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

Unified Diff: third_party/WebKit/Source/core/css/cssom/CSSRotation.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/CSSRotation.h
diff --git a/third_party/WebKit/Source/core/css/cssom/CSSRotation.h b/third_party/WebKit/Source/core/css/cssom/CSSRotation.h
index 6c3f75db139d950d5419958a2bb3215e48d315dd..856b3fa795a767e25c6a94b127bcf147ee72add7 100644
--- a/third_party/WebKit/Source/core/css/cssom/CSSRotation.h
+++ b/third_party/WebKit/Source/core/css/cssom/CSSRotation.h
@@ -12,15 +12,18 @@ namespace blink {
class DOMMatrix;
+// Represents a rotation value in a CSSTransformValue used for properties like
+// "transform".
+// See CSSRotation.idl for more information about this class.
class CORE_EXPORT CSSRotation final : public CSSTransformComponent {
WTF_MAKE_NONCOPYABLE(CSSRotation);
DEFINE_WRAPPERTYPEINFO();
public:
+ // Constructors defined in the IDL.
static CSSRotation* Create(const CSSNumericValue* angle_value) {
return new CSSRotation(angle_value);
}
-
static CSSRotation* Create(double x,
double y,
double z,
@@ -28,8 +31,11 @@ class CORE_EXPORT CSSRotation final : public CSSTransformComponent {
return new CSSRotation(x, y, z, angle_value);
}
+ // Blink-internal ways of creating CSSRotations.
static CSSRotation* FromCSSValue(const CSSFunctionValue&);
+ // Getters and setters for attributes defined in the IDL.
+ // Bindings require a non const return value.
rjwright 2017/06/16 06:13:04 Duplicate with the line below?
meade_UTC10 2017/06/16 06:43:14 removed
// Bindings requires returning non-const pointers. This is safe because
// CSSNumericValues are immutable.
CSSNumericValue* angle() const {
@@ -39,10 +45,10 @@ class CORE_EXPORT CSSRotation final : public CSSTransformComponent {
double y() const { return y_; }
double z() const { return z_; }
+ // Internal methods - from CSSTransformComponent.
TransformComponentType GetType() const override {
return is2d_ ? kRotationType : kRotation3DType;
}
-
DOMMatrix* AsMatrix() const override {
return nullptr;
// TODO(meade): Implement.
@@ -53,7 +59,6 @@ class CORE_EXPORT CSSRotation final : public CSSTransformComponent {
// angle_->to(CSSPrimitiveValue::UnitType::kDegrees)->value(),
// x_, y_, z_);
}
-
CSSFunctionValue* ToCSSValue() const override;
DEFINE_INLINE_VIRTUAL_TRACE() {

Powered by Google App Engine
This is Rietveld 408576698