- use Tor Browser with the 32220 patch (I'm using 9.5a3)
- make sure LB is on and make sure the bookmarks toolbar is off. It's important that when you start TB, that the first inner window is 1000x1000 (or 1000x900 etc)
- close TB so we start clean
- open Tor Browser, the actual/real inner window is
- open a "new window" from the hamburger menu = the actual/real inner window is
- close the "new window"
- from the original window, click new identity - the subsequent actual/real inner window is
- there is something different about the very first window upon firefox.exe starting, and subsequent ones (where firefox.exe is not closed)
- of course, LB will protect end users with web content
AFAICT what happens is the "new window" or "new ID window" opens at 1000x1000 and 1ms later it changes to 1002x1001 : LBing kicks in much later, see Bug 1556016 ). This has something to do with the borders (1px each to left/right = 2pixels width, and 1px bottom = 1px in height).
Note: all of this requires user interaction, but that's not hard to do IMO. But it's also nothing compared to the entropy that can arise in Bug 1556016
I have a PoC for all of this, which displays the results (and debugs some info to the console as well) which I will attach later (on TZP) to the
new window test. I'll let you know when it's all done - I need to do some more testing. Interestingly enough, some other things to mention
- with new windows set to open as new tabs (
0 = TB default), i.e we are not measuring an actual new window, I can still detect the 2px/1px change
- I can also detect the 2px/1px change without opening a new window/tab: when the chrome is resized
- the 2px/1px change indicates if LB is enabled or not
- note: I can also detect when a 2px/1px change is NOT from this patch (e.g. TB8.5 where the LB margins are 2px/1px)
- I can use the same technique to bypass the window.open() clamping in TB8 series
- the technique is simply to constantly ask the new window about it's sizes and record a history of changes: from pre-render, to borders applied, to LB kicking in
I don't think there's anything to do here except clamp window.open (tor bug 31821, Bug #1556016), which would stop off all of the above in my PoC
Unless you also want to fix the new-win/new-ID difference in the STR. I think by matching the theme, people won't even notice it's there.