Changeset 117956 in webkit


Ignore:
Timestamp:
May 22, 2012 5:06:24 AM (12 years ago)
Author:
kling@webkit.org
Message:

DOM Attr objects pointing to "style" attribute should force reification when read.
<http://webkit.org/b/87076>

Reviewed by Antti Koivisto.

Source/WebCore:

Make sure that the "style" attribute is reserialized as needed when it gets retrieved
through an Attr object. This fixes a bug where updating an element's inline style
through the CSSOM API, and then retrieving the style attribute through an Attr node
that was previously created by element.getAttributeNode() would return the old style
attribute value.

Test: fast/dom/attr-style-too-lazy.html

  • dom/Attr.cpp:

(WebCore::Attr::value):

LayoutTests:

  • fast/dom/attr-style-too-lazy-expected.txt: Added.
  • fast/dom/attr-style-too-lazy.html: Added.
Location:
trunk
Files:
2 added
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/LayoutTests/ChangeLog

    r117955 r117956  
     12012-05-22  Andreas Kling  <kling@webkit.org>
     2
     3        DOM Attr objects pointing to "style" attribute should force reification when read.
     4        <http://webkit.org/b/87076>
     5
     6        Reviewed by Antti Koivisto.
     7
     8        * fast/dom/attr-style-too-lazy-expected.txt: Added.
     9        * fast/dom/attr-style-too-lazy.html: Added.
     10
    1112012-05-22  Dominik Röttsches  <dominik.rottsches@intel.com>
    212
  • trunk/Source/WebCore/ChangeLog

    r117953 r117956  
     12012-05-22  Andreas Kling  <kling@webkit.org>
     2
     3        DOM Attr objects pointing to "style" attribute should force reification when read.
     4        <http://webkit.org/b/87076>
     5
     6        Reviewed by Antti Koivisto.
     7
     8        Make sure that the "style" attribute is reserialized as needed when it gets retrieved
     9        through an Attr object. This fixes a bug where updating an element's inline style
     10        through the CSSOM API, and then retrieving the style attribute through an Attr node
     11        that was previously created by element.getAttributeNode() would return the old style
     12        attribute value.
     13
     14        Test: fast/dom/attr-style-too-lazy.html
     15
     16        * dom/Attr.cpp:
     17        (WebCore::Attr::value):
     18
    1192012-05-22  Ilya Tikhonovsky  <loislo@chromium.org>
    220
  • trunk/Source/WebCore/dom/Attr.cpp

    r117723 r117956  
    204204{
    205205    if (m_element)
    206         return m_element->getAttributeItem(qualifiedName())->value();
     206        return m_element->getAttribute(qualifiedName());
    207207    return m_standaloneValue;
    208208}
Note: See TracChangeset for help on using the changeset viewer.