Skip to content

Bug 32308: use direct browser sizing for letterboxing.

ma1 requested to merge ma1/tor-browser:bug_32308 into tor-browser-102.5.0esr-12.5-1

This MR switches letterboxing from using margins to shrink the browser size indirectly to setting the quantized dimensions directly onto the XUL browser element.

Among the benefits of this approach:

  1. By relying on the browserStack's grid layout to center the browser automatically, we avoid most of the jittering (fixing #32308 (closed))
  2. By not having the margins bouncing the browser bounds around, we prevent most of the transient size inconsistencies (and should other bugs like #41515 (closed))
  3. We can completely remove the inter-process communication previously needed in order to listen for resize events in the content process and notify the parent process which adjusted the browser's margins accordingly

As a result, we're removing a significant amount of code, including the RFHHelper parent/child actors (@richard will love this 😸), and simplifying the calculations to the bare minimum.

Merge request reports