Bug 1097499 part 3 - Add a separate anonbox for text nodes. r=heycam

MozReview-Commit-ID: 1GfoFEGhyka
This commit is contained in:
Xidorn Quan
2016-04-22 09:18:41 +10:00
parent 3dc0ea538e
commit 15df861e15
17 changed files with 76 additions and 44 deletions

View File

@@ -8330,7 +8330,7 @@ nsFrame::CorrectStyleParentFrame(nsIFrame* aProspectiveParent,
// Anon boxes are parented to their actual parent already, except
// for non-elements. Those should not be treated as an anon box.
if (aChildPseudo && aChildPseudo != nsCSSAnonBoxes::mozNonElement &&
if (aChildPseudo && !nsCSSAnonBoxes::IsNonElement(aChildPseudo) &&
nsCSSAnonBoxes::IsAnonBox(aChildPseudo)) {
NS_ASSERTION(aChildPseudo != nsCSSAnonBoxes::mozAnonymousBlock &&
aChildPseudo != nsCSSAnonBoxes::mozAnonymousPositionedBlock,