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); |
+} |
+} |