Remove FilterOperation::blendingNeedsRendererSize()
authorantti@apple.com <antti@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 15 Sep 2017 17:22:57 +0000 (17:22 +0000)
committerantti@apple.com <antti@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 15 Sep 2017 17:22:57 +0000 (17:22 +0000)
https://bugs.webkit.org/show_bug.cgi?id=176994

Reviewed by Simon Fraser.

It is not used.

* page/animation/CSSPropertyAnimation.cpp:
(WebCore::blendFunc):
* platform/graphics/filters/FilterOperation.h:
(WebCore::FilterOperation::blend):
(WebCore::FilterOperation::shouldBeRestrictedBySecurityOrigin const):
(WebCore::FilterOperation::blendingNeedsRendererSize const): Deleted.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@222095 268f45cc-cd09-0410-ab3c-d52691b4dbfc

Source/WebCore/ChangeLog
Source/WebCore/page/animation/CSSPropertyAnimation.cpp
Source/WebCore/platform/graphics/filters/FilterOperation.h
Source/WebCore/platform/graphics/texmap/TextureMapperAnimation.cpp

index eb0d973..404c1cc 100644 (file)
@@ -1,3 +1,19 @@
+2017-09-15  Antti Koivisto  <antti@apple.com>
+
+        Remove FilterOperation::blendingNeedsRendererSize()
+        https://bugs.webkit.org/show_bug.cgi?id=176994
+
+        Reviewed by Simon Fraser.
+
+        It is not used.
+
+        * page/animation/CSSPropertyAnimation.cpp:
+        (WebCore::blendFunc):
+        * platform/graphics/filters/FilterOperation.h:
+        (WebCore::FilterOperation::blend):
+        (WebCore::FilterOperation::shouldBeRestrictedBySecurityOrigin const):
+        (WebCore::FilterOperation::blendingNeedsRendererSize const): Deleted.
+
 2017-09-15  Youenn Fablet  <youenn@apple.com>
 
         Add an URL method to remove both query string and fragment identifier
index 2130887..7d09735 100644 (file)
@@ -165,13 +165,9 @@ static inline RefPtr<ShapeValue> blendFunc(const AnimationBase*, ShapeValue* fro
     return ShapeValue::create(toShape.blend(fromShape, progress), to->cssBox());
 }
 
-static inline RefPtr<FilterOperation> blendFunc(const AnimationBase* animation, FilterOperation* fromOp, FilterOperation* toOp, double progress, bool blendToPassthrough = false)
+static inline RefPtr<FilterOperation> blendFunc(const AnimationBase*, FilterOperation* fromOp, FilterOperation* toOp, double progress, bool blendToPassthrough = false)
 {
     ASSERT(toOp);
-    if (toOp->blendingNeedsRendererSize()) {
-        LayoutSize size = is<RenderBox>(*animation->renderer()) ? downcast<RenderBox>(*animation->renderer()).borderBoxRect().size() : LayoutSize();
-        return toOp->blend(fromOp, progress, size, blendToPassthrough);
-    }
     return toOp->blend(fromOp, progress, blendToPassthrough);
 }
 
index fef1dcf..19ddcc8 100644 (file)
@@ -75,13 +75,6 @@ public:
 
     virtual RefPtr<FilterOperation> blend(const FilterOperation* /*from*/, double /*progress*/, bool /*blendToPassthrough*/ = false)
     {
-        ASSERT(!blendingNeedsRendererSize());
-        return nullptr;
-    }
-
-    virtual RefPtr<FilterOperation> blend(const FilterOperation* /*from*/, double /*progress*/, const LayoutSize&, bool /*blendToPassthrough*/ = false)
-    {
-        ASSERT(blendingNeedsRendererSize());
         return nullptr;
     }
 
@@ -105,8 +98,6 @@ public:
     virtual bool movesPixels() const { return false; }
     // True if the filter should not be allowed to work on content that is not available from this security origin.
     virtual bool shouldBeRestrictedBySecurityOrigin() const { return false; }
-    // True if the filter needs the size of the box in order to calculate the animations.
-    virtual bool blendingNeedsRendererSize() const { return false; }
 
 protected:
     FilterOperation(OperationType type)
index 9cc1df6..f94682c 100644 (file)
 
 namespace WebCore {
 
-static RefPtr<FilterOperation> blendFunc(FilterOperation* fromOp, FilterOperation& toOp, double progress, const FloatSize& size, bool blendToPassthrough = false)
+static RefPtr<FilterOperation> blendFunc(FilterOperation* fromOp, FilterOperation& toOp, double progress, const FloatSize&, bool blendToPassthrough = false)
 {
-    if (toOp.blendingNeedsRendererSize())
-        return toOp.blend(fromOp, progress, LayoutSize(size), blendToPassthrough);
     return toOp.blend(fromOp, progress, blendToPassthrough);
 }