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

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

Issue 1858163002: Rename inDocument() to inShadowIncludingDocument() (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase Created 4 years, 8 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 301 matching lines...) Expand 10 before | Expand all | Expand 10 after
312 } 312 }
313 313
314 void HTMLObjectElement::removedFrom(ContainerNode* insertionPoint) 314 void HTMLObjectElement::removedFrom(ContainerNode* insertionPoint)
315 { 315 {
316 HTMLPlugInElement::removedFrom(insertionPoint); 316 HTMLPlugInElement::removedFrom(insertionPoint);
317 FormAssociatedElement::removedFrom(insertionPoint); 317 FormAssociatedElement::removedFrom(insertionPoint);
318 } 318 }
319 319
320 void HTMLObjectElement::childrenChanged(const ChildrenChange& change) 320 void HTMLObjectElement::childrenChanged(const ChildrenChange& change)
321 { 321 {
322 if (inDocument() && !useFallbackContent()) { 322 if (inShadowIncludingDocument() && !useFallbackContent()) {
323 setNeedsWidgetUpdate(true); 323 setNeedsWidgetUpdate(true);
324 lazyReattachIfNeeded(); 324 lazyReattachIfNeeded();
325 } 325 }
326 HTMLPlugInElement::childrenChanged(change); 326 HTMLPlugInElement::childrenChanged(change);
327 } 327 }
328 328
329 bool HTMLObjectElement::isURLAttribute(const Attribute& attribute) const 329 bool HTMLObjectElement::isURLAttribute(const Attribute& attribute) const
330 { 330 {
331 return attribute.name() == codebaseAttr || attribute.name() == dataAttr 331 return attribute.name() == codebaseAttr || attribute.name() == dataAttr
332 || (attribute.name() == usemapAttr && attribute.value()[0] != '#') 332 || (attribute.name() == usemapAttr && attribute.value()[0] != '#')
(...skipping 24 matching lines...) Expand all
357 reattach(); 357 reattach();
358 else 358 else
359 lazyReattachIfAttached(); 359 lazyReattachIfAttached();
360 } 360 }
361 361
362 void HTMLObjectElement::renderFallbackContent() 362 void HTMLObjectElement::renderFallbackContent()
363 { 363 {
364 if (useFallbackContent()) 364 if (useFallbackContent())
365 return; 365 return;
366 366
367 if (!inDocument()) 367 if (!inShadowIncludingDocument())
368 return; 368 return;
369 369
370 // Before we give up and use fallback content, check to see if this is a MIM E type issue. 370 // Before we give up and use fallback content, check to see if this is a MIM E type issue.
371 if (m_imageLoader && m_imageLoader->image() && m_imageLoader->image()->getSt atus() != Resource::LoadError) { 371 if (m_imageLoader && m_imageLoader->image() && m_imageLoader->image()->getSt atus() != Resource::LoadError) {
372 m_serviceType = m_imageLoader->image()->response().mimeType(); 372 m_serviceType = m_imageLoader->image()->response().mimeType();
373 if (!isImageType()) { 373 if (!isImageType()) {
374 // If we don't think we have an image type anymore, then clear the i mage from the loader. 374 // If we don't think we have an image type anymore, then clear the i mage from the loader.
375 m_imageLoader->setImage(0); 375 m_imageLoader->setImage(0);
376 reattachFallbackContent(); 376 reattachFallbackContent();
377 return; 377 return;
(...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after
430 { 430 {
431 return fastHasAttribute(usemapAttr); 431 return fastHasAttribute(usemapAttr);
432 } 432 }
433 433
434 bool HTMLObjectElement::useFallbackContent() const 434 bool HTMLObjectElement::useFallbackContent() const
435 { 435 {
436 return HTMLPlugInElement::useFallbackContent() || m_useFallbackContent; 436 return HTMLPlugInElement::useFallbackContent() || m_useFallbackContent;
437 } 437 }
438 438
439 } // namespace blink 439 } // 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