[iOS] WebGL leaks exact GPU type
authordino@apple.com <dino@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 7 Nov 2018 21:12:55 +0000 (21:12 +0000)
committerdino@apple.com <dino@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 7 Nov 2018 21:12:55 +0000 (21:12 +0000)
commitee99c4c9e0039f84579625c291b6bf02df236886
treecdd287624245e791c64f63102507855e787b3342
parent6d7ffff642a8b352aff726e520af588b8b899074
[iOS] WebGL leaks exact GPU type
https://bugs.webkit.org/show_bug.cgi?id=191393
Source/WebCore:

Reviewed by Tim Horton.

The fully exposed renderer info shouldn't be necessary
on iOS, where the GPUs and drivers are consistent
enough that people shouldn't need to write code specifically
for them. Reduce the ability to fingerprint by simply
returning "Apple GPU".

The other option would have been to disable the extension,
but I think it might still be useful to know you're on
an iOS device.

Test: fast/canvas/webgl/hide-some-renderer-info.html

* html/canvas/WebGL2RenderingContext.cpp: Return "Apple GPU"
on iOS.
(WebCore::WebGL2RenderingContext::getParameter):
* html/canvas/WebGLRenderingContext.cpp: Ditto.
(WebCore::WebGLRenderingContext::getParameter):

LayoutTests:

<rdar://problem/45788297>

Reviewed by Tim Horton.

A test that checks that when the GPU vendor is Apple we're
returning a generic renderer name.

* fast/canvas/webgl/hide-some-renderer-info-expected.txt: Added.
* fast/canvas/webgl/hide-some-renderer-info.html: Added.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@237940 268f45cc-cd09-0410-ab3c-d52691b4dbfc
LayoutTests/ChangeLog
LayoutTests/fast/canvas/webgl/hide-some-renderer-info-expected.txt [new file with mode: 0644]
LayoutTests/fast/canvas/webgl/hide-some-renderer-info.html [new file with mode: 0644]
Source/WebCore/ChangeLog
Source/WebCore/html/canvas/WebGL2RenderingContext.cpp
Source/WebCore/html/canvas/WebGLRenderingContext.cpp