summaryrefslogtreecommitdiffstats
path: root/widget/android
diff options
context:
space:
mode:
Diffstat (limited to 'widget/android')
-rw-r--r--widget/android/EventDispatcher.cpp10
-rw-r--r--widget/android/GfxInfo.cpp8
-rw-r--r--widget/android/ScreenHelperAndroid.cpp9
-rw-r--r--widget/android/nsLookAndFeel.cpp5
-rw-r--r--widget/android/nsWindow.cpp16
5 files changed, 30 insertions, 18 deletions
diff --git a/widget/android/EventDispatcher.cpp b/widget/android/EventDispatcher.cpp
index 6e414c11ce..2054d822d7 100644
--- a/widget/android/EventDispatcher.cpp
+++ b/widget/android/EventDispatcher.cpp
@@ -21,12 +21,6 @@
#include "mozilla/java/EventCallbackWrappers.h"
#include "mozilla/jni/GeckoBundleUtils.h"
-// Disable the C++ 2a warning. See bug #1509926
-#if defined(__clang__)
-# pragma clang diagnostic push
-# pragma clang diagnostic ignored "-Wc++2a-compat"
-#endif
-
namespace mozilla {
namespace widget {
@@ -770,7 +764,3 @@ nsresult EventDispatcher::UnboxBundle(JSContext* aCx, jni::Object::Param aData,
} // namespace widget
} // namespace mozilla
-
-#if defined(__clang__)
-# pragma clang diagnostic pop
-#endif
diff --git a/widget/android/GfxInfo.cpp b/widget/android/GfxInfo.cpp
index 6e6d3bf47b..267beaf330 100644
--- a/widget/android/GfxInfo.cpp
+++ b/widget/android/GfxInfo.cpp
@@ -667,6 +667,14 @@ nsresult GfxInfo::GetFeatureStatusImpl(
return NS_OK;
}
+ if (aFeature == FEATURE_WEBGPU) {
+ // Ensure WebGPU is disabled by default on Android until it is better
+ // tested.
+ *aStatus = nsIGfxInfo::FEATURE_BLOCKED_DEVICE;
+ aFailureId = "FEATURE_FAILURE_WEBGPU_ANDROID";
+ return NS_OK;
+ }
+
return GfxInfoBase::GetFeatureStatusImpl(
aFeature, aStatus, aSuggestedDriverVersion, aDriverInfo, aFailureId, &os);
}
diff --git a/widget/android/ScreenHelperAndroid.cpp b/widget/android/ScreenHelperAndroid.cpp
index 33c91fe6e0..141b38e01b 100644
--- a/widget/android/ScreenHelperAndroid.cpp
+++ b/widget/android/ScreenHelperAndroid.cpp
@@ -38,14 +38,15 @@ static already_AddRefed<Screen> MakePrimaryScreen() {
uint32_t depth = java::GeckoAppShell::GetScreenDepth();
float density = java::GeckoAppShell::GetDensity();
float dpi = java::GeckoAppShell::GetDpi();
+ bool isHDR = false; // Bug 1884960: report this accurately
auto orientation =
hal::ScreenOrientation(java::GeckoAppShell::GetScreenOrientation());
uint16_t angle = java::GeckoAppShell::GetScreenAngle();
float refreshRate = java::GeckoAppShell::GetScreenRefreshRate();
- return MakeAndAddRef<Screen>(bounds, bounds, depth, depth, refreshRate,
- DesktopToLayoutDeviceScale(density),
- CSSToLayoutDeviceScale(1.0f), dpi,
- Screen::IsPseudoDisplay::No, orientation, angle);
+ return MakeAndAddRef<Screen>(
+ bounds, bounds, depth, depth, refreshRate,
+ DesktopToLayoutDeviceScale(density), CSSToLayoutDeviceScale(1.0f), dpi,
+ Screen::IsPseudoDisplay::No, Screen::IsHDR(isHDR), orientation, angle);
}
ScreenHelperAndroid::ScreenHelperAndroid() {
diff --git a/widget/android/nsLookAndFeel.cpp b/widget/android/nsLookAndFeel.cpp
index 6d9f8c634f..45c556f6d1 100644
--- a/widget/android/nsLookAndFeel.cpp
+++ b/widget/android/nsLookAndFeel.cpp
@@ -253,6 +253,7 @@ nsresult nsLookAndFeel::NativeGetColor(ColorID aID, ColorScheme aColorScheme,
break;
case ColorID::Marktext:
case ColorID::Mark:
+ case ColorID::MozAutofillBackground:
case ColorID::SpellCheckerUnderline:
aColor = GetStandinForNativeColor(aID, aColorScheme);
break;
@@ -298,10 +299,6 @@ nsresult nsLookAndFeel::NativeGetInt(IntID aID, int32_t& aResult) {
aResult = 1;
break;
- case IntID::ShowCaretDuringSelection:
- aResult = 0;
- break;
-
case IntID::SelectTextfieldsOnKeyFocus:
// Select textfield content when focused by kbd
// used by EventStateManager::sTextfieldSelectModel
diff --git a/widget/android/nsWindow.cpp b/widget/android/nsWindow.cpp
index e9756c3f92..a654c8e848 100644
--- a/widget/android/nsWindow.cpp
+++ b/widget/android/nsWindow.cpp
@@ -609,6 +609,22 @@ class NPZCSupport final
PostInputEvent([input = std::move(input), result](nsWindow* window) {
WidgetMouseEvent mouseEvent = input.ToWidgetEvent(window);
window->ProcessUntransformedAPZEvent(&mouseEvent, result);
+ if (MouseInput::SECONDARY_BUTTON == input.mButtonType) {
+ if ((StaticPrefs::ui_context_menus_after_mouseup() &&
+ MouseInput::MOUSE_UP == input.mType) ||
+ (!StaticPrefs::ui_context_menus_after_mouseup() &&
+ MouseInput::MOUSE_DOWN == input.mType)) {
+ MouseInput contextMenu = input;
+
+ // Actually we don't dispatch context menu event to APZ since we don't
+ // handle it on APZ yet. If handling it, we need to consider how to
+ // dispatch it on APZ thread. It may cause a race condition.
+ contextMenu.mType = MouseInput::MOUSE_CONTEXTMENU;
+
+ WidgetMouseEvent contextMenuEvent = contextMenu.ToWidgetEvent(window);
+ window->ProcessUntransformedAPZEvent(&contextMenuEvent, result);
+ }
+ }
});
switch (result.GetStatus()) {