Bug 222265 - [GTK] REGRESSION: Broken scrolling on element.io with async scrolling
Summary: [GTK] REGRESSION: Broken scrolling on element.io with async scrolling
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: WebKitGTK (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Chris Lord
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2021-02-22 03:58 PST by Alice Mikhaylenko
Modified: 2021-05-21 05:23 PDT (History)
11 users (show)

See Also:


Attachments
Screen recording (5.37 MB, video/x-matroska)
2021-02-22 03:58 PST, Alice Mikhaylenko
no flags Details
Screenshot of a zoomed in page (181.66 KB, image/png)
2021-02-22 04:07 PST, Alice Mikhaylenko
no flags Details
Patch (2.01 KB, patch)
2021-05-21 03:48 PDT, Chris Lord
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Alice Mikhaylenko 2021-02-22 03:58:27 PST
Created attachment 421176 [details]
Screen recording

See the recording. It's reproducible with http://svn.webkit.org/repository/webkit/trunk@273230. though it started a lot earlier.

I'm pretty sure it can be reproduced elsewhere, and maybe even already has a bug filed, but can't find anything right now.
Comment 1 Alice Mikhaylenko 2021-02-22 04:07:40 PST
Created attachment 421178 [details]
Screenshot of a zoomed in page

Oh, I've missed a very important detail: it seems to only happen on HiDPI OR when the page is zoomed in via pinch zoom.
Comment 2 Alice Mikhaylenko 2021-05-16 12:36:14 PDT
Seems it also happens in the inspector, in the "All Layers" list.
Comment 3 Alice Mikhaylenko 2021-05-16 13:32:45 PDT
Found the cause. In `Source/WebCore/platform/graphics/texmap/TextureMapperLayer.cpp`, 

```cpp
        clipTransform.translate(options.offset.width() + m_state.boundsOrigin.x(),
            options.offset.height() + m_state.boundsOrigin.y());
```

the origin coords should be multiplied by the scale factors (both page and device).
Comment 4 Chris Lord 2021-05-21 03:48:52 PDT
Created attachment 429280 [details]
Patch
Comment 5 Alice Mikhaylenko 2021-05-21 03:56:19 PDT
I can confirm it works, both with scale factor and page zooming.
Comment 6 EWS 2021-05-21 05:23:48 PDT
Committed r277855 (237997@main): <https://commits.webkit.org/237997@main>

All reviewed patches have been landed. Closing bug and clearing flags on attachment 429280 [details].