Bug 142732 - Implement Scroll Container Animation Triggers
Summary: Implement Scroll Container Animation Triggers
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Animations (show other bugs)
Version: 528+ (Nightly build)
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Dean Jackson
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2015-03-16 10:41 PDT by Dean Jackson
Modified: 2015-03-17 18:30 PDT (History)
9 users (show)

See Also:


Attachments
Patch (17.97 KB, patch)
2015-03-16 15:07 PDT, Dean Jackson
no flags Details | Formatted Diff | Diff
Patch (21.37 KB, patch)
2015-03-17 11:34 PDT, Dean Jackson
simon.fraser: review+
buildbot: commit-queue-
Details | Formatted Diff | Diff
Archive of layout-test-results from ews103 for mac-mavericks (523.36 KB, application/zip)
2015-03-17 12:29 PDT, Build Bot
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Dean Jackson 2015-03-16 10:41:07 PDT
Implement the AnimationController side of triggers based on the container scroll.
Comment 1 Radar WebKit Bug Importer 2015-03-16 10:41:25 PDT
<rdar://problem/20174619>
Comment 2 Dean Jackson 2015-03-16 15:07:08 PDT
Created attachment 248752 [details]
Patch
Comment 3 WebKit Commit Bot 2015-03-16 15:08:48 PDT
Attachment 248752 [details] did not pass style-queue:


ERROR: Source/WebCore/ChangeLog:8:  You should remove the 'No new tests' and either add and list tests, or explain why no new tests were possible.  [changelog/nonewtests] [5]
ERROR: Source/WebCore/platform/animation/Animation.cpp:138:  Weird number of spaces at line-start.  Are you using a 4-space indent?  [whitespace/indent] [3]
ERROR: Source/WebCore/platform/animation/Animation.cpp:151:  Weird number of spaces at line-start.  Are you using a 4-space indent?  [whitespace/indent] [3]
Total errors found: 3 in 10 files


If any of these errors are false positives, please file a bug against check-webkit-style.
Comment 4 Dean Jackson 2015-03-17 11:34:43 PDT
Created attachment 248855 [details]
Patch
Comment 5 Simon Fraser (smfr) 2015-03-17 11:46:23 PDT
Comment on attachment 248855 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=248855&action=review

> Source/WebCore/page/animation/AnimationBase.cpp:466
> +                ScrollAnimationTrigger* scrollTrigger = static_cast<ScrollAnimationTrigger*>(m_animation->trigger().get());

downcast<ScrollAnimationTrigger>
ScrollAnimationTrigger&

> Source/WebCore/page/animation/AnimationBase.cpp:547
> +        if (!m_animation->trigger() || m_animation->trigger()->isAutoAnimationTrigger()) {
> +            double timeFromNow = m_animation->delay() - (beginAnimationUpdateTime() - m_requestedStartTime);
> +            return std::max(timeFromNow, 0.0);
> +        }

Remove.

> Source/WebCore/page/animation/AnimationBase.cpp:557
> +#else

#endif here.

> Source/WebCore/page/animation/AnimationBase.cpp:712
> +        ScrollAnimationTrigger* scrollTrigger = static_cast<ScrollAnimationTrigger*>(m_animation->trigger().get());

downcast, ref.

> Source/WebCore/page/animation/AnimationBase.cpp:719
> +        if (scrollTrigger->hasEndValue() && m_object) {
> +            float offset = m_object->view().frameView().scrollOffsetForFixedPosition().height().toFloat();
> +            if (offset < scrollTrigger->startValue().value())
> +                return 0;
> +            if (offset > scrollTrigger->endValue().value())
> +                return m_animation->duration();
> +            return m_animation->duration() * (offset - scrollTrigger->startValue().value()) / (scrollTrigger->endValue().value() - scrollTrigger->startValue().value());

Remove?

> Source/WebCore/platform/graphics/ca/GraphicsLayerCA.cpp:872
> +    if (anim->trigger()->isScrollAnimationTrigger()) {
> +        ScrollAnimationTrigger* scrollTrigger = static_cast<ScrollAnimationTrigger*>(anim->trigger().get());
> +        if (scrollTrigger->hasEndValue())
> +            return false;
> +    }

Remove.

> LayoutTests/animations/trigger-container-scroll-simple.html:41
> +    setTimeout(checkValueWithoutScroll, 100);

100ms is very long!

> LayoutTests/animations/trigger-container-scroll-simple.html:47
> +    setTimeout(checkValueWithScroll, 0);

Use animationstart event.

> LayoutTests/animations/trigger-container-scroll-simple.html:98
> +    <br>
> +    <br>
> +    <br>
> +    <br>
> +    <br>
> +    <br>
> +    <br>
> +    <br>
> +    <br>
> +    <br>
> +    <br>
> +    <br>
> +    <br>
> +    <br>
> +    <br>
> +    <br>
> +    <br>
> +    <br>
> +    <br>
> +    <br>
> +    <br>
> +    <br>
> +    <br>
> +    <br>
> +    <br>
> +    <br>
> +    <br>
> +    <br>
> +    <br>
> +    <br>

body { height: 2000px; }
Comment 6 Csaba Osztrogonác 2015-03-17 12:22:00 PDT
It broke the build everywhere as the EWS noticed it in time.
Please fix the builds ASAP. Thanks.
Comment 7 Build Bot 2015-03-17 12:28:56 PDT
Comment on attachment 248855 [details]
Patch

Attachment 248855 [details] did not pass mac-ews (mac):
Output: http://webkit-queues.appspot.com/results/5666104122802176

New failing tests:
animations/trigger-container-scroll-simple.html
Comment 8 Build Bot 2015-03-17 12:29:01 PDT
Created attachment 248859 [details]
Archive of layout-test-results from ews103 for mac-mavericks

The attached test failures were seen while running run-webkit-tests on the mac-ews.
Bot: ews103  Port: mac-mavericks  Platform: Mac OS X 10.9.5
Comment 9 Csaba Osztrogonác 2015-03-17 12:46:48 PDT
Just to document it was landed in http://trac.webkit.org/changeset/181655 ...

Are you working on the buildfixes? It is not WebKit2, you 
are not allowed to break the build intentionally any time.
Comment 10 Dean Jackson 2015-03-17 13:12:39 PDT
Hopefully these two followups will fix everything:

https://trac.webkit.org/r181658
https://trac.webkit.org/r181659
Comment 11 Dean Jackson 2015-03-17 13:12:52 PDT
I'm watching the bots now.
Comment 12 Alexey Proskuryakov 2015-03-17 18:30:45 PDT
The new test asserts on Mac WK1 nearly every time, see bug 142790.