mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
When re-resolving style, re-resolve root in undisplayed map too. (Bug 473042) r+sr=bzbarsky
This commit is contained in:
parent
a59b1cf8db
commit
54c0fed0d2
@ -271,6 +271,10 @@ public:
|
||||
nsIFrame* GetRootElementStyleFrame() { return mRootElementStyleFrame; }
|
||||
nsIFrame* GetPageSequenceFrame() { return mPageSequenceFrame; }
|
||||
|
||||
// Get the frame that is the parent of the root element.
|
||||
nsIFrame* GetDocElementContainingBlock()
|
||||
{ return mDocElementContainingBlock; }
|
||||
|
||||
private:
|
||||
|
||||
nsresult ReconstructDocElementHierarchyInternal();
|
||||
|
@ -1312,10 +1312,28 @@ nsFrameManager::ReResolveStyleContext(nsPresContext *aPresContext,
|
||||
}
|
||||
|
||||
// now look for undisplayed child content and pseudos
|
||||
if (!pseudoTag && localContent && mUndisplayedMap) {
|
||||
|
||||
// When the root element is display:none, we still construct *some*
|
||||
// frames that have the root element as their mContent, down to the
|
||||
// DocElementContainingBlock.
|
||||
PRBool checkUndisplayed;
|
||||
nsIContent *undisplayedParent;
|
||||
if (pseudoTag) {
|
||||
checkUndisplayed = aFrame == mPresShell->FrameConstructor()->
|
||||
GetDocElementContainingBlock();
|
||||
undisplayedParent = nsnull;
|
||||
} else {
|
||||
checkUndisplayed = !!localContent;
|
||||
undisplayedParent = localContent;
|
||||
}
|
||||
if (checkUndisplayed && mUndisplayedMap) {
|
||||
for (UndisplayedNode* undisplayed =
|
||||
mUndisplayedMap->GetFirstNode(localContent);
|
||||
mUndisplayedMap->GetFirstNode(undisplayedParent);
|
||||
undisplayed; undisplayed = undisplayed->mNext) {
|
||||
NS_ASSERTION(undisplayedParent ||
|
||||
undisplayed->mContent ==
|
||||
mPresShell->GetDocument()->GetRootContent(),
|
||||
"undisplayed node child of null must be root");
|
||||
nsRefPtr<nsStyleContext> undisplayedContext;
|
||||
nsIAtom* const undisplayedPseudoTag = undisplayed->mStyle->GetPseudoType();
|
||||
if (!undisplayedPseudoTag) { // child content
|
||||
|
Loading…
Reference in New Issue
Block a user