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

Side by Side Diff: third_party/WebKit/Source/core/css/cssom/CSSSkew.h

Issue 2943303002: [CSS Typed OM] Refactor is2D handling in CSSTransformComponents to match new spec (Closed)
Patch Set: rebase Created 3 years, 5 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 unified diff | Download patch
OLDNEW
1 // Copyright 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef CSSSkew_h 5 #ifndef CSSSkew_h
6 #define CSSSkew_h 6 #define CSSSkew_h
7 7
8 #include "core/css/cssom/CSSNumericValue.h" 8 #include "core/css/cssom/CSSNumericValue.h"
9 #include "core/css/cssom/CSSTransformComponent.h" 9 #include "core/css/cssom/CSSTransformComponent.h"
10 10
(...skipping 17 matching lines...) Expand all
28 28
29 // Internal ways of creating CSSSkews. 29 // Internal ways of creating CSSSkews.
30 static CSSSkew* FromCSSValue(const CSSFunctionValue&); 30 static CSSSkew* FromCSSValue(const CSSFunctionValue&);
31 31
32 // Getters and setters for the ax and ay attributes defined in the IDL. 32 // Getters and setters for the ax and ay attributes defined in the IDL.
33 CSSNumericValue* ax() { return ax_.Get(); } 33 CSSNumericValue* ax() { return ax_.Get(); }
34 CSSNumericValue* ay() { return ay_.Get(); } 34 CSSNumericValue* ay() { return ay_.Get(); }
35 void setAx(CSSNumericValue*, ExceptionState&); 35 void setAx(CSSNumericValue*, ExceptionState&);
36 void setAy(CSSNumericValue*, ExceptionState&); 36 void setAy(CSSNumericValue*, ExceptionState&);
37 37
38 // From CSSTransformComponent
39 // Setting is2D for CSSSkew does nothing.
40 // https://drafts.css-houdini.org/css-typed-om/#dom-cssskew-is2d
41 void setIs2D(bool is2D) final {}
42
38 // Internal methods - from CSSTransformComponent. 43 // Internal methods - from CSSTransformComponent.
39 DOMMatrix* AsMatrix() const override; 44 DOMMatrix* AsMatrix() const override;
40 TransformComponentType GetType() const override { return kSkewType; } 45 TransformComponentType GetType() const override { return kSkewType; }
41 CSSFunctionValue* ToCSSValue() const override; 46 CSSFunctionValue* ToCSSValue() const override;
42 47
43 DEFINE_INLINE_VIRTUAL_TRACE() { 48 DEFINE_INLINE_VIRTUAL_TRACE() {
44 visitor->Trace(ax_); 49 visitor->Trace(ax_);
45 visitor->Trace(ay_); 50 visitor->Trace(ay_);
46 CSSTransformComponent::Trace(visitor); 51 CSSTransformComponent::Trace(visitor);
47 } 52 }
48 53
49 private: 54 private:
50 CSSSkew(CSSNumericValue* ax, CSSNumericValue* ay) 55 CSSSkew(CSSNumericValue* ax, CSSNumericValue* ay)
51 : CSSTransformComponent(), ax_(ax), ay_(ay) {} 56 : CSSTransformComponent(true /* is2D */), ax_(ax), ay_(ay) {}
52 57
53 Member<CSSNumericValue> ax_; 58 Member<CSSNumericValue> ax_;
54 Member<CSSNumericValue> ay_; 59 Member<CSSNumericValue> ay_;
55 }; 60 };
56 61
57 } // namespace blink 62 } // namespace blink
58 63
59 #endif 64 #endif
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698