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

Unified Diff: Source/core/html/LabelsNodeList.cpp

Issue 18259016: Introduce isHTMLLabelElement and toHTMLLabelElement (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Took tkent's comment into consideration Created 7 years, 5 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « Source/core/html/HTMLLabelElement.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/html/LabelsNodeList.cpp
diff --git a/Source/core/html/LabelsNodeList.cpp b/Source/core/html/LabelsNodeList.cpp
index f925e9fd57b29ee7760c7b599c00412b65575103..a822c47ae6f514651cb90a8ca2357368b88080c2 100644
--- a/Source/core/html/LabelsNodeList.cpp
+++ b/Source/core/html/LabelsNodeList.cpp
@@ -41,11 +41,11 @@ LabelsNodeList::LabelsNodeList(Node* forNode)
LabelsNodeList::~LabelsNodeList()
{
ownerNode()->nodeLists()->removeCacheWithAtomicName(this, LabelsNodeListType, starAtom);
-}
-
+}
+
bool LabelsNodeList::nodeMatches(Element* testNode) const
{
- return testNode->hasTagName(labelTag) && static_cast<HTMLLabelElement*>(testNode)->control() == ownerNode();
+ return isHTMLLabelElement(testNode) && toHTMLLabelElement(testNode)->control() == ownerNode();
}
} // namespace WebCore
« no previous file with comments | « Source/core/html/HTMLLabelElement.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698