Title: [206894] trunk

Diff

Modified: trunk/LayoutTests/ChangeLog (206893 => 206894)


--- trunk/LayoutTests/ChangeLog	2016-10-07 01:54:14 UTC (rev 206893)
+++ trunk/LayoutTests/ChangeLog	2016-10-07 02:33:38 UTC (rev 206894)
@@ -1,3 +1,18 @@
+2016-10-06  Commit Queue  <commit-qu...@webkit.org>
+
+        Unreviewed, rolling out r206713.
+        https://bugs.webkit.org/show_bug.cgi?id=163097
+
+        triggers apparent codegen bug on ARM 32-bit (Requested by smfr
+        on #webkit).
+
+        Reverted changeset:
+
+        "Support transitions/animations of background-position with
+        right/bottom-relative values"
+        https://bugs.webkit.org/show_bug.cgi?id=162048
+        http://trac.webkit.org/changeset/206713
+
 2016-10-06  Ryosuke Niwa  <rn...@webkit.org>
 
         Upgrading and constructing element should always report exception instead of rethrowing

Modified: trunk/LayoutTests/fast/shapes/shape-outside-floats/shape-outside-animation-expected.txt (206893 => 206894)


--- trunk/LayoutTests/fast/shapes/shape-outside-floats/shape-outside-animation-expected.txt	2016-10-07 01:54:14 UTC (rev 206893)
+++ trunk/LayoutTests/fast/shapes/shape-outside-floats/shape-outside-animation-expected.txt	2016-10-07 02:33:38 UTC (rev 206894)
@@ -22,6 +22,6 @@
 PASS - "webkitShapeOutside" property for "circle-to-bottomright-using-keyword-box" element at 1s saw something close to: circle(35% at 75% 75%)
 PASS - "webkitShapeOutside" property for "circle-to-bottomright-using-keyword-box" element at 1s saw something close to: circle(35% at 75% 75%)
 PASS - "webkitShapeOutside" property for "circle-to-bottomright-extended-box" element at 1s saw something close to: circle(35% at 75% 75%)
-PASS - "webkitShapeOutside" property for "circle-to-bottomright-extended-using-keyword-box" element at 1s saw something close to: circle(35% at 70% calc((50% * 0.5) + ((100% - 20px) * 0.5)))
-PASS - "webkitShapeOutside" property for "circle-to-bottomright-extended-using-keyword-2-box" element at 1s saw something close to: circle(35% at 70% calc((50% * 0.5) + ((100% - 10px) * 0.5)))
+PASS - "webkitShapeOutside" property for "circle-to-bottomright-extended-using-keyword-box" element at 1s saw something close to: circle(35% at calc((50% * 0.5) + ((100% - 10%) * 0.5)) calc((50% * 0.5) + ((100% - 20px) * 0.5)))
+PASS - "webkitShapeOutside" property for "circle-to-bottomright-extended-using-keyword-2-box" element at 1s saw something close to: circle(35% at calc((50% * 0.5) + ((100% - 10%) * 0.5)) calc((50% * 0.5) + ((100% - 10px) * 0.5)))
 

Modified: trunk/LayoutTests/fast/shapes/shape-outside-floats/shape-outside-animation.html (206893 => 206894)


--- trunk/LayoutTests/fast/shapes/shape-outside-floats/shape-outside-animation.html	2016-10-07 01:54:14 UTC (rev 206893)
+++ trunk/LayoutTests/fast/shapes/shape-outside-floats/shape-outside-animation.html	2016-10-07 02:33:38 UTC (rev 206894)
@@ -146,8 +146,8 @@
       ["circle-to-bottomright-using-keyword-anim",  1, "circle-to-bottomright-using-keyword-box", "webkitShapeOutside", "circle(35% at 75% 75%)", 0.05],
       ["circle-to-bottomright-using-keyword-anim",  1, "circle-to-bottomright-using-keyword-box", "webkitShapeOutside", "circle(35% at 75% 75%)", 0.05],
       ["circle-to-bottomright-extended-anim",  1, "circle-to-bottomright-extended-box", "webkitShapeOutside", "circle(35% at 75% 75%)", 0.05],
-      ["circle-to-bottomright-extended-using-keyword-anim",  1, "circle-to-bottomright-extended-using-keyword-box", "webkitShapeOutside", "circle(35% at 70% calc((50% * 0.5) + ((100% - 20px) * 0.5)))", 0.01],
-      ["circle-to-bottomright-extended-using-keyword-2-anim",  1, "circle-to-bottomright-extended-using-keyword-2-box", "webkitShapeOutside", "circle(35% at 70% calc((50% * 0.5) + ((100% - 10px) * 0.5)))", 0.01],
+      ["circle-to-bottomright-extended-using-keyword-anim",  1, "circle-to-bottomright-extended-using-keyword-box", "webkitShapeOutside", "circle(35% at calc((50% * 0.5) + ((100% - 10%) * 0.5)) calc((50% * 0.5) + ((100% - 20px) * 0.5)))", 0.01],
+      ["circle-to-bottomright-extended-using-keyword-2-anim",  1, "circle-to-bottomright-extended-using-keyword-2-box", "webkitShapeOutside", "circle(35% at calc((50% * 0.5) + ((100% - 10%) * 0.5)) calc((50% * 0.5) + ((100% - 10px) * 0.5)))", 0.01],
     ];
     
     runAnimationTest(expectedValues);

Deleted: trunk/LayoutTests/transitions/background-position-transitions-expected.txt (206893 => 206894)


