Changeset 108924 in webkit


Ignore:
Timestamp:
Feb 25, 2012 9:08:28 PM (12 years ago)
Author:
kling@webkit.org
Message:

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):

Location:
trunk/Source/WebCore
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebCore/ChangeLog

    r108916 r108924  
     12012-02-25  Andreas Kling  <awesomekling@apple.com>
     2
     3        Setting style="" should destroy the element's inline style.
     4        <http://webkit.org/b/79595>
     5
     6        Reviewed by Anders Carlsson.
     7
     8        There's no reason for an element with style="" to have an inline style object.
     9        Remove the inline style in that case, just like we do when removing the style
     10        attribute altogether.
     11
     12        * dom/StyledElement.cpp:
     13        (WebCore::StyledElement::parseAttribute):
     14
    1152012-02-25  Andreas Kling  <awesomekling@apple.com>
    216
  • trunk/Source/WebCore/dom/StyledElement.cpp

    r108667 r108924  
    100100        classAttributeChanged(attr->value());
    101101    else if (attr->name() == styleAttr) {
    102         if (attr->isNull())
     102        if (attr->isEmpty())
    103103            destroyInlineStyleDecl();
    104104        else if (document()->contentSecurityPolicy()->allowInlineStyle())
Note: See TracChangeset for help on using the changeset viewer.