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

Side by Side Diff: Source/core/page/FrameView.cpp

Issue 16896019: Replace RenderArena with PartitionAlloc. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
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
OLDNEW
1 /* 1 /*
2 * Copyright (C) 1998, 1999 Torben Weis <weis@kde.org> 2 * Copyright (C) 1998, 1999 Torben Weis <weis@kde.org>
3 * 1999 Lars Knoll <knoll@kde.org> 3 * 1999 Lars Knoll <knoll@kde.org>
4 * 1999 Antti Koivisto <koivisto@kde.org> 4 * 1999 Antti Koivisto <koivisto@kde.org>
5 * 2000 Dirk Mueller <mueller@kde.org> 5 * 2000 Dirk Mueller <mueller@kde.org>
6 * Copyright (C) 2004, 2005, 2006, 2007, 2008 Apple Inc. All rights reserved. 6 * Copyright (C) 2004, 2005, 2006, 2007, 2008 Apple Inc. All rights reserved.
7 * (C) 2006 Graham Dennis (graham.dennis@gmail.com) 7 * (C) 2006 Graham Dennis (graham.dennis@gmail.com)
8 * (C) 2006 Alexey Proskuryakov (ap@nypop.com) 8 * (C) 2006 Alexey Proskuryakov (ap@nypop.com)
9 * Copyright (C) 2009 Google Inc. All rights reserved. 9 * Copyright (C) 2009 Google Inc. All rights reserved.
10 * 10 *
(...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after
56 #include "core/page/FrameActionScheduler.h" 56 #include "core/page/FrameActionScheduler.h"
57 #include "core/page/FrameTree.h" 57 #include "core/page/FrameTree.h"
58 #include "core/page/Settings.h" 58 #include "core/page/Settings.h"
59 #include "core/page/animation/AnimationController.h" 59 #include "core/page/animation/AnimationController.h"
60 #include "core/page/scrolling/ScrollingCoordinator.h" 60 #include "core/page/scrolling/ScrollingCoordinator.h"
61 #include "core/platform/ScrollAnimator.h" 61 #include "core/platform/ScrollAnimator.h"
62 #include "core/platform/graphics/FloatRect.h" 62 #include "core/platform/graphics/FloatRect.h"
63 #include "core/platform/graphics/FontCache.h" 63 #include "core/platform/graphics/FontCache.h"
64 #include "core/platform/graphics/GraphicsContext.h" 64 #include "core/platform/graphics/GraphicsContext.h"
65 #include "core/platform/text/TextStream.h" 65 #include "core/platform/text/TextStream.h"
66 #include "core/rendering/RenderArena.h"
67 #include "core/rendering/RenderEmbeddedObject.h" 66 #include "core/rendering/RenderEmbeddedObject.h"
68 #include "core/rendering/RenderFullScreen.h" 67 #include "core/rendering/RenderFullScreen.h"
69 #include "core/rendering/RenderIFrame.h" 68 #include "core/rendering/RenderIFrame.h"
70 #include "core/rendering/RenderLayer.h" 69 #include "core/rendering/RenderLayer.h"
71 #include "core/rendering/RenderLayerBacking.h" 70 #include "core/rendering/RenderLayerBacking.h"
72 #include "core/rendering/RenderLayerCompositor.h" 71 #include "core/rendering/RenderLayerCompositor.h"
73 #include "core/rendering/RenderLazyBlock.h" 72 #include "core/rendering/RenderLazyBlock.h"
74 #include "core/rendering/RenderPart.h" 73 #include "core/rendering/RenderPart.h"
75 #include "core/rendering/RenderScrollbar.h" 74 #include "core/rendering/RenderScrollbar.h"
76 #include "core/rendering/RenderScrollbarPart.h" 75 #include "core/rendering/RenderScrollbarPart.h"
(...skipping 2110 matching lines...) Expand 10 before | Expand all | Expand 10 after
2187 2186
2188 bool FrameView::updateWidgets() 2187 bool FrameView::updateWidgets()
2189 { 2188 {
2190 if (m_nestedLayoutCount > 1 || !m_widgetUpdateSet || m_widgetUpdateSet->isEm pty()) 2189 if (m_nestedLayoutCount > 1 || !m_widgetUpdateSet || m_widgetUpdateSet->isEm pty())
2191 return true; 2190 return true;
2192 2191
2193 size_t size = m_widgetUpdateSet->size(); 2192 size_t size = m_widgetUpdateSet->size();
2194 2193
2195 Vector<RenderObject*> objects; 2194 Vector<RenderObject*> objects;
2196 objects.reserveInitialCapacity(size); 2195 objects.reserveInitialCapacity(size);
2197 // Protect RendereArena from getting wiped out, when Document is detached du ring updateWidget().
2198 RefPtr<RenderArena> protectedArena = m_frame->document()->renderArena();
2199 2196
2200 RenderObjectSet::const_iterator end = m_widgetUpdateSet->end(); 2197 RenderObjectSet::const_iterator end = m_widgetUpdateSet->end();
2201 for (RenderObjectSet::const_iterator it = m_widgetUpdateSet->begin(); it != end; ++it) { 2198 for (RenderObjectSet::const_iterator it = m_widgetUpdateSet->begin(); it != end; ++it) {
2202 RenderObject* object = *it; 2199 RenderObject* object = *it;
2203 objects.uncheckedAppend(object); 2200 objects.uncheckedAppend(object);
2204 if (object->isEmbeddedObject()) { 2201 if (object->isEmbeddedObject()) {
2205 RenderEmbeddedObject* embeddedObject = static_cast<RenderEmbeddedObj ect*>(object); 2202 RenderEmbeddedObject* embeddedObject = static_cast<RenderEmbeddedObj ect*>(object);
2206 embeddedObject->ref(); 2203 embeddedObject->ref();
2207 } 2204 }
2208 } 2205 }
2209 2206
2210 for (size_t i = 0; i < size; ++i) { 2207 for (size_t i = 0; i < size; ++i) {
2211 RenderObject* object = objects[i]; 2208 RenderObject* object = objects[i];
2212 updateWidget(object); 2209 updateWidget(object);
2213 m_widgetUpdateSet->remove(object); 2210 m_widgetUpdateSet->remove(object);
2214 } 2211 }
2215 2212
2216 for (size_t i = 0; i < size; ++i) { 2213 for (size_t i = 0; i < size; ++i) {
2217 RenderObject* object = objects[i]; 2214 RenderObject* object = objects[i];
2218 if (object->isEmbeddedObject()) { 2215 if (object->isEmbeddedObject()) {
2219 RenderEmbeddedObject* embeddedObject = static_cast<RenderEmbeddedObj ect*>(object); 2216 RenderEmbeddedObject* embeddedObject = static_cast<RenderEmbeddedObj ect*>(object);
2220 embeddedObject->deref(protectedArena.get()); 2217 embeddedObject->deref();
2221 } 2218 }
2222 } 2219 }
2223 2220
2224 return m_widgetUpdateSet->isEmpty(); 2221 return m_widgetUpdateSet->isEmpty();
2225 } 2222 }
2226 2223
2227 void FrameView::flushAnyPendingPostLayoutTasks() 2224 void FrameView::flushAnyPendingPostLayoutTasks()
2228 { 2225 {
2229 if (!m_postLayoutTasksTimer.isActive()) 2226 if (!m_postLayoutTasksTimer.isActive())
2230 return; 2227 return;
(...skipping 1186 matching lines...) Expand 10 before | Expand all | Expand 10 after
3417 } 3414 }
3418 3415
3419 AXObjectCache* FrameView::axObjectCache() const 3416 AXObjectCache* FrameView::axObjectCache() const
3420 { 3417 {
3421 if (frame() && frame()->document()) 3418 if (frame() && frame()->document())
3422 return frame()->document()->existingAXObjectCache(); 3419 return frame()->document()->existingAXObjectCache();
3423 return 0; 3420 return 0;
3424 } 3421 }
3425 3422
3426 } // namespace WebCore 3423 } // namespace WebCore
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698