mirror of
https://github.com/RGBCube/serenity
synced 2025-05-31 13:28:11 +00:00
LibWeb: Store custom properties in CSSStyleDeclaration
Keep them around when parsing and store them in the CSSStyleDeclaration when done.
This commit is contained in:
parent
f0c6160362
commit
0d7169b91a
3 changed files with 32 additions and 13 deletions
|
@ -9,8 +9,9 @@
|
|||
|
||||
namespace Web::CSS {
|
||||
|
||||
CSSStyleDeclaration::CSSStyleDeclaration(Vector<StyleProperty>&& properties)
|
||||
CSSStyleDeclaration::CSSStyleDeclaration(Vector<StyleProperty>&& properties, HashMap<String, StyleProperty>&& custom_properties)
|
||||
: m_properties(move(properties))
|
||||
, m_custom_properties(move(custom_properties))
|
||||
{
|
||||
}
|
||||
|
||||
|
@ -26,7 +27,7 @@ String CSSStyleDeclaration::item(size_t index) const
|
|||
}
|
||||
|
||||
ElementInlineCSSStyleDeclaration::ElementInlineCSSStyleDeclaration(DOM::Element& element)
|
||||
: CSSStyleDeclaration({})
|
||||
: CSSStyleDeclaration({}, {})
|
||||
, m_element(element.make_weak_ptr<DOM::Element>())
|
||||
{
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue