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

Unified Diff: third_party/WebKit/Source/core/css/cssom/CSSScale.h

Issue 2935413002: [Typed OM] Add comments and consistent structure to all the CSSTransformComponent subclasses (Closed)
Patch Set: Created 3 years, 6 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/core/css/cssom/CSSScale.h
diff --git a/third_party/WebKit/Source/core/css/cssom/CSSScale.h b/third_party/WebKit/Source/core/css/cssom/CSSScale.h
index bbe6e67a872642f4fd97a9ff089b5febb4bb4a65..c7c4222f001e180b2c66548a3a0097306ff61941 100644
--- a/third_party/WebKit/Source/core/css/cssom/CSSScale.h
+++ b/third_party/WebKit/Source/core/css/cssom/CSSScale.h
@@ -10,36 +10,41 @@
namespace blink {
+class DOMMatrix;
+
+// Represents a scale value in a CSSTransformValue used for properties like
+// "transform".
+// See CSSScale.idl for more information about this class.
class CORE_EXPORT CSSScale final : public CSSTransformComponent {
WTF_MAKE_NONCOPYABLE(CSSScale);
DEFINE_WRAPPERTYPEINFO();
public:
+ // Constructors defined in the IDL.
static CSSScale* Create(double x, double y) { return new CSSScale(x, y); }
-
static CSSScale* Create(double x, double y, double z) {
return new CSSScale(x, y, z);
}
+ // Blink-internal ways of creating CSSRotations.
rjwright 2017/06/16 06:13:04 CSSScales
meade_UTC10 2017/06/16 06:43:14 Done.
static CSSScale* FromCSSValue(const CSSFunctionValue&);
+ // Getters and setters for attributes defined in the IDL.
double x() const { return x_; }
double y() const { return y_; }
double z() const { return z_; }
-
void setX(double x) { x_ = x; }
void setY(double y) { y_ = y; }
void setZ(double z) { z_ = z; }
+ // Internal methods - from CSSTransformComponent.
TransformComponentType GetType() const override {
return is2d_ ? kScaleType : kScale3DType;
}
-
DOMMatrix* AsMatrix() const override {
DOMMatrix* result = DOMMatrix::Create();
return result->scaleSelf(x_, y_, z_);
}
-
CSSFunctionValue* ToCSSValue() const override;
private:

Powered by Google App Engine
This is Rietveld 408576698