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

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

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
« no previous file with comments | « third_party/WebKit/Source/core/paint/PaintInvalidator.cpp ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 bc4e1ac699fb4ec02fe8449339b839fd81469757..5bba076eb625b610b439fef9561bf420725c444a 100644
--- a/third_party/WebKit/Source/platform/geometry/TransformState.h
+++ b/third_party/WebKit/Source/platform/geometry/TransformState.h
@@ -26,14 +26,15 @@
#ifndef TransformState_h
#define TransformState_h
+#include <memory>
#include "platform/geometry/FloatPoint.h"
#include "platform/geometry/FloatQuad.h"
#include "platform/geometry/IntSize.h"
+#include "platform/geometry/LayoutPoint.h"
#include "platform/geometry/LayoutSize.h"
#include "platform/transforms/AffineTransform.h"
#include "platform/transforms/TransformationMatrix.h"
#include "wtf/Allocator.h"
-#include <memory>
namespace blink {
@@ -87,7 +88,10 @@ class PLATFORM_EXPORT TransformState {
TransformState& operator=(const TransformState&);
+ // Note: this overrides the quad and ignores any accumulatedOffset.
+ // If it's desired to include the offset, call flatten() first.
void setQuad(const FloatQuad& quad) {
+ DCHECK(!m_accumulatingTransform);
// FIXME: this assumes that the quad being added is in the coordinate system
// of the current state. This breaks if we're simultaneously mapping a
// point. https://bugs.webkit.org/show_bug.cgi?id=106680
@@ -107,6 +111,10 @@ class PLATFORM_EXPORT TransformState {
TransformAccumulation accumulate = FlattenTransform) {
move(LayoutSize(size), accumulate);
}
+ void moveBy(const LayoutPoint& point,
+ TransformAccumulation accumulate = FlattenTransform) {
+ move(LayoutSize(point.x(), point.y()), accumulate);
+ }
void applyTransform(const AffineTransform& transformFromContainer,
TransformAccumulation = FlattenTransform,
bool* wasClamped = 0);
« no previous file with comments | « third_party/WebKit/Source/core/paint/PaintInvalidator.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698