--- trunk/LayoutTests/transitions/background-position-transitions-expected.txt	2016-10-07 01:54:14 UTC (rev 206893)
+++ trunk/LayoutTests/transitions/background-position-transitions-expected.txt	2016-10-07 02:33:38 UTC (rev 206894)
@@ -1,4 +0,0 @@
-PASS - "background-position" property for "box1" element at 0.5s saw something close to: 45,60
-PASS - "background-position" property for "box2" element at 0.5s saw something close to: 45,60
-PASS - "background-position" property for "box3" element at 0.5s saw something close to: 10,0.5,100,80,0,0.5,20,0.5,100,100,0,0.5
-

Deleted: trunk/LayoutTests/transitions/background-position-transitions.html (206893 => 206894)


--- trunk/LayoutTests/transitions/background-position-transitions.html	2016-10-07 01:54:14 UTC (rev 206893)
+++ trunk/LayoutTests/transitions/background-position-transitions.html	2016-10-07 02:33:38 UTC (rev 206894)
@@ -1,66 +0,0 @@
-<!DOCTYPE>
-
-<html>
-<head>
-    <style>
-        .box {
-            height: 100px;
-            width: 100px;
-            margin: 10px;
-            background: url('../fast/backgrounds/repeat/resources/gradient.gif') repeat 0 0;
-            transition-duration: 1s;
-            transition-timing-function: linear;
-            transition-property: background-position;
-        }
-
-        #box1 {
-            background-position: 10px 20px;
-        }
-
-        body.final #box1 {
-            background-position: left 80px top 100px;
-        }
-
-        #box2 {
-            background-position: right 10px bottom 20px;
-        }
-
-        body.final #box2 {
-            background-position: right 80px bottom 100px;
-        }
-
-        #box3 {
-            background-position: 10px 20px;
-        }
-
-        body.final #box3 {
-            background-position: right 80px bottom 100px;
-        }
-    </style>
-    <script src="" type="text/_javascript_"></script>
-    <script>
-        const expectedValues = [
-        // [time, element-id, property, expected-value, tolerance]
-        [0.5, 'box1', 'background-position', [45, 60], 2],
-        [0.5, 'box2', 'background-position', [45, 60], 2],
-        [0.5, 'box3', 'background-position', [10,0.5,100,80,0,0.5,20,0.5,100,100,0,0.5], 2], // Numbers extracted from a calc() _expression_.
-        ];
-
-        function setupTest()
-        {
-            document.body.classList.add('final');
-        }
-
-        runTransitionTest(expectedValues, setupTest, usePauseAPI);
-    </script>
-</head>
-<body>
-
-    <div id="box1" class="box"></div>
-    <div id="box2" class="box"></div>
-    <div id="box3" class="box"></div>
-
-    <pre id="result"></pre>
-
-</body>
-</html>

Modified: trunk/LayoutTests/transitions/resources/transition-test-helpers.js (206893 => 206894)


--- trunk/LayoutTests/transitions/resources/transition-test-helpers.js	2016-10-07 01:54:14 UTC (rev 206893)
+++ trunk/LayoutTests/transitions/resources/transition-test-helpers.js	2016-10-07 02:33:38 UTC (rev 206894)
@@ -110,77 +110,6 @@
     return null;
 }
 
