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

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

Issue 485093003: Make it obvious an HTMLOptionsCollection can only contain HTMLOptionElements (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 6 years, 4 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 | « no previous file | Source/core/html/HTMLOptionsCollection.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/html/HTMLCollection.cpp
diff --git a/Source/core/html/HTMLCollection.cpp b/Source/core/html/HTMLCollection.cpp
index f42ae7098827d9584b9764e99962f1c14d778345..5ecfa0ab6b7bf1d59ea7b3751865a92568aaa0fa 100644
--- a/Source/core/html/HTMLCollection.cpp
+++ b/Source/core/html/HTMLCollection.cpp
@@ -32,6 +32,7 @@
#include "core/html/HTMLElement.h"
#include "core/html/HTMLObjectElement.h"
#include "core/html/HTMLOptionElement.h"
+#include "core/html/HTMLOptionsCollection.h"
#include "core/html/HTMLTagCollection.h"
#include "core/html/WindowNameCollection.h"
#include "wtf/HashSet.h"
@@ -217,7 +218,7 @@ static inline bool isMatchingHTMLElement(const HTMLCollection& htmlCollection, c
case TSectionRows:
return element.hasTagName(trTag);
case SelectOptions:
- return element.hasTagName(optionTag);
+ return toHTMLOptionsCollection(htmlCollection).elementMatches(element);
case SelectedOptions:
return isHTMLOptionElement(element) && toHTMLOptionElement(element).selected();
case DataListOptions:
« no previous file with comments | « no previous file | Source/core/html/HTMLOptionsCollection.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698