Need to check if the scroller is a scroll container for scroll timeline
Categories
(Core :: CSS Transitions and Animations, defect, P3)
Tracking
()
People
(Reporter: boris, Assigned: boris)
References
(Blocks 1 open bug)
Details
Attachments
(1 obsolete file)
Per the matrix discussion (1, 2), we didn't handle well in some cases in GetCurrentTimeAsDuration(). For example where overflow-x: clip; overflow-y: scroll and scroll timeline orientation is inline. We probably don't handle well this case. We have to refine this part and add some more tests.
| Assignee | ||
Comment 1•4 years ago
|
||
Explanation from hiro: in my understanding generating nsIScrollableFrame matches scroll container in the spec, so for overflow-x:clip;overflow-y:scroll will generate it, but yeah, in such cases we don't return null for x-axis timeline, that's what I meant.
| Assignee | ||
Updated•4 years ago
|
Updated•4 years ago
|
| Assignee | ||
Updated•4 years ago
|
| Assignee | ||
Updated•4 years ago
|
| Assignee | ||
Comment 2•4 years ago
•
|
||
(In reply to Boris Chiou [:boris] from comment #1)
Explanation from hiro: in my understanding generating nsIScrollableFrame matches scroll container in the spec, so for overflow-x:clip;overflow-y:scroll will generate it, but yeah, in such cases we don't return null for x-axis timeline, that's what I meant.
Note: it's impossible to have a scroller with overflow-x:clip;overflow-y:scroll. In this case, overflow-y:clip will be converted into overflow-y:hidden, based on the spec [1] (gecko code):
as specified, except with visible/clip computing to auto/hidden (respectively) if one of overflow-x or overflow-y is neither visible nor clip
Besides, if the scroller is not a scroll container, we don't create the scroll frame because we check IsScrollableOverflow() when building a scroll frame in nsCSSFrameConstructor. So I think our current code should be OK. The only exception is the root scroll frame. It seem we generate the root scroll frame always, so setting overflow:clip for html element still generate the root scroll frame. Therefore, this bug doesn't have to do anything on Gecko. Perhaps adding a test is enough.
[1] https://drafts.csswg.org/css-overflow-3/#scroll-container
| Assignee | ||
Comment 3•4 years ago
|
||
Based on
https://drafts.csswg.org/scroll-animations-1/#current-time-algorithm,
if the source is not a scroll container, we return unresolved current
time (i.e. inactive timeline), so the animation effect is not applied to
the target.
Gecko checks overflow property when building scroll frame, so if
this frame is not a scroll container, we don't build a scroll frame for
it, and ScrollTimeline::GetScrollFrame() should return nullptr for this
case.
The root element is a special case because we always generate the root
scroll frame, so if the source is the root element, the animation still works
even if we set overflow:clip for html. This makes us match the behavior in
Chromium.
Updated•4 years ago
|
Updated•3 years ago
|
| Assignee | ||
Comment 4•3 years ago
|
||
I added the related test in the patch (https://phabricator.services.mozilla.com/D146358) already. So close this bug.
Updated•3 years ago
|
Description
•