Closed Bug 1704978 Opened 3 years ago Closed 2 years ago

Get helper_hittest_overscroll_contextmenu.html to pass on Windows

Categories

(Core :: Panning and Zooming, task, P3)

task

Tracking

()

RESOLVED FIXED
106 Branch
Tracking Status
firefox106 --- fixed

People

(Reporter: botond, Assigned: hiro)

References

(Blocks 2 open bugs)

Details

Attachments

(2 files)

In bug 1704070 we fixed a bug, where clicking in the root scroll frame's overscroll gutter activated a browser chrome context menu, for Linux and Mac.

The test for that, helper_hittest_overscroll_contextmenu.html, is currently skipped on Windows, and would fail if it were run. This bug tracks fixing the issue and enabling the test on Windows.

Depends on: 1784991

I figured out a way to solve this issue. IIUC on Windows WM_CONTEXTMENU message is sent from OS and we can tell whether the message was triggered by mouse or not just like this code. So with telling whether the last mouse up event was in overscroll gutter just like we did in bug 1704070 for Mac/Linux we can prevent opening context menu.

Assignee: nobody → hikezoe.birchill
Status: NEW → ASSIGNED

There's another case we need to care to prevent opening context menu in the case of touch sceen (with touch pen?) here. I have a local fix to the case, but hasn't finished writing tests. I will handle it in another bug later.

The comment about NS_IF_RELEASE() is now useless since there's no
NS_IF_RELEASE() call.

Pushed by hikezoe.birchill@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/c6f17233ceac
Remove a comment about NS_IF_RELEASE() use in nsWindow::DispatchMouseEvent. r=botond
https://hg.mozilla.org/integration/autoland/rev/550108db5022
Prevent opening context menu in the case the user did right click in the overscroll gutter on Windows. r=botond,handyman
Status: ASSIGNED → RESOLVED
Closed: 2 years ago
Resolution: --- → FIXED
Target Milestone: --- → 106 Branch
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: