Index: Source/core/html/HTMLOptGroupElement.cpp |
diff --git a/Source/core/html/HTMLOptGroupElement.cpp b/Source/core/html/HTMLOptGroupElement.cpp |
index e45aacc493c0814d08b2ae59b2ee0deb9d33eea0..314e220d088510271d3c705f7d8c1ff1d8a13450 100644 |
--- a/Source/core/html/HTMLOptGroupElement.cpp |
+++ b/Source/core/html/HTMLOptGroupElement.cpp |
@@ -76,7 +76,7 @@ void HTMLOptGroupElement::parseAttribute(const QualifiedName& name, const Atomic |
void HTMLOptGroupElement::recalcSelectOptions() |
{ |
ContainerNode* select = parentNode(); |
- while (select && !select->hasTagName(selectTag)) |
+ while (select && !isHTMLSelectElement(*select)) |
select = select->parentNode(); |
if (select) |
toHTMLSelectElement(select)->setRecalcListItems(); |
@@ -128,7 +128,7 @@ String HTMLOptGroupElement::groupLabelText() const |
HTMLSelectElement* HTMLOptGroupElement::ownerSelectElement() const |
{ |
ContainerNode* select = parentNode(); |
- while (select && !select->hasTagName(selectTag)) |
+ while (select && !isHTMLSelectElement(*select)) |
select = select->parentNode(); |
if (!select) |