-function hasFloatValue(value)
-{
-    switch (value.primitiveType) {
-    case CSSPrimitiveValue.CSS_FR:
-    case CSSPrimitiveValue.CSS_NUMBER:
-    case CSSPrimitiveValue.CSS_PARSER_INTEGER:
-    case CSSPrimitiveValue.CSS_PERCENTAGE:
-    case CSSPrimitiveValue.CSS_EMS:
-    case CSSPrimitiveValue.CSS_EXS:
-    case CSSPrimitiveValue.CSS_CHS:
-    case CSSPrimitiveValue.CSS_REMS:
-    case CSSPrimitiveValue.CSS_PX:
-    case CSSPrimitiveValue.CSS_CM:
-    case CSSPrimitiveValue.CSS_MM:
-    case CSSPrimitiveValue.CSS_IN:
-    case CSSPrimitiveValue.CSS_PT:
-    case CSSPrimitiveValue.CSS_PC:
-    case CSSPrimitiveValue.CSS_DEG:
-    case CSSPrimitiveValue.CSS_RAD:
-    case CSSPrimitiveValue.CSS_GRAD:
-    case CSSPrimitiveValue.CSS_TURN:
-    case CSSPrimitiveValue.CSS_MS:
-    case CSSPrimitiveValue.CSS_S:
-    case CSSPrimitiveValue.CSS_HZ:
-    case CSSPrimitiveValue.CSS_KHZ:
-    case CSSPrimitiveValue.CSS_DIMENSION:
-    case CSSPrimitiveValue.CSS_VW:
-    case CSSPrimitiveValue.CSS_VH:
-    case CSSPrimitiveValue.CSS_VMIN:
-    case CSSPrimitiveValue.CSS_VMAX:
-    case CSSPrimitiveValue.CSS_DPPX:
-    case CSSPrimitiveValue.CSS_DPI:
-    case CSSPrimitiveValue.CSS_DPCM:
-        return true;
-    }
-    return false;
-}
-
-function getNumericValue(cssValue)
-{
-    if (hasFloatValue(cssValue.primitiveType))
-        return cssValue.getFloatValue(cssValue.primitiveType);
-
-    return -1;
-}
-
-function isCalcPrimitiveValue(value)
-{
-    switch (value.primitiveType) {
-    case 113: // CSSPrimitiveValue.CSS_CALC:
-    case 114: // CSSPrimitiveValue.CSS_CALC_PERCENTAGE_WITH_NUMBER:
-    case 115: // CSSPrimitiveValue.CSS_CALC_PERCENTAGE_WITH_LENGTH:
-    return true;
-    }
-    return false;
-}
-
-function extractNumbersFromCalcExpression(value, values)
-{
-    var calcRegexp = /^calc\((.+)\)$/;
-    var result = calcRegexp.exec(value.cssText);
-    var numberMatch = /([^\.\-0-9]*)(-?[\.0-9]+)/;
-    var remainder = result[1];
-    var match;
-    while ((match = numberMatch.exec(remainder)) !== null) {
-        var skipLength = match[1].length + match[2].length;
-        values.push(parseFloat(match[2]))
-        remainder = remainder.substr(skipLength + 1);
-    }
-}
-
 function checkExpectedValue(expected, index)
 {
     var time = expected[index][0];
@@ -265,27 +194,23 @@
         if (computedStyle.cssValueType == CSSValue.CSS_VALUE_LIST) {
             var values = [];
             for (var i = 0; i < computedStyle.length; ++i) {
-                var styleValue = computedStyle[i];
-                switch (styleValue.cssValueType) {
+                switch (computedStyle[i].cssValueType) {
                   case CSSValue.CSS_PRIMITIVE_VALUE:
-                    if (hasFloatValue(styleValue))
-                        values.push(styleValue.getFloatValue(CSSPrimitiveValue.CSS_NUMBER));
-                    else if (isCalcPrimitiveValue(styleValue))
-                        extractNumbersFromCalcExpression(styleValue, values);
+                    values.push(computedStyle[i].getFloatValue(CSSPrimitiveValue.CSS_NUMBER));
                     break;
                   case CSSValue.CSS_CUSTOM:
                     // arbitrarily pick shadow-x and shadow-y
                     if (isShadow) {
-                      var shadowXY = getShadowXY(styleValue);
+                      var shadowXY = getShadowXY(computedStyle[i]);
                       values.push(shadowXY[0]);
                       values.push(shadowXY[1]);
                     } else
-                      values.push(styleValue.cssText);
+                      values.push(computedStyle[i].cssText);
                     break;
                 }
             }
             computedValue = values.join(',');
-            pass = values.length > 0;
+            pass = true;
             for (var i = 0; i < values.length; ++i)
                 pass &= isCloseEnough(values[i], expectedValue[i], tolerance);
         } else if (computedStyle.cssValueType == CSSValue.CSS_PRIMITIVE_VALUE) {

Modified: trunk/LayoutTests/transitions/svg-transitions-expected.txt (206893 => 206894)


--- trunk/LayoutTests/transitions/svg-transitions-expected.txt	2016-10-07 01:54:14 UTC (rev 206893)
+++ trunk/LayoutTests/transitions/svg-transitions-expected.txt	2016-10-07 02:33:38 UTC (rev 206894)
@@ -1,4 +1,4 @@
-CONSOLE MESSAGE: line 368: Failed to pause 'fill' transition on element 'rect7'
+CONSOLE MESSAGE: line 293: Failed to pause 'fill' transition on element 'rect7'
 Example
 PASS - "fill-opacity" property for "rect1" element at 1s saw something close to: 0.6
 PASS - "stroke-width" property for "rect1" element at 1s saw something close to: 3

Modified: trunk/Source/WebCore/ChangeLog (206893 => 206894)


--- trunk/Source/WebCore/ChangeLog	2016-10-07 01:54:14 UTC (rev 206893)
+++ trunk/Source/WebCore/ChangeLog	2016-10-07 02:33:38 UTC (rev 206894)
@@ -1,3 +1,18 @@
+2016-10-06  Commit Queue  <commit-qu...@webkit.org>
+
+        Unreviewed, rolling out r206713.
+        https://bugs.webkit.org/show_bug.cgi?id=163097
+
+        triggers apparent codegen bug on ARM 32-bit (Requested by smfr
+        on #webkit).
+
+        Reverted changeset:
+
+        "Support transitions/animations of background-position with
+        right/bottom-relative values"
+        https://bugs.webkit.org/show_bug.cgi?id=162048
+        http://trac.webkit.org/changeset/206713
+
 2016-10-06  Daniel Bates  <daba...@apple.com>
 
         Remove unused WebCore::contentDispositionType()

Modified: trunk/Source/WebCore/css/StyleBuilderConverter.h (206893 => 206894)


--- trunk/Source/WebCore/css/StyleBuilderConverter.h	2016-10-07 01:54:14 UTC (rev 206893)
+++ trunk/Source/WebCore/css/StyleBuilderConverter.h	2016-10-07 02:33:38 UTC (rev 206894)
@@ -159,6 +159,7 @@
     static Length parseSnapCoordinate(StyleResolver&, const CSSValue&);
 #endif
 
+    static Length convertTo100PercentMinusLength(const Length&);
     static Length convertPositionComponent(StyleResolver&, const CSSPrimitiveValue&);
 
 #if ENABLE(CSS_GRID_LAYOUT)
@@ -312,6 +313,18 @@
     return LengthSize(radiusWidth, radiusHeight);
 }
 
+inline Length StyleBuilderConverter::convertTo100PercentMinusLength(const Length& length)
+{
+    if (length.isPercent())
+        return Length(100 - length.value(), Percent);
+    
+    // Turn this into a calc _expression_: calc(100% - length)
+    auto lhs = std::make_unique<CalcExpressionLength>(Length(100, Percent));
+    auto rhs = std::make_unique<CalcExpressionLength>(length);
+    auto op = std::make_unique<CalcExpressionBinaryOperation>(WTFMove(lhs), WTFMove(rhs), CalcSubtract);
+    return Length(CalculationValue::create(WTFMove(op), ValueRangeAll));
+}
+
 inline Length StyleBuilderConverter::convertPositionComponent(StyleResolver& styleResolver, const CSSPrimitiveValue& value)
 {
     Length length;

Modified: trunk/Source/WebCore/page/animation/CSSPropertyAnimation.cpp (206893 => 206894)


--- trunk/Source/WebCore/page/animation/CSSPropertyAnimation.cpp	2016-10-07 01:54:14 UTC (rev 206893)
+++ trunk/Source/WebCore/page/animation/CSSPropertyAnimation.cpp	2016-10-07 02:33:38 UTC (rev 206894)
@@ -39,7 +39,6 @@
 #include "CSSPrimitiveValue.h"
 #include "CSSPropertyNames.h"
 #include "CachedImage.h"
-#include "CalculationValue.h"
 #include "ClipPathOperation.h"
 #include "FloatConversion.h"
 #include "FontTaggedSettings.h"
@@ -963,23 +962,14 @@
 class FillLayerAnimationPropertyWrapperBase {
     WTF_MAKE_FAST_ALLOCATED;
 public:
-    FillLayerAnimationPropertyWrapperBase(CSSPropertyID property)
-        : m_property(property)
+    FillLayerAnimationPropertyWrapperBase()
     {
     }
-    
-    CSSPropertyID property() const { return m_property; }
 
     virtual ~FillLayerAnimationPropertyWrapperBase() { }
 
     virtual bool equals(const FillLayer*, const FillLayer*) const = 0;
     virtual void blend(const AnimationBase*, FillLayer*, const FillLayer*, const FillLayer*, double) const = 0;
-
-#if !LOG_DISABLED
-    virtual void logBlend(const FillLayer* result, const FillLayer*, const FillLayer*, double) const = 0;
-#endif
-private:
-    CSSPropertyID m_property;
 };
 
 template <typename T>
@@ -987,9 +977,8 @@
     WTF_MAKE_FAST_ALLOCATED;
     WTF_MAKE_NONCOPYABLE(FillLayerPropertyWrapperGetter);
 public:
-    FillLayerPropertyWrapperGetter(CSSPropertyID property, T (FillLayer::*getter)() const)
-        : FillLayerAnimationPropertyWrapperBase(property)
-        , m_getter(getter)
+    FillLayerPropertyWrapperGetter(T (FillLayer::*getter)() const)
+        : m_getter(getter)
     {
     }
 
@@ -1002,18 +991,6 @@
         return (a->*m_getter)() == (b->*m_getter)();
     }
 
-    T value(const FillLayer* layer) const
-    {
-        return (layer->*m_getter)();
-    }
-
-#if !LOG_DISABLED
-    void logBlend(const FillLayer* result, const FillLayer* a, const FillLayer* b, double progress) const override
-    {
-        LOG_WITH_STREAM(Animations, stream << "  blending " << getPropertyName(property()) << " from " << value(a) << " to " << value(b) << " at " << TextStream::FormatNumberRespectingIntegers(progress) << " -> " << value(result));
-    }
-#endif
-
 protected:
     T (FillLayer::*m_getter)() const;
 };
@@ -1022,119 +999,36 @@
 class FillLayerPropertyWrapper : public FillLayerPropertyWrapperGetter<const T&> {
     WTF_MAKE_FAST_ALLOCATED;
 public:
-    FillLayerPropertyWrapper(CSSPropertyID property, const T& (FillLayer::*getter)() const, void (FillLayer::*setter)(T))
-        : FillLayerPropertyWrapperGetter<const T&>(property, getter)
+    FillLayerPropertyWrapper(const T& (FillLayer::*getter)() const, void (FillLayer::*setter)(T))
+        : FillLayerPropertyWrapperGetter<const T&>(getter)
         , m_setter(setter)
     {
     }
 
-    void blend(const AnimationBase* anim, FillLayer* dst, const FillLayer* a, const FillLayer* b, double progress) const override
+    virtual void blend(const AnimationBase* anim, FillLayer* dst, const FillLayer* a, const FillLayer* b, double progress) const
     {
         (dst->*m_setter)(blendFunc(anim, (a->*FillLayerPropertyWrapperGetter<const T&>::m_getter)(), (b->*FillLayerPropertyWrapperGetter<const T&>::m_getter)(), progress));
     }
 
-#if !LOG_DISABLED
-    void logBlend(const FillLayer* result, const FillLayer* a, const FillLayer* b, double progress) const override
-    {
-        LOG_WITH_STREAM(Animations, stream << "  blending " << getPropertyName(FillLayerPropertyWrapperGetter<const T&>::property())
-            << " from " << FillLayerPropertyWrapperGetter<const T&>::value(a)
-            << " to " << FillLayerPropertyWrapperGetter<const T&>::value(b)
-            << " at " << TextStream::FormatNumberRespectingIntegers(progress) << " -> " << FillLayerPropertyWrapperGetter<const T&>::value(result));
-    }
-#endif
-
 protected:
     void (FillLayer::*m_setter)(T);
 };
 
-class FillLayerPositionPropertyWrapper : public FillLayerPropertyWrapperGetter<const Length&> {
-    WTF_MAKE_FAST_ALLOCATED;
-public:
-    FillLayerPositionPropertyWrapper(CSSPropertyID property, const Length& (FillLayer::*lengthGetter)() const, void (FillLayer::*lengthSetter)(Length), Edge (FillLayer::*originGetter)() const, void (FillLayer::*originSetter)(Edge), Edge farEdge)
-        : FillLayerPropertyWrapperGetter<const Length&>(property, lengthGetter)
-        , m_lengthSetter(lengthSetter)
-        , m_originGetter(originGetter)
-        , m_originSetter(originSetter)
-        , m_farEdge(farEdge)
-    {
-    }
-
-    bool equals(const FillLayer* a, const FillLayer* b) const override
-    {
-        if (a == b)
-            return true;
-        if (!a || !b)
-            return false;
-
-        Length fromLength = (a->*FillLayerPropertyWrapperGetter<const Length&>::m_getter)();
-        Length toLength = (b->*FillLayerPropertyWrapperGetter<const Length&>::m_getter)();
-        
-        Edge fromEdge = (a->*m_originGetter)();
-        Edge toEdge = (b->*m_originGetter)();
-        
-        return fromLength == toLength && fromEdge == toEdge;
-    }
-
-    void blend(const AnimationBase* anim, FillLayer* dst, const FillLayer* a, const FillLayer* b, double progress) const override
-    {
-        Length fromLength = (a->*FillLayerPropertyWrapperGetter<const Length&>::m_getter)();
-        Length toLength = (b->*FillLayerPropertyWrapperGetter<const Length&>::m_getter)();
-        
-        Edge fromEdge = (a->*m_originGetter)();
-        Edge toEdge = (b->*m_originGetter)();
-        
-        if (fromEdge != toEdge) {
-            // Convert the right/bottom into a calc _expression_,
-            if (fromEdge == m_farEdge)
-                fromLength = convertTo100PercentMinusLength(fromLength);
-            else if (toEdge == m_farEdge) {
-                toLength = convertTo100PercentMinusLength(toLength);
-                (dst->*m_originSetter)(fromEdge); // Now we have a calc(100% - l), it's relative to the left/top edge.
-            }
-        }
-
-        (dst->*m_lengthSetter)(blendFunc(anim, fromLength, toLength, progress));
-    }
-
-#if !LOG_DISABLED
-    void logBlend(const FillLayer* result, const FillLayer* a, const FillLayer* b, double progress) const override
-    {
-        LOG_WITH_STREAM(Animations, stream << "  blending " << getPropertyName(property()) << " from " << value(a) << " to " << value(b) << " at " << TextStream::FormatNumberRespectingIntegers(progress) << " -> " << value(result));
-    }
-#endif
-
-protected:
-    void (FillLayer::*m_lengthSetter)(Length);
-    Edge (FillLayer::*m_originGetter)() const;
-    void (FillLayer::*m_originSetter)(Edge);
-    Edge m_farEdge;
-};
-
 template <typename T>
 class FillLayerRefCountedPropertyWrapper : public FillLayerPropertyWrapperGetter<T*> {
     WTF_MAKE_FAST_ALLOCATED;
 public:
-    FillLayerRefCountedPropertyWrapper(CSSPropertyID property, T* (FillLayer::*getter)() const, void (FillLayer::*setter)(PassRefPtr<T>))
-        : FillLayerPropertyWrapperGetter<T*>(property, getter)
+    FillLayerRefCountedPropertyWrapper(T* (FillLayer::*getter)() const, void (FillLayer::*setter)(PassRefPtr<T>))
+        : FillLayerPropertyWrapperGetter<T*>(getter)
         , m_setter(setter)
     {
     }
 
-    void blend(const AnimationBase* anim, FillLayer* dst, const FillLayer* a, const FillLayer* b, double progress) const override
+    virtual void blend(const AnimationBase* anim, FillLayer* dst, const FillLayer* a, const FillLayer* b, double progress) const
     {
         (dst->*m_setter)(blendFunc(anim, (a->*FillLayerPropertyWrapperGetter<T*>::m_getter)(), (b->*FillLayerPropertyWrapperGetter<T*>::m_getter)(), progress));
     }
 
-#if !LOG_DISABLED
-    void logBlend(const FillLayer* result, const FillLayer* a, const FillLayer* b, double progress) const override
-    {
-        LOG_WITH_STREAM(Animations, stream << "  blending " << getPropertyName(FillLayerPropertyWrapperGetter<T*>::property())
-            << " from " << FillLayerPropertyWrapperGetter<T*>::value(a)
-            << " to " << FillLayerPropertyWrapperGetter<T*>::value(b)
-            << " at " << TextStream::FormatNumberRespectingIntegers(progress) << " -> " << FillLayerPropertyWrapperGetter<T*>::value(result));
-    }
-#endif
-
 protected:
     void (FillLayer::*m_setter)(PassRefPtr<T>);
 };
@@ -1142,8 +1036,8 @@
 class FillLayerStyleImagePropertyWrapper : public FillLayerRefCountedPropertyWrapper<StyleImage> {
     WTF_MAKE_FAST_ALLOCATED;
 public:
-    FillLayerStyleImagePropertyWrapper(CSSPropertyID property, StyleImage* (FillLayer::*getter)() const, void (FillLayer::*setter)(PassRefPtr<StyleImage>))
-        : FillLayerRefCountedPropertyWrapper<StyleImage>(property, getter, setter)
+    FillLayerStyleImagePropertyWrapper(StyleImage* (FillLayer::*getter)() const, void (FillLayer::*setter)(PassRefPtr<StyleImage>))
+        : FillLayerRefCountedPropertyWrapper<StyleImage>(getter, setter)
     {
     }
 
@@ -1158,13 +1052,6 @@
         StyleImage* imageB = (b->*m_getter)();
         return arePointingToEqualData(imageA, imageB);
     }
-
-#if !LOG_DISABLED
-    void logBlend(const FillLayer* result, const FillLayer* a, const FillLayer* b, double progress) const override
-    {
-        LOG_WITH_STREAM(Animations, stream << "  blending " << getPropertyName(property()) << " from " << value(a) << " to " << value(b) << " at " << TextStream::FormatNumberRespectingIntegers(progress) << " -> " << value(result));
-    }
-#endif
 };
 
 class FillLayersPropertyWrapper : public AnimationPropertyWrapperBase {
@@ -1173,27 +1060,27 @@
     typedef const FillLayer* (RenderStyle::*LayersGetter)() const;
     typedef FillLayer& (RenderStyle::*LayersAccessor)();
 
-    FillLayersPropertyWrapper(CSSPropertyID property, LayersGetter getter, LayersAccessor accessor)
-        : AnimationPropertyWrapperBase(property)
+    FillLayersPropertyWrapper(CSSPropertyID prop, LayersGetter getter, LayersAccessor accessor)
+        : AnimationPropertyWrapperBase(prop)
         , m_layersGetter(getter)
         , m_layersAccessor(accessor)
     {
-        switch (property) {
+        switch (prop) {
         case CSSPropertyBackgroundPositionX:
         case CSSPropertyWebkitMaskPositionX:
-            m_fillLayerPropertyWrapper = std::make_unique<FillLayerPositionPropertyWrapper>(property, &FillLayer::xPosition, &FillLayer::setXPosition, &FillLayer::backgroundXOrigin, &FillLayer::setBackgroundXOrigin, Edge::Right);
+            m_fillLayerPropertyWrapper = std::make_unique<FillLayerPropertyWrapper<Length>>(&FillLayer::xPosition, &FillLayer::setXPosition);
             break;
         case CSSPropertyBackgroundPositionY:
         case CSSPropertyWebkitMaskPositionY:
-            m_fillLayerPropertyWrapper = std::make_unique<FillLayerPositionPropertyWrapper>(property, &FillLayer::yPosition, &FillLayer::setYPosition, &FillLayer::backgroundYOrigin, &FillLayer::setBackgroundYOrigin, Edge::Bottom);
+            m_fillLayerPropertyWrapper = std::make_unique<FillLayerPropertyWrapper<Length>>(&FillLayer::yPosition, &FillLayer::setYPosition);
             break;
         case CSSPropertyBackgroundSize:
         case CSSPropertyWebkitBackgroundSize:
         case CSSPropertyWebkitMaskSize:
-            m_fillLayerPropertyWrapper = std::make_unique<FillLayerPropertyWrapper<LengthSize>>(property, &FillLayer::sizeLength, &FillLayer::setSizeLength);
+            m_fillLayerPropertyWrapper = std::make_unique<FillLayerPropertyWrapper<LengthSize>>(&FillLayer::sizeLength, &FillLayer::setSizeLength);
             break;
         case CSSPropertyBackgroundImage:
-            m_fillLayerPropertyWrapper = std::make_unique<FillLayerStyleImagePropertyWrapper>(property, &FillLayer::image, &FillLayer::setImage);
+            m_fillLayerPropertyWrapper = std::make_unique<FillLayerStyleImagePropertyWrapper>(&FillLayer::image, &FillLayer::setImage);
             break;
         default:
             break;
@@ -1236,18 +1123,10 @@
     }
 
 #if !LOG_DISABLED
-    void logBlend(const RenderStyle* from, const RenderStyle* to, const RenderStyle* result, double progress) const final
+    void logBlend(const RenderStyle*, const RenderStyle*, const RenderStyle*, double progress) const final
     {
-        const FillLayer* aLayer = (from->*m_layersGetter)();
-        const FillLayer* bLayer = (to->*m_layersGetter)();
-        const FillLayer* dstLayer = (result->*m_layersGetter)();
-
-        while (aLayer && bLayer && dstLayer) {
-            m_fillLayerPropertyWrapper->logBlend(dstLayer, aLayer, bLayer, progress);
-            aLayer = aLayer->next();
-            bLayer = bLayer->next();
-            dstLayer = dstLayer->next();
-        }
+        // FIXME: better logging.
+        LOG_WITH_STREAM(Animations, stream << "  blending FillLayers at " << TextStream::FormatNumberRespectingIntegers(progress));
     }
 #endif
 
@@ -1290,10 +1169,10 @@
     }
 
 #if !LOG_DISABLED
-    void logBlend(const RenderStyle* a, const RenderStyle* b, const RenderStyle* dst, double progress) const final
+    void logBlend(const RenderStyle*, const RenderStyle*, const RenderStyle*, double progress) const final
     {
-        for (auto& wrapper : m_propertyWrappers)
-            wrapper->logBlend(a, b, dst, progress);
+        // FIXME: better logging.
+        LOG_WITH_STREAM(Animations, stream << "  blending shorthand property " << getPropertyName(property()) << " at " << TextStream::FormatNumberRespectingIntegers(progress));
     }
 #endif
 
@@ -1706,10 +1585,10 @@
 
     AnimationPropertyWrapperBase* wrapper = CSSPropertyAnimationWrapperMap::singleton().wrapperForProperty(prop);
     if (wrapper) {
-        wrapper->blend(anim, dst, a, b, progress);
 #if !LOG_DISABLED
         wrapper->logBlend(a, b, dst, progress);
 #endif
+        wrapper->blend(anim, dst, a, b, progress);
         return !wrapper->animationIsAccelerated() || !anim->isAccelerated();
     }
     return false;

Modified: trunk/Source/WebCore/platform/CalculationValue.cpp (206893 => 206894)


--- trunk/Source/WebCore/platform/CalculationValue.cpp	2016-10-07 01:54:14 UTC (rev 206893)
+++ trunk/Source/WebCore/platform/CalculationValue.cpp	2016-10-07 02:33:38 UTC (rev 206894)
@@ -31,7 +31,6 @@
 
 #include "config.h"
 #include "CalculationValue.h"
-#include "TextStream.h"
 
 #include <limits>
 
@@ -47,11 +46,6 @@
     return m_value;
 }
 
-void CalcExpressionNumber::dump(TextStream& ts) const
-{
-    ts << TextStream::FormatNumberRespectingIntegers(m_value);
-}
-
 bool CalcExpressionNumber::operator==(const CalcExpressionNode& other) const
 {
     return other.type() == CalcExpressionNodeNumber && *this == toCalcExpressionNumber(other);
@@ -92,11 +86,6 @@
     return other.type() == CalcExpressionNodeBinaryOperation && *this == toCalcExpressionBinaryOperation(other);
 }
 
-void CalcExpressionBinaryOperation::dump(TextStream& ts) const
-{
-    ts << *m_leftSide << " " << m_operator << " " << *m_rightSide;
-}
-
 float CalcExpressionLength::evaluate(float maxValue) const
 {
     return floatValueForLength(m_length, maxValue);
@@ -107,11 +96,6 @@
     return other.type() == CalcExpressionNodeLength && *this == toCalcExpressionLength(other);
 }
 
-void CalcExpressionLength::dump(TextStream& ts) const
-{
-    ts << m_length;
-}
-
 float CalcExpressionBlendLength::evaluate(float maxValue) const
 {
     return (1.0f - m_progress) * floatValueForLength(m_from, maxValue) + m_progress * floatValueForLength(m_to, maxValue);
@@ -122,34 +106,4 @@
     return other.type() == CalcExpressionNodeBlendLength && *this == toCalcExpressionBlendLength(other);
 }
 
-void CalcExpressionBlendLength::dump(TextStream& ts) const
-{
-    ts << "blend(" << m_from << ", " << m_to << ", " << m_progress << ")";
-}
-
-TextStream& operator<<(TextStream& ts, CalcOperator op)
-{
-    switch (op) {
-    case CalcAdd: ts << "+"; break;
-    case CalcSubtract: ts << "-"; break;
-    case CalcMultiply: ts << "*"; break;
-    case CalcDivide: ts << "/"; break;
-    }
-    return ts;
-}
-
-TextStream& operator<<(TextStream& ts, const CalculationValue& value)
-{
-    ts << "calc(";
-    ts << value._expression_();
-    ts << ")";
-    return ts;
-}
-
-TextStream& operator<<(TextStream& ts, const CalcExpressionNode& expressionNode)
-{
-    expressionNode.dump(ts);
-    return ts;
-}
-
 } // namespace WebCore

Modified: trunk/Source/WebCore/platform/CalculationValue.h (206893 => 206894)


--- trunk/Source/WebCore/platform/CalculationValue.h	2016-10-07 01:54:14 UTC (rev 206893)
+++ trunk/Source/WebCore/platform/CalculationValue.h	2016-10-07 02:33:38 UTC (rev 206894)
@@ -39,8 +39,6 @@
 
 namespace WebCore {
 
-class TextStream;
-
 enum CalcOperator {
     CalcAdd = '+',
     CalcSubtract = '-',
@@ -66,7 +64,6 @@
 
     virtual float evaluate(float maxValue) const = 0;
     virtual bool operator==(const CalcExpressionNode&) const = 0;
-    virtual void dump(TextStream&) const = 0;
 
 private:
     CalcExpressionNodeType m_type;
@@ -81,7 +78,6 @@
 private:
     float evaluate(float) const override;
     bool operator==(const CalcExpressionNode&) const override;
-    void dump(TextStream&) const override;
 
     float m_value;
 };
@@ -95,7 +91,6 @@
 private:
     float evaluate(float maxValue) const override;
     bool operator==(const CalcExpressionNode&) const override;
-    void dump(TextStream&) const override;
 
     Length m_length;
 };
@@ -111,7 +106,6 @@
 private:
     float evaluate(float maxValue) const override;
     bool operator==(const CalcExpressionNode&) const override;
-    void dump(TextStream&) const override;
 
     std::unique_ptr<CalcExpressionNode> m_leftSide;
     std::unique_ptr<CalcExpressionNode> m_rightSide;
@@ -129,7 +123,6 @@
 private:
     float evaluate(float maxValue) const override;
     bool operator==(const CalcExpressionNode&) const override;
-    void dump(TextStream&) const override;
 
     Length m_from;
     Length m_to;
@@ -239,10 +232,6 @@
     return static_cast<const CalcExpressionBlendLength&>(value);
 }
 
