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

Unified Diff: third_party/WebKit/Source/platform/geometry/TransformState.h

Issue 1777613002: Add localToAbsoluteTransform and localToAncestorTransform. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 9 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/geometry/TransformState.h
diff --git a/third_party/WebKit/Source/platform/geometry/TransformState.h b/third_party/WebKit/Source/platform/geometry/TransformState.h
index d0ed2753bf62ada0a6adab171e007bd0d8f193cc..8712f8c7f350428bfc2fa23a05d59a677ba61b4c 100644
--- a/third_party/WebKit/Source/platform/geometry/TransformState.h
+++ b/third_party/WebKit/Source/platform/geometry/TransformState.h
@@ -59,6 +59,7 @@ public:
, m_mapPoint(true)
, m_mapQuad(false)
, m_direction(mappingDirection)
+ , m_forceAccumulatingTransform(false)
{
}
@@ -68,6 +69,18 @@ public:
, m_mapPoint(false)
, m_mapQuad(true)
, m_direction(mappingDirection)
+ , m_forceAccumulatingTransform(false)
+ {
+ }
+
+ // Accumulate a transform but don't map any points directly.
+ TransformState(TransformDirection mappingDirection)
+ : m_accumulatedTransform(TransformationMatrix::create())
+ , m_accumulatingTransform(true)
+ , m_mapPoint(false)
+ , m_mapQuad(false)
+ , m_direction(mappingDirection)
+ , m_forceAccumulatingTransform(true)
{
}
@@ -106,6 +119,9 @@ public:
FloatPoint mappedPoint(bool* wasClamped = 0) const;
FloatQuad mappedQuad(bool* wasClamped = 0) const;
+ // Return the accumulated transform.
+ const TransformationMatrix& accumulatedTransform() const;
+
private:
void translateTransform(const LayoutSize&);
void translateMappedCoordinates(const LayoutSize&);
@@ -121,6 +137,7 @@ private:
bool m_accumulatingTransform;
bool m_mapPoint, m_mapQuad;
TransformDirection m_direction;
+ bool m_forceAccumulatingTransform;
szager1 2016/03/08 23:34:15 Please reorder to keep all the bool's together.
dmazzoni 2016/03/09 18:14:59 Done.
};
} // namespace blink

Powered by Google App Engine
This is Rietveld 408576698