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

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: rebase 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..0e8b6d598bbde69659d7b134df45f441ed4f7572 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,10 @@ 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 requires returning non-const pointers. This is safe because
// CSSNumericValues are immutable.
CSSNumericValue* angle() const {
@@ -39,10 +44,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 +58,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() {
« no previous file with comments | « third_party/WebKit/Source/core/css/cssom/CSSPerspective.h ('k') | third_party/WebKit/Source/core/css/cssom/CSSScale.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698