OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2008 Apple Inc. All Rights Reserved. | 2 * Copyright (C) 2008 Apple Inc. All Rights Reserved. |
3 * | 3 * |
4 * Redistribution and use in source and binary forms, with or without | 4 * Redistribution and use in source and binary forms, with or without |
5 * modification, are permitted provided that the following conditions | 5 * modification, are permitted provided that the following conditions |
6 * are met: | 6 * are met: |
7 * 1. Redistributions of source code must retain the above copyright | 7 * 1. Redistributions of source code must retain the above copyright |
8 * notice, this list of conditions and the following disclaimer. | 8 * notice, this list of conditions and the following disclaimer. |
9 * 2. Redistributions in binary form must reproduce the above copyright | 9 * 2. Redistributions in binary form must reproduce the above copyright |
10 * notice, this list of conditions and the following disclaimer in the | 10 * notice, this list of conditions and the following disclaimer in the |
(...skipping 16 matching lines...) Expand all Loading... |
27 #define CSSMatrix_h | 27 #define CSSMatrix_h |
28 | 28 |
29 #include "bindings/core/v8/ScriptWrappable.h" | 29 #include "bindings/core/v8/ScriptWrappable.h" |
30 #include "platform/transforms/TransformationMatrix.h" | 30 #include "platform/transforms/TransformationMatrix.h" |
31 #include "wtf/RefCounted.h" | 31 #include "wtf/RefCounted.h" |
32 #include "wtf/text/WTFString.h" | 32 #include "wtf/text/WTFString.h" |
33 | 33 |
34 namespace blink { | 34 namespace blink { |
35 | 35 |
36 class ExceptionState; | 36 class ExceptionState; |
| 37 class ExecutionContext; |
37 | 38 |
38 class CSSMatrix final : public RefCountedWillBeGarbageCollected<CSSMatrix>, publ
ic ScriptWrappable { | 39 class CSSMatrix final : public RefCountedWillBeGarbageCollected<CSSMatrix>, publ
ic ScriptWrappable { |
39 DEFINE_WRAPPERTYPEINFO(); | 40 DEFINE_WRAPPERTYPEINFO(); |
40 public: | 41 public: |
41 static PassRefPtrWillBeRawPtr<CSSMatrix> create(const TransformationMatrix&
m) | 42 static PassRefPtrWillBeRawPtr<CSSMatrix> create(const TransformationMatrix&
m) |
42 { | 43 { |
43 return adoptRefWillBeNoop(new CSSMatrix(m)); | 44 return adoptRefWillBeNoop(new CSSMatrix(m)); |
44 } | 45 } |
45 static PassRefPtrWillBeRawPtr<CSSMatrix> create(const String& s, ExceptionSt
ate& exceptionState) | 46 static PassRefPtrWillBeRawPtr<CSSMatrix> create(ExecutionContext*, const Str
ing&, ExceptionState&); |
46 { | |
47 return adoptRefWillBeNoop(new CSSMatrix(s, exceptionState)); | |
48 } | |
49 | 47 |
50 double a() const { return m_matrix.a(); } | 48 double a() const { return m_matrix.a(); } |
51 double b() const { return m_matrix.b(); } | 49 double b() const { return m_matrix.b(); } |
52 double c() const { return m_matrix.c(); } | 50 double c() const { return m_matrix.c(); } |
53 double d() const { return m_matrix.d(); } | 51 double d() const { return m_matrix.d(); } |
54 double e() const { return m_matrix.e(); } | 52 double e() const { return m_matrix.e(); } |
55 double f() const { return m_matrix.f(); } | 53 double f() const { return m_matrix.f(); } |
56 | 54 |
57 void setA(double f) { m_matrix.setA(f); } | 55 void setA(double f) { m_matrix.setA(f); } |
58 void setB(double f) { m_matrix.setB(f); } | 56 void setB(double f) { m_matrix.setB(f); } |
(...skipping 94 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
153 protected: | 151 protected: |
154 CSSMatrix(const TransformationMatrix&); | 152 CSSMatrix(const TransformationMatrix&); |
155 CSSMatrix(const String&, ExceptionState&); | 153 CSSMatrix(const String&, ExceptionState&); |
156 | 154 |
157 TransformationMatrix m_matrix; | 155 TransformationMatrix m_matrix; |
158 }; | 156 }; |
159 | 157 |
160 } // namespace blink | 158 } // namespace blink |
161 | 159 |
162 #endif // CSSMatrix_h | 160 #endif // CSSMatrix_h |
OLD | NEW |