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

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

Issue 2943303002: [CSS Typed OM] Refactor is2D handling in CSSTransformComponents to match new spec (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/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 a285779fbabc6ca374cad94c3259bb7386961c24..3284af0f393b091218a85585c6b5443714eb9103 100644
--- a/third_party/WebKit/Source/core/css/cssom/CSSScale.h
+++ b/third_party/WebKit/Source/core/css/cssom/CSSScale.h
@@ -38,23 +38,22 @@ class CORE_EXPORT CSSScale final : public CSSTransformComponent {
void setZ(double z) { z_ = z; }
// Internal methods - from CSSTransformComponent.
- TransformComponentType GetType() const override {
- return is2d_ ? kScaleType : kScale3DType;
- }
- DOMMatrix* AsMatrix() const override {
+ TransformComponentType GetType() const final { return kScaleType; }
+ DOMMatrix* AsMatrix() const final {
DOMMatrix* result = DOMMatrix::Create();
return result->scaleSelf(x_, y_, z_);
}
- CSSFunctionValue* ToCSSValue() const override;
+ CSSFunctionValue* ToCSSValue() const final;
private:
- CSSScale(double x, double y) : x_(x), y_(y), z_(1), is2d_(true) {}
- CSSScale(double x, double y, double z) : x_(x), y_(y), z_(z), is2d_(false) {}
+ CSSScale(double x, double y)
+ : CSSTransformComponent(true /* is2D */), x_(x), y_(y), z_(1) {}
+ CSSScale(double x, double y, double z)
+ : CSSTransformComponent(false /* is2D */), x_(x), y_(y), z_(z) {}
double x_;
double y_;
double z_;
- bool is2d_;
};
} // namespace blink
« no previous file with comments | « third_party/WebKit/Source/core/css/cssom/CSSRotation.cpp ('k') | third_party/WebKit/Source/core/css/cssom/CSSScale.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698