Changeset 84693 in webkit


Ignore:
Timestamp:
Apr 22, 2011 3:36:46 PM (13 years ago)
Author:
yael.aharon@nokia.com
Message:

2011-04-22 Yael Aharon <yael.aharon@nokia.com>

Reviewed by Sam Weinig.

HTMLFormControlElement::labels should allow custom attributes.
https://bugs.webkit.org/show_bug.cgi?id=59128

  • fast/forms/labels-custom-property-expected.txt: Added.
  • fast/forms/labels-custom-property.html: Added.

2011-04-22 Yael Aharon <yael.aharon@nokia.com>

Reviewed by Sam Weinig.

HTMLFormControlElement::labels should allow custom attributes.
https://bugs.webkit.org/show_bug.cgi?id=59128

Cache the labels list when it is created and keep using it for future
labels calls.

Test: fast/forms/labels-custom-property.html

  • html/HTMLFormControlElement.cpp: (WebCore::HTMLFormControlElement::labels):
Location:
trunk
Files:
2 added
6 edited

Legend:

Unmodified
Added
Removed
  • trunk/LayoutTests/ChangeLog

    r84686 r84693  
     12011-04-22  Yael Aharon  <yael.aharon@nokia.com>
     2
     3        Reviewed by Sam Weinig.
     4
     5        HTMLFormControlElement::labels should allow custom attributes.
     6        https://bugs.webkit.org/show_bug.cgi?id=59128
     7
     8        * fast/forms/labels-custom-property-expected.txt: Added.
     9        * fast/forms/labels-custom-property.html: Added.
     10
    1112011-04-22  Csaba Osztrogonác  <ossy@webkit.org>
    212
  • trunk/Source/WebCore/ChangeLog

    r84690 r84693  
     12011-04-22  Yael Aharon  <yael.aharon@nokia.com>
     2
     3        Reviewed by Sam Weinig.
     4
     5        HTMLFormControlElement::labels should allow custom attributes.
     6        https://bugs.webkit.org/show_bug.cgi?id=59128
     7
     8        Cache the labels list when it is created and keep using it for future
     9        labels calls.
     10
     11        Test: fast/forms/labels-custom-property.html
     12
     13        * html/HTMLFormControlElement.cpp:
     14        (WebCore::HTMLFormControlElement::labels):
     15
    1162011-04-22  Adrienne Walker  <enne@google.com>
    217
  • trunk/Source/WebCore/dom/NodeRareData.h

    r84586 r84693  
    3535namespace WebCore {
    3636
     37class LabelsNodeList;
    3738class TreeScope;
    3839
     
    5758    TagNodeListCacheNS m_tagNodeListCacheNS;
    5859 
    59     RefPtr<DynamicNodeList> m_labelsNodeListCache;
     60    LabelsNodeList* m_labelsNodeListCache;
    6061 
    6162    static PassOwnPtr<NodeListsNodeData> create()
  • trunk/Source/WebCore/html/HTMLFormControlElement.cpp

    r83016 r84693  
    472472    }
    473473
    474     return LabelsNodeList::create(this);
     474    if (data->nodeLists()->m_labelsNodeListCache)
     475        return data->nodeLists()->m_labelsNodeListCache;
     476
     477    RefPtr<LabelsNodeList> list = LabelsNodeList::create(this);
     478    data->nodeLists()->m_labelsNodeListCache = list.get();
     479    return list.release();
    475480}
    476481
  • trunk/Source/WebCore/html/LabelsNodeList.cpp

    r60232 r84693  
    3333using namespace HTMLNames;
    3434
    35 LabelsNodeList::LabelsNodeList(PassRefPtr<Node> forNode )
     35LabelsNodeList::LabelsNodeList(Node* forNode )
    3636    : DynamicNodeList(forNode->document()) , m_forNode(forNode)
    3737{
  • trunk/Source/WebCore/html/LabelsNodeList.h

    r60232 r84693  
    3333class LabelsNodeList : public DynamicNodeList {
    3434public:
    35     static PassRefPtr<LabelsNodeList> create(PassRefPtr<Node> forNode)
     35    static PassRefPtr<LabelsNodeList> create(Node* forNode)
    3636    {
    3737        return adoptRef(new LabelsNodeList(forNode));
     
    4040
    4141protected:
    42     LabelsNodeList(PassRefPtr<Node> forNode);
     42    LabelsNodeList(Node* forNode);
    4343
    4444    virtual bool nodeMatches(Element*) const;
Note: See TracChangeset for help on using the changeset viewer.