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

Unified Diff: third_party/WebKit/Source/core/paint/PaintLayerClipper.cpp

Issue 2802443002: Compute rounded-ness of visual rects (Closed)
Patch Set: none Created 3 years, 8 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 side-by-side diff with in-line comments
Download patch
Index: third_party/WebKit/Source/core/paint/PaintLayerClipper.cpp
diff --git a/third_party/WebKit/Source/core/paint/PaintLayerClipper.cpp b/third_party/WebKit/Source/core/paint/PaintLayerClipper.cpp
index 111f00ae4ba2c1698ee4c5d23587a4d43824c326..5efc05db44e91a69880fdd8e23d0894baaaf9dce 100644
--- a/third_party/WebKit/Source/core/paint/PaintLayerClipper.cpp
+++ b/third_party/WebKit/Source/core/paint/PaintLayerClipper.cpp
@@ -426,12 +426,18 @@ void PaintLayerClipper::calculateBackgroundClipRectWithGeometryMapper(
// paint outside of those bounds.
// The total painting bounds includes any visual overflow (such as shadow) and
// filter bounds.
+ //
+ // TODO(chrishtr): sourceToDestinationVisualRect and
+ // sourceToDestinationClipRect may not compute tight results in the presence
+ // of transforms. Tight results are required for most use cases of these
+ // rects, so we should add methods to GeometryMapper that guarantee there
+ // are tight results, or else signal an error.
if (shouldClipOverflow(context)) {
- FloatRect clipRect(localVisualRect());
+ FloatClipRect clipRect((FloatRect(localVisualRect())));
clipRect.moveBy(FloatPoint(m_layer.layoutObject().paintOffset()));
GeometryMapper::sourceToDestinationVisualRect(
sourcePropertyTreeState, destinationPropertyTreeState, clipRect);
- output.setRect(FloatClipRect(clipRect));
+ output.setRect(clipRect);
} else {
const FloatClipRect& clippedRectInRootLayerSpace =
GeometryMapper::sourceToDestinationClipRect(

Powered by Google App Engine
This is Rietveld 408576698