OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2006, 2007, 2008, 2009, 2010, 2011, 2012 Apple Inc. All rights | 2 * Copyright (C) 2006, 2007, 2008, 2009, 2010, 2011, 2012 Apple Inc. All rights |
3 * reserved. | 3 * reserved. |
4 * | 4 * |
5 * Portions are Copyright (C) 1998 Netscape Communications Corporation. | 5 * Portions are Copyright (C) 1998 Netscape Communications Corporation. |
6 * | 6 * |
7 * Other contributors: | 7 * Other contributors: |
8 * Robert O'Callahan <roc+@cs.cmu.edu> | 8 * Robert O'Callahan <roc+@cs.cmu.edu> |
9 * David Baron <dbaron@fas.harvard.edu> | 9 * David Baron <dbaron@fas.harvard.edu> |
10 * Christian Biesinger <cbiesinger@web.de> | 10 * Christian Biesinger <cbiesinger@web.de> |
(...skipping 167 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
178 if (rare_data_ && rare_data_->resource_info) { | 178 if (rare_data_ && rare_data_->resource_info) { |
179 const ComputedStyle& style = GetLayoutObject().StyleRef(); | 179 const ComputedStyle& style = GetLayoutObject().StyleRef(); |
180 if (style.HasFilter()) | 180 if (style.HasFilter()) |
181 style.Filter().RemoveClient(rare_data_->resource_info); | 181 style.Filter().RemoveClient(rare_data_->resource_info); |
182 if (IsReferenceClipPath(style.ClipPath())) { | 182 if (IsReferenceClipPath(style.ClipPath())) { |
183 ToReferenceClipPathOperation(style.ClipPath()) | 183 ToReferenceClipPathOperation(style.ClipPath()) |
184 ->RemoveClient(rare_data_->resource_info); | 184 ->RemoveClient(rare_data_->resource_info); |
185 } | 185 } |
186 rare_data_->resource_info->ClearLayer(); | 186 rare_data_->resource_info->ClearLayer(); |
187 } | 187 } |
188 if (GetLayoutObject().GetFrame() && GetLayoutObject().GetFrame()->GetPage()) { | 188 if (GetLayoutObject().GetFrame()) { |
189 if (ScrollingCoordinator* scrolling_coordinator = | 189 if (ScrollingCoordinator* scrolling_coordinator = GetScrollingCoordinator()) |
190 GetLayoutObject().GetFrame()->GetPage()->GetScrollingCoordinator()) | |
191 scrolling_coordinator->WillDestroyLayer(this); | 190 scrolling_coordinator->WillDestroyLayer(this); |
192 } | 191 } |
193 | 192 |
194 if (GroupedMapping()) { | 193 if (GroupedMapping()) { |
195 DisableCompositingQueryAsserts disabler; | 194 DisableCompositingQueryAsserts disabler; |
196 SetGroupedMapping(0, kInvalidateLayerAndRemoveFromMapping); | 195 SetGroupedMapping(0, kInvalidateLayerAndRemoveFromMapping); |
197 } | 196 } |
198 | 197 |
199 // Child layers will be deleted by their corresponding layout objects, so | 198 // Child layers will be deleted by their corresponding layout objects, so |
200 // we don't need to delete them ourselves. | 199 // we don't need to delete them ourselves. |
(...skipping 2541 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2742 ((global_paint_flags & kGlobalPaintFlattenCompositingLayers) || | 2741 ((global_paint_flags & kGlobalPaintFlattenCompositingLayers) || |
2743 GetCompositingState() != kPaintsIntoOwnBacking); | 2742 GetCompositingState() != kPaintsIntoOwnBacking); |
2744 } | 2743 } |
2745 | 2744 |
2746 return (Transform() || | 2745 return (Transform() || |
2747 GetLayoutObject().Style()->GetPosition() == EPosition::kFixed) && | 2746 GetLayoutObject().Style()->GetPosition() == EPosition::kFixed) && |
2748 ((global_paint_flags & kGlobalPaintFlattenCompositingLayers) || | 2747 ((global_paint_flags & kGlobalPaintFlattenCompositingLayers) || |
2749 GetCompositingState() != kPaintsIntoOwnBacking); | 2748 GetCompositingState() != kPaintsIntoOwnBacking); |
2750 } | 2749 } |
2751 | 2750 |
| 2751 ScrollingCoordinator* PaintLayer::GetScrollingCoordinator() { |
| 2752 Page* page = GetLayoutObject().GetFrame()->GetPage(); |
| 2753 return (!page) ? nullptr : page->GetScrollingCoordinator(); |
| 2754 } |
| 2755 |
2752 bool PaintLayer::CompositesWithTransform() const { | 2756 bool PaintLayer::CompositesWithTransform() const { |
2753 return TransformAncestor() || Transform(); | 2757 return TransformAncestor() || Transform(); |
2754 } | 2758 } |
2755 | 2759 |
2756 bool PaintLayer::CompositesWithOpacity() const { | 2760 bool PaintLayer::CompositesWithOpacity() const { |
2757 return OpacityAncestor() || GetLayoutObject().Style()->HasOpacity(); | 2761 return OpacityAncestor() || GetLayoutObject().Style()->HasOpacity(); |
2758 } | 2762 } |
2759 | 2763 |
2760 bool PaintLayer::BackgroundIsKnownToBeOpaqueInRect( | 2764 bool PaintLayer::BackgroundIsKnownToBeOpaqueInRect( |
2761 const LayoutRect& local_rect) const { | 2765 const LayoutRect& local_rect) const { |
(...skipping 517 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3279 } | 3283 } |
3280 | 3284 |
3281 void showLayerTree(const blink::LayoutObject* layoutObject) { | 3285 void showLayerTree(const blink::LayoutObject* layoutObject) { |
3282 if (!layoutObject) { | 3286 if (!layoutObject) { |
3283 LOG(INFO) << "Cannot showLayerTree. Root is (nil)"; | 3287 LOG(INFO) << "Cannot showLayerTree. Root is (nil)"; |
3284 return; | 3288 return; |
3285 } | 3289 } |
3286 showLayerTree(layoutObject->EnclosingLayer()); | 3290 showLayerTree(layoutObject->EnclosingLayer()); |
3287 } | 3291 } |
3288 #endif | 3292 #endif |
OLD | NEW |