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

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: Fix editing failures 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 405 matching lines...) Expand 10 before | Expand all | Expand 10 after
416 416
417 m_useFallbackContent = true; 417 m_useFallbackContent = true;
418 418
419 // FIXME: Style gets recalculated which is suboptimal. 419 // FIXME: Style gets recalculated which is suboptimal.
420 reattachFallbackContent(); 420 reattachFallbackContent();
421 } 421 }
422 422
423 bool HTMLObjectElement::isExposed() const 423 bool HTMLObjectElement::isExposed() const
424 { 424 {
425 // http://www.whatwg.org/specs/web-apps/current-work/#exposed 425 // http://www.whatwg.org/specs/web-apps/current-work/#exposed
426 for (Node* ancestor = parentNode(); ancestor; ancestor = ancestor->parentNod e()) { 426 for (HTMLObjectElement* ancestor = Traversal<HTMLObjectElement>::firstAncest or(*this); ancestor; ancestor = Traversal<HTMLObjectElement>::firstAncestor(*anc estor)) {
427 if (isHTMLObjectElement(*ancestor) && toHTMLObjectElement(ancestor)->isE xposed()) 427 if (ancestor->isExposed())
428 return false; 428 return false;
429 } 429 }
430 for (HTMLElement* element = Traversal<HTMLElement>::firstWithin(*this); elem ent; element = Traversal<HTMLElement>::next(*element, this)) { 430 for (HTMLElement* element = Traversal<HTMLElement>::firstWithin(*this); elem ent; element = Traversal<HTMLElement>::next(*element, this)) {
431 if (isHTMLObjectElement(*element) || isHTMLEmbedElement(*element)) 431 if (isHTMLObjectElement(*element) || isHTMLEmbedElement(*element))
432 return false; 432 return false;
433 } 433 }
434 return true; 434 return true;
435 } 435 }
436 436
437 bool HTMLObjectElement::containsJavaApplet() const 437 bool HTMLObjectElement::containsJavaApplet() const
(...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after
483 { 483 {
484 return fastHasAttribute(usemapAttr); 484 return fastHasAttribute(usemapAttr);
485 } 485 }
486 486
487 bool HTMLObjectElement::useFallbackContent() const 487 bool HTMLObjectElement::useFallbackContent() const
488 { 488 {
489 return HTMLPlugInElement::useFallbackContent() || m_useFallbackContent; 489 return HTMLPlugInElement::useFallbackContent() || m_useFallbackContent;
490 } 490 }
491 491
492 } 492 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698