-
Notifications
You must be signed in to change notification settings - Fork 76
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Forces the default pointer value to a mouse-type pointer, fixing the detection issues on headless browsers.
- Loading branch information
Showing
2 changed files
with
32 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
diff --git a/layout/style/nsMediaFeatures.cpp b/layout/style/nsMediaFeatures.cpp | ||
index cc86d1abf6..bfc4d0f1d8 100644 | ||
--- a/layout/style/nsMediaFeatures.cpp | ||
+++ b/layout/style/nsMediaFeatures.cpp | ||
@@ -372,24 +372,10 @@ static PointerCapabilities GetPointerCapabilities(const Document* aDocument, | ||
|
||
// The default value for Desktop is mouse-type pointer, and for Android | ||
// a coarse pointer. | ||
- const PointerCapabilities kDefaultCapabilities = | ||
#ifdef ANDROID | ||
- PointerCapabilities::Coarse; | ||
-#else | ||
- PointerCapabilities::Fine | PointerCapabilities::Hover; | ||
+ return PointerCapabilities::Coarse; | ||
#endif | ||
- if (aDocument->ShouldResistFingerprinting( | ||
- RFPTarget::CSSPointerCapabilities)) { | ||
- return kDefaultCapabilities; | ||
- } | ||
- | ||
- int32_t intValue; | ||
- nsresult rv = LookAndFeel::GetInt(aID, &intValue); | ||
- if (NS_FAILED(rv)) { | ||
- return kDefaultCapabilities; | ||
- } | ||
- | ||
- return static_cast<PointerCapabilities>(intValue); | ||
+ return PointerCapabilities::Fine | PointerCapabilities::Hover; | ||
} | ||
|
||
PointerCapabilities Gecko_MediaFeatures_PrimaryPointerCapabilities( |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,2 @@ | ||
version=130.0.1 | ||
release=beta.10 | ||
release=beta.11 |