Closed Bug 1247865 Opened 8 years ago Closed 8 years ago

@font-face + table + :before/:after causes "ASSERTION: aElement should be the element and not the pseudo-element: 'pseudoType == nsCSSPseudoElements::ePseudo_NotPseudoElement || ...", e.g. at hellocasa.fr

Categories

(Core :: CSS Parsing and Computation, defect)

defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla47
Tracking Status
firefox47 --- fixed

People

(Reporter: dholbert, Assigned: dbaron)

References

()

Details

(Keywords: assertion)

Attachments

(3 files)

STR:
 1. Visit https://hellocasa.fr/ in a debug build.

ACTUAL RESULTS:
Several instances of this assertion during pageload:
{
###!!! ASSERTION: aElement should be the element and not the pseudo-element: 'pseudoType == nsCSSPseudoElements::ePseudo_NotPseudoElement || !elementForAnimation->GetPrimaryFrame() || elementForAnimation->GetPrimaryFrame()->StyleContext()-> GetPseudoType() == nsCSSPseudoElements::ePseudo_NotPseudoElement', file layout/style/nsStyleSet.cpp, line 1722
}

This assertion was added here for bug 996796, FWIW:
http://hg.mozilla.org/mozilla-central/diff/7ee0ebcf0602/layout/style/nsStyleSet.cpp#l1.48
Attached file testcase 1
Here's a reduced testcase that still triggers the assertion for me.
Summary: hellocasa.fr triggers "ASSERTION: aElement should be the element and not the pseudo-element: 'pseudoType == nsCSSPseudoElements::ePseudo_NotPseudoElement || ..." → @font-face + table + :before/:after causes "ASSERTION: aElement should be the element and not the pseudo-element: 'pseudoType == nsCSSPseudoElements::ePseudo_NotPseudoElement || ...", e.g. at hellocasa.fr
This is just a bug in the assertion expression; it needs to use nsLayoutUtils::GetStyleFrame to fix up table outer frames.
I confirmed locally that, without the following patch, the crashtest
harness does detect the single assertion.

Review commit: https://reviewboard.mozilla.org/r/34879/diff/#index_header
See other reviews: https://reviewboard.mozilla.org/r/34879/
Attachment #8719087 - Flags: review?(bbirtles)
Assignee: nobody → dbaron
Comment on attachment 8719087 [details]
MozReview Request: Bug 1247865 - Add crashtest for assertion.  r?birtles

https://reviewboard.mozilla.org/r/34879/#review31489
Attachment #8719087 - Flags: review?(bbirtles) → review+
Attachment #8719088 - Flags: review?(bbirtles) → review+
Comment on attachment 8719088 [details]
MozReview Request: Bug 1247865 - Fix assertion to handle restyling of a table::after.  r?birtles

https://reviewboard.mozilla.org/r/34881/#review31491
https://hg.mozilla.org/mozilla-central/rev/0b93057bf480
https://hg.mozilla.org/mozilla-central/rev/d8db1845736b
Status: NEW → RESOLVED
Closed: 8 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla47
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: