Firefox crashes on :nth-child():before() selector combination
Categories
(Core :: CSS Parsing and Computation, defect)
Tracking
()
| Tracking | Status | |
|---|---|---|
| firefox-esr102 | --- | unaffected |
| firefox113 | --- | wontfix |
| firefox114 | --- | verified |
| firefox115 | --- | verified |
People
(Reporter: schellmax01, Assigned: emilio)
References
(Regression)
Details
(Keywords: regression)
Crash Data
Attachments
(3 files)
Steps to reproduce:
using the following css selector:
div:nth-child(odd of .b):before{content:'x'}
for an online demonstration, see https://codepen.io/schellmax01/pen/RwevJqv
Actual results:
firefox crashes
Expected results:
firefox should not crash :)
Comment 1•2 years ago
|
||
The Bugbug bot thinks this bug should belong to the 'Core::CSS Parsing and Computation' component, and is moving the bug to that component. Please correct in case you think the bot is wrong.
Updated•2 years ago
|
Comment 2•2 years ago
|
||
Comment 3•2 years ago
|
||
Updated•2 years ago
|
Updated•2 years ago
|
Comment 4•2 years ago
|
||
With layout.css.nth-child-of.enabled= True,
Bug 1808228 - Implement selector matching for :nth-child(An+B of selector list) and :nth-last-child(An+B of selector list) r=emilio
Since we have been using a single hash map to cache all :nth-child
indices (with no selector list), each different selector will need its
own cache.
As a side note, this patch does not address invalidation.
Differential Revision: https://phabricator.services.mozilla.com/D166266
Comment 5•2 years ago
|
||
Set release status flags based on info from the regressing bug 1808228
| Assignee | ||
Updated•2 years ago
|
| Assignee | ||
Comment 6•2 years ago
|
||
| Assignee | ||
Comment 7•2 years ago
|
||
If this happens again, it might be worth not matching rather than
potentially crashing. Though I guess crashing is a very good way getting
it reported soon...
| Assignee | ||
Comment 8•2 years ago
|
||
Comment on attachment 9335626 [details]
Bug 1834717 - Properly increase the nesting level when matching :nth-child(of) selectors. r=zrhoffman,#style,#layout
Beta/Release Uplift Approval Request
- User impact if declined: Trivial crash fix.
- Is this code covered by automated tests?: Yes
- Has the fix been verified in Nightly?: No
- Needs manual test from QE?: Yes
- If yes, steps to reproduce: open test-case.
- List of other uplifts needed: none
- Risk to taking this patch: Low
- Why is the change risky/not risky? (and alternatives if risky): Trivial fix, kinda sad that we didn't have coverage for this case o.O
- String changes made/needed: none
- Is Android affected?: Yes
| Assignee | ||
Updated•2 years ago
|
Comment 10•2 years ago
|
||
Comment 12•2 years ago
|
||
| bugherder | ||
Comment 14•2 years ago
|
||
| bugherder | ||
Updated•2 years ago
|
Comment 15•2 years ago
|
||
Emilio, two patches landed on mozilla-central but you only requested uplift to one of them, is that intended? Thanks
| Assignee | ||
Comment 16•2 years ago
|
||
Yeah the second is basically a mitigation. The first is enough to fix the crash.
Comment 17•2 years ago
|
||
Comment on attachment 9335626 [details]
Bug 1834717 - Properly increase the nesting level when matching :nth-child(of) selectors. r=zrhoffman,#style,#layout
Approved for 114 beta 9, thanks.
Comment 18•2 years ago
|
||
| bugherder uplift | ||
Comment 19•2 years ago
|
||
Verified as fixed on Windows 10 x64, macOS 11.6.
Updated•2 years ago
|
Comment 20•2 years ago
|
||
Verified as fixed on Windows 10 x64, macOS 11.6 and on Ubuntu 20.04 x64.
Description
•