Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(19)

Side by Side Diff: Source/core/html/HTMLObjectElement.cpp

Issue 75273004: Add 'exposed' objects and embeds to a document's named properties. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 7 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « Source/core/html/HTMLObjectElement.h ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright (C) 1999 Lars Knoll (knoll@kde.org) 2 * Copyright (C) 1999 Lars Knoll (knoll@kde.org)
3 * (C) 1999 Antti Koivisto (koivisto@kde.org) 3 * (C) 1999 Antti Koivisto (koivisto@kde.org)
4 * (C) 2000 Stefan Schimanski (1Stein@gmx.de) 4 * (C) 2000 Stefan Schimanski (1Stein@gmx.de)
5 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2011 Apple Inc. All rights reserved. 5 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2011 Apple Inc. All rights reserved.
6 * Copyright (C) 2008 Nokia Corporation and/or its subsidiary(-ies) 6 * Copyright (C) 2008 Nokia Corporation and/or its subsidiary(-ies)
7 * 7 *
8 * This library is free software; you can redistribute it and/or 8 * This library is free software; you can redistribute it and/or
9 * modify it under the terms of the GNU Library General Public 9 * modify it under the terms of the GNU Library General Public
10 * License as published by the Free Software Foundation; either 10 * License as published by the Free Software Foundation; either
(...skipping 368 matching lines...) Expand 10 before | Expand all | Expand 10 after
379 return; 379 return;
380 } 380 }
381 } 381 }
382 382
383 m_useFallbackContent = true; 383 m_useFallbackContent = true;
384 384
385 // FIXME: Style gets recalculated which is suboptimal. 385 // FIXME: Style gets recalculated which is suboptimal.
386 reattachFallbackContent(); 386 reattachFallbackContent();
387 } 387 }
388 388
389 bool HTMLObjectElement::isExposed() const
390 {
391 // http://www.whatwg.org/specs/web-apps/current-work/#exposed
392 for (Node* ancestor = parentNode(); ancestor; ancestor = ancestor->parentNod e()) {
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
393 if (ancestor->hasTagName(objectTag) && toHTMLObjectElement(ancestor)->is Exposed())
394 return false;
395 }
396 if (hasFallbackContent() && !useFallbackContent())
397 return true;
398 for (Node* node = firstChild(); node; node = NodeTraversal::next(*node, this )) {
399 if (node->hasTagName(objectTag) || node->hasTagName(embedTag))
400 return false;
401 }
402 return true;
403 }
404
389 bool HTMLObjectElement::containsJavaApplet() const 405 bool HTMLObjectElement::containsJavaApplet() const
390 { 406 {
391 if (MIMETypeRegistry::isJavaAppletMIMEType(getAttribute(typeAttr))) 407 if (MIMETypeRegistry::isJavaAppletMIMEType(getAttribute(typeAttr)))
392 return true; 408 return true;
393 409
394 for (Element* child = ElementTraversal::firstWithin(*this); child; child = E lementTraversal::nextSkippingChildren(*child, this)) { 410 for (Element* child = ElementTraversal::firstWithin(*this); child; child = E lementTraversal::nextSkippingChildren(*child, this)) {
395 if (child->hasTagName(paramTag) 411 if (child->hasTagName(paramTag)
396 && equalIgnoringCase(child->getNameAttribute(), "type") 412 && equalIgnoringCase(child->getNameAttribute(), "type")
397 && MIMETypeRegistry::isJavaAppletMIMEType(child->getAttribute(va lueAttr).string())) 413 && MIMETypeRegistry::isJavaAppletMIMEType(child->getAttribute(va lueAttr).string()))
398 return true; 414 return true;
(...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after
443 { 459 {
444 return FormAssociatedElement::form(); 460 return FormAssociatedElement::form();
445 } 461 }
446 462
447 bool HTMLObjectElement::isInteractiveContent() const 463 bool HTMLObjectElement::isInteractiveContent() const
448 { 464 {
449 return fastHasAttribute(usemapAttr); 465 return fastHasAttribute(usemapAttr);
450 } 466 }
451 467
452 } 468 }
OLDNEW
« no previous file with comments | « Source/core/html/HTMLObjectElement.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698