LibWeb: Correctly handle serialization of PseudoElements

Previusly the implementation only was serializing PseudoElements if they
were the last element in the CompoundSelector. This caused bugs on
Javascript code that referenced their selectorText, where it would be
wrong.
This commit is contained in:
Luiz 2025-06-22 21:12:25 -03:00 committed by Sam Atkins
commit da14e072b7
Notes: github-actions[bot] 2025-06-24 11:46:10 +00:00
3 changed files with 23 additions and 4 deletions

View file

@ -0,0 +1,17 @@
<!DOCTYPE html>
<style>
::-webkit-scrollbar-thumb {
background: #28bea5;
}
::-webkit-scrollbar-thumb:hover {
background: #28bea5;
}
</style>
<script src="../include.js"></script>
<script>
test(() => {
for (let rule of document.styleSheets[0].cssRules) {
println(rule.selectorText);
}
});
</script>