mirror of
https://github.com/RGBCube/serenity
synced 2025-07-26 08:57:34 +00:00
LibWeb: Clear element.style when the "style" attribute is removed
We were hanging on to element inline style, even after the style attribute was removed. This made inline style sticky and impossible to remove. This patch fixes that. :^)
This commit is contained in:
parent
485ef276bd
commit
2b7775118d
2 changed files with 11 additions and 1 deletions
|
@ -265,6 +265,16 @@ void Element::parse_attribute(const FlyString& name, const String& value)
|
|||
}
|
||||
}
|
||||
|
||||
void Element::did_remove_attribute(FlyString const& name)
|
||||
{
|
||||
if (name == HTML::AttributeNames::style) {
|
||||
if (m_inline_style) {
|
||||
m_inline_style = nullptr;
|
||||
set_needs_style_update(true);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
enum class RequiredInvalidation {
|
||||
None,
|
||||
RepaintOnly,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue