Chromium Code Reviews| Index: Source/core/style/StyleTransformData.cpp |
| diff --git a/Source/core/style/StyleTransformData.cpp b/Source/core/style/StyleTransformData.cpp |
| index f9f35a5780f5b2d2499175884d2824d24dfc5b6d..4a51f6f66bd642fffc7aa48b287315b6295816ce 100644 |
| --- a/Source/core/style/StyleTransformData.cpp |
| +++ b/Source/core/style/StyleTransformData.cpp |
| @@ -23,6 +23,7 @@ |
| #include "core/style/StyleTransformData.h" |
| #include "core/style/ComputedStyle.h" |
| +#include "core/style/DataEquivalency.h" |
| namespace blink { |
| @@ -38,12 +39,28 @@ StyleTransformData::StyleTransformData(const StyleTransformData& o) |
| , m_operations(o.m_operations) |
| , m_origin(o.m_origin) |
| , m_motion(o.m_motion) |
| + , m_translate(o.m_translate) |
| + , m_rotate(o.m_rotate) |
| + , m_scale(o.m_scale) |
| { |
| } |
| bool StyleTransformData::operator==(const StyleTransformData& o) const |
| { |
| - return m_origin == o.m_origin && m_operations == o.m_operations && m_motion == o.m_motion; |
| + return m_origin == o.m_origin |
| + && m_operations == o.m_operations |
|
Timothy Loh
2015/06/15 06:17:34
indentation looks wrong
soonm
2015/06/15 06:59:19
Done - Fixed
|
| + && m_motion == o.m_motion |
| + && dataEquivalent<TransformOperation>(m_translate, o.m_translate) |
| + && dataEquivalent<TransformOperation>(m_rotate, o.m_rotate) |
| + && dataEquivalent<TransformOperation>(m_scale, o.m_scale); |
| +} |
| + |
| +bool StyleTransformData::has3DTransformProperties() const |
| +{ |
| + return m_operations.has3DOperation() |
| + || (m_translate && m_translate->z() != 0) |
| + || (m_rotate && (m_rotate->x() != 0 || m_rotate->y() != 0 || m_rotate->z() != 1)) |
|
Timothy Loh
2015/06/15 06:17:34
probably don't need to check z here?
soonm
2015/06/15 06:59:19
Done - Removed
|
| + || (m_scale && m_scale->z() != 1); |
| } |
| } // namespace blink |