Bug 260505

Summary: REGRESSION(263118@main): [CoordinatedGraphics] Incomplete rendering after 10s inactivity without hardware acceleration
Product: WebKit Reporter: Tomoki Imai <tomoki.imai>
Component: WebKit2Assignee: Carlos Garcia Campos <cgarcia>
Status: CLOSED FIXED    
Severity: Normal CC: cgarcia, Hironori.Fujii, kkinnunen, mcatanzaro, webkit-bug-importer, zdobersek
Priority: P2 Keywords: InRadar
Version: WebKit Local Build   
Hardware: Unspecified   
OS: Unspecified   
See Also: https://bugs.webkit.org/show_bug.cgi?id=255392
https://bugs.webkit.org/show_bug.cgi?id=259449
Attachments:
Description Flags
The reproduction steps using WebKitGTK MiniBrowser
none
Reproduced image on webkitgtk MiniBrowser
none
Reproduced image on windows (wincairo) MiniBrowser none

Description Tomoki Imai 2023-08-21 20:55:27 PDT
Created attachment 467379 [details]
The reproduction steps using WebKitGTK MiniBrowser

Test Environment:
- Ubuntu 22.04
- webkit 267033@main (https://github.com/WebKit/WebKit/commit/718ac9d)

Steps:
- Launch WebKitGTK MiniBrowser
- Make "Hardware Accelerated Policy" "never" from the preferences
- Navigate to https://webkit.org/
- Scroll down to the bottom of page (where there is no animation displayed)
- Focus to another window (for example terminal application)
- Wait 10s
- Focus MiniBrowser again

Actual Result:
- The content of website disappears.

Expected Result:
- The content of website should be displayed.

Our Invesitgation Note:
This seems to be a regression from 263118@main (bug 255392). The backing store is discarded and not properly recovered.
There was another fix 266511@main but unfortunately it doesn't fix the issue completely.

We see the same issue on WinCairo if it is configured to use DrawingAreaProxyCoordinatedGraphics. The default one is DrawingAreaProxyWC so it doesn't reproduce the issue without settings.

https://github.com/WebKit/WebKit/blob/1d5fbefb714166eebf47d4b06477332bb39b3a32/Source/WebKit/UIProcess/win/PageClientImpl.cpp#L57-L60
Comment 1 Tomoki Imai 2023-08-21 21:01:59 PDT
Created attachment 467380 [details]
Reproduced image on webkitgtk MiniBrowser
Comment 2 Tomoki Imai 2023-08-22 01:06:59 PDT
Created attachment 467383 [details]
Reproduced image on windows (wincairo) MiniBrowser

Steps:
- Disable "UseGPUProcessForWebGLEnabled" https://github.com/WebKit/WebKit/blob/2f1549d11968bcbcfeabf70cb4ff84c711f9eeda/Source/WTF/Scripts/Preferences/UnifiedWebPreferences.yaml#L6830
- Launch MiniBrowser
- Disable "Debug => Use Accelerated Compositing"
- Navigate to https://webkit.org/
- Scroll down to the bottom of page (where there is no animation displayed)
- Focus to another window (for example command prompt)
- Wait 10s
- Focus MiniBrowser again
- Scroll up

Expected result: All content of webpage should be rendered.
Actual result: Some part of webpage is not rendered.
Comment 3 Carlos Garcia Campos 2023-08-23 06:49:24 PDT
Thanks for reporting, I'll look at this next week.
Comment 4 Carlos Garcia Campos 2023-08-28 00:17:07 PDT
I can't reproduce, but I see flickering, there's a repaint with no backing store before the backing store is created, then I see the contents normally. I'll fix the flickering which hpefully will fix the issue for you too.
Comment 5 Carlos Garcia Campos 2023-08-28 03:41:54 PDT
Pull request: https://github.com/WebKit/WebKit/pull/17120
Comment 6 Radar WebKit Bug Importer 2023-08-28 20:56:14 PDT
<rdar://problem/114606369>
Comment 7 EWS 2023-08-29 06:58:32 PDT
Committed 267399@main (3e47e6d0c366): <https://commits.webkit.org/267399@main>

Reviewed commits have been landed. Closing PR #17120 and removing active labels.
Comment 8 Tomoki Imai 2023-08-30 01:33:11 PDT
Thank you, I confirmed that 267444@main doesn't reproduce the issue on WinCairo and WebKitGTK!