Closed Bug 590090 Opened 16 years ago Closed 16 years ago

Write a CSS selector parser for the new Style panel

Categories

(DevTools :: General, defect)

defect
Not set
normal

Tracking

(Not tracked)

VERIFIED FIXED

People

(Reporter: msucan, Assigned: msucan)

References

Details

(Whiteboard: [kd4b6] [Web-Console-Testday])

Currently we take each rule and we do rule.selectorText.split(",") to walk through each simple selector. This fails with selectors like: h2, :-moz-any(article, aside, nav, section) h1 { display: block; font-size: 1.5em; font-weight: bold; margin: .83em 0; } ... found in resource://gre-resources/html.css. We need to properly parse selectors and build an array of simple selectors - perhaps even a nested array of selectors.
Whiteboard: [kd4b6]
This is now fixed in bug 585565. We can mark this as FIXED or a DUPLICATE.
Status: NEW → ASSIGNED
We need to check that this patch takes into account "E ~ F" and nasty cases like E[foo~="bar"]
Assignee: nobody → mihai.sucan
No longer blocks: 585565
Depends on: 585565
Should we leave this open to catch the E[foo~="bar"] case?
Yeah, sure. We can consider this bug as part of the wider needs of selectors parsing we have. Bug 585565 includes its minimal code for making it work fine with UA stylesheets. When we get time to implement the selector parsing for specificity, then we can mark this as fixed.
Status: ASSIGNED → RESOLVED
Closed: 16 years ago
Resolution: --- → FIXED
Status: RESOLVED → REOPENED
Resolution: FIXED → ---
http://www.w3.org/TR/css3-selectors/#grammar says we don't need to worry about the whole ~ issue. It also defines "a, b" to be a selector_group and not a selector ;-) So in short since "a ~ b" is a selector and not a selector_group, then our current parser implementation is good, and we can close this bug. Disagreement?
The partial issue left over here is covered in Bug 592743. Closing this bug.
Status: REOPENED → RESOLVED
Closed: 16 years ago → 16 years ago
Resolution: --- → FIXED
Status: RESOLVED → VERIFIED
Whiteboard: [kd4b6] → [kd4b6] [Web-Console-Testday]
Product: Firefox → DevTools
You need to log in before you can comment on or make changes to this bug.