From def92d1b8e9d373e2f6f27c366d578d97d8960c6 Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Wed, 15 May 2024 05:34:50 +0200 Subject: Merging upstream version 126.0. Signed-off-by: Daniel Baumann --- widget/headless/HeadlessLookAndFeelGTK.cpp | 3 --- widget/headless/HeadlessScreenHelper.cpp | 7 ++++--- widget/headless/HeadlessWidget.cpp | 9 ++++----- 3 files changed, 8 insertions(+), 11 deletions(-) (limited to 'widget/headless') diff --git a/widget/headless/HeadlessLookAndFeelGTK.cpp b/widget/headless/HeadlessLookAndFeelGTK.cpp index 462a877f34..aa55bcc347 100644 --- a/widget/headless/HeadlessLookAndFeelGTK.cpp +++ b/widget/headless/HeadlessLookAndFeelGTK.cpp @@ -32,9 +32,6 @@ nsresult HeadlessLookAndFeel::NativeGetInt(IntID aID, int32_t& aResult) { case IntID::CaretWidth: aResult = 1; break; - case IntID::ShowCaretDuringSelection: - aResult = 0; - break; case IntID::SelectTextfieldsOnKeyFocus: aResult = 1; break; diff --git a/widget/headless/HeadlessScreenHelper.cpp b/widget/headless/HeadlessScreenHelper.cpp index 4d8dbfa0d1..5a9643c572 100644 --- a/widget/headless/HeadlessScreenHelper.cpp +++ b/widget/headless/HeadlessScreenHelper.cpp @@ -32,9 +32,10 @@ LayoutDeviceIntRect HeadlessScreenHelper::GetScreenRect() { HeadlessScreenHelper::HeadlessScreenHelper() { AutoTArray, 1> screenList; LayoutDeviceIntRect rect = GetScreenRect(); - auto ret = MakeRefPtr( - rect, rect, 24, 24, 0, DesktopToLayoutDeviceScale(), - CSSToLayoutDeviceScale(), 96.0f, Screen::IsPseudoDisplay::No); + auto ret = + MakeRefPtr(rect, rect, 24, 24, 0, DesktopToLayoutDeviceScale(), + CSSToLayoutDeviceScale(), 96.0f, + Screen::IsPseudoDisplay::No, Screen::IsHDR::No); screenList.AppendElement(ret.forget()); ScreenManager::Refresh(std::move(screenList)); } diff --git a/widget/headless/HeadlessWidget.cpp b/widget/headless/HeadlessWidget.cpp index 083d026d3c..419b3bf940 100644 --- a/widget/headless/HeadlessWidget.cpp +++ b/widget/headless/HeadlessWidget.cpp @@ -160,10 +160,9 @@ void HeadlessWidget::GetCompositorWidgetInitData( nsIWidget* HeadlessWidget::GetTopLevelWidget() { return mTopLevel; } void HeadlessWidget::RaiseWindow() { - MOZ_ASSERT(mWindowType == WindowType::TopLevel || - mWindowType == WindowType::Dialog || - mWindowType == WindowType::Sheet, - "Raising a non-toplevel window."); + MOZ_ASSERT( + mWindowType == WindowType::TopLevel || mWindowType == WindowType::Dialog, + "Raising a non-toplevel window."); // Do nothing if this is the currently active window. RefPtr activeWindow = GetActiveWindow(); @@ -204,7 +203,7 @@ void HeadlessWidget::Show(bool aState) { // so we don't focus them by default. if (aState && !mAlwaysOnTop && (mWindowType == WindowType::TopLevel || - mWindowType == WindowType::Dialog || mWindowType == WindowType::Sheet)) { + mWindowType == WindowType::Dialog)) { RaiseWindow(); } -- cgit v1.2.3