Open Bug 1119140 Opened 5 years ago Updated 4 years ago

ASSERTION: aElement should be the element and not the pseudo-element: 'pseudoType == nsCSSPseudoElements::ePseudo_NotPseudoElement || !elementForAnimation->GetPrimaryFrame() || elementForAnimation->GetPrimaryFrame()->StyleContext()-> GetPseudoType() == ns

Categories

(Core :: CSS Parsing and Computation, defect)

x86
macOS
defect
Not set

Tracking

()

People

(Reporter: cpeterson, Unassigned, NeedInfo)

References

Details

(Keywords: assertion, reproducible)

STR:
1. In a debug build, load http://issuu.com/iamacreativ/docs/trashart

RESULT:
NS_ASSERTION failures!

[Child 19455] ###!!! 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 /Users/chris/Code/mozilla/inbound/layout/style/nsStyleSet.cpp, line 1634

[Child 19455] ###!!! 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 /Users/chris/Code/mozilla/inbound/layout/style/nsStyleSet.cpp, line 1634
The assert we're hitting is this one in ResolveStyleWithReplacement:

1629        NS_ASSERTION(pseudoType == nsCSSPseudoElements::ePseudo_NotPseudoElement ||
1630                     !elementForAnimation->GetPrimaryFrame() ||
1631                     elementForAnimation->GetPrimaryFrame()->StyleContext()->
1632                         GetPseudoType() ==
1633                       nsCSSPseudoElements::ePseudo_NotPseudoElement,

In our case, elementForAnimation is a <nav> styled with "display:table".  pseudoType is ePseudo_before because we're restyling its ::before.  But the <nav> has a frame, and elementForAnimation->GetPrimaryFrame()->StyleContext()->GetPseudoType() is not ePseudo_NotPseudoElement, because the primary frame is the table outer frame.  So its pseudo type is ePseudo_AnonBox.

I _think_ there's no functional bug here, just a bug in the assert.

Do we have any sort of generic mechanism for getting the "main style" frame, which is what we really want here?  nsComputedDOMStyle just does an explicit check for table-outer and gets its first child....
Flags: needinfo?(dbaron)
Just hit the same:

ASSERTION: aElement should be the element and not the pseudo-element: 'pseudoType == nsCSSPseudoElements::ePseudo_NotPseudoElement || !elementForAnimation->GetPrimaryFrame() || elementForAnimation->GetPrimaryFrame()->StyleContext()-> GetPseudoType() == nsCSSPseudoElements::ePseudo_NotPseudoElement', f
ile /var/tmp/portage/www-client/seamonkey-2.39/work/seamonkey-2.39/mozilla/layout/style/nsStyleSet.cpp, line 1710


with

http://ryanairemail.com/r/?id=hc0fbc03,4c51f79,4c549e2&p1=%40baYCAEUrNLGQCNP65pCHeA%3D%3D
You need to log in before you can comment on or make changes to this bug.