Loading widget/android/nsWindow.cpp +0 −4 Original line number Diff line number Diff line Loading @@ -2659,10 +2659,6 @@ void* nsWindow::GetNativeData(uint32_t aDataType) { return nullptr; } void nsWindow::SetNativeData(uint32_t aDataType, uintptr_t aVal) { switch (aDataType) {} } void nsWindow::DispatchHitTest(const WidgetTouchEvent& aEvent) { if (aEvent.mMessage == eTouchStart && aEvent.mTouches.Length() == 1) { // Since touch events don't get retargeted by PositionedEventTargeting.cpp Loading widget/android/nsWindow.h +0 −1 Original line number Diff line number Diff line Loading @@ -168,7 +168,6 @@ class nsWindow final : public nsBaseWidget { virtual nsresult MakeFullScreen(bool aFullScreen) override; void SetCursor(const Cursor& aDefaultCursor) override; void* GetNativeData(uint32_t aDataType) override; void SetNativeData(uint32_t aDataType, uintptr_t aVal) override; virtual nsresult SetTitle(const nsAString& aTitle) override { return NS_OK; } [[nodiscard]] virtual nsresult GetAttention(int32_t aCycleCount) override { return NS_ERROR_NOT_IMPLEMENTED; Loading widget/nsBaseWidget.h +0 −2 Original line number Diff line number Diff line Loading @@ -349,8 +349,6 @@ class nsBaseWidget : public nsIWidget, public nsSupportsWeakReference { void NotifyWindowMoved(int32_t aX, int32_t aY, ByMoveToRect = ByMoveToRect::No); void SetNativeData(uint32_t aDataType, uintptr_t aVal) override {} // Should be called by derived implementations to notify on system color and // theme changes. void NotifyThemeChanged(mozilla::widget::ThemeChangeKind); Loading widget/nsIWidget.h +1 −3 Original line number Diff line number Diff line Loading @@ -113,11 +113,10 @@ typedef nsEventStatus (*EVENT_CALLBACK)(mozilla::WidgetGUIEvent* aEvent); typedef void* nsNativeWidget; /** * Flags for the GetNativeData and SetNativeData functions * Values for the GetNativeData function */ #define NS_NATIVE_WINDOW 0 #define NS_NATIVE_GRAPHIC 1 #define NS_NATIVE_TMP_WINDOW 2 #define NS_NATIVE_WIDGET 3 #define NS_NATIVE_REGION 5 #define NS_NATIVE_OFFSETX 6 Loading Loading @@ -1271,7 +1270,6 @@ class nsIWidget : public nsISupports { virtual void AddChild(nsIWidget* aChild) = 0; virtual void RemoveChild(nsIWidget* aChild) = 0; virtual void* GetNativeData(uint32_t aDataType) = 0; virtual void SetNativeData(uint32_t aDataType, uintptr_t aVal) = 0; virtual void FreeNativeData(void* data, uint32_t aDataType) = 0; //~~~ //@} Loading widget/windows/WinUtils.cpp +34 −0 Original line number Diff line number Diff line Loading @@ -2112,5 +2112,39 @@ const char* WinUtils::WinEventToEventName(UINT msg) { ? eventMsgInfo->second.mStr : nullptr; } // Note to testers and/or test-authors: on Windows 10, and possibly on other // versions as well, supplying the `WS_EX_LAYOUTRTL` flag here has no effect // whatsoever on child common-dialogs **unless the system UI locale is also set // to an RTL language**. // // If it is, the flag is still required; otherwise, the picker dialog will be // presented in English (or possibly some other LTR language) as a fallback. ScopedRtlShimWindow::ScopedRtlShimWindow(nsIWidget* aParent) : mWnd(nullptr) { NS_ENSURE_TRUE_VOID(aParent); // Headless windows don't have HWNDs, but also probably shouldn't be launching // print dialogs. HWND const hwnd = (HWND)aParent->GetNativeData(NS_NATIVE_WINDOW); NS_ENSURE_TRUE_VOID(hwnd); nsWindow* const win = WinUtils::GetNSWindowPtr(hwnd); NS_ENSURE_TRUE_VOID(win); ATOM const wclass = ::GetClassWord(hwnd, GCW_ATOM); mWnd = ::CreateWindowExW( win->IsRTL() ? WS_EX_LAYOUTRTL : 0, (LPCWSTR)(uintptr_t)wclass, L"", WS_CHILD, CW_USEDEFAULT, CW_USEDEFAULT, CW_USEDEFAULT, CW_USEDEFAULT, hwnd, nullptr, nsToolkit::mDllInstance, nullptr); MOZ_ASSERT(mWnd); } ScopedRtlShimWindow::~ScopedRtlShimWindow() { if (mWnd) { ::DestroyWindow(mWnd); } } } // namespace widget } // namespace mozilla Loading
widget/android/nsWindow.cpp +0 −4 Original line number Diff line number Diff line Loading @@ -2659,10 +2659,6 @@ void* nsWindow::GetNativeData(uint32_t aDataType) { return nullptr; } void nsWindow::SetNativeData(uint32_t aDataType, uintptr_t aVal) { switch (aDataType) {} } void nsWindow::DispatchHitTest(const WidgetTouchEvent& aEvent) { if (aEvent.mMessage == eTouchStart && aEvent.mTouches.Length() == 1) { // Since touch events don't get retargeted by PositionedEventTargeting.cpp Loading
widget/android/nsWindow.h +0 −1 Original line number Diff line number Diff line Loading @@ -168,7 +168,6 @@ class nsWindow final : public nsBaseWidget { virtual nsresult MakeFullScreen(bool aFullScreen) override; void SetCursor(const Cursor& aDefaultCursor) override; void* GetNativeData(uint32_t aDataType) override; void SetNativeData(uint32_t aDataType, uintptr_t aVal) override; virtual nsresult SetTitle(const nsAString& aTitle) override { return NS_OK; } [[nodiscard]] virtual nsresult GetAttention(int32_t aCycleCount) override { return NS_ERROR_NOT_IMPLEMENTED; Loading
widget/nsBaseWidget.h +0 −2 Original line number Diff line number Diff line Loading @@ -349,8 +349,6 @@ class nsBaseWidget : public nsIWidget, public nsSupportsWeakReference { void NotifyWindowMoved(int32_t aX, int32_t aY, ByMoveToRect = ByMoveToRect::No); void SetNativeData(uint32_t aDataType, uintptr_t aVal) override {} // Should be called by derived implementations to notify on system color and // theme changes. void NotifyThemeChanged(mozilla::widget::ThemeChangeKind); Loading
widget/nsIWidget.h +1 −3 Original line number Diff line number Diff line Loading @@ -113,11 +113,10 @@ typedef nsEventStatus (*EVENT_CALLBACK)(mozilla::WidgetGUIEvent* aEvent); typedef void* nsNativeWidget; /** * Flags for the GetNativeData and SetNativeData functions * Values for the GetNativeData function */ #define NS_NATIVE_WINDOW 0 #define NS_NATIVE_GRAPHIC 1 #define NS_NATIVE_TMP_WINDOW 2 #define NS_NATIVE_WIDGET 3 #define NS_NATIVE_REGION 5 #define NS_NATIVE_OFFSETX 6 Loading Loading @@ -1271,7 +1270,6 @@ class nsIWidget : public nsISupports { virtual void AddChild(nsIWidget* aChild) = 0; virtual void RemoveChild(nsIWidget* aChild) = 0; virtual void* GetNativeData(uint32_t aDataType) = 0; virtual void SetNativeData(uint32_t aDataType, uintptr_t aVal) = 0; virtual void FreeNativeData(void* data, uint32_t aDataType) = 0; //~~~ //@} Loading
widget/windows/WinUtils.cpp +34 −0 Original line number Diff line number Diff line Loading @@ -2112,5 +2112,39 @@ const char* WinUtils::WinEventToEventName(UINT msg) { ? eventMsgInfo->second.mStr : nullptr; } // Note to testers and/or test-authors: on Windows 10, and possibly on other // versions as well, supplying the `WS_EX_LAYOUTRTL` flag here has no effect // whatsoever on child common-dialogs **unless the system UI locale is also set // to an RTL language**. // // If it is, the flag is still required; otherwise, the picker dialog will be // presented in English (or possibly some other LTR language) as a fallback. ScopedRtlShimWindow::ScopedRtlShimWindow(nsIWidget* aParent) : mWnd(nullptr) { NS_ENSURE_TRUE_VOID(aParent); // Headless windows don't have HWNDs, but also probably shouldn't be launching // print dialogs. HWND const hwnd = (HWND)aParent->GetNativeData(NS_NATIVE_WINDOW); NS_ENSURE_TRUE_VOID(hwnd); nsWindow* const win = WinUtils::GetNSWindowPtr(hwnd); NS_ENSURE_TRUE_VOID(win); ATOM const wclass = ::GetClassWord(hwnd, GCW_ATOM); mWnd = ::CreateWindowExW( win->IsRTL() ? WS_EX_LAYOUTRTL : 0, (LPCWSTR)(uintptr_t)wclass, L"", WS_CHILD, CW_USEDEFAULT, CW_USEDEFAULT, CW_USEDEFAULT, CW_USEDEFAULT, hwnd, nullptr, nsToolkit::mDllInstance, nullptr); MOZ_ASSERT(mWnd); } ScopedRtlShimWindow::~ScopedRtlShimWindow() { if (mWnd) { ::DestroyWindow(mWnd); } } } // namespace widget } // namespace mozilla