Index: Source/core/html/HTMLObjectElement.cpp |
diff --git a/Source/core/html/HTMLObjectElement.cpp b/Source/core/html/HTMLObjectElement.cpp |
index 5b5c0344366aeb0c36d3801b5454dc5647cbbeee..38797a16826675fe4cba1a1c62dbc55638fa1dd0 100644 |
--- a/Source/core/html/HTMLObjectElement.cpp |
+++ b/Source/core/html/HTMLObjectElement.cpp |
@@ -420,8 +420,8 @@ void HTMLObjectElement::renderFallbackContent() |
bool HTMLObjectElement::isExposed() const |
{ |
// http://www.whatwg.org/specs/web-apps/current-work/#exposed |
- for (Node* ancestor = parentNode(); ancestor; ancestor = ancestor->parentNode()) { |
- if (isHTMLObjectElement(*ancestor) && toHTMLObjectElement(ancestor)->isExposed()) |
+ for (HTMLObjectElement* ancestor = Traversal<HTMLObjectElement>::firstAncestor(*this); ancestor; ancestor = Traversal<HTMLObjectElement>::firstAncestor(*ancestor)) { |
+ if (ancestor->isExposed()) |
return false; |
} |
for (HTMLElement* element = Traversal<HTMLElement>::firstWithin(*this); element; element = Traversal<HTMLElement>::next(*element, this)) { |