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

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

Issue 2727093002: Account for perspective and preserve-3d in mapToVisualRectInAncestorSpace (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 side-by-side diff with in-line comments
Download patch
Index: third_party/WebKit/Source/core/paint/PaintInvalidator.cpp
diff --git a/third_party/WebKit/Source/core/paint/PaintInvalidator.cpp b/third_party/WebKit/Source/core/paint/PaintInvalidator.cpp
index d8e6e7f2eced417e7755414247171fb11726c4fa..1548ce74529415aef16c568b891e86847eda9134 100644
--- a/third_party/WebKit/Source/core/paint/PaintInvalidator.cpp
+++ b/third_party/WebKit/Source/core/paint/PaintInvalidator.cpp
@@ -33,11 +33,17 @@ static LayoutRect slowMapToVisualRectInAncestorSpace(
}
LayoutRect result(rect);
- if (object.isLayoutView())
- toLayoutView(object).mapToVisualRectInAncestorSpace(
- &ancestor, result, InputIsInFrameCoordinates, DefaultVisualRectFlags);
- else
- object.mapToVisualRectInAncestorSpace(&ancestor, result);
+ if (object.isLayoutView()) {
+ TransformState transformState(TransformState::ApplyTransformDirection,
+ FloatQuad(FloatRect(rect)));
+ toLayoutView(object).mapToVisualRectInAncestorSpaceInternal(
+ &ancestor, transformState, InputIsInFrameCoordinates,
+ DefaultVisualRectFlags);
+ transformState.flatten();
+ return LayoutRect(transformState.lastPlanarQuad().boundingBox());
Xianzhu 2017/03/03 01:24:42 Can you wrap the above code into LayoutView::mapTo
chrishtr 2017/03/03 02:45:11 Done.
+ }
+
+ object.mapToVisualRectInAncestorSpace(&ancestor, result);
return result;
}

Powered by Google App Engine
This is Rietveld 408576698