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

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

Issue 488763002: Introduce HTMLDataListOptionsCollection subclass for HTMLCollection (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
Index: Source/core/html/HTMLCollection.cpp
diff --git a/Source/core/html/HTMLCollection.cpp b/Source/core/html/HTMLCollection.cpp
index f42ae7098827d9584b9764e99962f1c14d778345..6a249b3c174566a080dc1f5440857b17cf873659 100644
--- a/Source/core/html/HTMLCollection.cpp
+++ b/Source/core/html/HTMLCollection.cpp
@@ -29,6 +29,7 @@
#include "core/dom/ElementTraversal.h"
#include "core/dom/NodeRareData.h"
#include "core/html/DocumentNameCollection.h"
+#include "core/html/HTMLDataListOptionsCollection.h"
#include "core/html/HTMLElement.h"
#include "core/html/HTMLObjectElement.h"
#include "core/html/HTMLOptionElement.h"
@@ -221,12 +222,7 @@ static inline bool isMatchingHTMLElement(const HTMLCollection& htmlCollection, c
case SelectedOptions:
return isHTMLOptionElement(element) && toHTMLOptionElement(element).selected();
case DataListOptions:
- if (isHTMLOptionElement(element)) {
- const HTMLOptionElement& option = toHTMLOptionElement(element);
- if (!option.isDisabledFormControl() && !option.value().isEmpty())
- return true;
- }
- return false;
+ return toHTMLDataListOptionsCollection(htmlCollection).elementMatches(element);
case MapAreas:
return element.hasTagName(areaTag);
case DocApplets:

Powered by Google App Engine
This is Rietveld 408576698