Bug 222265

Summary: [GTK] REGRESSION: Broken scrolling on element.io with async scrolling
Product: WebKit Reporter: Alice Mikhaylenko <alicem>
Component: WebKitGTKAssignee: Chris Lord <clord>
Status: RESOLVED FIXED    
Severity: Normal CC: alex, bugs-noreply, cgarcia, clord, cmarcelo, ews-watchlist, Hironori.Fujii, kondapallykalyan, luiz, mcatanzaro, zdobersek
Priority: P2    
Version: WebKit Nightly Build   
Hardware: Unspecified   
OS: Unspecified   
Attachments:
Description Flags
Screen recording
none
Screenshot of a zoomed in page
none
Patch none

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].