Bug 851514. Make sure that we add the parent frame before its kids when constructing a scrollable block, so that things will appear in the right order in fixed-pos lists. r=dbaron
This commit is contained in:
@@ -4364,6 +4364,10 @@ nsCSSFrameConstructor::ConstructScrollableBlock(nsFrameConstructorState& aState,
|
||||
nsIFrame* scrolledFrame =
|
||||
NS_NewBlockFormattingContext(mPresShell, styleContext);
|
||||
|
||||
// Make sure to AddChild before we call ConstructBlock so that we
|
||||
// end up before our descendants in fixed-pos lists as needed.
|
||||
aState.AddChild(newFrame, aFrameItems, content, styleContext, aParentFrame);
|
||||
|
||||
nsFrameItems blockItem;
|
||||
ConstructBlock(aState, scrolledContentStyle->StyleDisplay(), content,
|
||||
newFrame, newFrame, scrolledContentStyle,
|
||||
@@ -4375,7 +4379,6 @@ nsCSSFrameConstructor::ConstructScrollableBlock(nsFrameConstructorState& aState,
|
||||
"Scrollframe's frameItems should be exactly the scrolled frame");
|
||||
FinishBuildingScrollFrame(newFrame, scrolledFrame);
|
||||
|
||||
aState.AddChild(newFrame, aFrameItems, content, styleContext, aParentFrame);
|
||||
return newFrame;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user