OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 1999 Antti Koivisto (koivisto@kde.org) | 2 * Copyright (C) 1999 Antti Koivisto (koivisto@kde.org) |
3 * Copyright (C) 2004, 2005, 2006, 2007, 2008 Apple Inc. All rights reserved. | 3 * Copyright (C) 2004, 2005, 2006, 2007, 2008 Apple Inc. All rights reserved. |
4 * | 4 * |
5 * This library is free software; you can redistribute it and/or | 5 * This library is free software; you can redistribute it and/or |
6 * modify it under the terms of the GNU Library General Public | 6 * modify it under the terms of the GNU Library General Public |
7 * License as published by the Free Software Foundation; either | 7 * License as published by the Free Software Foundation; either |
8 * version 2 of the License, or (at your option) any later version. | 8 * version 2 of the License, or (at your option) any later version. |
9 * | 9 * |
10 * This library is distributed in the hope that it will be useful, | 10 * This library is distributed in the hope that it will be useful, |
(...skipping 15 matching lines...) Expand all Loading... |
26 | 26 |
27 namespace blink { | 27 namespace blink { |
28 | 28 |
29 StyleTransformData::StyleTransformData() | 29 StyleTransformData::StyleTransformData() |
30 : operations_(ComputedStyle::InitialTransform()), | 30 : operations_(ComputedStyle::InitialTransform()), |
31 origin_(ComputedStyle::InitialTransformOrigin()), | 31 origin_(ComputedStyle::InitialTransformOrigin()), |
32 motion_(ComputedStyle::InitialOffsetAnchor(), | 32 motion_(ComputedStyle::InitialOffsetAnchor(), |
33 ComputedStyle::InitialOffsetPosition(), | 33 ComputedStyle::InitialOffsetPosition(), |
34 nullptr, | 34 nullptr, |
35 ComputedStyle::InitialOffsetDistance(), | 35 ComputedStyle::InitialOffsetDistance(), |
36 ComputedStyle::InitialOffsetRotation()), | 36 ComputedStyle::InitialOffsetRotate()), |
37 translate_(ComputedStyle::InitialTranslate()), | 37 translate_(ComputedStyle::InitialTranslate()), |
38 rotate_(ComputedStyle::InitialRotate()), | 38 rotate_(ComputedStyle::InitialRotate()), |
39 scale_(ComputedStyle::InitialScale()) {} | 39 scale_(ComputedStyle::InitialScale()) {} |
40 | 40 |
41 StyleTransformData::StyleTransformData(const StyleTransformData& o) | 41 StyleTransformData::StyleTransformData(const StyleTransformData& o) |
42 : RefCounted<StyleTransformData>(), | 42 : RefCounted<StyleTransformData>(), |
43 operations_(o.operations_), | 43 operations_(o.operations_), |
44 origin_(o.origin_), | 44 origin_(o.origin_), |
45 motion_(o.motion_), | 45 motion_(o.motion_), |
46 translate_(o.translate_), | 46 translate_(o.translate_), |
47 rotate_(o.rotate_), | 47 rotate_(o.rotate_), |
48 scale_(o.scale_) {} | 48 scale_(o.scale_) {} |
49 | 49 |
50 bool StyleTransformData::operator==(const StyleTransformData& o) const { | 50 bool StyleTransformData::operator==(const StyleTransformData& o) const { |
51 return origin_ == o.origin_ && operations_ == o.operations_ && | 51 return origin_ == o.origin_ && operations_ == o.operations_ && |
52 motion_ == o.motion_ && | 52 motion_ == o.motion_ && |
53 DataEquivalent<TransformOperation>(translate_, o.translate_) && | 53 DataEquivalent<TransformOperation>(translate_, o.translate_) && |
54 DataEquivalent<TransformOperation>(rotate_, o.rotate_) && | 54 DataEquivalent<TransformOperation>(rotate_, o.rotate_) && |
55 DataEquivalent<TransformOperation>(scale_, o.scale_); | 55 DataEquivalent<TransformOperation>(scale_, o.scale_); |
56 } | 56 } |
57 | 57 |
58 bool StyleTransformData::Has3DTransform() const { | 58 bool StyleTransformData::Has3DTransform() const { |
59 return operations_.Has3DOperation() || (translate_ && translate_->Z() != 0) || | 59 return operations_.Has3DOperation() || (translate_ && translate_->Z() != 0) || |
60 (rotate_ && (rotate_->X() != 0 || rotate_->Y() != 0)) || | 60 (rotate_ && (rotate_->X() != 0 || rotate_->Y() != 0)) || |
61 (scale_ && scale_->Z() != 1); | 61 (scale_ && scale_->Z() != 1); |
62 } | 62 } |
63 | 63 |
64 } // namespace blink | 64 } // namespace blink |
OLD | NEW |