mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-07-28 19:59:17 +00:00
LibWeb: Use Selectors instead of a String for :not() selectors
Rather than parsing the selector every time we want to check it, we now parse it once at the beginning. A bonus effect of this is that we now support a selector list in :not(), instead of just a single selector, though only when using the new parser.
This commit is contained in:
parent
776b1f4548
commit
ffc81cbfad
Notes:
sideshowbarker
2024-07-18 09:04:11 +09:00
Author: https://github.com/AtkinsSJ
Commit: ffc81cbfad
Pull-request: https://github.com/SerenityOS/serenity/pull/8723
Reviewed-by: https://github.com/kleinesfilmroellchen
8 changed files with 40 additions and 19 deletions
20
Base/res/html/misc/not-selector.html
Normal file
20
Base/res/html/misc/not-selector.html
Normal file
|
@ -0,0 +1,20 @@
|
|||
<html>
|
||||
<head>
|
||||
<title>:only-child test</title>
|
||||
<style>
|
||||
div {
|
||||
background: yellow;
|
||||
}
|
||||
|
||||
div:not(div div) {
|
||||
background: lime;
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
<div>I am not a descendant and should be green.</div>
|
||||
<div>
|
||||
<div>I am a descendant and should be yellow.</div>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
|
@ -109,6 +109,7 @@
|
|||
<li><a href="nth-last-child.html">:nth-last-child</a></li>
|
||||
<li><a href="empty.html">:empty</a></li>
|
||||
<li><a href="root.html">:root</a></li>
|
||||
<li><a href="not-selector.html">:not</a></li>
|
||||
<li><a href="form.html">form</a></li>
|
||||
<li><a href="borders.html">borders</a></li>
|
||||
<li><a href="css.html">css</a></li>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue