| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2000 Lars Knoll (knoll@kde.org) | 2 * Copyright (C) 2000 Lars Knoll (knoll@kde.org) |
| 3 * (C) 2000 Antti Koivisto (koivisto@kde.org) | 3 * (C) 2000 Antti Koivisto (koivisto@kde.org) |
| 4 * (C) 2000 Dirk Mueller (mueller@kde.org) | 4 * (C) 2000 Dirk Mueller (mueller@kde.org) |
| 5 * Copyright (C) 2003, 2005, 2006, 2007, 2008 Apple Inc. All rights reserved. | 5 * Copyright (C) 2003, 2005, 2006, 2007, 2008 Apple Inc. All rights reserved. |
| 6 * Copyright (C) 2006 Graham Dennis (graham.dennis@gmail.com) | 6 * Copyright (C) 2006 Graham Dennis (graham.dennis@gmail.com) |
| 7 * | 7 * |
| 8 * This library is free software; you can redistribute it and/or | 8 * This library is free software; you can redistribute it and/or |
| 9 * modify it under the terms of the GNU Library General Public | 9 * modify it under the terms of the GNU Library General Public |
| 10 * License as published by the Free Software Foundation; either | 10 * License as published by the Free Software Foundation; either |
| 11 * version 2 of the License, or (at your option) any later version. | 11 * version 2 of the License, or (at your option) any later version. |
| 12 * | 12 * |
| 13 * This library is distributed in the hope that it will be useful, | 13 * This library is distributed in the hope that it will be useful, |
| 14 * but WITHOUT ANY WARRANTY; without even the implied warranty of | 14 * but WITHOUT ANY WARRANTY; without even the implied warranty of |
| 15 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | 15 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
| 16 * Library General Public License for more details. | 16 * Library General Public License for more details. |
| 17 * | 17 * |
| 18 * You should have received a copy of the GNU Library General Public License | 18 * You should have received a copy of the GNU Library General Public License |
| 19 * along with this library; see the file COPYING.LIB. If not, write to | 19 * along with this library; see the file COPYING.LIB. If not, write to |
| 20 * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, | 20 * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, |
| 21 * Boston, MA 02110-1301, USA. | 21 * Boston, MA 02110-1301, USA. |
| 22 * | 22 * |
| 23 */ | 23 */ |
| 24 | 24 |
| 25 #ifndef StyleTransformData_h | 25 #ifndef StyleTransformData_h |
| 26 #define StyleTransformData_h | 26 #define StyleTransformData_h |
| 27 | 27 |
| 28 #include "core/CoreExport.h" |
| 28 #include "core/style/StyleMotionData.h" | 29 #include "core/style/StyleMotionData.h" |
| 29 #include "core/style/TransformOrigin.h" | 30 #include "core/style/TransformOrigin.h" |
| 30 #include "platform/transforms/RotateTransformOperation.h" | 31 #include "platform/transforms/RotateTransformOperation.h" |
| 31 #include "platform/transforms/ScaleTransformOperation.h" | 32 #include "platform/transforms/ScaleTransformOperation.h" |
| 32 #include "platform/transforms/TransformOperations.h" | 33 #include "platform/transforms/TransformOperations.h" |
| 33 #include "platform/transforms/TranslateTransformOperation.h" | 34 #include "platform/transforms/TranslateTransformOperation.h" |
| 34 #include "wtf/PassRefPtr.h" | 35 #include "wtf/PassRefPtr.h" |
| 35 #include "wtf/RefCounted.h" | 36 #include "wtf/RefCounted.h" |
| 36 | 37 |
| 37 namespace blink { | 38 namespace blink { |
| 38 | 39 |
| 39 class StyleTransformData : public RefCounted<StyleTransformData> { | 40 class CORE_EXPORT StyleTransformData : public RefCounted<StyleTransformData> { |
| 40 public: | 41 public: |
| 41 static PassRefPtr<StyleTransformData> create() { | 42 static PassRefPtr<StyleTransformData> create() { |
| 42 return adoptRef(new StyleTransformData); | 43 return adoptRef(new StyleTransformData); |
| 43 } | 44 } |
| 44 PassRefPtr<StyleTransformData> copy() const { | 45 PassRefPtr<StyleTransformData> copy() const { |
| 45 return adoptRef(new StyleTransformData(*this)); | 46 return adoptRef(new StyleTransformData(*this)); |
| 46 } | 47 } |
| 47 | 48 |
| 48 bool operator==(const StyleTransformData&) const; | 49 bool operator==(const StyleTransformData&) const; |
| 49 bool operator!=(const StyleTransformData& o) const { return !(*this == o); } | 50 bool operator!=(const StyleTransformData& o) const { return !(*this == o); } |
| 50 bool has3DTransform() const; | 51 bool has3DTransform() const; |
| 51 | 52 |
| 53 bool transformDataEquivalent(const StyleTransformData&) const; |
| 54 |
| 52 TransformOperations m_operations; | 55 TransformOperations m_operations; |
| 53 TransformOrigin m_origin; | 56 TransformOrigin m_origin; |
| 54 StyleMotionData m_motion; | 57 StyleMotionData m_motion; |
| 58 LengthPoint m_perspectiveOrigin; |
| 55 RefPtr<TranslateTransformOperation> m_translate; | 59 RefPtr<TranslateTransformOperation> m_translate; |
| 56 RefPtr<RotateTransformOperation> m_rotate; | 60 RefPtr<RotateTransformOperation> m_rotate; |
| 57 RefPtr<ScaleTransformOperation> m_scale; | 61 RefPtr<ScaleTransformOperation> m_scale; |
| 58 | 62 |
| 63 float m_perspective; |
| 64 |
| 65 unsigned m_transformStyle3D : 1; // ETransformStyle3D |
| 66 unsigned m_backfaceVisibility : 1; // EBackfaceVisibility |
| 67 |
| 68 // Whether the transform (if it exists) is stored in the element's inline |
| 69 // style. |
| 70 unsigned m_hasInlineTransform : 1; |
| 71 |
| 59 private: | 72 private: |
| 60 StyleTransformData(); | 73 StyleTransformData(); |
| 61 StyleTransformData(const StyleTransformData&); | 74 StyleTransformData(const StyleTransformData&); |
| 62 }; | 75 }; |
| 63 | 76 |
| 64 } // namespace blink | 77 } // namespace blink |
| 65 | 78 |
| 66 #endif // StyleTransformData_h | 79 #endif // StyleTransformData_h |
| OLD | NEW |