mirror of
https://github.com/classilla/tenfourfox.git
synced 2024-06-06 22:29:34 +00:00
M1338678
This commit is contained in:
parent
bd73711647
commit
99bece105f
|
@ -6727,8 +6727,11 @@ nsCSSFrameConstructor::MaybeConstructLazily(Operation aOperation,
|
||||||
nsIContent* aContainer,
|
nsIContent* aContainer,
|
||||||
nsIContent* aChild)
|
nsIContent* aChild)
|
||||||
{
|
{
|
||||||
|
// XXXmats no lazy frames for display:contents direct descendants yet
|
||||||
|
// (bug 979782).
|
||||||
if (mPresShell->GetPresContext()->IsChrome() || !aContainer ||
|
if (mPresShell->GetPresContext()->IsChrome() || !aContainer ||
|
||||||
aContainer->IsInNativeAnonymousSubtree() || aContainer->IsXULElement()) {
|
aContainer->IsInNativeAnonymousSubtree() || aContainer->IsXULElement() ||
|
||||||
|
GetDisplayContentsStyleFor(aContainer)) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -6756,12 +6759,17 @@ nsCSSFrameConstructor::MaybeConstructLazily(Operation aOperation,
|
||||||
|
|
||||||
// Walk up the tree setting the NODE_DESCENDANTS_NEED_FRAMES bit as we go.
|
// Walk up the tree setting the NODE_DESCENDANTS_NEED_FRAMES bit as we go.
|
||||||
nsIContent* content = aContainer;
|
nsIContent* content = aContainer;
|
||||||
|
|
||||||
#ifdef DEBUG
|
#ifdef DEBUG
|
||||||
// If we hit a node with no primary frame, or the NODE_NEEDS_FRAME bit set
|
// If we hit a node with no primary frame, or the NODE_NEEDS_FRAME bit set
|
||||||
// we want to assert, but leaf frames that process their own children and may
|
// we want to assert, but leaf frames that process their own children and may
|
||||||
// ignore anonymous children (eg framesets) make this complicated. So we set
|
// ignore anonymous children (eg framesets) make this complicated. So we set
|
||||||
// these two booleans if we encounter these situations and unset them if we
|
// these two booleans if we encounter these situations and unset them if we
|
||||||
// hit a node with a leaf frame.
|
// hit a node with a leaf frame.
|
||||||
|
//
|
||||||
|
// Also, it's fine if one of the nodes without primary frame is a display:
|
||||||
|
// contents node except if it's the direct ancestor of the children we're
|
||||||
|
// recreating frames for.
|
||||||
bool noPrimaryFrame = false;
|
bool noPrimaryFrame = false;
|
||||||
bool needsFrameBitSet = false;
|
bool needsFrameBitSet = false;
|
||||||
#endif
|
#endif
|
||||||
|
@ -6771,17 +6779,14 @@ nsCSSFrameConstructor::MaybeConstructLazily(Operation aOperation,
|
||||||
if (content->GetPrimaryFrame() && content->GetPrimaryFrame()->IsLeaf()) {
|
if (content->GetPrimaryFrame() && content->GetPrimaryFrame()->IsLeaf()) {
|
||||||
noPrimaryFrame = needsFrameBitSet = false;
|
noPrimaryFrame = needsFrameBitSet = false;
|
||||||
}
|
}
|
||||||
if (!noPrimaryFrame && !content->GetPrimaryFrame()) {
|
if (!noPrimaryFrame && !content->GetPrimaryFrame() &&
|
||||||
|
!GetDisplayContentsStyleFor(content)) {
|
||||||
noPrimaryFrame = true;
|
noPrimaryFrame = true;
|
||||||
}
|
}
|
||||||
if (!needsFrameBitSet && content->HasFlag(NODE_NEEDS_FRAME)) {
|
if (!needsFrameBitSet && content->HasFlag(NODE_NEEDS_FRAME)) {
|
||||||
needsFrameBitSet = true;
|
needsFrameBitSet = true;
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
// XXXmats no lazy frames for display:contents descendants yet (bug 979782).
|
|
||||||
if (GetDisplayContentsStyleFor(content)) {
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
content->SetFlags(NODE_DESCENDANTS_NEED_FRAMES);
|
content->SetFlags(NODE_DESCENDANTS_NEED_FRAMES);
|
||||||
content = content->GetFlattenedTreeParent();
|
content = content->GetFlattenedTreeParent();
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue
Block a user