mirror of
https://github.com/fergalmoran/ladybird.git
synced 2026-01-04 15:45:25 +00:00
LibWeb: Ensure inline CSS loaded from HTML is ElementInline
This commit changes inline CSS loaded from style attributes of HTML elements to be loaded as CSS::ElementInlineCSSStyleDeclaration instead of CSS::CSSStyleDeclaration, fixing a crash when the style of that element is changed from JavaScript.
This commit is contained in:
committed by
Andreas Kling
parent
afcd053b68
commit
0fdfdbed9f
@@ -32,6 +32,12 @@ ElementInlineCSSStyleDeclaration::ElementInlineCSSStyleDeclaration(DOM::Element&
|
||||
{
|
||||
}
|
||||
|
||||
ElementInlineCSSStyleDeclaration::ElementInlineCSSStyleDeclaration(DOM::Element& element, CSSStyleDeclaration& declaration)
|
||||
: CSSStyleDeclaration(move(declaration.m_properties), move(declaration.m_custom_properties))
|
||||
, m_element(element.make_weak_ptr<DOM::Element>())
|
||||
{
|
||||
}
|
||||
|
||||
ElementInlineCSSStyleDeclaration::~ElementInlineCSSStyleDeclaration()
|
||||
{
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user