Closed Bug 1223694 Opened 9 years ago Closed 9 years ago

"Assertion failure: mStyleScopes.Contains(cur)"

Categories

(Core :: CSS Parsing and Computation, defect)

defect
Not set
critical

Tracking

()

RESOLVED FIXED
mozilla45
Tracking Status
firefox45 --- fixed

People

(Reporter: jruderman, Assigned: heycam)

References

Details

(Keywords: assertion, testcase)

Attachments

(3 files)

Attached file testcase (deleted) —
Assertion failure: mStyleScopes.Contains(cur), at layout/style/nsCSSRuleProcessor.cpp:4132
Attached file stack (deleted) —
We're creating a <style scoped> as a child of the document element. The document element has native anonymous content -- the <scrollbar>, which we're restyling). The <scrollbar> doesn't have the IsElementInStyleScope flag set. Thus when we call InitStyleScopes: https://dxr.mozilla.org/mozilla-central/rev/84a7cf29f4f14c9b359db2f7f19c0abd6a8e178e/layout/style/nsStyleSet.cpp#1339 we think we can skip looking up to find the ancestors that are IsElementInStyleScope(), and we assert that <html> isn't in our TreeMatchContext::mStyleScopes. Since document style sheets shouldn't apply to native anonymous content anyway, I think we can just skip the assertion if aElement->IsInNativeAnonymousSubtree().
Attached patch patch (deleted) — Splinter Review
Assignee: nobody → cam
Status: NEW → ASSIGNED
Attachment #8686338 - Flags: review?(dbaron)
Attachment #8686338 - Flags: review?(dbaron) → review+
Status: ASSIGNED → RESOLVED
Closed: 9 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla45
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: