Summary: | [WebGL] Safari snapshots of WebGL content in the tab picker don't work | ||||||
---|---|---|---|---|---|---|---|
Product: | WebKit | Reporter: | Justin Fan <justin_fan> | ||||
Component: | WebGL | Assignee: | Justin Fan <justin_fan> | ||||
Status: | RESOLVED FIXED | ||||||
Severity: | Normal | CC: | cdumez, changseok, darin, dino, esprehn+autocc, ews-watchlist, glenn, graouts, gyuyoung.kim, kondapallykalyan, pdr, thorton, webkit-bug-importer | ||||
Priority: | P2 | Keywords: | InRadar | ||||
Version: | WebKit Local Build | ||||||
Hardware: | Unspecified | ||||||
OS: | Unspecified | ||||||
Attachments: |
|
Description
Justin Fan
2020-07-17 05:06:58 PDT
Created attachment 405013 [details]
Patch
Sort of WIP patch for now. The snapshot will use the last-painted Image by the canvas if the Page is no longer active when the snapshot is requested. May still try to write an internal test for the snapshotting feature. To clarify, the code works, but there's no test. Comment on attachment 405013 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=405013&action=review > Source/WebCore/ChangeLog:9 > + No new tests; writing a test may involve adding a new feature to TestRunner to trigger this path. Understood. Could we please add that feature? (Probably we should just write an API test similar to the other snapshotting tests) Should have checked this earlier, but iOS just works. This only occurred on mac. Comment on attachment 405013 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=405013&action=review >> Source/WebCore/ChangeLog:9 >> + No new tests; writing a test may involve adding a new feature to TestRunner to trigger this path. > > Understood. Could we please add that feature? We definitely should. Either an API test or something in Internals. Internals could expose the same thing that the Web Inspector uses with "PageAgent.snapshotNode", which ultimately is WebCore::snapshotNode, and either return the ImageBuffer as an HTMLImageElement, an ArrayBuffer (for drawing into a canvas) or even a DOMString via toDataURL("image/png"_s, WTF::nullopt, PreserveResolution::Yes) on the result. I slightly prefer using Internals because then it can be a reftest in LayoutTests, which I think people run more frequently than API tests. Committed r265116: <https://trac.webkit.org/changeset/265116> I added an API test (although mac only at the moment). |