-
Notifications
You must be signed in to change notification settings - Fork 711
[scroll-animations-1] Add Element-based offset (#4337) #5124
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
Introduce concept of "scroll timeline offset" that can be container-based (existing type) and element-based (new type) Add IDL for the new offset type and use it. Define the process for each offset type to be resolved into an effective scroll offset. Update current time calculation to resolve offsets and use the effective values. Minor changes: - reflow lines to fit in 80 chars - Clarify some definitions TODO (as follow ups): - define threshold for element-based offset - Add a diagram to visualize the element-based computation - Add css syntax for element-based offsets
@flackr FYI in case you have any comments. |
For these cases we cannot calculate a meaningful scroll offset: 1. When target is not a descendant of timeline's source. 2. When target has no layout box. There current draft spec [1] asks for these situations to result into unresolved scroll offset which keeps timeline inactive. [1] w3c/csswg-drafts#5124 TEST: wpt/scroll-animations/element-based-offset-unresolved.html BUG: 1023375 Change-Id: Iec616444dda8dcdd6649e250aa993b439c00885e
Addressed nits in latest commit be7fcd7 |
For these cases we cannot calculate a meaningful scroll offset: 1. When target is not a descendant of timeline's source. 2. When target has no layout box. The current draft spec [1] asks for these situations to result into unresolved scroll offset which keeps timeline inactive. [1] w3c/csswg-drafts#5124 TEST: wpt/scroll-animations/element-based-offset-unresolved.html BUG: 1023375 Change-Id: Iec616444dda8dcdd6649e250aa993b439c00885e
For these cases we cannot calculate a meaningful scroll offset: 1. When target is not a descendant of timeline's source. 2. When target has no layout box. The current draft spec [1] asks for these situations to result into unresolved scroll offset which keeps timeline inactive. [1] w3c/csswg-drafts#5124 TEST: wpt/scroll-animations/element-based-offset-unresolved.html BUG: 1023375 Change-Id: Iec616444dda8dcdd6649e250aa993b439c00885e Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2222884 Reviewed-by: Majid Valipour <majidvp@chromium.org> Reviewed-by: Yi Gu <yigu@chromium.org> Commit-Queue: Majid Valipour <majidvp@chromium.org> Cr-Commit-Position: refs/heads/master@{#774144}
For these cases we cannot calculate a meaningful scroll offset: 1. When target is not a descendant of timeline's source. 2. When target has no layout box. The current draft spec [1] asks for these situations to result into unresolved scroll offset which keeps timeline inactive. [1] w3c/csswg-drafts#5124 TEST: wpt/scroll-animations/element-based-offset-unresolved.html BUG: 1023375 Change-Id: Iec616444dda8dcdd6649e250aa993b439c00885e Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2222884 Reviewed-by: Majid Valipour <majidvp@chromium.org> Reviewed-by: Yi Gu <yigu@chromium.org> Commit-Queue: Majid Valipour <majidvp@chromium.org> Cr-Commit-Position: refs/heads/master@{#774144}
For these cases we cannot calculate a meaningful scroll offset: 1. When target is not a descendant of timeline's source. 2. When target has no layout box. The current draft spec [1] asks for these situations to result into unresolved scroll offset which keeps timeline inactive. [1] w3c/csswg-drafts#5124 TEST: wpt/scroll-animations/element-based-offset-unresolved.html BUG: 1023375 Change-Id: Iec616444dda8dcdd6649e250aa993b439c00885e Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2222884 Reviewed-by: Majid Valipour <majidvp@chromium.org> Reviewed-by: Yi Gu <yigu@chromium.org> Commit-Queue: Majid Valipour <majidvp@chromium.org> Cr-Commit-Position: refs/heads/master@{#774144}
…olvable cases, a=testonly Automatic update from web-platform-tests [scroll-timeline] Correctly handle unresolvable cases For these cases we cannot calculate a meaningful scroll offset: 1. When target is not a descendant of timeline's source. 2. When target has no layout box. The current draft spec [1] asks for these situations to result into unresolved scroll offset which keeps timeline inactive. [1] w3c/csswg-drafts#5124 TEST: wpt/scroll-animations/element-based-offset-unresolved.html BUG: 1023375 Change-Id: Iec616444dda8dcdd6649e250aa993b439c00885e Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2222884 Reviewed-by: Majid Valipour <majidvp@chromium.org> Reviewed-by: Yi Gu <yigu@chromium.org> Commit-Queue: Majid Valipour <majidvp@chromium.org> Cr-Commit-Position: refs/heads/master@{#774144} -- wpt-commits: 52575c9d7c3139cab33780e114b5cf9237a47157 wpt-pr: 23889
…olvable cases, a=testonly Automatic update from web-platform-tests [scroll-timeline] Correctly handle unresolvable cases For these cases we cannot calculate a meaningful scroll offset: 1. When target is not a descendant of timeline's source. 2. When target has no layout box. The current draft spec [1] asks for these situations to result into unresolved scroll offset which keeps timeline inactive. [1] w3c/csswg-drafts#5124 TEST: wpt/scroll-animations/element-based-offset-unresolved.html BUG: 1023375 Change-Id: Iec616444dda8dcdd6649e250aa993b439c00885e Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2222884 Reviewed-by: Majid Valipour <majidvp@chromium.org> Reviewed-by: Yi Gu <yigu@chromium.org> Commit-Queue: Majid Valipour <majidvp@chromium.org> Cr-Commit-Position: refs/heads/master@{#774144} -- wpt-commits: 52575c9d7c3139cab33780e114b5cf9237a47157 wpt-pr: 23889
…olvable cases, a=testonly Automatic update from web-platform-tests [scroll-timeline] Correctly handle unresolvable cases For these cases we cannot calculate a meaningful scroll offset: 1. When target is not a descendant of timeline's source. 2. When target has no layout box. The current draft spec [1] asks for these situations to result into unresolved scroll offset which keeps timeline inactive. [1] w3c/csswg-drafts#5124 TEST: wpt/scroll-animations/element-based-offset-unresolved.html BUG: 1023375 Change-Id: Iec616444dda8dcdd6649e250aa993b439c00885e Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2222884 Reviewed-by: Majid Valipour <majidvp@chromium.org> Reviewed-by: Yi Gu <yigu@chromium.org> Commit-Queue: Majid Valipour <majidvp@chromium.org> Cr-Commit-Position: refs/heads/master@{#774144} -- wpt-commits: 52575c9d7c3139cab33780e114b5cf9237a47157 wpt-pr: 23889 Differential Revision: https://phabricator.services.mozilla.com/D78787
…olvable cases, a=testonly Automatic update from web-platform-tests [scroll-timeline] Correctly handle unresolvable cases For these cases we cannot calculate a meaningful scroll offset: 1. When target is not a descendant of timeline's source. 2. When target has no layout box. The current draft spec [1] asks for these situations to result into unresolved scroll offset which keeps timeline inactive. [1] w3c/csswg-drafts#5124 TEST: wpt/scroll-animations/element-based-offset-unresolved.html BUG: 1023375 Change-Id: Iec616444dda8dcdd6649e250aa993b439c00885e Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2222884 Reviewed-by: Majid Valipour <majidvp@chromium.org> Reviewed-by: Yi Gu <yigu@chromium.org> Commit-Queue: Majid Valipour <majidvp@chromium.org> Cr-Commit-Position: refs/heads/master@{#774144} -- wpt-commits: 52575c9d7c3139cab33780e114b5cf9237a47157 wpt-pr: 23889 Differential Revision: https://phabricator.services.mozilla.com/D78787
…olvable cases, a=testonly Automatic update from web-platform-tests [scroll-timeline] Correctly handle unresolvable cases For these cases we cannot calculate a meaningful scroll offset: 1. When target is not a descendant of timeline's source. 2. When target has no layout box. The current draft spec [1] asks for these situations to result into unresolved scroll offset which keeps timeline inactive. [1] w3c/csswg-drafts#5124 TEST: wpt/scroll-animations/element-based-offset-unresolved.html BUG: 1023375 Change-Id: Iec616444dda8dcdd6649e250aa993b439c00885e Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2222884 Reviewed-by: Majid Valipour <majidvp@chromium.org> Reviewed-by: Yi Gu <yigu@chromium.org> Commit-Queue: Majid Valipour <majidvp@chromium.org> Cr-Commit-Position: refs/heads/master@{#774144} -- wpt-commits: 52575c9d7c3139cab33780e114b5cf9237a47157 wpt-pr: 23889 Differential Revision: https://phabricator.services.mozilla.com/D78787
…olvable cases, a=testonly Automatic update from web-platform-tests [scroll-timeline] Correctly handle unresolvable cases For these cases we cannot calculate a meaningful scroll offset: 1. When target is not a descendant of timeline's source. 2. When target has no layout box. The current draft spec [1] asks for these situations to result into unresolved scroll offset which keeps timeline inactive. [1] w3c/csswg-drafts#5124 TEST: wpt/scroll-animations/element-based-offset-unresolved.html BUG: 1023375 Change-Id: Iec616444dda8dcdd6649e250aa993b439c00885e Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2222884 Reviewed-by: Majid Valipour <majidvp@chromium.org> Reviewed-by: Yi Gu <yigu@chromium.org> Commit-Queue: Majid Valipour <majidvp@chromium.org> Cr-Commit-Position: refs/heads/master@{#774144} -- wpt-commits: 52575c9d7c3139cab33780e114b5cf9237a47157 wpt-pr: 23889 Differential Revision: https://phabricator.services.mozilla.com/D78787
…olvable cases, a=testonly Automatic update from web-platform-tests [scroll-timeline] Correctly handle unresolvable cases For these cases we cannot calculate a meaningful scroll offset: 1. When target is not a descendant of timeline's source. 2. When target has no layout box. The current draft spec [1] asks for these situations to result into unresolved scroll offset which keeps timeline inactive. [1] w3c/csswg-drafts#5124 TEST: wpt/scroll-animations/element-based-offset-unresolved.html BUG: 1023375 Change-Id: Iec616444dda8dcdd6649e250aa993b439c00885e Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2222884 Reviewed-by: Majid Valipour <majidvpchromium.org> Reviewed-by: Yi Gu <yiguchromium.org> Commit-Queue: Majid Valipour <majidvpchromium.org> Cr-Commit-Position: refs/heads/master{#774144} -- wpt-commits: 52575c9d7c3139cab33780e114b5cf9237a47157 wpt-pr: 23889 UltraBlame original commit: 8d5970242b1ef3f361256b225805d097138569f8
…olvable cases, a=testonly Automatic update from web-platform-tests [scroll-timeline] Correctly handle unresolvable cases For these cases we cannot calculate a meaningful scroll offset: 1. When target is not a descendant of timeline's source. 2. When target has no layout box. The current draft spec [1] asks for these situations to result into unresolved scroll offset which keeps timeline inactive. [1] w3c/csswg-drafts#5124 TEST: wpt/scroll-animations/element-based-offset-unresolved.html BUG: 1023375 Change-Id: Iec616444dda8dcdd6649e250aa993b439c00885e Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2222884 Reviewed-by: Majid Valipour <majidvpchromium.org> Reviewed-by: Yi Gu <yiguchromium.org> Commit-Queue: Majid Valipour <majidvpchromium.org> Cr-Commit-Position: refs/heads/master{#774144} -- wpt-commits: 52575c9d7c3139cab33780e114b5cf9237a47157 wpt-pr: 23889 Differential Revision: https://phabricator.services.mozilla.com/D78787 UltraBlame original commit: 9d70834b865c54e1fbd354acd7a040d07899cfbb
…olvable cases, a=testonly Automatic update from web-platform-tests [scroll-timeline] Correctly handle unresolvable cases For these cases we cannot calculate a meaningful scroll offset: 1. When target is not a descendant of timeline's source. 2. When target has no layout box. The current draft spec [1] asks for these situations to result into unresolved scroll offset which keeps timeline inactive. [1] w3c/csswg-drafts#5124 TEST: wpt/scroll-animations/element-based-offset-unresolved.html BUG: 1023375 Change-Id: Iec616444dda8dcdd6649e250aa993b439c00885e Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2222884 Reviewed-by: Majid Valipour <majidvpchromium.org> Reviewed-by: Yi Gu <yiguchromium.org> Commit-Queue: Majid Valipour <majidvpchromium.org> Cr-Commit-Position: refs/heads/master{#774144} -- wpt-commits: 52575c9d7c3139cab33780e114b5cf9237a47157 wpt-pr: 23889 Differential Revision: https://phabricator.services.mozilla.com/D78787 UltraBlame original commit: 7e3d78d04d1df89a7be533236cce0137b205cd6c
…olvable cases, a=testonly Automatic update from web-platform-tests [scroll-timeline] Correctly handle unresolvable cases For these cases we cannot calculate a meaningful scroll offset: 1. When target is not a descendant of timeline's source. 2. When target has no layout box. The current draft spec [1] asks for these situations to result into unresolved scroll offset which keeps timeline inactive. [1] w3c/csswg-drafts#5124 TEST: wpt/scroll-animations/element-based-offset-unresolved.html BUG: 1023375 Change-Id: Iec616444dda8dcdd6649e250aa993b439c00885e Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2222884 Reviewed-by: Majid Valipour <majidvpchromium.org> Reviewed-by: Yi Gu <yiguchromium.org> Commit-Queue: Majid Valipour <majidvpchromium.org> Cr-Commit-Position: refs/heads/master{#774144} -- wpt-commits: 52575c9d7c3139cab33780e114b5cf9237a47157 wpt-pr: 23889 UltraBlame original commit: 8d5970242b1ef3f361256b225805d097138569f8
…olvable cases, a=testonly Automatic update from web-platform-tests [scroll-timeline] Correctly handle unresolvable cases For these cases we cannot calculate a meaningful scroll offset: 1. When target is not a descendant of timeline's source. 2. When target has no layout box. The current draft spec [1] asks for these situations to result into unresolved scroll offset which keeps timeline inactive. [1] w3c/csswg-drafts#5124 TEST: wpt/scroll-animations/element-based-offset-unresolved.html BUG: 1023375 Change-Id: Iec616444dda8dcdd6649e250aa993b439c00885e Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2222884 Reviewed-by: Majid Valipour <majidvpchromium.org> Reviewed-by: Yi Gu <yiguchromium.org> Commit-Queue: Majid Valipour <majidvpchromium.org> Cr-Commit-Position: refs/heads/master{#774144} -- wpt-commits: 52575c9d7c3139cab33780e114b5cf9237a47157 wpt-pr: 23889 Differential Revision: https://phabricator.services.mozilla.com/D78787 UltraBlame original commit: 9d70834b865c54e1fbd354acd7a040d07899cfbb
…olvable cases, a=testonly Automatic update from web-platform-tests [scroll-timeline] Correctly handle unresolvable cases For these cases we cannot calculate a meaningful scroll offset: 1. When target is not a descendant of timeline's source. 2. When target has no layout box. The current draft spec [1] asks for these situations to result into unresolved scroll offset which keeps timeline inactive. [1] w3c/csswg-drafts#5124 TEST: wpt/scroll-animations/element-based-offset-unresolved.html BUG: 1023375 Change-Id: Iec616444dda8dcdd6649e250aa993b439c00885e Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2222884 Reviewed-by: Majid Valipour <majidvpchromium.org> Reviewed-by: Yi Gu <yiguchromium.org> Commit-Queue: Majid Valipour <majidvpchromium.org> Cr-Commit-Position: refs/heads/master{#774144} -- wpt-commits: 52575c9d7c3139cab33780e114b5cf9237a47157 wpt-pr: 23889 Differential Revision: https://phabricator.services.mozilla.com/D78787 UltraBlame original commit: 7e3d78d04d1df89a7be533236cce0137b205cd6c
…olvable cases, a=testonly Automatic update from web-platform-tests [scroll-timeline] Correctly handle unresolvable cases For these cases we cannot calculate a meaningful scroll offset: 1. When target is not a descendant of timeline's source. 2. When target has no layout box. The current draft spec [1] asks for these situations to result into unresolved scroll offset which keeps timeline inactive. [1] w3c/csswg-drafts#5124 TEST: wpt/scroll-animations/element-based-offset-unresolved.html BUG: 1023375 Change-Id: Iec616444dda8dcdd6649e250aa993b439c00885e Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2222884 Reviewed-by: Majid Valipour <majidvpchromium.org> Reviewed-by: Yi Gu <yiguchromium.org> Commit-Queue: Majid Valipour <majidvpchromium.org> Cr-Commit-Position: refs/heads/master{#774144} -- wpt-commits: 52575c9d7c3139cab33780e114b5cf9237a47157 wpt-pr: 23889 UltraBlame original commit: 8d5970242b1ef3f361256b225805d097138569f8
…olvable cases, a=testonly Automatic update from web-platform-tests [scroll-timeline] Correctly handle unresolvable cases For these cases we cannot calculate a meaningful scroll offset: 1. When target is not a descendant of timeline's source. 2. When target has no layout box. The current draft spec [1] asks for these situations to result into unresolved scroll offset which keeps timeline inactive. [1] w3c/csswg-drafts#5124 TEST: wpt/scroll-animations/element-based-offset-unresolved.html BUG: 1023375 Change-Id: Iec616444dda8dcdd6649e250aa993b439c00885e Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2222884 Reviewed-by: Majid Valipour <majidvpchromium.org> Reviewed-by: Yi Gu <yiguchromium.org> Commit-Queue: Majid Valipour <majidvpchromium.org> Cr-Commit-Position: refs/heads/master{#774144} -- wpt-commits: 52575c9d7c3139cab33780e114b5cf9237a47157 wpt-pr: 23889 Differential Revision: https://phabricator.services.mozilla.com/D78787 UltraBlame original commit: 9d70834b865c54e1fbd354acd7a040d07899cfbb
…olvable cases, a=testonly Automatic update from web-platform-tests [scroll-timeline] Correctly handle unresolvable cases For these cases we cannot calculate a meaningful scroll offset: 1. When target is not a descendant of timeline's source. 2. When target has no layout box. The current draft spec [1] asks for these situations to result into unresolved scroll offset which keeps timeline inactive. [1] w3c/csswg-drafts#5124 TEST: wpt/scroll-animations/element-based-offset-unresolved.html BUG: 1023375 Change-Id: Iec616444dda8dcdd6649e250aa993b439c00885e Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2222884 Reviewed-by: Majid Valipour <majidvpchromium.org> Reviewed-by: Yi Gu <yiguchromium.org> Commit-Queue: Majid Valipour <majidvpchromium.org> Cr-Commit-Position: refs/heads/master{#774144} -- wpt-commits: 52575c9d7c3139cab33780e114b5cf9237a47157 wpt-pr: 23889 Differential Revision: https://phabricator.services.mozilla.com/D78787 UltraBlame original commit: 7e3d78d04d1df89a7be533236cce0137b205cd6c
DOMString start = "auto"; | ||
DOMString end = "auto"; | ||
(DOMString or ElementBasedOffset) start = "auto"; | ||
(DOMString or ElementBasedOffset) end = "auto"; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@majido Should this patch have updated the types of the start
and end
members of the ScrollTimeline
interface too?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Indeed! And thanks for the patch to fix it.
…olvable cases, a=testonly Automatic update from web-platform-tests [scroll-timeline] Correctly handle unresolvable cases For these cases we cannot calculate a meaningful scroll offset: 1. When target is not a descendant of timeline's source. 2. When target has no layout box. The current draft spec [1] asks for these situations to result into unresolved scroll offset which keeps timeline inactive. [1] w3c/csswg-drafts#5124 TEST: wpt/scroll-animations/element-based-offset-unresolved.html BUG: 1023375 Change-Id: Iec616444dda8dcdd6649e250aa993b439c00885e Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2222884 Reviewed-by: Majid Valipour <majidvp@chromium.org> Reviewed-by: Yi Gu <yigu@chromium.org> Commit-Queue: Majid Valipour <majidvp@chromium.org> Cr-Commit-Position: refs/heads/master@{#774144} -- wpt-commits: 52575c9d7c3139cab33780e114b5cf9237a47157 wpt-pr: 23889
…olvable cases, a=testonly Automatic update from web-platform-tests [scroll-timeline] Correctly handle unresolvable cases For these cases we cannot calculate a meaningful scroll offset: 1. When target is not a descendant of timeline's source. 2. When target has no layout box. The current draft spec [1] asks for these situations to result into unresolved scroll offset which keeps timeline inactive. [1] w3c/csswg-drafts#5124 TEST: wpt/scroll-animations/element-based-offset-unresolved.html BUG: 1023375 Change-Id: Iec616444dda8dcdd6649e250aa993b439c00885e Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2222884 Reviewed-by: Majid Valipour <majidvp@chromium.org> Reviewed-by: Yi Gu <yigu@chromium.org> Commit-Queue: Majid Valipour <majidvp@chromium.org> Cr-Commit-Position: refs/heads/master@{#774144} -- wpt-commits: 52575c9d7c3139cab33780e114b5cf9237a47157 wpt-pr: 23889 Differential Revision: https://phabricator.services.mozilla.com/D78787
…olvable cases, a=testonly Automatic update from web-platform-tests [scroll-timeline] Correctly handle unresolvable cases For these cases we cannot calculate a meaningful scroll offset: 1. When target is not a descendant of timeline's source. 2. When target has no layout box. The current draft spec [1] asks for these situations to result into unresolved scroll offset which keeps timeline inactive. [1] w3c/csswg-drafts#5124 TEST: wpt/scroll-animations/element-based-offset-unresolved.html BUG: 1023375 Change-Id: Iec616444dda8dcdd6649e250aa993b439c00885e Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2222884 Reviewed-by: Majid Valipour <majidvp@chromium.org> Reviewed-by: Yi Gu <yigu@chromium.org> Commit-Queue: Majid Valipour <majidvp@chromium.org> Cr-Commit-Position: refs/heads/master@{#774144} -- wpt-commits: 52575c9d7c3139cab33780e114b5cf9237a47157 wpt-pr: 23889 Differential Revision: https://phabricator.services.mozilla.com/D78787
Add basic definition for Element-based offsets
Major changes:
Minor changes:
TODO (as follow ups):