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

Unified Diff: Source/core/animation/AnimatableSVGPaint.cpp

Issue 25456002: Web Animations CSS: Support animation of fill and stroke (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Address review feedback 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
« no previous file with comments | « Source/core/animation/AnimatableSVGPaint.h ('k') | Source/core/animation/AnimatableValue.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/animation/AnimatableSVGPaint.cpp
diff --git a/Source/web/FullscreenController.h b/Source/core/animation/AnimatableSVGPaint.cpp
similarity index 61%
copy from Source/web/FullscreenController.h
copy to Source/core/animation/AnimatableSVGPaint.cpp
index 08a56d140bfa3f59f855848e5645e3718c037d30..c8f07dc2d00e0b261ea6076941f5d579a8670a06 100644
--- a/Source/web/FullscreenController.h
+++ b/Source/core/animation/AnimatableSVGPaint.cpp
@@ -28,52 +28,29 @@
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
-#ifndef FullscreenController_h
-#define FullscreenController_h
-
-#include "platform/geometry/IntSize.h"
-#include "wtf/PassOwnPtr.h"
-#include "wtf/RefPtr.h"
+#include "config.h"
+#include "core/animation/AnimatableSVGPaint.h"
namespace WebCore {
-class Element;
-class Frame;
-}
-
-namespace WebKit {
-class WebViewImpl;
-
-class FullscreenController {
-public:
- static PassOwnPtr<FullscreenController> create(WebViewImpl*);
-
- void willEnterFullScreen();
- void didEnterFullScreen();
- void willExitFullScreen();
- void didExitFullScreen();
-
- void enterFullScreenForElement(WebCore::Element*);
- void exitFullScreenForElement(WebCore::Element*);
-
-protected:
- explicit FullscreenController(WebViewImpl*);
-
-private:
- WebViewImpl* m_webViewImpl;
-
- float m_exitFullscreenPageScaleFactor;
- WebCore::IntSize m_exitFullscreenScrollOffset;
-
- // If set, the WebView is transitioning to fullscreen for this element.
- RefPtr<WebCore::Element> m_provisionalFullScreenElement;
-
- // If set, the WebView is in fullscreen mode for an element in this frame.
- RefPtr<WebCore::Frame> m_fullScreenFrame;
-
- bool m_isCancelingFullScreen;
-};
+PassRefPtr<AnimatableValue> AnimatableSVGPaint::interpolateTo(const AnimatableValue* value, double fraction) const
+{
+ const AnimatableSVGPaint* svgPaint = toAnimatableSVGPaint(value);
+ if (paintType() == SVGPaint::SVG_PAINTTYPE_RGBCOLOR && svgPaint->paintType() == SVGPaint::SVG_PAINTTYPE_RGBCOLOR) {
+ ASSERT(uri().isNull());
+ return AnimatableSVGPaint::create(SVGPaint::SVG_PAINTTYPE_RGBCOLOR, m_color.interpolateTo(svgPaint->m_color, fraction), String());
+ }
+ return defaultInterpolateTo(this, value, fraction);
}
-#endif
+PassRefPtr<AnimatableValue> AnimatableSVGPaint::addWith(const AnimatableValue* value) const
+{
+ const AnimatableSVGPaint* svgPaint = toAnimatableSVGPaint(value);
+ if (paintType() != SVGPaint::SVG_PAINTTYPE_RGBCOLOR || svgPaint->paintType() != SVGPaint::SVG_PAINTTYPE_RGBCOLOR) {
+ ASSERT(uri().isNull());
+ return AnimatableSVGPaint::create(SVGPaint::SVG_PAINTTYPE_RGBCOLOR, m_color.addWith(svgPaint->m_color), String());
+ }
+ return defaultAddWith(this, value);
+}
+}
« no previous file with comments | « Source/core/animation/AnimatableSVGPaint.h ('k') | Source/core/animation/AnimatableValue.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698