summaryrefslogtreecommitdiffstats
path: root/widget/windows
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-08 15:11:26 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-08 15:11:26 +0000
commitfcea19dfd2c426bac0456da850e7c12258e4b9eb (patch)
treea31f07c9bcca9d56ce61e9a1ffd30ef350d513aa /widget/windows
parentAdding upstream version 115.7.0esr. (diff)
downloadfirefox-esr-fcea19dfd2c426bac0456da850e7c12258e4b9eb.tar.xz
firefox-esr-fcea19dfd2c426bac0456da850e7c12258e4b9eb.zip
Adding upstream version 115.8.0esr.upstream/115.8.0esr
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'widget/windows')
-rw-r--r--widget/windows/GfxInfo.cpp47
-rw-r--r--widget/windows/nsWindow.cpp5
2 files changed, 27 insertions, 25 deletions
diff --git a/widget/windows/GfxInfo.cpp b/widget/windows/GfxInfo.cpp
index ae66e5feaa..633ed88921 100644
--- a/widget/windows/GfxInfo.cpp
+++ b/widget/windows/GfxInfo.cpp
@@ -1173,25 +1173,6 @@ static OperatingSystem WindowsVersionToOperatingSystem(
}
}
-static bool OnlyAllowFeatureOnWhitelistedVendor(int32_t aFeature) {
- switch (aFeature) {
- // The GPU process doesn't need hardware acceleration and can run on
- // devices that we normally block from not being on our whitelist.
- case nsIGfxInfo::FEATURE_GPU_PROCESS:
- // We can mostly assume that ANGLE will work
- case nsIGfxInfo::FEATURE_DIRECT3D_11_ANGLE:
- // Remote WebGL is needed for Win32k Lockdown, so it should be enabled
- // regardless of HW support or not
- case nsIGfxInfo::FEATURE_ALLOW_WEBGL_OUT_OF_PROCESS:
- // Backdrop filter should generally work, especially if we fall back to
- // Software WebRender because of an unknown vendor.
- case nsIGfxInfo::FEATURE_BACKDROP_FILTER:
- return false;
- default:
- return true;
- }
-}
-
// Return true if the CPU supports AVX, but the operating system does not.
#if defined(_M_X64)
static inline bool DetectBrokenAVX() {
@@ -1920,12 +1901,16 @@ nsresult GfxInfo::GetFeatureStatusImpl(
if (NS_FAILED(GetAdapterVendorID(adapterVendorID)) ||
NS_FAILED(GetAdapterDeviceID(adapterDeviceID)) ||
NS_FAILED(GetAdapterDriverVersion(adapterDriverVersionString))) {
- aFailureId = "FEATURE_FAILURE_GET_ADAPTER";
- *aStatus = FEATURE_BLOCKED_DEVICE;
+ if (OnlyAllowFeatureOnKnownConfig(aFeature)) {
+ aFailureId = "FEATURE_FAILURE_GET_ADAPTER";
+ *aStatus = FEATURE_BLOCKED_DEVICE;
+ } else {
+ *aStatus = FEATURE_STATUS_OK;
+ }
return NS_OK;
}
- if (OnlyAllowFeatureOnWhitelistedVendor(aFeature) &&
+ if (OnlyAllowFeatureOnKnownConfig(aFeature) &&
!adapterVendorID.Equals(
GfxDriverInfo::GetDeviceVendor(DeviceVendor::Intel),
nsCaseInsensitiveStringComparator) &&
@@ -1974,10 +1959,24 @@ nsresult GfxInfo::GetFeatureStatusImpl(
return NS_OK;
}
+ if (adapterDriverVersionString.Length() == 0) {
+ if (OnlyAllowFeatureOnKnownConfig(aFeature)) {
+ aFailureId = "FEATURE_FAILURE_EMPTY_DRIVER_VERSION";
+ *aStatus = FEATURE_BLOCKED_DRIVER_VERSION;
+ } else {
+ *aStatus = FEATURE_STATUS_OK;
+ }
+ return NS_OK;
+ }
+
uint64_t driverVersion;
if (!ParseDriverVersion(adapterDriverVersionString, &driverVersion)) {
- aFailureId = "FEATURE_FAILURE_PARSE_DRIVER";
- *aStatus = FEATURE_BLOCKED_DRIVER_VERSION;
+ if (OnlyAllowFeatureOnKnownConfig(aFeature)) {
+ aFailureId = "FEATURE_FAILURE_PARSE_DRIVER";
+ *aStatus = FEATURE_BLOCKED_DRIVER_VERSION;
+ } else {
+ *aStatus = FEATURE_STATUS_OK;
+ }
return NS_OK;
}
}
diff --git a/widget/windows/nsWindow.cpp b/widget/windows/nsWindow.cpp
index 7f925a6ef8..e4b733486b 100644
--- a/widget/windows/nsWindow.cpp
+++ b/widget/windows/nsWindow.cpp
@@ -3279,7 +3279,10 @@ void nsWindow::SetCursor(const Cursor& aCursor) {
sCurrentHCursorIsCustom = false;
sCurrentCursor = aCursor;
- HCURSOR cursor = CursorForImage(aCursor, GetDefaultScale());
+ HCURSOR cursor = nullptr;
+ if (mCustomCursorAllowed) {
+ cursor = CursorForImage(aCursor, GetDefaultScale());
+ }
bool custom = false;
if (cursor) {
custom = true;