12020-07-22 Justin Fan <justin_fan@apple.com>
2
3 [WebGL] Safari snapshots of WebGL content in the tab picker don't work
4 https://bugs.webkit.org/show_bug.cgi?id=214452
5 <rdar://problem/21243082>
6
7 Reviewed by NOBODY (OOPS!).
8
9 No new tests; writing a test may involve adding a new feature to TestRunner to trigger this path.
10
11 * html/HTMLCanvasElement.cpp:
12 (WebCore::HTMLCanvasElement::paint): Will properly request a paint when a snapshot is requested.
13 * html/HTMLCanvasElement.h:
14 * html/canvas/WebGLRenderingContextBase.cpp:
15 (WebCore::WebGLRenderingContextBase::paintRenderingResultsToCanvas): Only clear the last snapshot if readPixels will succeed.
16 * rendering/RenderHTMLCanvas.cpp:
17 (WebCore::RenderHTMLCanvas::paintReplaced):
18