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

Unified Diff: Source/core/dom/DocumentOrderedMap.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/accessibility/AccessibilityRenderObject.cpp ('k') | Source/core/dom/Element.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/dom/DocumentOrderedMap.cpp
diff --git a/Source/core/dom/DocumentOrderedMap.cpp b/Source/core/dom/DocumentOrderedMap.cpp
index 5c41c8dd812a31318f0d87d356cf4b866564678b..dd0b116eecb77ee38fe35823338265fb1aea2043 100644
--- a/Source/core/dom/DocumentOrderedMap.cpp
+++ b/Source/core/dom/DocumentOrderedMap.cpp
@@ -36,6 +36,7 @@
#include "core/dom/NodeTraversal.h"
#include "core/dom/TreeScope.h"
#include "core/dom/WebCoreMemoryInstrumentation.h"
+#include "core/html/HTMLLabelElement.h"
#include "core/html/HTMLMapElement.h"
#include <wtf/MemoryInstrumentationHashCountedSet.h>
#include <wtf/MemoryInstrumentationHashMap.h>
@@ -61,7 +62,7 @@ inline bool keyMatchesLowercasedMapName(AtomicStringImpl* key, Element* element)
inline bool keyMatchesLabelForAttribute(AtomicStringImpl* key, Element* element)
{
- return element->hasTagName(labelTag) && element->getAttribute(forAttr).impl() == key;
+ return isHTMLLabelElement(element) && element->getAttribute(forAttr).impl() == key;
}
void DocumentOrderedMap::clear()
« no previous file with comments | « Source/core/accessibility/AccessibilityRenderObject.cpp ('k') | Source/core/dom/Element.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698