Commit 1a7b9e0c authored by kling@webkit.org's avatar kling@webkit.org

Setting style="" should destroy the element's inline style.

<http://webkit.org/b/79595>

Reviewed by Anders Carlsson.

There's no reason for an element with style="" to have an inline style object.
Remove the inline style in that case, just like we do when removing the style
attribute altogether.

* dom/StyledElement.cpp:
(WebCore::StyledElement::parseAttribute):


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@108924 268f45cc-cd09-0410-ab3c-d52691b4dbfc
parent b2f54564
2012-02-25 Andreas Kling <awesomekling@apple.com>
Setting style="" should destroy the element's inline style.
<http://webkit.org/b/79595>
Reviewed by Anders Carlsson.
There's no reason for an element with style="" to have an inline style object.
Remove the inline style in that case, just like we do when removing the style
attribute altogether.
* dom/StyledElement.cpp:
(WebCore::StyledElement::parseAttribute):
2012-02-25 Andreas Kling <awesomekling@apple.com>
Allow matched property cache for elements with additional attribute style.
......@@ -99,7 +99,7 @@ void StyledElement::parseAttribute(Attribute* attr)
if (attr->name() == classAttr)
classAttributeChanged(attr->value());
else if (attr->name() == styleAttr) {
if (attr->isNull())
if (attr->isEmpty())
destroyInlineStyleDecl();
else if (document()->contentSecurityPolicy()->allowInlineStyle())
ensureInlineStyleDecl()->parseDeclaration(attr->value(), document()->elementSheet());
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment