зеркало из https://github.com/mozilla/gecko-dev.git
Bug 455063. Make sure we don't lose track of our initial containing block. r+sr=roc
This commit is contained in:
Родитель
d25c8a9a25
Коммит
56de412294
|
@ -0,0 +1,6 @@
|
|||
<html>
|
||||
<body onload="document.documentElement.style.display = 'table'">
|
||||
<span><div></div></span>
|
||||
</body>
|
||||
|
||||
</html>
|
|
@ -0,0 +1,6 @@
|
|||
<html style="display:table">
|
||||
<body onload="document.documentElement.style.display = 'block'">
|
||||
<span><div></div></span>
|
||||
</body>
|
||||
|
||||
</html>
|
|
@ -0,0 +1,6 @@
|
|||
<html style="display:block;-moz-column-count:2;column-count:2;">
|
||||
<body>
|
||||
<span><div></div></span>
|
||||
</body>
|
||||
|
||||
</html>
|
|
@ -124,3 +124,6 @@ load 429088-2.html
|
|||
load 432752-1.svg
|
||||
load 433450-1.html
|
||||
load 444925-1.xul
|
||||
load 455063-1.html
|
||||
load 455063-2.html
|
||||
load 455063-3.html
|
||||
|
|
|
@ -3542,6 +3542,12 @@ nsCSSFrameConstructor::ConstructTableFrame(nsFrameConstructorState& aState,
|
|||
return rv;
|
||||
}
|
||||
|
||||
if (!mInitialContainingBlock) {
|
||||
// The frame we're constructing will be the initial containing block.
|
||||
// Set mInitialContainingBlock before processing children.
|
||||
mInitialContainingBlock = aNewOuterFrame;
|
||||
}
|
||||
|
||||
nsFrameItems childItems;
|
||||
rv = ProcessChildren(aState, aContent, aNewInnerFrame, PR_TRUE, childItems,
|
||||
PR_FALSE);
|
||||
|
@ -4297,6 +4303,9 @@ nsCSSFrameConstructor::ConstructDocElementFrame(nsFrameConstructorState& aState,
|
|||
// set the primary frame
|
||||
aState.mFrameManager->SetPrimaryFrameFor(aDocElement, contentFrame);
|
||||
|
||||
NS_ASSERTION(processChildren ? !mInitialContainingBlock :
|
||||
mInitialContainingBlock == contentFrame,
|
||||
"unexpected mInitialContainingBlock");
|
||||
mInitialContainingBlock = contentFrame;
|
||||
|
||||
// Figure out which frame has the main style for the document element,
|
||||
|
@ -7715,8 +7724,7 @@ nsCSSFrameConstructor::GetAbsoluteContainingBlock(nsIFrame* aFrame)
|
|||
if (frame->IsFrameOfType(nsIFrame::eMathML)) {
|
||||
// If it's mathml, bail out -- no absolute positioning out from inside
|
||||
// mathml frames. Note that we don't make this part of the loop
|
||||
// condition because of the mInitialContainingBlock stuff at the
|
||||
// end of this method...
|
||||
// condition because of the stuff at the end of this method...
|
||||
return nsnull;
|
||||
}
|
||||
|
||||
|
@ -12315,6 +12323,12 @@ nsCSSFrameConstructor::ConstructBlock(nsFrameConstructorState& aState,
|
|||
// See if we need to create a view, e.g. the frame is absolutely positioned
|
||||
nsHTMLContainerFrame::CreateViewForFrame(blockFrame, contentParent, PR_FALSE);
|
||||
|
||||
if (!mInitialContainingBlock) {
|
||||
// The frame we're constructing will be the initial containing block.
|
||||
// Set mInitialContainingBlock before processing children.
|
||||
mInitialContainingBlock = *aNewFrame;
|
||||
}
|
||||
|
||||
// We should make the outer frame be the absolute containing block,
|
||||
// if one is required. We have to do this because absolute
|
||||
// positioning must be computed with respect to the CSS dimensions
|
||||
|
|
Загрузка…
Ссылка в новой задаче