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

Side by Side Diff: trunk/Source/core/html/HTMLPlugInImageElement.cpp

Issue 16336010: Revert 150924 "Node::lazyAttach shouldn't lie about being attached" (Closed) Base URL: svn://svn.chromium.org/blink/
Patch Set: Created 7 years, 6 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 | « trunk/Source/core/html/HTMLObjectElement.cpp ('k') | no next file » | 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 136 matching lines...) Expand 10 before | Expand all | Expand 10 after
147 RenderImage* image = new (arena) RenderImage(this); 147 RenderImage* image = new (arena) RenderImage(this);
148 image->setImageResource(RenderImageResource::create()); 148 image->setImageResource(RenderImageResource::create());
149 return image; 149 return image;
150 } 150 }
151 151
152 return new (arena) RenderEmbeddedObject(this); 152 return new (arena) RenderEmbeddedObject(this);
153 } 153 }
154 154
155 void HTMLPlugInImageElement::willRecalcStyle(StyleChange) 155 void HTMLPlugInImageElement::willRecalcStyle(StyleChange)
156 { 156 {
157 // FIXME: setNeedsWidgetUpdate is used by subclasses to signal that they nee d 157 // FIXME: Why is this necessary? Manual re-attach is almost always wrong.
158 // their renderer replaced on the next style recalc. It's not clear why they
159 // don't just do lazyReattach instead. This code looks like a terrible hack.
160 if (!useFallbackContent() && needsWidgetUpdate() && renderer() && !isImageTy pe()) 158 if (!useFallbackContent() && needsWidgetUpdate() && renderer() && !isImageTy pe())
161 reattach(); 159 reattach();
162 } 160 }
163 161
164 void HTMLPlugInImageElement::attach() 162 void HTMLPlugInImageElement::attach()
165 { 163 {
166 PostAttachCallbackDisabler disabler(this); 164 PostAttachCallbackDisabler disabler(this);
167 165
168 bool isImage = isImageType(); 166 bool isImage = isImageType();
169 167
(...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after
228 226
229 void HTMLPlugInImageElement::subframeLoaderWillCreatePlugIn(const KURL& url) 227 void HTMLPlugInImageElement::subframeLoaderWillCreatePlugIn(const KURL& url)
230 { 228 {
231 LOG(Plugins, "%p Plug-in URL: %s", this, m_url.utf8().data()); 229 LOG(Plugins, "%p Plug-in URL: %s", this, m_url.utf8().data());
232 LOG(Plugins, " Loaded URL: %s", url.string().utf8().data()); 230 LOG(Plugins, " Loaded URL: %s", url.string().utf8().data());
233 231
234 m_loadedUrl = url; 232 m_loadedUrl = url;
235 } 233 }
236 234
237 } // namespace WebCore 235 } // namespace WebCore
OLDNEW
« no previous file with comments | « trunk/Source/core/html/HTMLObjectElement.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698