Title: [201268] releases/WebKitGTK/webkit-2.12
Revision
201268
Author
[email protected]
Date
2016-05-23 03:45:53 -0700 (Mon, 23 May 2016)

Log Message

Merge r200622 - REGRESSION (r193610): Drop down menu doesn’t expand at allofbach.com
https://bugs.webkit.org/show_bug.cgi?id=157445

Reviewed by Simon Fraser.

When we don't run transitions (becasuse of to/from 'auto' values) we should also not
report the 'from' value and behave as if we finished the transition already.

Source/WebCore:

Test: fast/animation/height-auto-transition-computed-value.html

* page/animation/KeyframeAnimation.cpp:
(WebCore::KeyframeAnimation::fetchIntervalEndpointsForProperty): This is a revert of
looping the 'to' value back to the first keyframe when reverse animation is at the start value (last keyframe).

* platform/Length.cpp:
(WebCore::blend):

LayoutTests:

* fast/animation/height-auto-transition-computed-value-expected.html: Added.
* fast/animation/height-auto-transition-computed-value.html: Added.
* imported/blink/transitions/transition-not-interpolable-expected.txt:

Modified Paths

Added Paths

Diff

Modified: releases/WebKitGTK/webkit-2.12/LayoutTests/ChangeLog (201267 => 201268)


--- releases/WebKitGTK/webkit-2.12/LayoutTests/ChangeLog	2016-05-23 07:21:28 UTC (rev 201267)
+++ releases/WebKitGTK/webkit-2.12/LayoutTests/ChangeLog	2016-05-23 10:45:53 UTC (rev 201268)
@@ -1,3 +1,17 @@
+2016-05-10  Zalan Bujtas  <[email protected]>
+
+        REGRESSION (r193610): Drop down menu doesn’t expand at allofbach.com
+        https://bugs.webkit.org/show_bug.cgi?id=157445
+
+        Reviewed by Simon Fraser.
+
+        When we don't run transitions (becasuse of to/from 'auto' values) we should also not
+        report the 'from' value and behave as if we finished the transition already.
+
+        * fast/animation/height-auto-transition-computed-value-expected.html: Added.
+        * fast/animation/height-auto-transition-computed-value.html: Added.
+        * imported/blink/transitions/transition-not-interpolable-expected.txt:
+
 2016-05-07  Joanmarie Diggs  <[email protected]>
 
         REGRESSION(r196222): [AX][GTK] accessibility/gtk/caret-offsets.html failing

Added: releases/WebKitGTK/webkit-2.12/LayoutTests/fast/animation/height-auto-transition-computed-value-expected.html (0 => 201268)


--- releases/WebKitGTK/webkit-2.12/LayoutTests/fast/animation/height-auto-transition-computed-value-expected.html	                        (rev 0)
+++ releases/WebKitGTK/webkit-2.12/LayoutTests/fast/animation/height-auto-transition-computed-value-expected.html	2016-05-23 10:45:53 UTC (rev 201268)
@@ -0,0 +1,18 @@
+<!DOCTYPE html>
+<html>
+<head>
+<title>This tests that auto transition returns the proper computed value.</title>
+<style>
+#dropdown {
+    overflow: hidden;
+    border: 1px solid red;
+    height: 18px;
+    transition: height 1s ease-out;
+}
+</style>
+</head>
+<body>
+<div id=dropdown></div>
+PASS if you can see foobar above.
+</body>
+</html>

Added: releases/WebKitGTK/webkit-2.12/LayoutTests/fast/animation/height-auto-transition-computed-value.html (0 => 201268)


--- releases/WebKitGTK/webkit-2.12/LayoutTests/fast/animation/height-auto-transition-computed-value.html	                        (rev 0)
+++ releases/WebKitGTK/webkit-2.12/LayoutTests/fast/animation/height-auto-transition-computed-value.html	2016-05-23 10:45:53 UTC (rev 201268)
@@ -0,0 +1,35 @@
+<!DOCTYPE html>
+<html>
+<head>
+<title>This tests that auto transition returns the proper computed value.</title>
+<style>
+#dropdown {
+    font-size: 16px;
+    font-family: ahem;
+    color: white;
+    overflow: hidden;
+    border: 1px solid red;
+    height: 0px;
+    transition: height 1s ease-out;
+}
+</style>
+</head>
+<body>
+<div id=dropdown>foobar</div>
+PASS if you can see foobar above.
+
+<script>
+if (window.testRunner)
+    testRunner.waitUntilDone();
+
+setTimeout(function() {
+    var element = document.getElementById("dropdown");
+    element.style.height = 'auto';
+    var h = element.offsetHeight;
+    element.style.height = h + 'px';
+    if (window.testRunner)
+        testRunner.notifyDone();
+}, 0);
+</script>
+</body>
+</html>

Modified: releases/WebKitGTK/webkit-2.12/LayoutTests/imported/blink/transitions/transition-not-interpolable-expected.txt (201267 => 201268)


--- releases/WebKitGTK/webkit-2.12/LayoutTests/imported/blink/transitions/transition-not-interpolable-expected.txt	2016-05-23 07:21:28 UTC (rev 201267)
+++ releases/WebKitGTK/webkit-2.12/LayoutTests/imported/blink/transitions/transition-not-interpolable-expected.txt	2016-05-23 10:45:53 UTC (rev 201268)
@@ -1 +1 @@
-FAIL -- transtion should not apply from 0px to auto
+PASS

