Add ChromeOnly CSSStyleRule::querySelectorAll
Categories
(DevTools :: Inspector: Rules, task)
Tracking
(firefox127 fixed)
| Tracking | Status | |
|---|---|---|
| firefox127 | --- | fixed |
People
(Reporter: nchevobbe, Assigned: nchevobbe)
References
Details
Attachments
(1 file)
|
48 bytes,
text/x-phabricator-request
|
Details |
This will take a root node, and will return the elements inside the root node that match the rule's selectors
This way, we won't have to serialize the rule (desugared) selectorText which can be expensive
| Assignee | ||
Comment 1•2 years ago
|
||
For the selector highlighter, we were retrieving the desugared selector of each
displayed rule, and using the selector text in querySelectorAll to retrieve the
elements matching the rule.
This can be very expensive, especially for deeply nested rule, for a feature that
might not even be used.
This patch is adding a method which takes a root node, and will return the
elements inside the root node that match the rule's selectors.
We're only exposing the method that existed in glue.rs to get the SelectorList
of a given Rule, and call Servo_SelectorList_QueryAll with it to get our NodeList.
A test file is added to ensure this works as expected.
Comment 3•2 years ago
|
||
| bugherder | ||
Description
•