mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-09-07 10:06:03 +00:00
LibWeb: Match styles for pseudo-elements
Since each selector can only have zero or one pseudo-element, we match against it as a separate step, before matching the rest of the selector. This should be faster, but mostly I did this because I could not figure out how else to stop selectors without a pseudo-element from matching the pseudo-element, eg so `.foo` styles don't affect `.foo::before`.
This commit is contained in:
parent
caef4ec157
commit
7eb7396f8b
Notes:
sideshowbarker
2024-07-17 18:17:54 +09:00
Author: https://github.com/AtkinsSJ
Commit: 7eb7396f8b
Pull-request: https://github.com/SerenityOS/serenity/pull/12753
6 changed files with 86 additions and 49 deletions
|
@ -11,6 +11,6 @@
|
|||
|
||||
namespace Web::SelectorEngine {
|
||||
|
||||
bool matches(CSS::Selector const&, DOM::Element const&);
|
||||
bool matches(CSS::Selector const&, DOM::Element const&, Optional<CSS::Selector::PseudoElement> = {});
|
||||
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue