Changeset 106527 in webkit


Ignore:
Timestamp:
Feb 1, 2012 7:22:22 PM (12 years ago)
Author:
commit-queue@webkit.org
Message:

Select attribute of HTMLContentElement should be able be changed dynamically.
https://bugs.webkit.org/show_bug.cgi?id=76261

Patch by Shinya Kawanaka <shinyak@google.com> on 2012-02-01
Reviewed by Hajime Morita.

Source/WebCore:

When select attribute is changed, the flag to recalc style is set.

Test: fast/dom/shadow/content-element-select-dynamic.html

  • html/shadow/HTMLContentElement.cpp:

(WebCore::HTMLContentElement::parseMappedAttribute):

Sets recalc style when select is changed.

  • html/shadow/HTMLContentElement.h:

(HTMLContentElement):

LayoutTests:

Test cases for changing select attribute dynamically.

  • fast/dom/shadow/content-element-select-dynamic-expected.txt: Added.
  • fast/dom/shadow/content-element-select-dynamic.html: Added.
Location:
trunk
Files:
2 added
4 edited

Legend:

Unmodified
Added
Removed
  • trunk/LayoutTests/ChangeLog

    r106521 r106527  
     12012-02-01  Shinya Kawanaka  <shinyak@google.com>
     2
     3        Select attribute of HTMLContentElement should be able be changed dynamically.
     4        https://bugs.webkit.org/show_bug.cgi?id=76261
     5
     6        Reviewed by Hajime Morita.
     7
     8        Test cases for changing select attribute dynamically.
     9
     10        * fast/dom/shadow/content-element-select-dynamic-expected.txt: Added.
     11        * fast/dom/shadow/content-element-select-dynamic.html: Added.
     12
    1132012-02-01  Michael Saboff  <msaboff@apple.com>
    214
  • trunk/Source/WebCore/ChangeLog

    r106526 r106527  
     12012-02-01  Shinya Kawanaka  <shinyak@google.com>
     2
     3        Select attribute of HTMLContentElement should be able be changed dynamically.
     4        https://bugs.webkit.org/show_bug.cgi?id=76261
     5
     6        Reviewed by Hajime Morita.
     7
     8        When select attribute is changed, the flag to recalc style is set.
     9
     10        Test: fast/dom/shadow/content-element-select-dynamic.html
     11
     12        * html/shadow/HTMLContentElement.cpp:
     13        (WebCore::HTMLContentElement::parseMappedAttribute):
     14          Sets recalc style when select is changed.
     15        * html/shadow/HTMLContentElement.h:
     16        (HTMLContentElement):
     17
    1182012-02-01  Kentaro Hara  <haraken@chromium.org>
    219
  • trunk/Source/WebCore/html/shadow/HTMLContentElement.cpp

    r106465 r106527  
    119119}
    120120
     121void HTMLContentElement::parseMappedAttribute(Attribute* attr)
     122{
     123    if (attr->name() == selectAttr) {
     124        if (ShadowRoot* root = toShadowRoot(shadowTreeRootNode()))
     125            root->setNeedsReattachHostChildrenAndShadow();
     126    } else
     127        HTMLElement::parseMappedAttribute(attr);
    121128}
     129
     130}
  • trunk/Source/WebCore/html/shadow/HTMLContentElement.h

    r106225 r106527  
    7474    virtual RenderObject* createRenderer(RenderArena*, RenderStyle*) { return 0; }
    7575
     76    virtual void parseMappedAttribute(Attribute*);
     77
    7678    OwnPtr<ShadowInclusionList> m_inclusions;
    7779};
Note: See TracChangeset for help on using the changeset viewer.