Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(145)

Side by Side Diff: Source/core/html/HTMLFormControlsCollection.cpp

Issue 132923003: Make sure the rootNode of a LiveNodeListBase is always a ContainerNode (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Rebase Created 6 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « Source/core/html/HTMLFormControlsCollection.h ('k') | Source/core/html/HTMLNameCollection.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright (C) 1999 Lars Knoll (knoll@kde.org) 2 * Copyright (C) 1999 Lars Knoll (knoll@kde.org)
3 * (C) 1999 Antti Koivisto (koivisto@kde.org) 3 * (C) 1999 Antti Koivisto (koivisto@kde.org)
4 * Copyright (C) 2003, 2004, 2005, 2006, 2007, 2010, 2011, 2012 Apple Inc. All r ights reserved. 4 * Copyright (C) 2003, 2004, 2005, 2006, 2007, 2010, 2011, 2012 Apple Inc. All r ights reserved.
5 * 5 *
6 * This library is free software; you can redistribute it and/or 6 * This library is free software; you can redistribute it and/or
7 * modify it under the terms of the GNU Library General Public 7 * modify it under the terms of the GNU Library General Public
8 * License as published by the Free Software Foundation; either 8 * License as published by the Free Software Foundation; either
9 * version 2 of the License, or (at your option) any later version. 9 * version 2 of the License, or (at your option) any later version.
10 * 10 *
(...skipping 17 matching lines...) Expand all
28 #include "core/html/HTMLFormElement.h" 28 #include "core/html/HTMLFormElement.h"
29 #include "core/html/HTMLImageElement.h" 29 #include "core/html/HTMLImageElement.h"
30 30
31 namespace WebCore { 31 namespace WebCore {
32 32
33 using namespace HTMLNames; 33 using namespace HTMLNames;
34 34
35 // Since the collections are to be "live", we have to do the 35 // Since the collections are to be "live", we have to do the
36 // calculation every time if anything has changed. 36 // calculation every time if anything has changed.
37 37
38 HTMLFormControlsCollection::HTMLFormControlsCollection(Node* ownerNode) 38 HTMLFormControlsCollection::HTMLFormControlsCollection(ContainerNode* ownerNode)
39 : HTMLCollection(ownerNode, FormControls, OverridesItemAfter) 39 : HTMLCollection(ownerNode, FormControls, OverridesItemAfter)
40 , m_cachedElement(0) 40 , m_cachedElement(0)
41 , m_cachedElementOffsetInArray(0) 41 , m_cachedElementOffsetInArray(0)
42 { 42 {
43 ASSERT(ownerNode->hasTagName(formTag) || ownerNode->hasTagName(fieldsetTag)) ; 43 ASSERT(ownerNode->hasTagName(formTag) || ownerNode->hasTagName(fieldsetTag)) ;
44 ScriptWrappable::init(this); 44 ScriptWrappable::init(this);
45 } 45 }
46 46
47 PassRefPtr<HTMLFormControlsCollection> HTMLFormControlsCollection::create(Node* ownerNode, CollectionType) 47 PassRefPtr<HTMLFormControlsCollection> HTMLFormControlsCollection::create(Contai nerNode* ownerNode, CollectionType)
48 { 48 {
49 return adoptRef(new HTMLFormControlsCollection(ownerNode)); 49 return adoptRef(new HTMLFormControlsCollection(ownerNode));
50 } 50 }
51 51
52 HTMLFormControlsCollection::~HTMLFormControlsCollection() 52 HTMLFormControlsCollection::~HTMLFormControlsCollection()
53 { 53 {
54 } 54 }
55 55
56 const Vector<FormAssociatedElement*>& HTMLFormControlsCollection::formControlEle ments() const 56 const Vector<FormAssociatedElement*>& HTMLFormControlsCollection::formControlEle ments() const
57 { 57 {
(...skipping 141 matching lines...) Expand 10 before | Expand all | Expand 10 after
199 returnValue1Enabled = true; 199 returnValue1Enabled = true;
200 returnValue1 = namedItems.at(0); 200 returnValue1 = namedItems.at(0);
201 return; 201 return;
202 } 202 }
203 203
204 returnValue0Enabled = true; 204 returnValue0Enabled = true;
205 returnValue0 = this->ownerNode()->radioNodeList(name); 205 returnValue0 = this->ownerNode()->radioNodeList(name);
206 } 206 }
207 207
208 } 208 }
OLDNEW
« no previous file with comments | « Source/core/html/HTMLFormControlsCollection.h ('k') | Source/core/html/HTMLNameCollection.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698