Chromium Code Reviews| 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()) { |
|
abarth-chromium
2013/11/18 17:38:58
Are these ancestor traversals correct w.r.t. shado
sof
2013/11/18 20:37:35
Thanks. Does
https://codereview.chromium.org/75
|
| + 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))) |