Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: 887865867066542f6e21dea8bd562d9c184413e8
      
https://github.com/WebKit/WebKit/commit/887865867066542f6e21dea8bd562d9c184413e8
  Author: Kimmo Kinnunen <[email protected]>
  Date:   2026-03-12 (Thu, 12 Mar 2026)

  Changed paths:
    M LayoutTests/platform/glib/TestExpectations
    M Source/WTF/Scripts/Preferences/UnifiedWebPreferences.yaml
    M Source/WTF/wtf/PlatformHave.h
    M Source/WebCore/WebCore.xcodeproj/project.pbxproj
    M Source/WebCore/html/HTMLCanvasElement.cpp
    M Source/WebCore/html/OffscreenCanvas.cpp
    R Source/WebCore/platform/graphics/gpu/GPUAvailability.h
    R Source/WebCore/platform/graphics/gpu/cocoa/GPUAvailabilityMetal.mm
    M Source/WebKit/WebProcess/WebCoreSupport/WebWorkerClient.cpp

  Log Message:
  -----------
  WebGL: Do not support in-process WebGL in Workers
https://bugs.webkit.org/show_bug.cgi?id=309664
rdar://172273276

Reviewed by Dan Glastonbury.

Remove support for creation of in-process GraphicsContextGL in Workers
by remving the instantiation in WebWorkerClient.

ANGLE does not support multithreaded operation. This state was possible
to enter when using internal "WebGL: GPU Process" flag as unset.

Remove WebCore bindings for UseGPUProcessForWebGLEnabled. WebCore
should not have notion of process separation, it's WebKit feature.
Prevents bugs like this.

* Source/WTF/Scripts/Preferences/UnifiedWebPreferences.yaml:
* Source/WTF/wtf/PlatformHave.h:
* Source/WebCore/WebCore.xcodeproj/project.pbxproj:
* Source/WebCore/html/HTMLCanvasElement.cpp:
(WebCore::HTMLCanvasElement::createContextWebGL):
(WebCore::HTMLCanvasElement::getContextWebGL):
(WebCore::requiresAcceleratedCompositingForWebGL): Deleted.
(WebCore::shouldEnableWebGL): Deleted.
* Source/WebCore/html/OffscreenCanvas.cpp:
(WebCore::OffscreenCanvas::getContext):
(WebCore::requiresAcceleratedCompositingForWebGL): Deleted.
(WebCore::shouldEnableWebGL): Deleted.
* Source/WebCore/platform/graphics/gpu/GPUAvailability.h: Removed.
* Source/WebCore/platform/graphics/gpu/cocoa/GPUAvailabilityMetal.mm: Removed.
Remove redundant GPUAvailability. GraphicsContextGLCocoa already checks
for Metal. The OffscreenCanvas vs HTMLCanvasElement checks were
disconnected, HTMLCanvasElement used GPUAvailability while
OffscreenCanvas did not.

* Source/WebKit/WebProcess/WebCoreSupport/WebWorkerClient.cpp:
(WebKit::GPUProcessWebWorkerClient::createGraphicsContextGL const):
(WebKit::WebWorkerClient::createGraphicsContextGL const):

Canonical link: https://commits.webkit.org/309154@main



To unsubscribe from these emails, change your notification settings at 
https://github.com/WebKit/WebKit/settings/notifications

Reply via email to