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

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

Issue 2149893003: Rename Node::inShadowIncludingDocument() to Node::isConnected() (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: addressed Created 4 years, 5 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
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 296 matching lines...) Expand 10 before | Expand all | Expand 10 after
307 } 307 }
308 308
309 void HTMLObjectElement::removedFrom(ContainerNode* insertionPoint) 309 void HTMLObjectElement::removedFrom(ContainerNode* insertionPoint)
310 { 310 {
311 HTMLPlugInElement::removedFrom(insertionPoint); 311 HTMLPlugInElement::removedFrom(insertionPoint);
312 FormAssociatedElement::removedFrom(insertionPoint); 312 FormAssociatedElement::removedFrom(insertionPoint);
313 } 313 }
314 314
315 void HTMLObjectElement::childrenChanged(const ChildrenChange& change) 315 void HTMLObjectElement::childrenChanged(const ChildrenChange& change)
316 { 316 {
317 if (inShadowIncludingDocument() && !useFallbackContent()) { 317 if (isConnected() && !useFallbackContent()) {
318 setNeedsWidgetUpdate(true); 318 setNeedsWidgetUpdate(true);
319 lazyReattachIfNeeded(); 319 lazyReattachIfNeeded();
320 } 320 }
321 HTMLPlugInElement::childrenChanged(change); 321 HTMLPlugInElement::childrenChanged(change);
322 } 322 }
323 323
324 bool HTMLObjectElement::isURLAttribute(const Attribute& attribute) const 324 bool HTMLObjectElement::isURLAttribute(const Attribute& attribute) const
325 { 325 {
326 return attribute.name() == codebaseAttr || attribute.name() == dataAttr 326 return attribute.name() == codebaseAttr || attribute.name() == dataAttr
327 || (attribute.name() == usemapAttr && attribute.value()[0] != '#') 327 || (attribute.name() == usemapAttr && attribute.value()[0] != '#')
(...skipping 24 matching lines...) Expand all
352 reattach(); 352 reattach();
353 else 353 else
354 lazyReattachIfAttached(); 354 lazyReattachIfAttached();
355 } 355 }
356 356
357 void HTMLObjectElement::renderFallbackContent() 357 void HTMLObjectElement::renderFallbackContent()
358 { 358 {
359 if (useFallbackContent()) 359 if (useFallbackContent())
360 return; 360 return;
361 361
362 if (!inShadowIncludingDocument()) 362 if (!isConnected())
363 return; 363 return;
364 364
365 // Before we give up and use fallback content, check to see if this is a MIM E type issue. 365 // Before we give up and use fallback content, check to see if this is a MIM E type issue.
366 if (m_imageLoader && m_imageLoader->image() && m_imageLoader->image()->getSt atus() != Resource::LoadError) { 366 if (m_imageLoader && m_imageLoader->image() && m_imageLoader->image()->getSt atus() != Resource::LoadError) {
367 m_serviceType = m_imageLoader->image()->response().mimeType(); 367 m_serviceType = m_imageLoader->image()->response().mimeType();
368 if (!isImageType()) { 368 if (!isImageType()) {
369 // If we don't think we have an image type anymore, then clear the i mage from the loader. 369 // If we don't think we have an image type anymore, then clear the i mage from the loader.
370 m_imageLoader->setImage(0); 370 m_imageLoader->setImage(0);
371 reattachFallbackContent(); 371 reattachFallbackContent();
372 return; 372 return;
(...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after
425 { 425 {
426 return fastHasAttribute(usemapAttr); 426 return fastHasAttribute(usemapAttr);
427 } 427 }
428 428
429 bool HTMLObjectElement::useFallbackContent() const 429 bool HTMLObjectElement::useFallbackContent() const
430 { 430 {
431 return HTMLPlugInElement::useFallbackContent() || m_useFallbackContent; 431 return HTMLPlugInElement::useFallbackContent() || m_useFallbackContent;
432 } 432 }
433 433
434 } // namespace blink 434 } // namespace blink
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/html/HTMLMetaElement-in.cpp ('k') | third_party/WebKit/Source/core/html/HTMLPlugInElement.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698