Closed Bug 1681098 Opened 4 years ago Closed 4 years ago

Resizing a window with lockaspectratio via resizeTo or resizeBy should update aspect ratio

Categories

(Core :: Widget: Win32, defect, P5)

defect

Tracking

()

RESOLVED FIXED
86 Branch
Tracking Status
firefox86 --- fixed

People

(Reporter: mconley, Assigned: masterwayz, Mentored)

References

(Blocks 1 open bug, Regressed 1 open bug)

Details

Attachments

(1 file)

STR:

  1. Open a private browsing window (this is to increase the likelihood of viewing an advertisement on YouTube)
  2. In that private window, visit https://www.youtube.com/watch?v=sb3FJdRk-tI
  3. Hopefully you get an advertisement. If not, go back to 1.
  4. While the advertisement is playing, put it into Picture-in-Picture mode. If the toggle doesn't appear for you (for example, if the ad is less than 45 seconds long), double-right click on the ad and use the context menu to put it into Picture-in-Picture
  5. Once the ad is open in Picture-in-Picture mode, note the aspect ratio of the player window.
  6. Click on "Skip Ad" or wait for the advertisement(s) to finish, and the music video to begin.
  7. Note that the player window resizes itself to a new aspect ratio.
  8. Attempt to manually resize the window.

ER:

The player window should maintain the new aspect ratio.

AR:

The player window snaps back to the original aspect ratio.

The easiest way to do this would probably be to check if we're locking the aspect ratio here: https://searchfox.org/mozilla-central/rev/1843375acbbca68127713e402be222350ac99301/widget/windows/nsWindow.cpp#2036

by checking if mAspectRatio != 0.0, and if so, to call LockAspectRatio(false), and then after setting the bounds, re-locking with LockAspectRatio(true).

Assignee: nobody → michelle
Mentor: mconley
Pushed by mconley@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/b3574370c361 Update the aspect ratio when a PiP video gets resized r=mconley
Status: NEW → RESOLVED
Closed: 4 years ago
Resolution: --- → FIXED
Target Milestone: --- → 86 Branch
Regressions: 1744215
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: