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

Unified Diff: third_party/WebKit/Source/core/style/ComputedStyle.h

Issue 2241993002: CSS Motion Path: New names for properties (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase Created 4 years, 3 months 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
Index: third_party/WebKit/Source/core/style/ComputedStyle.h
diff --git a/third_party/WebKit/Source/core/style/ComputedStyle.h b/third_party/WebKit/Source/core/style/ComputedStyle.h
index f0550f586803e7bcf303af24dc25b042f1f16532..38e0ced30b219d1211f040088c643ded5a765d6d 100644
--- a/third_party/WebKit/Source/core/style/ComputedStyle.h
+++ b/third_party/WebKit/Source/core/style/ComputedStyle.h
@@ -44,8 +44,8 @@
#include "core/style/StyleGridData.h"
#include "core/style/StyleGridItemData.h"
#include "core/style/StyleInheritedData.h"
-#include "core/style/StyleMotionRotation.h"
#include "core/style/StyleMultiColData.h"
+#include "core/style/StyleOffsetRotation.h"
#include "core/style/StyleRareInheritedData.h"
#include "core/style/StyleRareNonInheritedData.h"
#include "core/style/StyleReflection.h"
@@ -970,20 +970,20 @@ public:
WebBlendMode blendMode() const { return static_cast<WebBlendMode>(m_rareNonInheritedData->m_effectiveBlendMode); }
void setBlendMode(WebBlendMode v) { m_rareNonInheritedData.access()->m_effectiveBlendMode = v; }
- // motion-path
- static StylePath* initialMotionPath() { return nullptr; }
- StylePath* motionPath() const { return m_rareNonInheritedData->m_transform->m_motion.m_path.get(); }
- void setMotionPath(PassRefPtr<StylePath>);
+ // offset-distance
suzyh_UTC10 (ex-contributor) 2016/09/19 01:21:04 Should these be moved down after object* to mainta
+ static Length initialOffsetDistance() { return Length(0, Fixed); }
+ const Length& offsetDistance() const { return m_rareNonInheritedData->m_transform->m_motion.m_distance; }
+ void setOffsetDistance(const Length& offsetDistance) { SET_NESTED_VAR(m_rareNonInheritedData, m_transform, m_motion.m_distance, offsetDistance); }
- // motion-offset
- static Length initialMotionOffset() { return Length(0, Fixed); }
- const Length& motionOffset() const { return m_rareNonInheritedData->m_transform->m_motion.m_offset; }
- void setMotionOffset(const Length& motionOffset) { SET_NESTED_VAR(m_rareNonInheritedData, m_transform, m_motion.m_offset, motionOffset); }
+ // offset-path
+ static StylePath* initialOffsetPath() { return nullptr; }
+ StylePath* offsetPath() const { return m_rareNonInheritedData->m_transform->m_motion.m_path.get(); }
+ void setOffsetPath(PassRefPtr<StylePath>);
- // motion-rotation
- static StyleMotionRotation initialMotionRotation() { return StyleMotionRotation(0, MotionRotationAuto); }
- const StyleMotionRotation& motionRotation() const { return m_rareNonInheritedData->m_transform->m_motion.m_rotation; }
- void setMotionRotation(const StyleMotionRotation& motionRotation) { SET_NESTED_VAR(m_rareNonInheritedData, m_transform, m_motion.m_rotation, motionRotation); }
+ // offset-rotation
+ static StyleOffsetRotation initialOffsetRotation() { return StyleOffsetRotation(0, OffsetRotationAuto); }
+ const StyleOffsetRotation& offsetRotation() const { return m_rareNonInheritedData->m_transform->m_motion.m_rotation; }
+ void setOffsetRotation(const StyleOffsetRotation& offsetRotation) { SET_NESTED_VAR(m_rareNonInheritedData, m_transform, m_motion.m_rotation, offsetRotation); }
// object-fit
static ObjectFit initialObjectFit() { return ObjectFitFill; }
@@ -2134,7 +2134,7 @@ public:
bool hasBlendMode() const { return blendMode() != WebBlendModeNormal; }
// Motion utility functions.
- bool hasMotionPath() const { return motionPath(); }
+ bool hasOffsetPath() const { return offsetPath(); }
// Direction utility functions.
bool isLeftToRightDirection() const { return direction() == LTR; }
@@ -2242,7 +2242,7 @@ public:
// Filter/transform utility functions.
bool has3DTransform() const { return m_rareNonInheritedData->m_transform->has3DTransform(); }
- bool hasTransform() const { return hasTransformOperations() || hasMotionPath() || hasCurrentTransformAnimation() || translate() || rotate() || scale(); }
+ bool hasTransform() const { return hasTransformOperations() || hasOffsetPath() || hasCurrentTransformAnimation() || translate() || rotate() || scale(); }
bool hasTransformOperations() const { return !m_rareNonInheritedData->m_transform->m_operations.operations().isEmpty(); }
ETransformStyle3D usedTransformStyle3D() const { return hasGroupingProperty() ? TransformStyle3DFlat : transformStyle3D(); }
bool transformDataEquivalent(const ComputedStyle& otherStyle) const { return m_rareNonInheritedData->m_transform == otherStyle.m_rareNonInheritedData->m_transform; }

Powered by Google App Engine
This is Rietveld 408576698