-TextStream& operator<<(TextStream&, const CalculationValue&);
-TextStream& operator<<(TextStream&, const CalcExpressionNode&);
-TextStream& operator<<(TextStream&, CalcOperator);
-
 } // namespace WebCore
 
 #endif // CalculationValue_h

Modified: trunk/Source/WebCore/platform/Length.cpp (206893 => 206894)


--- trunk/Source/WebCore/platform/Length.cpp	2016-10-07 01:54:14 UTC (rev 206893)
+++ trunk/Source/WebCore/platform/Length.cpp	2016-10-07 02:33:38 UTC (rev 206894)
@@ -284,18 +284,6 @@
     return calculationValue() == other.calculationValue();
 }
 
-Length convertTo100PercentMinusLength(const Length& length)
-{
-    if (length.isPercent())
-        return Length(100 - length.value(), Percent);
-    
-    // Turn this into a calc _expression_: calc(100% - length)
-    auto lhs = std::make_unique<CalcExpressionLength>(Length(100, Percent));
-    auto rhs = std::make_unique<CalcExpressionLength>(length);
-    auto op = std::make_unique<CalcExpressionBinaryOperation>(WTFMove(lhs), WTFMove(rhs), CalcSubtract);
-    return Length(CalculationValue::create(WTFMove(op), ValueRangeAll));
-}
-
 static Length blendMixedTypes(const Length& from, const Length& to, double progress)
 {
     if (progress <= 0.0)
@@ -382,7 +370,8 @@
         ts << TextStream::FormatNumberRespectingIntegers(length.percent()) << "%";
         break;
     case Calculated:
-        ts << length.calculationValue();
+        // FIXME: dump CalculationValue.
+        ts << "calc(...)";
         break;
     }
     

