Index: Source/core/html/HTMLObjectElement.cpp |
diff --git a/Source/core/html/HTMLObjectElement.cpp b/Source/core/html/HTMLObjectElement.cpp |
index 1d9a87adf4b710dde3c07f6c878c1e374f067b53..2851b34422bfea489ca82abb21e11f86c2c03595 100644 |
--- a/Source/core/html/HTMLObjectElement.cpp |
+++ b/Source/core/html/HTMLObjectElement.cpp |
@@ -386,6 +386,22 @@ void HTMLObjectElement::renderFallbackContent() |
reattachFallbackContent(); |
} |
+bool HTMLObjectElement::isExposed() const |
+{ |
+ // http://www.whatwg.org/specs/web-apps/current-work/#exposed |
+ for (Node* ancestor = parentNode(); ancestor; ancestor = ancestor->parentNode()) { |
+ if (ancestor->hasTagName(objectTag) && toHTMLObjectElement(ancestor)->isExposed()) |
+ return false; |
+ } |
+ if (hasFallbackContent() && !useFallbackContent()) |
+ return true; |
+ for (Node* node = firstChild(); node; node = NodeTraversal::next(*node, this)) { |
+ if (node->hasTagName(objectTag) || node->hasTagName(embedTag)) |
+ return false; |
+ } |
+ return true; |
+} |
+ |
bool HTMLObjectElement::containsJavaApplet() const |
{ |
if (MIMETypeRegistry::isJavaAppletMIMEType(getAttribute(typeAttr))) |