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

Side by Side Diff: third_party/WebKit/Source/core/paint/PrePaintTreeWalk.cpp

Issue 2678263002: Plumb border radius through when computing clip visual rects. (Closed)
Patch Set: none Created 3 years, 10 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
OLDNEW
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
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
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
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/paint/PaintPropertyTreeBuilderTest.cpp ('k') | third_party/WebKit/Source/platform/BUILD.gn » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698