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

Unified Diff: Source/core/platform/graphics/transforms/TranslateTransformOperation.h

Issue 22900008: Make vw/vh units to work in css transforms. Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 7 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: Source/core/platform/graphics/transforms/TranslateTransformOperation.h
diff --git a/Source/core/platform/graphics/transforms/TranslateTransformOperation.h b/Source/core/platform/graphics/transforms/TranslateTransformOperation.h
index 8db8971046ca7a20dc684b6ea720222a596aad71..96ef1ac80d4f8a54d0e5cb836468f5603012825c 100644
--- a/Source/core/platform/graphics/transforms/TranslateTransformOperation.h
+++ b/Source/core/platform/graphics/transforms/TranslateTransformOperation.h
@@ -43,9 +43,9 @@ public:
return adoptRef(new TranslateTransformOperation(tx, ty, tz, type));
}
- double x(const FloatSize& borderBoxSize) const { return floatValueForLength(m_x, borderBoxSize.width()); }
- double y(const FloatSize& borderBoxSize) const { return floatValueForLength(m_y, borderBoxSize.height()); }
- double z(const FloatSize&) const { return floatValueForLength(m_z, 1); }
+ double x(const FloatSize& borderBoxSize, RenderView* renderView) const { return floatValueForLength(m_x, borderBoxSize.width(), renderView); }
+ double y(const FloatSize& borderBoxSize, RenderView* renderView) const { return floatValueForLength(m_y, borderBoxSize.height(), renderView); }
+ double z(const FloatSize&, RenderView* renderView) const { return floatValueForLength(m_z, 1, renderView); }
Length x() const { return m_x; }
Length y() const { return m_y; }
@@ -65,13 +65,13 @@ private:
return m_x == t->m_x && m_y == t->m_y && m_z == t->m_z;
}
- virtual bool apply(TransformationMatrix& transform, const FloatSize& borderBoxSize) const
+ virtual bool apply(TransformationMatrix& transform, const FloatSize& borderBoxSize, RenderView* renderView) const
{
- transform.translate3d(x(borderBoxSize), y(borderBoxSize), z(borderBoxSize));
+ transform.translate3d(x(borderBoxSize, renderView), y(borderBoxSize, renderView), z(borderBoxSize, renderView));
return m_x.type() == Percent || m_y.type() == Percent;
}
- virtual PassRefPtr<TransformOperation> blend(const TransformOperation* from, double progress, bool blendToIdentity = false);
+ virtual PassRefPtr<TransformOperation> blend(const TransformOperation* from, double progress, bool blendToIdentity = false, RenderView* =0);
TranslateTransformOperation(const Length& tx, const Length& ty, const Length& tz, OperationType type)
: m_x(tx)

Powered by Google App Engine
This is Rietveld 408576698