Open Bug 1820168 Opened 2 years ago Updated 2 years ago

[macOS] The PDF draw pen cursor is no longer used if right click context menu is opened

Categories

(Core :: Widget: Cocoa, defect, P3)

Desktop
macOS
defect

Tracking

()

ASSIGNED
Tracking Status
firefox-esr102 --- unaffected
firefox110 --- wontfix
firefox111 --- wontfix
firefox112 --- wontfix
firefox113 --- wontfix
firefox114 --- wontfix

People

(Reporter: csasca, Assigned: mstange)

References

(Blocks 1 open bug, Regression)

Details

(Keywords: regression)

Attachments

(7 files, 1 obsolete file)

Found in

  • Firefox 111.0b8

Affected versions

  • Firefox 111.0b8
  • Firefox 112.0a1

Tested platforms

  • Affected platforms: macOS 12/13
  • Unaffected platforms: Windows, Ubuntu

Steps to reproduce

  1. Launch Firefox
  2. Access an editable pdf, for example
  3. Select the Draw pen and draw anything on the pdf
  4. Right click over the pdf and close the context menu after

Expected result

  • The drawing pen is still visible

Actual result

  • The default cursor icon is used

Regression range

  • Will see for a regression

Additional notes

  • The issue can be seen in the following attachment
  • Windows and Ubuntu keeps the draw pen cursor after closing the context menu.
QA Whiteboard: [qa-regression-triage]

Seems that this is not a regression as it happens on Firefox 104.0a1 (2022-07-19), the day the PDF drawing functionality was added.

Attached file plop.html (deleted) —

I can reproduce either the issue with the html file I attached so it isn't a pdf.js issue.
:spohl, maybe you'd have an idea on what's wrong here.

Flags: needinfo?(spohl.mozilla.bugs)

This appears to have stopped working with native context menus. Setting widget.macos.native-context-menus to false doesn't reproduce the issue.

Severity: S4 → S3
Flags: needinfo?(spohl.mozilla.bugs)
Keywords: regression
Priority: -- → P3
Regressed by: 1698997
Component: PDF Viewer → Widget: Cocoa
Product: Firefox → Core

:mstange, since you are the author of the regressor, bug 1698997, could you take a look?

For more information, please visit auto_nag documentation.

Flags: needinfo?(mstange.moz)
Assignee: nobody → mstange.moz
Status: NEW → ASSIGNED

Happy code deletion day!

nsMacCursor was used so that animated cursors could be treated like non-animated cursors.
But we don't have animated cursors anymore! Nothing calls -[nsMacCursor cursorWithFrames:type:].

Depends on D172479

This renames nsMacCursorManager to MOZDynamicCursor and makes it implement NSCursor.

We also install a cursor rect which covers the entire ChildView and which refers
to the MOZDynamicCursor singleton.

With the help of the cursor rect, the -[NSCursor set] implementation is now called
at the right times.

We can also stop resetting the cursor when it leaves the window.

Depends on D172483

Attachment #9321417 - Attachment is obsolete: true
Flags: needinfo?(mstange.moz)

Set release status flags based on info from the regressing bug 1698997

Blocks: 1822370
Pushed by mstange@themasta.com: https://hg.mozilla.org/integration/autoland/rev/e29e5a3349f4 Remove ObjC exception guards in nsCursorManager methods. r=mac-reviewers,bradwerth https://hg.mozilla.org/integration/autoland/rev/b32a9cf041fc Stop using nsMacCursor. r=mac-reviewers,bradwerth https://hg.mozilla.org/integration/autoland/rev/7b01e0445133 Remove unnecessary respondsToSelector checks. These cursors have all been supported on 10.6+. r=mac-reviewers,bradwerth https://hg.mozilla.org/integration/autoland/rev/ebde44bcb736 Some nsCursorManager cleanup. Tweak method names and return types, and remove excessive doc comments. r=mac-reviewers,bradwerth https://hg.mozilla.org/integration/autoland/rev/8da35371cbdf Remove unused method -[nsCursorManager dispose]. r=mac-reviewers,bradwerth https://hg.mozilla.org/integration/autoland/rev/03bc416d3399 Let the system re-set the current cursor when needed. r=mac-reviewers,bradwerth
Flags: needinfo?(mstange.moz)

There are some r+ patches which didn't land and no activity in this bug for 2 weeks.
:mstange, could you have a look please?
If you still have some work to do, you can add an action "Plan Changes" in Phabricator.
For more information, please visit auto_nag documentation.

Flags: needinfo?(mstange.moz)
Flags: needinfo?(bwerth)
Flags: needinfo?(bwerth)

(In reply to Release mgmt bot [:suhaib / :marco/ :calixte] from comment #15)

There are some r+ patches which didn't land and no activity in this bug for 2 weeks.

More work is needed to find the reason for the crashes that were the reason for the backout.
This has exceeded my time box for non-speedometer work at the moment, so I'll make this bug available for anyone who wants to finish it.

Assignee: mstange.moz → nobody
Status: ASSIGNED → NEW
Flags: needinfo?(mstange.moz)
Assignee: nobody → mstange.moz
Status: NEW → ASSIGNED
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: