Changeset 122546 in webkit


Ignore:
Timestamp:
Jul 13, 2012 12:20:49 AM (12 years ago)
Author:
rniwa@webkit.org
Message:

RadioNodeList is not updated upon input type change
https://bugs.webkit.org/show_bug.cgi?id=91178

Reviewed by Alexey Proskuryakov.

Source/WebCore:

Invalidate the radio node lists when type content attribute changes since it excludes
image type input elements.

Test: fast/forms/radionodelist-image-type.html

  • dom/Document.cpp:

(WebCore::shouldInvalidateNodeListForType):

  • dom/Document.h: Renamed InvalidateOnIdNameForAttrChange to InvalidateOnFormAttrChange

since listing all attribute name isn't useful at this point.

  • html/RadioNodeList.cpp:

(WebCore::RadioNodeList::RadioNodeList):

LayoutTests:

Add a regression test.

  • fast/forms/radionodelist-image-type-expected.txt: Added.
  • fast/forms/radionodelist-image-type.html: Added.
Location:
trunk
Files:
2 added
5 edited

Legend:

Unmodified
Added
Removed
  • trunk/LayoutTests/ChangeLog

    r122544 r122546  
     12012-07-13  Ryosuke Niwa  <rniwa@webkit.org>
     2
     3        RadioNodeList is not updated upon input type change
     4        https://bugs.webkit.org/show_bug.cgi?id=91178
     5
     6        Reviewed by Alexey Proskuryakov.
     7
     8        Add a regression test.
     9
     10        * fast/forms/radionodelist-image-type-expected.txt: Added.
     11        * fast/forms/radionodelist-image-type.html: Added.
     12
    1132012-07-12  Filip Pizlo  <fpizlo@apple.com>
    214
  • trunk/Source/WebCore/ChangeLog

    r122545 r122546  
     12012-07-13  Ryosuke Niwa  <rniwa@webkit.org>
     2
     3        RadioNodeList is not updated upon input type change
     4        https://bugs.webkit.org/show_bug.cgi?id=91178
     5
     6        Reviewed by Alexey Proskuryakov.
     7
     8        Invalidate the radio node lists when type content attribute changes since it excludes
     9        image type input elements.
     10
     11        Test: fast/forms/radionodelist-image-type.html
     12
     13        * dom/Document.cpp:
     14        (WebCore::shouldInvalidateNodeListForType):
     15        * dom/Document.h: Renamed InvalidateOnIdNameForAttrChange to InvalidateOnFormAttrChange
     16        since listing all attribute name isn't useful at this point.
     17        * html/RadioNodeList.cpp:
     18        (WebCore::RadioNodeList::RadioNodeList):
     19
    1202012-07-12  Dongwoo Im  <dw.im@samsung.com>
    221
  • trunk/Source/WebCore/dom/Document.cpp

    r122509 r122546  
    39013901    case InvalidateOnForAttrChange:
    39023902        return attrName == forAttr;
    3903     case InvalidateOnIdNameForAttrChange:
    3904         return attrName == nameAttr || attrName == idAttr || attrName == forAttr;
     3903    case InvalidateForFormControls:
     3904        return attrName == nameAttr || attrName == idAttr || attrName == forAttr || attrName == typeAttr;
    39053905    case InvalidateOnItemAttrChange:
    39063906#if ENABLE(MICRODATA)
  • trunk/Source/WebCore/dom/Document.h

    r122498 r122546  
    197197    InvalidateOnNameAttrChange,
    198198    InvalidateOnForAttrChange,
    199     InvalidateOnIdNameForAttrChange,
     199    InvalidateForFormControls,
    200200    InvalidateOnItemAttrChange,
    201201};
  • trunk/Source/WebCore/html/RadioNodeList.cpp

    r122498 r122546  
    3939
    4040RadioNodeList::RadioNodeList(Node* rootNode, const AtomicString& name)
    41     : DynamicSubtreeNodeList(rootNode, InvalidateOnIdNameForAttrChange, rootNode->hasTagName(formTag) ? NodeListIsRootedAtDocument : NodeListIsRootedAtNode)
     41    : DynamicSubtreeNodeList(rootNode, InvalidateForFormControls, rootNode->hasTagName(formTag) ? NodeListIsRootedAtDocument : NodeListIsRootedAtNode)
    4242    , m_name(name)
    4343{
Note: See TracChangeset for help on using the changeset viewer.