| OLD | NEW |
| 1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #include "core/paint/PrePaintTreeWalk.h" | 5 #include "core/paint/PrePaintTreeWalk.h" |
| 6 | 6 |
| 7 #include "core/dom/DocumentLifecycle.h" | 7 #include "core/dom/DocumentLifecycle.h" |
| 8 #include "core/frame/FrameView.h" | 8 #include "core/frame/FrameView.h" |
| 9 #include "core/frame/LocalFrame.h" | 9 #include "core/frame/LocalFrame.h" |
| 10 #include "core/layout/LayoutMultiColumnSpannerPlaceholder.h" | 10 #include "core/layout/LayoutMultiColumnSpannerPlaceholder.h" |
| (...skipping 103 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 114 if (isAncestorOfOrEqualTo(context.clip, ancestorState.clip())) | 114 if (isAncestorOfOrEqualTo(context.clip, ancestorState.clip())) |
| 115 return ClipRect(LayoutRect(LayoutRect::infiniteIntRect())); | 115 return ClipRect(LayoutRect(LayoutRect::infiniteIntRect())); |
| 116 | 116 |
| 117 hasClip = true; | 117 hasClip = true; |
| 118 | 118 |
| 119 PropertyTreeState localState(context.transform, context.clip, effect); | 119 PropertyTreeState localState(context.transform, context.clip, effect); |
| 120 | 120 |
| 121 // TODO(chrishtr): remove need for this. | 121 // TODO(chrishtr): remove need for this. |
| 122 LayoutRect localRect(LayoutRect::infiniteIntRect()); | 122 LayoutRect localRect(LayoutRect::infiniteIntRect()); |
| 123 | 123 |
| 124 LayoutRect rect(m_geometryMapper.sourceToDestinationVisualRect( | 124 LayoutRect rect(m_geometryMapper |
| 125 FloatRect(localRect), localState, ancestorState)); | 125 .sourceToDestinationVisualRect(FloatRect(localRect), |
| 126 localState, ancestorState) |
| 127 .rect()); |
| 126 rect.moveBy(-ancestorPaintOffset); | 128 rect.moveBy(-ancestorPaintOffset); |
| 127 return rect; | 129 return rect; |
| 128 } | 130 } |
| 129 | 131 |
| 130 void PrePaintTreeWalk::invalidatePaintLayerOptimizationsIfNeeded( | 132 void PrePaintTreeWalk::invalidatePaintLayerOptimizationsIfNeeded( |
| 131 const LayoutObject& object, | 133 const LayoutObject& object, |
| 132 const PaintLayer& ancestorTransformedOrRootPaintLayer, | 134 const PaintLayer& ancestorTransformedOrRootPaintLayer, |
| 133 PaintPropertyTreeBuilderContext& context) { | 135 PaintPropertyTreeBuilderContext& context) { |
| 134 if (!object.hasLayer()) | 136 if (!object.hasLayer()) |
| 135 return; | 137 return; |
| (...skipping 133 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 269 roundedIntPoint(context.treeBuilderContext.current.paintOffset); | 271 roundedIntPoint(context.treeBuilderContext.current.paintOffset); |
| 270 walk(*toFrameView(widget), context); | 272 walk(*toFrameView(widget), context); |
| 271 } | 273 } |
| 272 // TODO(pdr): Investigate RemoteFrameView (crbug.com/579281). | 274 // TODO(pdr): Investigate RemoteFrameView (crbug.com/579281). |
| 273 } | 275 } |
| 274 | 276 |
| 275 object.getMutableForPainting().clearPaintFlags(); | 277 object.getMutableForPainting().clearPaintFlags(); |
| 276 } | 278 } |
| 277 | 279 |
| 278 } // namespace blink | 280 } // namespace blink |
| OLD | NEW |