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

Side by Side Diff: Source/core/html/RadioNodeList.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/RadioNodeList.h ('k') | Source/web/WebNode.cpp » ('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) 2012 Motorola Mobility, Inc. All rights reserved. 2 * Copyright (c) 2012 Motorola Mobility, Inc. All rights reserved.
3 * 3 *
4 * Redistribution and use in source and binary forms, with or without 4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions 5 * modification, are permitted provided that the following conditions
6 * are met: 6 * are met:
7 * 1. Redistributions of source code must retain the above copyright 7 * 1. Redistributions of source code must retain the above copyright
8 * notice, this list of conditions and the following disclaimer. 8 * notice, this list of conditions and the following disclaimer.
9 * 2. Redistributions in binary form must reproduce the above copyright 9 * 2. Redistributions in binary form must reproduce the above copyright
10 * notice, this list of conditions and the following disclaimer in the 10 * notice, this list of conditions and the following disclaimer in the
(...skipping 19 matching lines...) Expand all
30 #include "core/dom/Element.h" 30 #include "core/dom/Element.h"
31 #include "core/dom/NodeRareData.h" 31 #include "core/dom/NodeRareData.h"
32 #include "core/html/HTMLFormElement.h" 32 #include "core/html/HTMLFormElement.h"
33 #include "core/html/HTMLInputElement.h" 33 #include "core/html/HTMLInputElement.h"
34 #include "core/html/HTMLObjectElement.h" 34 #include "core/html/HTMLObjectElement.h"
35 35
36 namespace WebCore { 36 namespace WebCore {
37 37
38 using namespace HTMLNames; 38 using namespace HTMLNames;
39 39
40 RadioNodeList::RadioNodeList(Node* rootNode, const AtomicString& name, Collectio nType type) 40 RadioNodeList::RadioNodeList(ContainerNode* rootNode, const AtomicString& name, CollectionType type)
41 : LiveNodeList(rootNode, type, InvalidateForFormControls, rootNode->hasTagNa me(formTag) ? NodeListIsRootedAtDocument : NodeListIsRootedAtNode) 41 : LiveNodeList(rootNode, type, InvalidateForFormControls, rootNode->hasTagNa me(formTag) ? NodeListIsRootedAtDocument : NodeListIsRootedAtNode)
42 , m_name(name) 42 , m_name(name)
43 , m_onlyMatchImgElements(type == RadioImgNodeListType) 43 , m_onlyMatchImgElements(type == RadioImgNodeListType)
44 { 44 {
45 ScriptWrappable::init(this); 45 ScriptWrappable::init(this);
46 } 46 }
47 47
48 RadioNodeList::~RadioNodeList() 48 RadioNodeList::~RadioNodeList()
49 { 49 {
50 ownerNode()->nodeLists()->removeCacheWithAtomicName(this, m_onlyMatchImgElem ents ? RadioImgNodeListType : RadioNodeListType, m_name); 50 ownerNode()->nodeLists()->removeCacheWithAtomicName(this, m_onlyMatchImgElem ents ? RadioImgNodeListType : RadioNodeListType, m_name);
(...skipping 60 matching lines...) Expand 10 before | Expand all | Expand 10 after
111 return false; 111 return false;
112 112
113 if (testElement.hasTagName(inputTag) && toHTMLInputElement(testElement).isIm ageButton()) 113 if (testElement.hasTagName(inputTag) && toHTMLInputElement(testElement).isIm ageButton())
114 return false; 114 return false;
115 115
116 return checkElementMatchesRadioNodeListFilter(testElement); 116 return checkElementMatchesRadioNodeListFilter(testElement);
117 } 117 }
118 118
119 } // namespace 119 } // namespace
120 120
OLDNEW
« no previous file with comments | « Source/core/html/RadioNodeList.h ('k') | Source/web/WebNode.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698