Modified: trunk/Source/WebCore/platform/Length.h (206893 => 206894)


--- trunk/Source/WebCore/platform/Length.h	2016-10-07 01:54:14 UTC (rev 206893)
+++ trunk/Source/WebCore/platform/Length.h	2016-10-07 02:33:38 UTC (rev 206894)
@@ -415,8 +415,6 @@
     return type() == FitContent;
 }
 
-Length convertTo100PercentMinusLength(const Length&);
-
 TextStream& operator<<(TextStream&, Length);
 
 } // namespace WebCore

Modified: trunk/Source/WebCore/rendering/style/BasicShapes.cpp (206893 => 206894)


--- trunk/Source/WebCore/rendering/style/BasicShapes.cpp	2016-10-07 01:54:14 UTC (rev 206893)
+++ trunk/Source/WebCore/rendering/style/BasicShapes.cpp	2016-10-07 02:33:38 UTC (rev 206894)
@@ -52,13 +52,15 @@
         m_computedLength = m_length.isUndefined() ? Length(0, Fixed) : m_length;
         return;
     }
-
     if (m_length.isUndefined()) {
         m_computedLength = Length(100, Percent);
         return;
     }
-    
-    m_computedLength = convertTo100PercentMinusLength(m_length);
+
+    auto lhs = std::make_unique<CalcExpressionLength>(Length(100, Percent));
+    auto rhs = std::make_unique<CalcExpressionLength>(m_length);
+    auto op = std::make_unique<CalcExpressionBinaryOperation>(WTFMove(lhs), WTFMove(rhs), CalcSubtract);
+    m_computedLength = Length(CalculationValue::create(WTFMove(op), ValueRangeAll));
 }
 
 struct SVGPathTranslatedByteStream {

Modified: trunk/Tools/ChangeLog (206893 => 206894)


--- trunk/Tools/ChangeLog	2016-10-07 01:54:14 UTC (rev 206893)
+++ trunk/Tools/ChangeLog	2016-10-07 02:33:38 UTC (rev 206894)
@@ -1,3 +1,18 @@
+2016-10-06  Commit Queue  <commit-qu...@webkit.org>
+
+        Unreviewed, rolling out r206713.
+        https://bugs.webkit.org/show_bug.cgi?id=163097
+
+        triggers apparent codegen bug on ARM 32-bit (Requested by smfr
+        on #webkit).
+
+        Reverted changeset:
+
+        "Support transitions/animations of background-position with
+        right/bottom-relative values"
+        https://bugs.webkit.org/show_bug.cgi?id=162048
+        http://trac.webkit.org/changeset/206713
+
 2016-10-06  Alex Christensen  <achristen...@webkit.org>
 
         URLParser: Non-ASCII characters in Non-UTF-8 encoded queries of relative URLs with ws, wss, or nonspecial schemes should be UTF-8 encoded

Modified: trunk/Tools/TestWebKitAPI/Tests/WebCore/CalculationValue.cpp (206893 => 206894)


--- trunk/Tools/TestWebKitAPI/Tests/WebCore/CalculationValue.cpp	2016-10-07 01:54:14 UTC (rev 206893)
+++ trunk/Tools/TestWebKitAPI/Tests/WebCore/CalculationValue.cpp	2016-10-07 02:33:38 UTC (rev 206894)
@@ -27,10 +27,6 @@
 
 #include <WebCore/CalculationValue.h>
 
-namespace WebCore {
-class TextStream;
-};
-
 namespace TestWebKitAPI {
 
 static unsigned deletionCount;
@@ -44,9 +40,6 @@
 
     float evaluate(float) const override { return 0; }
     bool operator==(const CalcExpressionNode&) const override { ASSERT_NOT_REACHED(); return false; }
-
-private:
-    void dump(WebCore::TextStream&) const override { };
 };
 
 static Ref<WebCore::CalculationValue> createTestValue()
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to