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 2c6573dcf835ad3e42c2bc0ec401d208288be610..a3b2c7a5abcbbd8cd796cddffc3f7b6593dcf55f 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,30 @@ 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-anchor |
+ static LengthPoint initialOffsetAnchor() { return LengthPoint(Length(Auto), Length(Auto)); } |
+ const LengthPoint& offsetAnchor() const { return m_rareNonInheritedData->m_transform->m_motion.m_anchor; } |
+ void setOffsetAnchor(const LengthPoint& offsetAnchor) { SET_NESTED_VAR(m_rareNonInheritedData, m_transform, m_motion.m_anchor, offsetAnchor); } |
- // 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-distance |
+ 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-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-path |
+ static StylePath* initialOffsetPath() { return nullptr; } |
+ StylePath* offsetPath() const { return m_rareNonInheritedData->m_transform->m_motion.m_path.get(); } |
+ void setOffsetPath(PassRefPtr<StylePath>); |
+ |
+ // offset-position |
+ static LengthPoint initialOffsetPosition() { return LengthPoint(Length(Auto), Length(Auto)); } |
+ const LengthPoint& offsetPosition() const { return m_rareNonInheritedData->m_transform->m_motion.m_position; } |
+ void setOffsetPosition(const LengthPoint& offsetPosition) { SET_NESTED_VAR(m_rareNonInheritedData, m_transform, m_motion.m_position, offsetPosition); } |
+ |
+ // 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; } |
@@ -2131,7 +2141,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; } |
@@ -2239,7 +2249,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; } |
@@ -2504,7 +2514,7 @@ private: |
Color lightingColor() const { return svgStyle().lightingColor(); } |
void addAppliedTextDecoration(const AppliedTextDecoration&); |
- void applyMotionPathTransform(float originX, float originY, TransformationMatrix&) const; |
+ void applyMotionPathTransform(float originX, float originY, const FloatRect& boundingBox, TransformationMatrix&) const; |
bool diffNeedsFullLayoutAndPaintInvalidation(const ComputedStyle& other) const; |
bool diffNeedsFullLayout(const ComputedStyle& other) const; |