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 131 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
142 m_isSelfPaintingLayer = shouldBeSelfPaintingLayer(); | 142 m_isSelfPaintingLayer = shouldBeSelfPaintingLayer(); |
143 | 143 |
144 if (!layoutObject->slowFirstChild() && layoutObject->style()) { | 144 if (!layoutObject->slowFirstChild() && layoutObject->style()) { |
145 m_visibleContentStatusDirty = false; | 145 m_visibleContentStatusDirty = false; |
146 m_hasVisibleContent = layoutObject->style()->visibility() == VISIBLE; | 146 m_hasVisibleContent = layoutObject->style()->visibility() == VISIBLE; |
147 } | 147 } |
148 | 148 |
149 updateScrollableArea(); | 149 updateScrollableArea(); |
150 } | 150 } |
151 | 151 |
152 DeprecatedPaintLayer::~DeprecatedPaintLayer() | 152 DeprecatedPaintLayer::~DeprecatedPaintLayer() |
haraken
2015/06/29 15:20:21
DeprecatedPaintLayer is explicitly destructed in L
sof
2015/06/29 15:59:41
How is that related to Oilpan? DeprecatedPaintLaye
| |
153 { | 153 { |
154 if (layoutObject()->frame() && layoutObject()->frame()->page()) { | 154 if (layoutObject()->frame() && layoutObject()->frame()->page()) { |
155 if (ScrollingCoordinator* scrollingCoordinator = layoutObject()->frame() ->page()->scrollingCoordinator()) | 155 if (ScrollingCoordinator* scrollingCoordinator = layoutObject()->frame() ->page()->scrollingCoordinator()) |
156 scrollingCoordinator->willDestroyLayer(this); | 156 scrollingCoordinator->willDestroyLayer(this); |
157 } | 157 } |
158 | 158 |
159 removeFilterInfoIfNeeded(); | 159 removeFilterInfoIfNeeded(); |
160 | 160 |
161 if (groupedMapping()) { | 161 if (groupedMapping()) { |
162 DisableCompositingQueryAsserts disabler; | 162 DisableCompositingQueryAsserts disabler; |
163 groupedMapping()->removeLayerFromSquashingGraphicsLayer(this); | 163 groupedMapping()->removeLayerFromSquashingGraphicsLayer(this); |
164 setGroupedMapping(0); | 164 setGroupedMapping(0); |
165 } | 165 } |
166 | 166 |
167 // Child layers will be deleted by their corresponding layout objects, so | 167 // Child layers will be deleted by their corresponding layout objects, so |
168 // we don't need to delete them ourselves. | 168 // we don't need to delete them ourselves. |
169 | 169 |
170 clearCompositedDeprecatedPaintLayerMapping(true); | 170 clearCompositedDeprecatedPaintLayerMapping(true); |
171 | 171 |
172 if (m_reflectionInfo) | 172 if (m_reflectionInfo) |
173 m_reflectionInfo->destroy(); | 173 m_reflectionInfo->destroy(); |
174 | |
175 if (m_scrollableArea) | |
176 m_scrollableArea->dispose(); | |
174 } | 177 } |
175 | 178 |
176 String DeprecatedPaintLayer::debugName() const | 179 String DeprecatedPaintLayer::debugName() const |
177 { | 180 { |
178 if (isReflection()) | 181 if (isReflection()) |
179 return layoutObject()->parent()->debugName() + " (reflection)"; | 182 return layoutObject()->parent()->debugName() + " (reflection)"; |
180 return layoutObject()->debugName(); | 183 return layoutObject()->debugName(); |
181 } | 184 } |
182 | 185 |
183 DeprecatedPaintLayerCompositor* DeprecatedPaintLayer::compositor() const | 186 DeprecatedPaintLayerCompositor* DeprecatedPaintLayer::compositor() const |
(...skipping 1251 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
1435 { | 1438 { |
1436 if (requiresStackingNode()) | 1439 if (requiresStackingNode()) |
1437 m_stackingNode = adoptPtr(new DeprecatedPaintLayerStackingNode(*layoutOb ject())); | 1440 m_stackingNode = adoptPtr(new DeprecatedPaintLayerStackingNode(*layoutOb ject())); |
1438 else | 1441 else |
1439 m_stackingNode = nullptr; | 1442 m_stackingNode = nullptr; |
1440 } | 1443 } |
1441 | 1444 |
1442 void DeprecatedPaintLayer::updateScrollableArea() | 1445 void DeprecatedPaintLayer::updateScrollableArea() |
1443 { | 1446 { |
1444 if (requiresScrollableArea()) | 1447 if (requiresScrollableArea()) |
1445 m_scrollableArea = adoptPtr(new DeprecatedPaintLayerScrollableArea(*this )); | 1448 m_scrollableArea = DeprecatedPaintLayerScrollableArea::create(*this); |
1446 else | 1449 else |
1447 m_scrollableArea = nullptr; | 1450 m_scrollableArea = nullptr; |
haraken
2015/06/29 15:20:21
Don't we need to call m_scrollableArea->dispose()
sof
2015/06/29 15:59:41
I'm not familiar with the naming for this helper,
| |
1448 } | 1451 } |
1449 | 1452 |
1450 bool DeprecatedPaintLayer::hasOverflowControls() const | 1453 bool DeprecatedPaintLayer::hasOverflowControls() const |
1451 { | 1454 { |
1452 return m_scrollableArea && (m_scrollableArea->hasScrollbar() || m_scrollable Area->scrollCorner() || layoutObject()->style()->resize() != RESIZE_NONE); | 1455 return m_scrollableArea && (m_scrollableArea->hasScrollbar() || m_scrollable Area->scrollCorner() || layoutObject()->style()->resize() != RESIZE_NONE); |
1453 } | 1456 } |
1454 | 1457 |
1455 void DeprecatedPaintLayer::appendSingleFragmentIgnoringPagination(DeprecatedPain tLayerFragments& fragments, const DeprecatedPaintLayer* rootLayer, const LayoutR ect& dirtyRect, ClipRectsCacheSlot clipRectsCacheSlot, OverlayScrollbarSizeRelev ancy inOverlayScrollbarSizeRelevancy, ShouldRespectOverflowClip respectOverflowC lip, const LayoutPoint* offsetFromRoot, const LayoutSize& subPixelAccumulation) | 1458 void DeprecatedPaintLayer::appendSingleFragmentIgnoringPagination(DeprecatedPain tLayerFragments& fragments, const DeprecatedPaintLayer* rootLayer, const LayoutR ect& dirtyRect, ClipRectsCacheSlot clipRectsCacheSlot, OverlayScrollbarSizeRelev ancy inOverlayScrollbarSizeRelevancy, ShouldRespectOverflowClip respectOverflowC lip, const LayoutPoint* offsetFromRoot, const LayoutSize& subPixelAccumulation) |
1456 { | 1459 { |
1457 DeprecatedPaintLayerFragment fragment; | 1460 DeprecatedPaintLayerFragment fragment; |
(...skipping 1278 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
2736 | 2739 |
2737 void showLayerTree(const blink::LayoutObject* layoutObject) | 2740 void showLayerTree(const blink::LayoutObject* layoutObject) |
2738 { | 2741 { |
2739 if (!layoutObject) { | 2742 if (!layoutObject) { |
2740 fprintf(stderr, "Cannot showLayerTree. Root is (nil)\n"); | 2743 fprintf(stderr, "Cannot showLayerTree. Root is (nil)\n"); |
2741 return; | 2744 return; |
2742 } | 2745 } |
2743 showLayerTree(layoutObject->enclosingLayer()); | 2746 showLayerTree(layoutObject->enclosingLayer()); |
2744 } | 2747 } |
2745 #endif | 2748 #endif |
OLD | NEW |