Changeset 126248 in webkit


Ignore:
Timestamp:
Aug 21, 2012 6:47:20 PM (12 years ago)
Author:
shinyak@chromium.org
Message:

A shadow element in ShadowDOM of a button element does not work.
https://bugs.webkit.org/show_bug.cgi?id=91486

Reviewed by Dimitri Glazkov.

Source/WebCore:

Since a button element is extended from an HTMLFormControlElement, it creates a UserAgentShadowDOM
just before adding an AuthorShadowDOM. However, actually a button element does not need any UserAgentShadowDOM.
So we have to prevent it from creating UserAgentShadowDOM.

Test: fast/dom/shadow/shadowdom-for-button.html

  • html/HTMLButtonElement.cpp:

(WebCore::HTMLButtonElement::willAddAuthorShadowRoot):
(WebCore):

  • html/HTMLButtonElement.h:

LayoutTests:

  • fast/dom/shadow/shadowdom-for-button-expected.html: Added.
  • fast/dom/shadow/shadowdom-for-button.html: Added.
  • fast/dom/shadow/shadowdom-for-form-associated-element-useragent-expected.txt:
  • fast/dom/shadow/shadowdom-for-form-associated-element-useragent.html: a button element

does not have user agent shadow dom anymore.

Location:
trunk
Files:
2 added
6 edited

Legend:

Unmodified
Added
Removed
  • trunk/LayoutTests/ChangeLog

    r126246 r126248  
     12012-08-21  Shinya Kawanaka  <shinyak@chromium.org>
     2
     3        A shadow element in ShadowDOM of a button element does not work.
     4        https://bugs.webkit.org/show_bug.cgi?id=91486
     5
     6        Reviewed by Dimitri Glazkov.
     7
     8        * fast/dom/shadow/shadowdom-for-button-expected.html: Added.
     9        * fast/dom/shadow/shadowdom-for-button.html: Added.
     10        * fast/dom/shadow/shadowdom-for-form-associated-element-useragent-expected.txt:
     11        * fast/dom/shadow/shadowdom-for-form-associated-element-useragent.html: a button element
     12        does not have user agent shadow dom anymore.
     13
    1142012-08-21  Kenneth Russell  <kbr@google.com>
    215
  • trunk/LayoutTests/fast/dom/shadow/shadowdom-for-form-associated-element-useragent-expected.txt

    r124027 r126248  
    11When a AuthorShadowRoot is added, UserAgentShadowRoot should exists as the oldest Shadow Root.
    22
    3 PASS oldestShadowRoot is not shadowRoot
    4 PASS youngerShadowRoot is shadowRoot
    53PASS oldestShadowRoot is not shadowRoot
    64PASS youngerShadowRoot is shadowRoot
  • trunk/LayoutTests/fast/dom/shadow/shadowdom-for-form-associated-element-useragent.html

    r124027 r126248  
    88<div id='container'>
    99    <form>
    10         <button id='button'>72</button>
    1110        <select id='select'><option>hoge</option></select>
    1211        <output id='output'></output>
     
    2221<script>
    2322var elems = [
    24     "button", "select", "keygen", "fieldset"
     23    "select", "keygen", "fieldset"
    2524];
    2625
  • trunk/Source/WebCore/ChangeLog

    r126245 r126248  
     12012-08-21  Shinya Kawanaka  <shinyak@chromium.org>
     2
     3        A shadow element in ShadowDOM of a button element does not work.
     4        https://bugs.webkit.org/show_bug.cgi?id=91486
     5
     6        Reviewed by Dimitri Glazkov.
     7
     8        Since a button element is extended from an HTMLFormControlElement, it creates a UserAgentShadowDOM
     9        just before adding an AuthorShadowDOM. However, actually a button element does not need any UserAgentShadowDOM.
     10        So we have to prevent it from creating UserAgentShadowDOM.
     11
     12        Test: fast/dom/shadow/shadowdom-for-button.html
     13
     14        * html/HTMLButtonElement.cpp:
     15        (WebCore::HTMLButtonElement::willAddAuthorShadowRoot):
     16        (WebCore):
     17        * html/HTMLButtonElement.h:
     18
    1192012-08-21  Sukolsak Sakshuwong  <sukolsak@google.com>
    220
  • trunk/Source/WebCore/html/HTMLButtonElement.cpp

    r124022 r126248  
    6262{
    6363    return new (arena) RenderButton(this);
     64}
     65
     66void HTMLButtonElement::willAddAuthorShadowRoot()
     67{
    6468}
    6569
  • trunk/Source/WebCore/html/HTMLButtonElement.h

    r124022 r126248  
    4848    virtual RenderObject* createRenderer(RenderArena*, RenderStyle*);
    4949
     50    virtual void willAddAuthorShadowRoot() OVERRIDE;
     51
    5052    virtual void parseAttribute(const Attribute&) OVERRIDE;
    5153    virtual bool isPresentationAttribute(const QualifiedName&) const OVERRIDE;
Note: See TracChangeset for help on using the changeset viewer.