From 7d2f6a8e242ee610162d7cca9498763f0883cbfe Mon Sep 17 00:00:00 2001 From: David Zbarsky Date: Thu, 23 May 2013 15:09:27 +0800 Subject: [PATCH] Bug 788549 Part 3: Refactor nsComputedDOMStyle::DoGetTransform r=dbaron --- layout/style/nsComputedDOMStyle.cpp | 6 ++++++ layout/style/nsComputedDOMStyle.h | 1 + 2 files changed, 7 insertions(+) diff --git a/layout/style/nsComputedDOMStyle.cpp b/layout/style/nsComputedDOMStyle.cpp index 736a94b3514..095279530e3 100644 --- a/layout/style/nsComputedDOMStyle.cpp +++ b/layout/style/nsComputedDOMStyle.cpp @@ -1096,6 +1096,12 @@ nsComputedDOMStyle::DoGetTransform() bounds, float(nsDeviceContext::AppUnitsPerCSSPixel())); + return MatrixToCSSValue(matrix); +} + +/* static */ CSSValue* +nsComputedDOMStyle::MatrixToCSSValue(gfx3DMatrix& matrix) +{ bool is3D = !matrix.Is2D(); nsAutoString resultString(NS_LITERAL_STRING("matrix")); diff --git a/layout/style/nsComputedDOMStyle.h b/layout/style/nsComputedDOMStyle.h index 556a3fca4c0..2c2203b4e79 100644 --- a/layout/style/nsComputedDOMStyle.h +++ b/layout/style/nsComputedDOMStyle.h @@ -437,6 +437,7 @@ private: mozilla::dom::CSSValue* DoGetMaskType(); mozilla::dom::CSSValue* DoGetPaintOrder(); + static mozilla::dom::CSSValue* MatrixToCSSValue(gfx3DMatrix& aMatrix); nsDOMCSSValueList* GetROCSSValueList(bool aCommaDelimited); void SetToRGBAColor(nsROCSSPrimitiveValue* aValue, nscolor aColor); void SetValueToStyleImage(const nsStyleImage& aStyleImage,