mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 985303. Part 1: Assert that nsViews are only associated with a specific, limited set of frame types. r=dbaron
--HG-- extra : rebase_source : 80ce9f2e4841b831fd37acf2b89d4ff350762ab8
This commit is contained in:
parent
84543bbdaa
commit
5ceb341697
@ -4478,6 +4478,17 @@ nsIFrame::SetView(nsView* aView)
|
|||||||
if (aView) {
|
if (aView) {
|
||||||
aView->SetFrame(this);
|
aView->SetFrame(this);
|
||||||
|
|
||||||
|
#ifdef DEBUG
|
||||||
|
nsIAtom* frameType = GetType();
|
||||||
|
NS_ASSERTION(frameType == nsGkAtoms::scrollFrame ||
|
||||||
|
frameType == nsGkAtoms::subDocumentFrame ||
|
||||||
|
frameType == nsGkAtoms::listControlFrame ||
|
||||||
|
frameType == nsGkAtoms::objectFrame ||
|
||||||
|
frameType == nsGkAtoms::viewportFrame ||
|
||||||
|
frameType == nsGkAtoms::menuPopupFrame,
|
||||||
|
"Only specific frame types can have an nsView");
|
||||||
|
#endif
|
||||||
|
|
||||||
// Set a property on the frame
|
// Set a property on the frame
|
||||||
Properties().Set(ViewProperty(), aView);
|
Properties().Set(ViewProperty(), aView);
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user