OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2006, 2007, 2008, 2009, 2010, 2011, 2012 Apple Inc. All rights
reserved. | 2 * Copyright (C) 2006, 2007, 2008, 2009, 2010, 2011, 2012 Apple Inc. All rights
reserved. |
3 * | 3 * |
4 * Portions are Copyright (C) 1998 Netscape Communications Corporation. | 4 * Portions are Copyright (C) 1998 Netscape Communications Corporation. |
5 * | 5 * |
6 * Other contributors: | 6 * Other contributors: |
7 * Robert O'Callahan <roc+@cs.cmu.edu> | 7 * Robert O'Callahan <roc+@cs.cmu.edu> |
8 * David Baron <dbaron@fas.harvard.edu> | 8 * David Baron <dbaron@fas.harvard.edu> |
9 * Christian Biesinger <cbiesinger@web.de> | 9 * Christian Biesinger <cbiesinger@web.de> |
10 * Randall Jesup <rjesup@wgate.com> | 10 * Randall Jesup <rjesup@wgate.com> |
(...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
59 #include "core/page/EventHandler.h" | 59 #include "core/page/EventHandler.h" |
60 #include "core/page/FocusController.h" | 60 #include "core/page/FocusController.h" |
61 #include "core/page/Frame.h" | 61 #include "core/page/Frame.h" |
62 #include "core/page/FrameView.h" | 62 #include "core/page/FrameView.h" |
63 #include "core/page/Page.h" | 63 #include "core/page/Page.h" |
64 #include "core/page/Settings.h" | 64 #include "core/page/Settings.h" |
65 #include "core/page/UseCounter.h" | 65 #include "core/page/UseCounter.h" |
66 #include "core/page/animation/AnimationController.h" | 66 #include "core/page/animation/AnimationController.h" |
67 #include "core/page/scrolling/ScrollingCoordinator.h" | 67 #include "core/page/scrolling/ScrollingCoordinator.h" |
68 #include "core/platform/HistogramSupport.h" | 68 #include "core/platform/HistogramSupport.h" |
| 69 #include "core/platform/Partitions.h" |
69 #include "core/platform/PlatformGestureEvent.h" | 70 #include "core/platform/PlatformGestureEvent.h" |
70 #include "core/platform/PlatformMouseEvent.h" | 71 #include "core/platform/PlatformMouseEvent.h" |
71 #include "core/platform/ScrollAnimator.h" | 72 #include "core/platform/ScrollAnimator.h" |
72 #include "core/platform/Scrollbar.h" | 73 #include "core/platform/Scrollbar.h" |
73 #include "core/platform/ScrollbarTheme.h" | 74 #include "core/platform/ScrollbarTheme.h" |
74 #include "core/platform/chromium/TraceEvent.h" | 75 #include "core/platform/chromium/TraceEvent.h" |
75 #include "core/platform/graphics/FloatPoint3D.h" | 76 #include "core/platform/graphics/FloatPoint3D.h" |
76 #include "core/platform/graphics/FloatRect.h" | 77 #include "core/platform/graphics/FloatRect.h" |
77 #include "core/platform/graphics/GraphicsContextStateSaver.h" | 78 #include "core/platform/graphics/GraphicsContextStateSaver.h" |
78 #include "core/platform/graphics/filters/ReferenceFilter.h" | 79 #include "core/platform/graphics/filters/ReferenceFilter.h" |
79 #include "core/platform/graphics/filters/SourceGraphic.h" | 80 #include "core/platform/graphics/filters/SourceGraphic.h" |
80 #include "core/platform/graphics/filters/custom/CustomFilterGlobalContext.h" | 81 #include "core/platform/graphics/filters/custom/CustomFilterGlobalContext.h" |
81 #include "core/platform/graphics/filters/custom/CustomFilterOperation.h" | 82 #include "core/platform/graphics/filters/custom/CustomFilterOperation.h" |
82 #include "core/platform/graphics/filters/custom/CustomFilterValidatedProgram.h" | 83 #include "core/platform/graphics/filters/custom/CustomFilterValidatedProgram.h" |
83 #include "core/platform/graphics/filters/custom/ValidatedCustomFilterOperation.h
" | 84 #include "core/platform/graphics/filters/custom/ValidatedCustomFilterOperation.h
" |
84 #include "core/platform/graphics/transforms/ScaleTransformOperation.h" | 85 #include "core/platform/graphics/transforms/ScaleTransformOperation.h" |
85 #include "core/platform/graphics/transforms/TransformationMatrix.h" | 86 #include "core/platform/graphics/transforms/TransformationMatrix.h" |
86 #include "core/platform/graphics/transforms/TranslateTransformOperation.h" | 87 #include "core/platform/graphics/transforms/TranslateTransformOperation.h" |
87 #include "core/rendering/ColumnInfo.h" | 88 #include "core/rendering/ColumnInfo.h" |
88 #include "core/rendering/FilterEffectRenderer.h" | 89 #include "core/rendering/FilterEffectRenderer.h" |
89 #include "core/rendering/HitTestRequest.h" | 90 #include "core/rendering/HitTestRequest.h" |
90 #include "core/rendering/HitTestResult.h" | 91 #include "core/rendering/HitTestResult.h" |
91 #include "core/rendering/HitTestingTransformState.h" | 92 #include "core/rendering/HitTestingTransformState.h" |
92 #include "core/rendering/OverlapTestRequestClient.h" | 93 #include "core/rendering/OverlapTestRequestClient.h" |
93 #include "core/rendering/RenderArena.h" | |
94 #include "core/rendering/RenderFlowThread.h" | 94 #include "core/rendering/RenderFlowThread.h" |
95 #include "core/rendering/RenderGeometryMap.h" | 95 #include "core/rendering/RenderGeometryMap.h" |
96 #include "core/rendering/RenderInline.h" | 96 #include "core/rendering/RenderInline.h" |
97 #include "core/rendering/RenderLayerBacking.h" | 97 #include "core/rendering/RenderLayerBacking.h" |
98 #include "core/rendering/RenderLayerCompositor.h" | 98 #include "core/rendering/RenderLayerCompositor.h" |
99 #include "core/rendering/RenderReplica.h" | 99 #include "core/rendering/RenderReplica.h" |
100 #include "core/rendering/RenderScrollbar.h" | 100 #include "core/rendering/RenderScrollbar.h" |
101 #include "core/rendering/RenderScrollbarPart.h" | 101 #include "core/rendering/RenderScrollbarPart.h" |
102 #include "core/rendering/RenderTreeAsText.h" | 102 #include "core/rendering/RenderTreeAsText.h" |
103 #include "core/rendering/RenderView.h" | 103 #include "core/rendering/RenderView.h" |
(...skipping 1505 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1609 LayoutRect clipRect = paintingExtent(rootLayer, paintDirtyRect, paintBeh
avior); | 1609 LayoutRect clipRect = paintingExtent(rootLayer, paintDirtyRect, paintBeh
avior); |
1610 context->clip(clipRect); | 1610 context->clip(clipRect); |
1611 context->beginTransparencyLayer(renderer()->opacity()); | 1611 context->beginTransparencyLayer(renderer()->opacity()); |
1612 #ifdef REVEAL_TRANSPARENCY_LAYERS | 1612 #ifdef REVEAL_TRANSPARENCY_LAYERS |
1613 context->setFillColor(Color(0.0f, 0.0f, 0.5f, 0.2f)); | 1613 context->setFillColor(Color(0.0f, 0.0f, 0.5f, 0.2f)); |
1614 context->fillRect(clipRect); | 1614 context->fillRect(clipRect); |
1615 #endif | 1615 #endif |
1616 } | 1616 } |
1617 } | 1617 } |
1618 | 1618 |
1619 void* RenderLayer::operator new(size_t sz, RenderArena* renderArena) | 1619 void* RenderLayer::operator new(size_t sz) |
1620 { | 1620 { |
1621 return renderArena->allocate(sz); | 1621 return partitionAlloc(Partitions::getRenderingPartition(), sz); |
1622 } | 1622 } |
1623 | 1623 |
1624 void RenderLayer::operator delete(void* ptr, size_t sz) | 1624 void RenderLayer::operator delete(void* ptr) |
1625 { | 1625 { |
1626 // Stash size where destroy can find it. | 1626 partitionFree(ptr); |
1627 *(size_t *)ptr = sz; | |
1628 } | |
1629 | |
1630 void RenderLayer::destroy(RenderArena* renderArena) | |
1631 { | |
1632 delete this; | |
1633 | |
1634 // Recover the size left there for us by operator delete and free the memory
. | |
1635 renderArena->free(*(size_t *)this, this); | |
1636 } | 1627 } |
1637 | 1628 |
1638 void RenderLayer::addChild(RenderLayer* child, RenderLayer* beforeChild) | 1629 void RenderLayer::addChild(RenderLayer* child, RenderLayer* beforeChild) |
1639 { | 1630 { |
1640 RenderLayer* prevSibling = beforeChild ? beforeChild->previousSibling() : la
stChild(); | 1631 RenderLayer* prevSibling = beforeChild ? beforeChild->previousSibling() : la
stChild(); |
1641 if (prevSibling) { | 1632 if (prevSibling) { |
1642 child->setPreviousSibling(prevSibling); | 1633 child->setPreviousSibling(prevSibling); |
1643 prevSibling->setNextSibling(child); | 1634 prevSibling->setNextSibling(child); |
1644 ASSERT(prevSibling != child); | 1635 ASSERT(prevSibling != child); |
1645 } else | 1636 } else |
(...skipping 4720 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
6366 } | 6357 } |
6367 } | 6358 } |
6368 | 6359 |
6369 void showLayerTree(const WebCore::RenderObject* renderer) | 6360 void showLayerTree(const WebCore::RenderObject* renderer) |
6370 { | 6361 { |
6371 if (!renderer) | 6362 if (!renderer) |
6372 return; | 6363 return; |
6373 showLayerTree(renderer->enclosingLayer()); | 6364 showLayerTree(renderer->enclosingLayer()); |
6374 } | 6365 } |
6375 #endif | 6366 #endif |
OLD | NEW |