Modified: releases/WebKitGTK/webkit-2.12/Source/WebCore/ChangeLog (201267 => 201268)


--- releases/WebKitGTK/webkit-2.12/Source/WebCore/ChangeLog	2016-05-23 07:21:28 UTC (rev 201267)
+++ releases/WebKitGTK/webkit-2.12/Source/WebCore/ChangeLog	2016-05-23 10:45:53 UTC (rev 201268)
@@ -1,3 +1,22 @@
+2016-05-10  Zalan Bujtas  <[email protected]>
+
+        REGRESSION (r193610): Drop down menu doesn’t expand at allofbach.com
+        https://bugs.webkit.org/show_bug.cgi?id=157445
+
+        Reviewed by Simon Fraser.
+
+        When we don't run transitions (becasuse of to/from 'auto' values) we should also not
+        report the 'from' value and behave as if we finished the transition already.
+
+        Test: fast/animation/height-auto-transition-computed-value.html
+
+        * page/animation/KeyframeAnimation.cpp:
+        (WebCore::KeyframeAnimation::fetchIntervalEndpointsForProperty): This is a revert of
+        looping the 'to' value back to the first keyframe when reverse animation is at the start value (last keyframe).
+
+        * platform/Length.cpp:
+        (WebCore::blend):
+
 2016-05-07  Joanmarie Diggs  <[email protected]>
 
         REGRESSION(r196222): [AX][GTK] accessibility/gtk/caret-offsets.html failing

Modified: releases/WebKitGTK/webkit-2.12/Source/WebCore/page/animation/KeyframeAnimation.cpp (201267 => 201268)


--- releases/WebKitGTK/webkit-2.12/Source/WebCore/page/animation/KeyframeAnimation.cpp	2016-05-23 07:21:28 UTC (rev 201267)
+++ releases/WebKitGTK/webkit-2.12/Source/WebCore/page/animation/KeyframeAnimation.cpp	2016-05-23 10:45:53 UTC (rev 201268)
@@ -67,23 +67,21 @@
 
 void KeyframeAnimation::fetchIntervalEndpointsForProperty(CSSPropertyID property, const RenderStyle*& fromStyle, const RenderStyle*& toStyle, double& prog) const
 {
+    size_t numKeyframes = m_keyframes.size();
+    if (!numKeyframes)
+        return;
+
     // Find the first key
     double elapsedTime = getElapsedTime();
     if (m_animation->duration() && m_animation->iterationCount() != Animation::IterationCountInfinite)
         elapsedTime = std::min(elapsedTime, m_animation->duration() * m_animation->iterationCount());
 
     const double fractionalTime = this->fractionalTime(1, elapsedTime, 0);
-
-    size_t numKeyframes = m_keyframes.size();
-    if (!numKeyframes)
-        return;
-    
     ASSERT(!m_keyframes[0].key());
     ASSERT(m_keyframes[m_keyframes.size() - 1].key() == 1);
-    
+
     int prevIndex = -1;
     int nextIndex = -1;
-    
     // FIXME: with a lot of keys, this linear search will be slow. We could binary search.
     for (size_t i = 0; i < numKeyframes; ++i) {
         const KeyframeValue& currKeyFrame = m_keyframes[i];
@@ -95,31 +93,22 @@
             nextIndex = i;
             break;
         }
-        
         prevIndex = i;
     }
 
     if (prevIndex == -1)
         prevIndex = 0;
+    if (nextIndex == -1)
+        nextIndex = m_keyframes.size() - 1;
 
-    if (nextIndex == -1) {
-        int lastIndex = m_keyframes.size() - 1;
-        if (prevIndex == lastIndex)
-            nextIndex = 0;
-        else
-            nextIndex = lastIndex;
-    }
-
-    ASSERT(prevIndex != nextIndex);
-
     const KeyframeValue& prevKeyframe = m_keyframes[prevIndex];
     const KeyframeValue& nextKeyframe = m_keyframes[nextIndex];
 
     fromStyle = prevKeyframe.style();
     toStyle = nextKeyframe.style();
-    
+
     double offset = prevKeyframe.key();
-    double scale = 1.0 / (nextKeyframe.key() - prevKeyframe.key());
+    double scale = 1.0 / (nextIndex == prevIndex ?  1 : (nextKeyframe.key() - prevKeyframe.key()));
 
     prog = progress(scale, offset, prevKeyframe.timingFunction(name()));
 }

Modified: releases/WebKitGTK/webkit-2.12/Source/WebCore/platform/Length.h (201267 => 201268)


--- releases/WebKitGTK/webkit-2.12/Source/WebCore/platform/Length.h	2016-05-23 07:21:28 UTC (rev 201267)
+++ releases/WebKitGTK/webkit-2.12/Source/WebCore/platform/Length.h	2016-05-23 10:45:53 UTC (rev 201268)
@@ -422,7 +422,7 @@
         return blendMixedTypes(from, progress);
 
     if (from.isZero() && isZero())
-        return progress ? *this : from; // Pick up 'auto' from 'from' if progress is zero.
+        return *this;
 
     LengthType resultType = type();
     if (isZero())
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to