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 15159008: Node::lazyAttach shouldn't lie about being attached (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Rebase again Created 7 years, 7 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
« no previous file with comments | « Source/core/html/HTMLFrameElementBase.cpp ('k') | Source/core/html/HTMLPlugInImageElement.cpp » ('j') | 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 359 matching lines...) Expand 10 before | Expand all | Expand 10 after
370 370
371 if (!inDocument()) 371 if (!inDocument())
372 return; 372 return;
373 373
374 // Before we give up and use fallback content, check to see if this is a MIM E type issue. 374 // Before we give up and use fallback content, check to see if this is a MIM E type issue.
375 if (m_imageLoader && m_imageLoader->image() && m_imageLoader->image()->statu s() != CachedResource::LoadError) { 375 if (m_imageLoader && m_imageLoader->image() && m_imageLoader->image()->statu s() != CachedResource::LoadError) {
376 m_serviceType = m_imageLoader->image()->response().mimeType(); 376 m_serviceType = m_imageLoader->image()->response().mimeType();
377 if (!isImageType()) { 377 if (!isImageType()) {
378 // If we don't think we have an image type anymore, then clear the i mage from the loader. 378 // If we don't think we have an image type anymore, then clear the i mage from the loader.
379 m_imageLoader->setImage(0); 379 m_imageLoader->setImage(0);
380 reattach(); 380 lazyReattach();
381 return; 381 return;
382 } 382 }
383 } 383 }
384 384
385 m_useFallbackContent = true; 385 m_useFallbackContent = true;
386 386
387 // FIXME: Style gets recalculated which is suboptimal. 387 // FIXME: Style gets recalculated which is suboptimal.
388 detach(); 388 lazyReattach();
389 attach();
390 } 389 }
391 390
392 // FIXME: This should be removed, all callers are almost certainly wrong. 391 // FIXME: This should be removed, all callers are almost certainly wrong.
393 static bool isRecognizedTagName(const QualifiedName& tagName) 392 static bool isRecognizedTagName(const QualifiedName& tagName)
394 { 393 {
395 DEFINE_STATIC_LOCAL(HashSet<AtomicStringImpl*>, tagList, ()); 394 DEFINE_STATIC_LOCAL(HashSet<AtomicStringImpl*>, tagList, ());
396 if (tagList.isEmpty()) { 395 if (tagList.isEmpty()) {
397 QualifiedName** tags = HTMLNames::getHTMLTags(); 396 QualifiedName** tags = HTMLNames::getHTMLTags();
398 for (size_t i = 0; i < HTMLNames::HTMLTagsCount; i++) { 397 for (size_t i = 0; i < HTMLNames::HTMLTagsCount; i++) {
399 if (*tags[i] == bgsoundTag 398 if (*tags[i] == bgsoundTag
(...skipping 101 matching lines...) Expand 10 before | Expand all | Expand 10 after
501 encoding.appendData(name(), value); 500 encoding.appendData(name(), value);
502 return true; 501 return true;
503 } 502 }
504 503
505 HTMLFormElement* HTMLObjectElement::virtualForm() const 504 HTMLFormElement* HTMLObjectElement::virtualForm() const
506 { 505 {
507 return FormAssociatedElement::form(); 506 return FormAssociatedElement::form();
508 } 507 }
509 508
510 } 509 }
OLDNEW
« no previous file with comments | « Source/core/html/HTMLFrameElementBase.cpp ('k') | Source/core/html/HTMLPlugInImageElement.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698