Stylo Assertion failure: mSource.IsGeckoRuleNode(), at layout/style/nsStyleContext.h:325

RESOLVED FIXED in Firefox 51

Status

()

Core
Layout
RESOLVED FIXED
2 years ago
2 years ago

People

(Reporter: cpeterson, Assigned: emilio)

Tracking

(Blocks: 2 bugs, {assertion})

unspecified
mozilla51
assertion
Points:
---
Dependency tree / graph

Firefox Tracking Flags

(firefox51 fixed)

Details

(Whiteboard: [stylo:m2])

Attachments

(2 attachments, 1 obsolete attachment)

(Reporter)

Description

2 years ago
To reproduce, run `./mach reftest --disable-e10s <filename>` or replace <filename> with `layout/reftest/reftest.list`.

TEST-UNEXPECTED-FAIL | file:///home/shinglyu/workspace/stylo/gecko-dev/layout/reftests/selection/pseudo-element-of-native-anonymous.html | application terminated with exit code 11
REFTEST PROCESS-CRASH | file:///home/shinglyu/workspace/stylo/gecko-dev/layout/reftests/selection/pseudo-element-of-native-anonymous.html | application crashed [None]

Assertion failure: mSource.IsGeckoRuleNode(), at /files/mozilla/stylo/bb/gecko/layout/style/nsStyleContext.h:325
(Assignee)

Comment 1

2 years ago
This boils down to a call to nsRuleNode::HasAuthorSpecifiedValues while looking for the selection style in nsTextFrame.cpp.

I have a patch to move the error we raise in the PresShell to nsRuleNode.
(Assignee)

Comment 2

2 years ago
Created attachment 8785003 [details] [diff] [review]
Bug 1292281: Convert the error from nsPresShell::HasAuthorSpecifiedRules in a warning in nsRuleNode.

This function, btw, explains why I thought we were missing pseudo-elements.

Returning true here unconditionally makes us not style the element with the native style, which makes it look raw when no styles are used.
Assignee: nobody → ecoal95
Status: NEW → ASSIGNED
Attachment #8785003 - Flags: review?(bobbyholley)
(Assignee)

Updated

2 years ago
See Also: → bug 1296149
(Assignee)

Comment 3

2 years ago
Created attachment 8785014 [details] [diff] [review]
Convert the error from nsPresContext::HasAuthorSpecifiedRules in a warning in nsRuleNode.

The commit message said nsPresShell instead of nsPresContext, sorry.
Attachment #8785003 - Attachment is obsolete: true
Attachment #8785003 - Flags: review?(bobbyholley)
Attachment #8785014 - Flags: review?(bobbyholley)
(Assignee)

Comment 4

2 years ago
Created attachment 8785015 [details] [diff] [review]
Devirtualize nsPresContext::HasAuthorSpecifiedRules

Nobody ever overrides it.
Attachment #8785015 - Flags: review?(bobbyholley)
Attachment #8785015 - Flags: review?(bobbyholley) → review+
Attachment #8785014 - Flags: review?(bobbyholley) → review+

Comment 5

2 years ago
Pushed by ecoal95@gmail.com:
https://hg.mozilla.org/integration/mozilla-inbound/rev/9f9fc14a57c1
Convert the error from nsPresContext::HasAuthorSpecifiedRules in a warning in nsRuleNode. r=bholley
https://hg.mozilla.org/integration/mozilla-inbound/rev/0d599bb5b2dd
Devirtualize nsPresContext::HasAuthorSpecifiedRules. r=bholley

Comment 6

2 years ago
bugherder
https://hg.mozilla.org/mozilla-central/rev/9f9fc14a57c1
https://hg.mozilla.org/mozilla-central/rev/0d599bb5b2dd
Status: ASSIGNED → RESOLVED
Last Resolved: 2 years ago
status-firefox51: --- → fixed
Resolution: --- → FIXED
Target Milestone: --- → mozilla51
You need to log in before you can comment on or make changes to this bug.