mirror of
https://github.com/LadybirdBrowser/ladybird
synced 2026-04-26 01:35:08 +02:00
LibWeb: Don't lie about supported WebGL extensions unless told to do so
We shouldn't say we support something we don't, unless we are told to do so by the flag that exposes experimental interfaces.
This commit is contained in:
committed by
Jelle Raaijmakers
parent
c2aeb9ea73
commit
3ac56aad7b
Notes:
github-actions[bot]
2026-03-11 19:21:01 +00:00
Author: https://github.com/cqundefine Commit: https://github.com/LadybirdBrowser/ladybird/commit/3ac56aad7bd Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/8285 Reviewed-by: https://github.com/gmta ✅
@@ -19,6 +19,7 @@ extern "C" {
|
||||
#include <LibWeb/HTML/HTMLVideoElement.h>
|
||||
#include <LibWeb/HTML/ImageBitmap.h>
|
||||
#include <LibWeb/HTML/ImageData.h>
|
||||
#include <LibWeb/HTML/UniversalGlobalScope.h>
|
||||
#include <LibWeb/WebGL/Extensions/ANGLEInstancedArrays.h>
|
||||
#include <LibWeb/WebGL/Extensions/EXTBlendMinMax.h>
|
||||
#include <LibWeb/WebGL/Extensions/EXTColorBufferFloat.h>
|
||||
@@ -173,6 +174,10 @@ Optional<Vector<String>> WebGLRenderingContextBase::get_supported_extensions()
|
||||
bool supported = !available_extension_info.only_for_webgl_version.has_value()
|
||||
|| context().webgl_version() == available_extension_info.only_for_webgl_version;
|
||||
|
||||
if (!available_extension_info.factory && !HTML::UniversalGlobalScopeMixin::expose_experimental_interfaces()) {
|
||||
supported = false;
|
||||
}
|
||||
|
||||
if (supported) {
|
||||
for (auto const& required_extension : available_extension_info.required_angle_extensions) {
|
||||
if (!opengl_extensions.contains_slow(required_extension)) {
|
||||
|
||||
Reference in New Issue
Block a user