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

Side by Side Diff: Source/core/html/HTMLPlugInImageElement.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/HTMLObjectElement.cpp ('k') | Source/core/html/HTMLSelectElement.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) 2008, 2011, 2012 Apple Inc. All rights reserved. 2 * Copyright (C) 2008, 2011, 2012 Apple Inc. All rights reserved.
3 * 3 *
4 * This library is free software; you can redistribute it and/or 4 * This library is free software; you can redistribute it and/or
5 * modify it under the terms of the GNU Library General Public 5 * modify it under the terms of the GNU Library General Public
6 * License as published by the Free Software Foundation; either 6 * License as published by the Free Software Foundation; either
7 * version 2 of the License, or (at your option) any later version. 7 * version 2 of the License, or (at your option) any later version.
8 * 8 *
9 * This library is distributed in the hope that it will be useful, 9 * This library is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of 10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
(...skipping 137 matching lines...) Expand 10 before | Expand all | Expand 10 after
148 RenderImage* image = new (arena) RenderImage(this); 148 RenderImage* image = new (arena) RenderImage(this);
149 image->setImageResource(RenderImageResource::create()); 149 image->setImageResource(RenderImageResource::create());
150 return image; 150 return image;
151 } 151 }
152 152
153 return new (arena) RenderEmbeddedObject(this); 153 return new (arena) RenderEmbeddedObject(this);
154 } 154 }
155 155
156 void HTMLPlugInImageElement::willRecalcStyle(StyleChange) 156 void HTMLPlugInImageElement::willRecalcStyle(StyleChange)
157 { 157 {
158 // FIXME: Why is this necessary? Manual re-attach is almost always wrong. 158 // FIXME: setNeedsWidgetUpdate is used by subclasses to signal that they nee d
159 // their renderer replaced on the next style recalc. It's not clear why they
160 // don't just do lazyReattach instead. This code looks like a terrible hack.
159 if (!useFallbackContent() && needsWidgetUpdate() && renderer() && !isImageTy pe()) 161 if (!useFallbackContent() && needsWidgetUpdate() && renderer() && !isImageTy pe())
160 reattach(); 162 reattach();
161 } 163 }
162 164
163 void HTMLPlugInImageElement::attach() 165 void HTMLPlugInImageElement::attach()
164 { 166 {
165 PostAttachCallbackDisabler disabler(this); 167 PostAttachCallbackDisabler disabler(this);
166 168
167 bool isImage = isImageType(); 169 bool isImage = isImageType();
168 170
(...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after
227 229
228 void HTMLPlugInImageElement::subframeLoaderWillCreatePlugIn(const KURL& url) 230 void HTMLPlugInImageElement::subframeLoaderWillCreatePlugIn(const KURL& url)
229 { 231 {
230 LOG(Plugins, "%p Plug-in URL: %s", this, m_url.utf8().data()); 232 LOG(Plugins, "%p Plug-in URL: %s", this, m_url.utf8().data());
231 LOG(Plugins, " Loaded URL: %s", url.string().utf8().data()); 233 LOG(Plugins, " Loaded URL: %s", url.string().utf8().data());
232 234
233 m_loadedUrl = url; 235 m_loadedUrl = url;
234 } 236 }
235 237
236 } // namespace WebCore 238 } // namespace WebCore
OLDNEW
« no previous file with comments | « Source/core/html/HTMLObjectElement.cpp ('k') | Source/core/html/HTMLSelectElement.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698