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:
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@200622
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
+2016-05-10 Zalan Bujtas <zalan@apple.com>
+
+ 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-09 Dean Jackson <dino@apple.com>
[iOS] <select> elements should render right-aligned when in RTL mode
--- /dev/null
+<!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>
--- /dev/null
+<!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>
-FAIL -- transtion should not apply from 0px to auto
+PASS
fast/regions/layers/region-removed-during-animation.html [ ImageOnlyFailure ]
fast/sub-pixel/table-with-subpixel-cell-size.html [ ImageOnlyFailure ]
svg/text/tspan-multiple-outline.svg [ ImageOnlyFailure ]
+fast/animation/height-auto-transition-computed-value.html [ ImageOnlyFailure ]
webkit.org/b/155174 svg/animations/animate-marker-orient-from-angle-to-autostartreverse.html [ Skip ]
+2016-05-10 Zalan Bujtas <zalan@apple.com>
+
+ 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-09 Dean Jackson <dino@apple.com>
[iOS] <select> elements should render right-aligned when in RTL mode
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];
nextIndex = i;
break;
}
-
prevIndex = i;
}
if (prevIndex == -1)
prevIndex = 0;
-
- if (nextIndex == -1) {
- int lastIndex = m_keyframes.size() - 1;
- if (prevIndex == lastIndex)
- nextIndex = 0;
- else
- nextIndex = lastIndex;
- }
-
- ASSERT(prevIndex != nextIndex);
+ if (nextIndex == -1)
+ nextIndex = m_keyframes.size() - 1;
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()));
}
Length blend(const Length& from, const Length& to, double progress)
{
if (from.isAuto() || to.isAuto())
- return progress ? to : from;
+ return to;
if (from.type() == Calculated || to.type() == Calculated)
return blendMixedTypes(from, to, progress);