Selaa lähdekoodia

LibWeb: Use correct cache key for pseudo elements

We were incorrectly caching both ::before and ::after pseudo elements
with the ::before key.

This regressed in 1ab7a8e0dbb5ee5195ab67c7c3f81c7f9f5f3f02.
Andreas Kling 2 vuotta sitten
vanhempi
commit
82df793d5d
1 muutettua tiedostoa jossa 1 lisäystä ja 1 poistoa
  1. 1 1
      Userland/Libraries/LibWeb/Layout/TreeBuilder.cpp

+ 1 - 1
Userland/Libraries/LibWeb/Layout/TreeBuilder.cpp

@@ -172,7 +172,7 @@ void TreeBuilder::create_pseudo_element_if_needed(DOM::Element& element, CSS::Se
         TODO();
     }
 
-    element.set_pseudo_element_node({}, CSS::Selector::PseudoElement::Before, pseudo_element_node);
+    element.set_pseudo_element_node({}, pseudo_element, pseudo_element_node);
     insert_node_into_inline_or_block_ancestor(*pseudo_element_node, pseudo_element_display, mode);
 }