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

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

Issue 201293002: Add Traversal<*Element>::firstAncestor() API (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Slight clean up Created 6 years, 9 months 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 | Annotate | Revision Log
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 396 matching lines...) Expand 10 before | Expand all | Expand 10 after
407 407
408 m_useFallbackContent = true; 408 m_useFallbackContent = true;
409 409
410 // FIXME: Style gets recalculated which is suboptimal. 410 // FIXME: Style gets recalculated which is suboptimal.
411 reattachFallbackContent(); 411 reattachFallbackContent();
412 } 412 }
413 413
414 bool HTMLObjectElement::isExposed() const 414 bool HTMLObjectElement::isExposed() const
415 { 415 {
416 // http://www.whatwg.org/specs/web-apps/current-work/#exposed 416 // http://www.whatwg.org/specs/web-apps/current-work/#exposed
417 for (Node* ancestor = parentNode(); ancestor; ancestor = ancestor->parentNod e()) { 417 for (HTMLObjectElement* ancestor = Traversal<HTMLObjectElement>::firstAncest or(*this); ancestor; ancestor = Traversal<HTMLObjectElement>::firstAncestor(*anc estor)) {
418 if (isHTMLObjectElement(*ancestor) && toHTMLObjectElement(ancestor)->isE xposed()) 418 if (ancestor->isExposed())
419 return false; 419 return false;
420 } 420 }
421 for (HTMLElement* element = Traversal<HTMLElement>::firstWithin(*this); elem ent; element = Traversal<HTMLElement>::next(*element, this)) { 421 for (HTMLElement* element = Traversal<HTMLElement>::firstWithin(*this); elem ent; element = Traversal<HTMLElement>::next(*element, this)) {
422 if (isHTMLObjectElement(*element) || isHTMLEmbedElement(*element)) 422 if (isHTMLObjectElement(*element) || isHTMLEmbedElement(*element))
423 return false; 423 return false;
424 } 424 }
425 return true; 425 return true;
426 } 426 }
427 427
428 bool HTMLObjectElement::containsJavaApplet() const 428 bool HTMLObjectElement::containsJavaApplet() const
(...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after
474 { 474 {
475 return fastHasAttribute(usemapAttr); 475 return fastHasAttribute(usemapAttr);
476 } 476 }
477 477
478 bool HTMLObjectElement::useFallbackContent() const 478 bool HTMLObjectElement::useFallbackContent() const
479 { 479 {
480 return HTMLPlugInElement::useFallbackContent() || m_useFallbackContent; 480 return HTMLPlugInElement::useFallbackContent() || m_useFallbackContent;
481 } 481 }
482 482
483 } 483 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698