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: |