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

Unified Diff: Source/core/animation/AnimatableShadow.h

Issue 38823002: Web Animations CSS: Support animation of {text,box,-webkit-box}-shadow and fix blur clamping (Closed) Base URL: https://chromium.googlesource.com/chromium/blink@master
Patch Set: use 0 instead of PassRefPtr<..>() Created 7 years, 2 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: Source/core/animation/AnimatableShadow.h
diff --git a/Source/core/animation/AnimatableSVGLength.h b/Source/core/animation/AnimatableShadow.h
similarity index 73%
copy from Source/core/animation/AnimatableSVGLength.h
copy to Source/core/animation/AnimatableShadow.h
index 27dba9a48c1a0909de178272d900270e3d107bd8..23fb59b7a08d5f08e7bd555ba8e897080cf78ac9 100644
--- a/Source/core/animation/AnimatableSVGLength.h
+++ b/Source/core/animation/AnimatableShadow.h
@@ -28,46 +28,40 @@
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
-#ifndef AnimatableSVGLength_h
-#define AnimatableSVGLength_h
+#ifndef AnimatableShadow_h
+#define AnimatableShadow_h
#include "core/animation/AnimatableValue.h"
-#include "core/svg/SVGLength.h"
+#include "core/rendering/style/ShadowList.h"
namespace WebCore {
-class AnimatableSVGLength: public AnimatableValue {
+class AnimatableShadow : public AnimatableValue {
public:
- virtual ~AnimatableSVGLength() { }
-
- static PassRefPtr<AnimatableSVGLength> create(const SVGLength& length)
+ virtual ~AnimatableShadow() { }
+ static PassRefPtr<AnimatableShadow> create(PassRefPtr<ShadowList> shadowList)
{
- return adoptRef(new AnimatableSVGLength(length));
- }
-
- const SVGLength& toSVGLength() const
- {
- return m_length;
+ return adoptRef(new AnimatableShadow(shadowList));
}
+ ShadowList* shadowList() const { return m_shadowList.get(); }
protected:
virtual PassRefPtr<AnimatableValue> interpolateTo(const AnimatableValue*, double fraction) const OVERRIDE;
virtual PassRefPtr<AnimatableValue> addWith(const AnimatableValue*) const OVERRIDE;
private:
- AnimatableSVGLength(const SVGLength& length)
- : m_length(length)
+ explicit AnimatableShadow(PassRefPtr<ShadowList> shadowList)
+ : m_shadowList(shadowList)
{
}
-
- virtual AnimatableType type() const { return TypeSVGLength; }
+ virtual AnimatableType type() const OVERRIDE { return TypeShadow; }
virtual bool equalTo(const AnimatableValue*) const OVERRIDE;
- SVGLength m_length;
+ const RefPtr<ShadowList> m_shadowList;
};
-DEFINE_ANIMATABLE_VALUE_TYPE_CASTS(AnimatableSVGLength, isSVGLength());
+DEFINE_ANIMATABLE_VALUE_TYPE_CASTS(AnimatableShadow, isShadow());
} // namespace WebCore
-#endif // AnimatableSVGLength_h
+#endif // AnimatableShadow_h

Powered by Google App Engine
This is Rietveld 408576698