gecko-dev/layout/inspector
Nicolas Chevobbe 09fec812c0 Bug 1893923 - [devtools] Add ChromeOnly CSSStyleRule::querySelectorAll. r=layout-reviewers,emilio.
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.

Differential Revision: https://phabricator.services.mozilla.com/D208363
2024-04-29 06:43:23 +00:00
..
tests Bug 1893923 - [devtools] Add ChromeOnly CSSStyleRule::querySelectorAll. r=layout-reviewers,emilio. 2024-04-29 06:43:23 +00:00
inDeepTreeWalker.cpp Bug 1855134 - Move existing MOZ_TRY macros to a dedicated header file; r=glandium 2023-09-28 20:46:07 +00:00
inDeepTreeWalker.h Bug 1826517 - Simplify DevTools' walker. r=smaug,devtools-reviewers,nchevobbe 2023-04-10 11:18:38 +00:00
inIDeepTreeWalker.idl Bug 1825825 - Remove unused whatToShow option from devtools inspector walker. r=devtools-reviewers,devtools-backward-compat-reviewers,nchevobbe 2023-04-04 08:56:37 +00:00
inLayoutUtils.cpp
inLayoutUtils.h
InspectorCSSParser.cpp Bug 1887638 - [devtools] Expose CSS token value in InspectorCSSToken. r=emilio. 2024-04-15 17:14:43 +00:00
InspectorCSSParser.h Bug 1887638 - [devtools] Add InspectorCSSParser. r=emilio,devtools-reviewers,frontend-codestyle-reviewers,bomsy. 2024-04-15 17:14:42 +00:00
InspectorFontFace.cpp Bug 1832173 - Finish removing HasArcFFI. r=boris 2023-05-12 22:31:38 +00:00
InspectorFontFace.h
InspectorUtils.cpp Bug 1882964 - [devtools] Turn getRuleBodyTextOffsets into getRuleBodyText for easier unicode chars handling. r=layout-reviewers,devtools-reviewers,emilio,ochameau. 2024-04-08 08:37:14 +00:00
InspectorUtils.h Bug 1882964 - [devtools] Turn getRuleBodyTextOffsets into getRuleBodyText for easier unicode chars handling. r=layout-reviewers,devtools-reviewers,emilio,ochameau. 2024-04-08 08:37:14 +00:00
moz.build Bug 1887638 - [devtools] Add InspectorCSSParser. r=emilio,devtools-reviewers,frontend-codestyle-reviewers,bomsy. 2024-04-15 17:14:42 +00:00
ServoStyleRuleMap.cpp Bug 1889496 - Part 2: Implement CSSStartingStyleRule interface. r=webidl,firefox-style-system-reviewers,layout-reviewers,emilio 2024-04-05 21:03:07 +00:00
ServoStyleRuleMap.h Bug 1835062 - Make CSSStyleRule a GroupRule. r=smaug,dshin 2023-06-14 09:36:22 +00:00