Closed
Bug 1399132
Opened 7 years ago
Closed 7 years ago
selectorText reports `**` when it should be `* + *` in Stylo
Categories
(Core :: CSS Parsing and Computation, defect)
Tracking
()
RESOLVED
DUPLICATE
of bug 1391169
People
(Reporter: me, Unassigned)
Details
User Agent: Mozilla/5.0 (X11; Linux x86_64; rv:56.0) Gecko/20100101 Firefox/56.0 Build ID: 20170808170225 Steps to reproduce: In my CSS selector rules, having the "* + *" CSS selector behaves differently in FF56 To reproduce, take the simple CSS and JS files https://pastebin.com/uNiJURfM index.html https://pastebin.com/Qs7QLjCs test.css https://pastebin.com/QDu9dmdS test.js Actual results: In Firefox 56, the console contains .foo > ** .foo Expected results: In Firefox 55 (or Chrome), the console contains .foo > * + * .foo The rule ** is not a valid selector.
Updated•7 years ago
|
Component: Untriaged → Developer Tools: Console
Comment 1•7 years ago
|
||
I don't see `.foo > **` in the console on 56 or 57 using this page (the test case from the STR in a data URI): data:text/html,<html><style>.foo {margin: 42px;}.foo > * + * {margin-left: 4px;}</style><script>window.onload = function() { var sheets = document.styleSheets;for(var i = sheets.length-1; i >= 0 ; i--) {var rules = sheets[i].cssRules;for(var r = rules.length-1; r >= 0; r--) {console.log(rules[r].selectorText);}} }</script></html> I see `.foo > * + *` as expected, am I missing something?
Flags: needinfo?(me)
Reporter | ||
Comment 2•7 years ago
|
||
You are right, I just tried with a fresh profile and did not get the issue either. Sorry, I guess it is one of my extension, I will investigate.
Status: UNCONFIRMED → RESOLVED
Closed: 7 years ago
Flags: needinfo?(me)
Resolution: --- → INVALID
Comment 3•7 years ago
|
||
(In reply to Martin Trigaux from comment #2) > You are right, I just tried with a fresh profile and did not get the issue > either. > Sorry, I guess it is one of my extension, I will investigate. Actually, I just figured it out - this happens with Stylo enabled (layout.css.servo.enabled). Ryan, it looks like the selectorText is wrong in this case with stylo (see Comment 1).
Flags: needinfo?(jryans)
Updated•7 years ago
|
Status: RESOLVED → UNCONFIRMED
Component: Developer Tools: Console → CSS Parsing and Computation
Product: Firefox → Core
Resolution: INVALID → ---
Summary: cssRules call concatenate * selectors → cssRules call concatenate * selectors in Stylo
Updated•7 years ago
|
Summary: cssRules call concatenate * selectors in Stylo → selectorText reports `**` when it should be `* + *` in Stylo
(In reply to Brian Grinstead [:bgrins] from comment #3) > (In reply to Martin Trigaux from comment #2) > > You are right, I just tried with a fresh profile and did not get the issue > > either. > > Sorry, I guess it is one of my extension, I will investigate. > > Actually, I just figured it out - this happens with Stylo enabled > (layout.css.servo.enabled). Ryan, it looks like the selectorText is wrong > in this case with stylo (see Comment 1). Yes, this sounds like Stylo bug 1391169. It should be fixed in 57, but it wasn't uplifted to 56. The test case from comment 1 appears to work in 57 with Stylo.
Status: UNCONFIRMED → RESOLVED
Closed: 7 years ago → 7 years ago
Flags: needinfo?(jryans)
Resolution: --- → DUPLICATE
Comment 6•7 years ago
|
||
(In reply to J. Ryan Stinnett [:jryans] (use ni?) from comment #4) > (In reply to Brian Grinstead [:bgrins] from comment #3) > > (In reply to Martin Trigaux from comment #2) > > > You are right, I just tried with a fresh profile and did not get the issue > > > either. > > > Sorry, I guess it is one of my extension, I will investigate. > > > > Actually, I just figured it out - this happens with Stylo enabled > > (layout.css.servo.enabled). Ryan, it looks like the selectorText is wrong > > in this case with stylo (see Comment 1). > > Yes, this sounds like Stylo bug 1391169. It should be fixed in 57, but it > wasn't uplifted to 56. > > The test case from comment 1 appears to work in 57 with Stylo. Yes you are right, I confirmed the test case works in 57. Thanks for filing the bug anyway, Martin!
Reporter | ||
Comment 7•7 years ago
|
||
Thank you for the quick investigation. Will this be backported to 56 or should I disable servo until upgrading to 57?
(In reply to Martin Trigaux from comment #7) > Thank you for the quick investigation. > Will this be backported to 56 or should I disable servo until upgrading to > 57? There are no plans to enable Stylo by default in 56, so it's effectively an "early version" that may have quirks like this. I would suggest either (a) switching to Nightly if you'd like to keep using Stylo with fixes for bugs like this or (b) disabling Stylo for now if you'd like to stay on Beta (currently 56).
You need to log in
before you can comment on or make changes to this bug.
Description
•