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

Unified Diff: third_party/WebKit/Source/core/style/StyleTransformData.cpp

Issue 2476923002: [RFC] Move StyleTransformData to ComputedStyle top-level (Closed)
Patch Set: Add export for StyleTransformData Created 4 years 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « third_party/WebKit/Source/core/style/StyleTransformData.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/Source/core/style/StyleTransformData.cpp
diff --git a/third_party/WebKit/Source/core/style/StyleTransformData.cpp b/third_party/WebKit/Source/core/style/StyleTransformData.cpp
index 3b8ff2a648fd16a36d8491b9905eccc4dd857ce5..ddeaf5fc82b6a53e397d2249071f661d10f4186d 100644
--- a/third_party/WebKit/Source/core/style/StyleTransformData.cpp
+++ b/third_party/WebKit/Source/core/style/StyleTransformData.cpp
@@ -34,25 +34,45 @@ StyleTransformData::StyleTransformData()
nullptr,
ComputedStyle::initialOffsetDistance(),
ComputedStyle::initialOffsetRotation()),
+ m_perspectiveOrigin(ComputedStyle::initialPerspectiveOrigin()),
m_translate(ComputedStyle::initialTranslate()),
m_rotate(ComputedStyle::initialRotate()),
- m_scale(ComputedStyle::initialScale()) {}
+ m_scale(ComputedStyle::initialScale()),
+ m_perspective(ComputedStyle::initialPerspective()),
+ m_transformStyle3D(ComputedStyle::initialTransformStyle3D()),
+ m_backfaceVisibility(ComputedStyle::initialBackfaceVisibility()),
+ m_hasInlineTransform(false) {}
StyleTransformData::StyleTransformData(const StyleTransformData& o)
: RefCounted<StyleTransformData>(),
m_operations(o.m_operations),
m_origin(o.m_origin),
m_motion(o.m_motion),
+ m_perspectiveOrigin(o.m_perspectiveOrigin),
m_translate(o.m_translate),
m_rotate(o.m_rotate),
- m_scale(o.m_scale) {}
+ m_scale(o.m_scale),
+ m_perspective(o.m_perspective),
+ m_transformStyle3D(o.m_transformStyle3D),
+ m_backfaceVisibility(o.m_backfaceVisibility),
+ m_hasInlineTransform(o.m_hasInlineTransform) {}
+
+bool StyleTransformData::transformDataEquivalent(
+ const StyleTransformData& other) const {
+ return m_origin == other.m_origin && m_operations == other.m_operations &&
+ m_motion == other.m_motion &&
+ dataEquivalent<TransformOperation>(m_translate, other.m_translate) &&
+ dataEquivalent<TransformOperation>(m_rotate, other.m_rotate) &&
+ dataEquivalent<TransformOperation>(m_scale, other.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 &&
- dataEquivalent<TransformOperation>(m_translate, o.m_translate) &&
- dataEquivalent<TransformOperation>(m_rotate, o.m_rotate) &&
- dataEquivalent<TransformOperation>(m_scale, o.m_scale);
+ return transformDataEquivalent(o) &&
+ m_perspectiveOrigin == o.m_perspectiveOrigin &&
+ m_perspective == o.m_perspective &&
+ m_transformStyle3D == o.m_transformStyle3D &&
+ m_backfaceVisibility == o.m_backfaceVisibility &&
+ m_hasInlineTransform == o.m_hasInlineTransform;
}
bool StyleTransformData::has3DTransform() const {
« no previous file with comments | « third_party/WebKit/Source/core/style/StyleTransformData.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698