Bug 156435 - composited scrolling interferes with the propagation of perspective
Summary: composited scrolling interferes with the propagation of perspective
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Compositing (show other bugs)
Version: Safari 9
Hardware: iPhone / iPad Unspecified
: P2 Normal
Assignee: Simon Fraser (smfr)
URL:
Keywords: InRadar
: 164949 211851 (view as bug list)
Depends on:
Blocks:
 
Reported: 2016-04-09 09:05 PDT by vollick
Modified: 2020-05-14 12:46 PDT (History)
13 users (show)

See Also:


Attachments
Patch (12.24 KB, patch)
2020-05-13 11:14 PDT, Simon Fraser (smfr)
koivisto: review+
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description vollick 2016-04-09 09:05:52 PDT
Try visiting https://output.jsbin.com/muqaqejafi

Clicking the button toggles -webkit-overflow-scrolling : touch/auto. When touch is selected, perspective from the scroller is not applied to the background as per my understanding of the TR transform spec and parallax fails. This appears to be the source of some pain in the wild (https://css-tricks.com/forums/topic/parallax-scrolling-that-actually-works-on-ipad/). I'm not aware of a way to get both fling and parallax on an overflow scroller on iOS without resorting to JS (is there a way?).

Unrelated: it is difficult to click the button on iOS without being scrolled to the top. Could the scrolled content be interfering with hit testing, despite the scroll clip?
Comment 1 Radar WebKit Bug Importer 2016-04-09 11:03:23 PDT
<rdar://problem/25642222>
Comment 2 Jayden Seric 2019-10-29 18:08:58 PDT
Related: https://bugs.webkit.org/show_bug.cgi?id=164949
Comment 3 Simon Fraser (smfr) 2019-10-29 18:25:27 PDT
*** Bug 164949 has been marked as a duplicate of this bug. ***
Comment 4 Simon Fraser (smfr) 2020-05-13 11:04:42 PDT
*** Bug 211851 has been marked as a duplicate of this bug. ***
Comment 5 Simon Fraser (smfr) 2020-05-13 11:14:49 PDT
Created attachment 399281 [details]
Patch
Comment 6 Antti Koivisto 2020-05-13 11:21:43 PDT
Comment on attachment 399281 [details]
Patch

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

> Source/WebCore/rendering/RenderLayerBacking.cpp:691
> +    auto layerForChildrenTransform = [&]() {

Unnecessary ()

> Source/WebCore/rendering/RenderLayerBacking.cpp:706
> +        perspectiveRelativeBox = borderBoxRect;
> +        return m_graphicsLayer.get();
> +    };
> +
> +    auto* layerForPerspective = layerForChildrenTransform();

If you wanted to be fancy you could return both perspectiveRelativeBox and layer together with something like

    return std::make_tuple(m_graphicsLayer.get(), borderBoxRect);
}

auto [layerForPerspective, perspectiveRelativeBox] = layerForChildrenTransform()
Comment 7 Simon Fraser (smfr) 2020-05-13 12:01:26 PDT
https://trac.webkit.org/changeset/261632/webkit