mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-08-08 01:00:05 +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:
parent
afcd053b68
commit
0fdfdbed9f
Notes:
sideshowbarker
2024-07-18 05:39:57 +09:00
Author: https://github.com/DoubleNegation
Commit: 0fdfdbed9f
Pull-request: https://github.com/SerenityOS/serenity/pull/8952
Reviewed-by: https://github.com/awesomekling
3 changed files with 14 additions and 2 deletions
|
@ -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()
|
||||
{
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue