Closed Bug 1775797 Opened 4 years ago Closed 4 years ago

Resize directions are not correct when in a rotated container

Categories

(Core :: DOM: Core & HTML, defect, P1)

Firefox 103
defect

Tracking

()

RESOLVED FIXED
104 Branch
Tracking Status
firefox103 --- wontfix
firefox104 --- fixed

People

(Reporter: calixte, Assigned: emilio)

References

Details

Attachments

(2 files)

Attached file foo.html

STR:

  • open the attachment
  • try to resize the green div

It's very hard to resize the div correctly.

In pdf.js, a page can be rotated and we want to be able to resize some editable elements in it.
For information, it works as expected in Chrome.

Component: Widget → DOM: Core & HTML

That's because the resizer basically only checks for physical positions: https://searchfox.org/mozilla-central/rev/c30349265c87047a324a471d2f39a216b6749262/dom/xul/XULResizerElement.cpp#145,174-176

This is the relevant chromium source that makes this work: https://source.chromium.org/chromium/chromium/src/+/main:third_party/blink/renderer/core/paint/paint_layer_scrollable_area.cc;l=2171;drc=70b0ee470bd53a63da6c4194579e8c2865db2b79

Should be rather straight-forward to convert the point relative to the current frame before computing the delta.

The patch I sent fixes it but I can't find a good test to extend. Happy to look into it, but if it's relatively urgent (or you feel like it), writing a WPT for this would be amazing. Calixte, how urgent is this for pdf.js?

Flags: needinfo?(cdenizet)

We want to ship the editing feature in 104 so I'd say it's a bit urgent.
I can disable the container resizing when the rotation angle is not 0 but clearly it'd be better to have this bug fixed asap.

Flags: needinfo?(cdenizet)
Assignee: nobody → emilio
Attachment #9282478 - Attachment description: WIP: Bug 1775797 - Make resizers use frame-relative coordinates. r=#layout → Bug 1775797 - Make resizers use frame-relative coordinates. r=#layout
Status: NEW → ASSIGNED

(In reply to Calixte Denizet (:calixte) from comment #4)

We want to ship the editing feature in 104 so I'd say it's a bit urgent.
I can disable the container resizing when the rotation angle is not 0 but clearly it'd be better to have this bug fixed asap.

Setting severity/priority S3/P1 per this comment.

Severity: -- → S3
Priority: -- → P1
Pushed by ealvarez@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/5401aa8df481 Make resizers use frame-relative coordinates. r=TYLin
Created web-platform-tests PR https://github.com/web-platform-tests/wpt/pull/34620 for changes under testing/web-platform/tests
Pushed by bszekely@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/b16e28a2aab2 Resizers don't work on Android. CLOSED TREE
Status: ASSIGNED → RESOLVED
Closed: 4 years ago
Resolution: --- → FIXED
Target Milestone: --- → 104 Branch
Upstream PR merged by moz-wptsync-bot

The patch landed in nightly and beta is affected.
:emilio, is this bug important enough to require an uplift?

  • If yes, please nominate the patch for beta approval.
  • If no, please set status-firefox103 to wontfix.

For more information, please visit auto_nag documentation.

Flags: needinfo?(emilio)
Flags: needinfo?(emilio)
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: