Browse Source

LibWeb: Mark element style dirty on style/id attribute change too

Andreas Kling 4 năm trước cách đây
mục cha
commit
59afcddcfe
1 tập tin đã thay đổi với 3 bổ sung0 xóa
  1. 3 0
      Libraries/LibWeb/DOM/Element.cpp

+ 3 - 0
Libraries/LibWeb/DOM/Element.cpp

@@ -164,6 +164,9 @@ void Element::parse_attribute(const FlyString& name, const String& value)
         set_needs_style_update(true);
     } else if (name == HTML::AttributeNames::style) {
         m_inline_style = parse_css_declaration(CSS::ParsingContext(document()), value);
+        set_needs_style_update(true);
+    } else if (name == HTML::AttributeNames::id) {
+        set_needs_style_update(true);
     }
 }