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

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

Issue 20231002: Replace RenderArena with PartitionAlloc (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Rebase. Created 7 years, 4 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/HTMLMeterElement.cpp ('k') | Source/core/html/HTMLProgressElement.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 117 matching lines...) Expand 10 before | Expand all | Expand 10 after
128 128
129 RenderObject* HTMLPlugInImageElement::createRenderer(RenderStyle* style) 129 RenderObject* HTMLPlugInImageElement::createRenderer(RenderStyle* style)
130 { 130 {
131 // Fallback content breaks the DOM->Renderer class relationship of this 131 // Fallback content breaks the DOM->Renderer class relationship of this
132 // class and all superclasses because createObject won't necessarily 132 // class and all superclasses because createObject won't necessarily
133 // return a RenderEmbeddedObject, RenderPart or even RenderWidget. 133 // return a RenderEmbeddedObject, RenderPart or even RenderWidget.
134 if (useFallbackContent()) 134 if (useFallbackContent())
135 return RenderObject::createObject(this, style); 135 return RenderObject::createObject(this, style);
136 136
137 if (isImageType()) { 137 if (isImageType()) {
138 RenderImage* image = new (document()->renderArena()) RenderImage(this); 138 RenderImage* image = new RenderImage(this);
139 image->setImageResource(RenderImageResource::create()); 139 image->setImageResource(RenderImageResource::create());
140 return image; 140 return image;
141 } 141 }
142 142
143 return new (document()->renderArena()) RenderEmbeddedObject(this); 143 return new RenderEmbeddedObject(this);
144 } 144 }
145 145
146 void HTMLPlugInImageElement::willRecalcStyle(StyleChange) 146 void HTMLPlugInImageElement::willRecalcStyle(StyleChange)
147 { 147 {
148 // FIXME: Why is this necessary? Manual re-attach is almost always wrong. 148 // FIXME: Why is this necessary? Manual re-attach is almost always wrong.
149 if (!useFallbackContent() && needsWidgetUpdate() && renderer() && !isImageTy pe()) 149 if (!useFallbackContent() && needsWidgetUpdate() && renderer() && !isImageTy pe())
150 reattach(); 150 reattach();
151 } 151 }
152 152
153 void HTMLPlugInImageElement::attach(const AttachContext& context) 153 void HTMLPlugInImageElement::attach(const AttachContext& context)
(...skipping 172 matching lines...) Expand 10 before | Expand all | Expand 10 after
326 renderEmbeddedObject()->setPluginUnavailabilityReason(RenderEmbeddedObje ct::PluginBlockedByContentSecurityPolicy); 326 renderEmbeddedObject()->setPluginUnavailabilityReason(RenderEmbeddedObje ct::PluginBlockedByContentSecurityPolicy);
327 return false; 327 return false;
328 } 328 }
329 329
330 if (frame->loader() && !frame->loader()->mixedContentChecker()->canRunInsecu reContent(document()->securityOrigin(), url)) 330 if (frame->loader() && !frame->loader()->mixedContentChecker()->canRunInsecu reContent(document()->securityOrigin(), url))
331 return false; 331 return false;
332 return true; 332 return true;
333 } 333 }
334 334
335 } // namespace WebCore 335 } // namespace WebCore
OLDNEW
« no previous file with comments | « Source/core/html/HTMLMeterElement.cpp ('k') | Source/core/html/HTMLProgressElement.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698