Closed
Bug 1428982
Opened 6 years ago
Closed 6 years ago
Skip the rules of anonymous boxes that use something other than a universal selector
Categories
(Core :: CSS Parsing and Computation, enhancement)
Core
CSS Parsing and Computation
Tracking
()
RESOLVED
WONTFIX
People
(Reporter: kuoe0.tw, Assigned: kuoe0.tw)
Details
Attachments
(1 file)
In [1], Firefox crashes when there is any rule of an anonymous box that uses something other than a universal selector. It would be better to skip the rule in order to prevent the crash. [1]: https://searchfox.org/mozilla-central/rev/cf149b7b63ff97023e28723167725e38cf5df757/servo/components/style/stylist.rs#2020
Comment hidden (mozreview-request) |
Assignee | ||
Updated•6 years ago
|
Assignee: nobody → kuoe0
Assignee | ||
Updated•6 years ago
|
Attachment #8940986 -
Flags: review?(cam)
Comment 2•6 years ago
|
||
I think it's acceptable to crash given it's a debug-only assertion, fwiw.
Comment 3•6 years ago
|
||
I think ideally the check would be done during CSS parsing (that's where the old style system does it, and it drops the rule and outputs a PEAnonBoxNotAlone error to the console). But that seems slightly annoying to thread through the selectors code. To me it seems on par with specifying an unknown pseudo-element. Crashing is also probably not helpful for fuzzers, which like to generate randomized style sheet input to use in debug builds.
Comment 4•6 years ago
|
||
(In reply to Cameron McCormack (:heycam) from comment #3) > Crashing is also probably not helpful for > fuzzers, which like to generate randomized style sheet input to use in debug > builds. Yeah, that's fair, though fuzzers can't fuzz UA sheets, and we don't parse these pseudos in other sheets, so it's impossible for them to hit this assertion AIUI.
Comment 5•6 years ago
|
||
mozreview-review |
Comment on attachment 8940986 [details] Bug 1428982 - Skip the rules of anonymous boxes that use something other than a universal selector. https://reviewboard.mozilla.org/r/211260/#review217430
Attachment #8940986 -
Flags: review?(cam) → review+
Assignee | ||
Comment 6•6 years ago
|
||
I also agree with Emilio on the debug-only. And in my opinion, I think the debug-only crash is helpful for developers to notice that they write some wrong rules, because we can know which line causes the crash in the crash log. If we just skip the rules, it would be more difficult for developers to know why the rules are not working. So, I decide to close this bug for now.
Status: NEW → RESOLVED
Closed: 6 years ago
Resolution: --- → WONTFIX
You need to log in
before you can comment on or make changes to this bug.
Description
•