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

Unified Diff: third_party/WebKit/Source/platform/graphics/paint/GeometryMapper.h

Issue 2268773002: Support css clip on fixed-position GeometryMapper (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Support css clip on fixed-position GeometryMapper Created 4 years, 4 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/platform/graphics/paint/GeometryMapper.h
diff --git a/third_party/WebKit/Source/platform/graphics/paint/GeometryMapper.h b/third_party/WebKit/Source/platform/graphics/paint/GeometryMapper.h
index 35a5883e46167c39e3dd943725fc0f898e3ff0d7..755dfb3ef14796e7cae2d40b5256465cc3bcf677 100644
--- a/third_party/WebKit/Source/platform/graphics/paint/GeometryMapper.h
+++ b/third_party/WebKit/Source/platform/graphics/paint/GeometryMapper.h
@@ -76,7 +76,8 @@ public:
// sets |success| to true.
FloatRect localToVisualRectInAncestorSpace(const FloatRect&,
const PropertyTreeState& localTransformState,
- const PropertyTreeState& ancestorState, bool& success);
+ const PropertyTreeState& ancestorState,
+ bool& success);
// Maps from a rect in |localTransformSpace| to its transformed rect in |ancestorSpace|. This is computed
// by multiplying the rect by the combined transform between |localTransformState| and |ancestorState|,
@@ -91,7 +92,8 @@ public:
// sets |success| to true.
FloatRect localToAncestorRect(const FloatRect&,
const PropertyTreeState& localTransformState,
- const PropertyTreeState& ancestorState, bool& success);
+ const PropertyTreeState& ancestorState,
+ bool& success);
// Maps from a rect in |ancestorSpace| to its transformed rect in |localTransformSpace|. This is computed
// by multiplying the rect by the inverse combined transform between |localTransformState| and |ancestorState|,
@@ -102,11 +104,17 @@ public:
// sets |success| to true.
FloatRect ancestorToLocalRect(const FloatRect&,
const PropertyTreeState& localTransformState,
- const PropertyTreeState& ancestorState, bool& success);
+ const PropertyTreeState& ancestorState,
+ bool& success);
private:
- // Used by mapToVisualRectInDestinationSpace() and mapRectToDestinationSpace() after fast mapping
- // (assuming destination is an ancestor of source) failed.
+ // Used by mapToVisualRectInDestinationSpace() after fast mapping (assuming destination is an ancestor of source) failed.
+ FloatRect slowMapToVisualRectInDestinationSpace(const FloatRect&,
chrishtr 2016/08/22 22:27:32 Please add a direct unittest to GeometryMapperTest
Xianzhu 2016/08/22 23:30:20 Done.
+ const PropertyTreeState& sourceState,
+ const PropertyTreeState& destinationState,
+ bool& success);
+
+ // Used by mapRectToDestinationSpace() after fast mapping (assuming destination is an ancestor of source) failed.
FloatRect slowMapRectToDestinationSpace(const FloatRect&,
const PropertyTreeState& sourceState,
const PropertyTreeState& destinationState,
@@ -116,13 +124,15 @@ private:
// equal to or a descendant of |ancestorState.transform|.
const TransformationMatrix& localToAncestorMatrix(
const TransformPaintPropertyNode* localTransformNode,
- const PropertyTreeState& ancestorState, bool& success);
+ const PropertyTreeState& ancestorState,
+ bool& success);
// Returns the "clip visual rect" between |localTransformState| and |ancestorState|. See above for the definition
// of "clip visual rect".
- const FloatRect& localToAncestorClipRect(
+ FloatRect localToAncestorClipRect(
const PropertyTreeState& localTransformState,
- const PropertyTreeState& ancestorState);
+ const PropertyTreeState& ancestorState,
+ bool& success);
// Returns the precomputed data if already set, or adds and memoizes a new PrecomputedDataForAncestor otherwise.
PrecomputedDataForAncestor& getPrecomputedDataForAncestor(const PropertyTreeState&);

Powered by Google App Engine
This is Rietveld 408576698