1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-25 08:37:34 +00:00

LibWeb: Implement CSS declaration block's "updating flag"

This flag is used to prevent reparsing the style attribute after it is
automatically updated after using the CSSOM API to mutate style.
This commit is contained in:
Andreas Kling 2022-04-11 16:56:52 +02:00
parent 66618a666b
commit a8afb883c1
4 changed files with 27 additions and 2 deletions

View file

@ -101,12 +101,17 @@ public:
DOM::Element* element() { return m_element.ptr(); }
const DOM::Element* element() const { return m_element.ptr(); }
bool is_updating() const { return m_updating; }
private:
explicit ElementInlineCSSStyleDeclaration(DOM::Element&, Vector<StyleProperty> properties, HashMap<String, StyleProperty> custom_properties);
virtual void update_style_attribute() override;
WeakPtr<DOM::Element> m_element;
// https://drafts.csswg.org/cssom/#cssstyledeclaration-updating-flag
bool m_updating { false };
};
}