Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

privacy.window.maxInnerWidth [A: a series of unfortunate near misses of 200s + sidebar] #1329

Closed
ghost opened this issue Jan 14, 2022 · 18 comments
Labels

Comments

@ghost
Copy link

ghost commented Jan 14, 2022

Hi all,
So I recently switched to Arkenfox and I am slowly finding my way through. Among the few issues that stick out for me is the size of the browser window at startup.

To be clear:

  • I have read and am using the override recipe at override RFP new window sizes #1286 for #4502 (also read related issues);
  • I have privacy.resistFingerprinting and privacy.resistFingerprinting.letterboxing set to true and I am fine with the letterboxing itself;
  • I am on mac with a screen res of 2560x1600;
  • my browser window is not maximised nor full-screen;
  • I have used TZP to check my inner window size.

What I want is to open the window larger than the current inner size of 900x700 so as not to have to resize it manually.
My issue is that, regardless of the values I enter in the override settings, I cannot seem to have FF open as big as it could -- which TZP reports as an inner window size of 1100x700.
I have slowly increased the override settings from 1600x900 to 2200x1400 (double the goal of 1100x700), but the largest that it opens is 900x700 (at 1600x900, if I recall correctly, it opens at 700x700).
I even tried to quickly math it out. If a value of 1600x900 (16/9 ratio) gives me 700x700 (ratio of 1), then a 11/7 ratio should be obtained by something like 2515x900 (ratio of 2.7 something). But no, it still opens at 900x700.

Not sure what to do at this point. Anything I'm missing?
Thx
Tom

@Thorin-Oakenpants
Copy link
Contributor

forget about aspect ratios, that is just a consequence/fact of width/height. With RFP we are stuck with new window sizes, but at least we can bump the width up to make websites more usable (I mean in developer edition, the settings UI gets a horizontal scrollbar FFS) and not serve mobile pages etc

you also can't get what you want, aspect ratio wise, when values are rounded. The aspect ratio is not what is being protected by RFP


you haven't given any actual values you used with their respective results.

Do the following

  • open about:config and toggle privacy.resistFingerprinting.letterboxing = false
  • open another tab and in about:config toggle privacy.resistFingerprinting = false
  • open another tab and go to TZP
  • go maximized (not full screen) and copy or write down the four screen/window metrics
  • see example pic (I wasn't maximized it was to show you what info I want)
  • example
  • close TZP
  • reset the two prefs in the two open tabs back to true

Post me the results

@ghost
Copy link
Author

ghost commented Jan 14, 2022

Thanks for the reply. Indeed, all the values I gave were the ones with resist.fingerprinting activated.
Here are the results you asked for:

  • screen resolution ● | 1440 x 900 [sizes match x4]
  • available resolution ● | 1385 x 875
  • outer window ● | 1384 x 875
  • inner window ● | 1168 x 790
    When I reset the prefs to true, all four values return to 1100x700.

@Thorin-Oakenpants
Copy link
Contributor

I am on mac with a screen res of 2560x1600;

What makes you think your screen res is 2560 x 1600? JS and Firefox is saying it's 1440 x 900

@ghost
Copy link
Author

ghost commented Jan 15, 2022

This. But, obviously I'm doubting it now.
Schermata 2022-01-15 alle 07 36 28

@Thorin-Oakenpants
Copy link
Contributor

Thorin-Oakenpants commented Jan 15, 2022

you have a native resolution of 2560x1600 ... that's not the same as your actual resolution, it's scaled (or you have changed layout.css.devPixelsPerPx and/or both)

I don't use macs, but there must be a setting or info somewhere that tells you this info

@Thorin-Oakenpants
Copy link
Contributor

so, to answer your original question

  • inner window ● | 1168 x 790
  • when maximized this shows the most room for the inner window you have is 1100 x 700 (when rounded down)

@Thorin-Oakenpants Thorin-Oakenpants changed the title Cannot (really) change my browser window size Cannot (really) change my browser window size [solved: native resolution !== scaled/display resolution] Jan 15, 2022
@ghost
Copy link
Author

ghost commented Jan 15, 2022

Well, thanks, but that's the part I already knew. The problem I have is that I cannot manage to have FF open at those dimensions. When I enter 1100x700 as my values, it opens at 700x700. When I set higher values, the largest window I get is always 900x700.. I get that it would not open maximised to occupy all the screen, but I would at least want it to open at the max inner window size, which it never does.

@Thorin-Oakenpants
Copy link
Contributor

do you have the sidebar showing, are you using a tiling manager?

@ghost
Copy link
Author

ghost commented Jan 15, 2022

Yes, I use Sidebery, to make up for the lack of vertical tabs. Once again, and to be clear, I've made my peace with 1100x700 if that's the most I can get with my sidebar and top bars and all. What I want to avoid is having to always resize the window manually, and I simply cannot get FF to open at those dimensions.

@Thorin-Oakenpants
Copy link
Contributor

Thorin-Oakenpants commented Jan 15, 2022

I don't use macs, sorry. And you make everything so confusing

1100x700 is the most you can get, fine, good, we already established that.

Stop fucking changing the pref values. If they're at 1600 x 900 and the best you can do is lower than that, then leave them alone

What you said was that you were getting 900 x 700 (instead of 1100 x 700).

Do you use Tor Browser. What do you get if you use Tor Browser? What do you get if you use 1000x1000 (which is the default) which is what Tor Browser uses

Edit: what do you get in a normal Firefox without Arkenfox?

WTF is sideberry?

Post a screenshot of the entire desktop so I see what the heck you are talking about (block out anything personal)

@fxbrit

@fxbrit
Copy link
Collaborator

fxbrit commented Jan 15, 2022

WTF is sideberry?

https://addons.mozilla.org/en-US/firefox/addon/sidebery/

1100x700 is the most you can get

how was this determined? macos has a ton of UI elements that take away what one would consider to be available screen (topbar, dock etc). it's possible that the window doesn't have enough space to stretch above 700x700 because of the macos app dock for example.

@TommieWong try hiding the dock with cmd + option + d then open a new window and see how the size changes.

@Thorin-Oakenpants
Copy link
Contributor

how was this determined

the values reported when maximized and RFP and LB were off

  • screen resolution ● | 1440 x 900 [sizes match x4]
  • available resolution ● | 1385 x 875
  • outer window ● | 1384 x 875
  • inner window ● | 1168 x 790

So

  • screen vs available : 55 x 25 pixels eaten out of screen by IDK cuz I don't use macs
  • outer vs available: 1px width cuz why not, probably a border
  • outer 1384 x 875 minus inner 1168 x 790 = chrome of 216 x 85
    • the 85px height is the toolbar/urlbar
    • the 216px width will be the sidebar (which is why I asked)

So we end up with 1168 x 790 max for the inner, which rounds down

So IDK why tommie can only achieve 900, which is why I asked if there was a tiling manager or something

On Tor Project I just tell people to post a screenshot, at least that way I can see everything and even measure it

@Thorin-Oakenpants
Copy link
Contributor

Get more height: 790 is so close to 800 .. you could use compact mode :)

  • browser.compactmode.show - true
  • toolbar > right click > customize > density > compact
  • on windows it frees up 19px from normal mode

@ghost
Copy link
Author

ghost commented Jan 15, 2022

That's weird, I thought that was all pretty clear. Anyway, I'm on my way out so I'll the other message soon. In the meantime, here are the screen caps you asked for.
FF with 1600x900; this is 900x700.
1
FF with 1600x900 after manually extending; this is 1100x700.
2
FF with 1000x1000.
3
Tor.
4

@Thorin-Oakenpants Thorin-Oakenpants changed the title Cannot (really) change my browser window size [solved: native resolution !== scaled/display resolution] privacy.window.maxInnerWidth Jan 16, 2022
@Thorin-Oakenpants
Copy link
Contributor

issue one, and my bad for not remembering. LBing and new window sizes do not have identical stepping

  • width is always in 200s

here's the user.js

user.js/user.js

Lines 898 to 902 in 7a4676f

/* 4502: set new window size rounding max values [FF55+]
* [SETUP-CHROME] sizes round down in hundreds: width to 200s and height to 100s, to fit your screen
* [1] https://bugzilla.mozilla.org/1330882 ***/
user_pref("privacy.window.maxInnerWidth", 1600);
user_pref("privacy.window.maxInnerHeight", 900);

maxwidth (LB off to measure the real inner window)

-     < 600 =  454 (minimum at least on windows: chrome elements prevent further shrinking)
-  600- 799 =  600
-  800- 999 =  800
- 1000-1199 = 1000
- etc

To test, you don't need to close Firefox, just open a new window

  • that's about:config searching for privacy.window.max (Height on top, Width below)
  • maxwidths

So that clears up one misconception (which again, I should have already noted)

@Thorin-Oakenpants
Copy link
Contributor

Here's what's happening, see pic

  • you have 1440 width
  • the docker reduces the available space to 1385
  • the pic is default maxWidth as 1000, (at AF's prefs the maximum you could get is 1200 (1385 rounded down in 200s))
  • so the new window opens at 1000 wide (or 1200 wide with AF's prefs)
  • the new window is then eaten into by sideberry (which happens to be just over 200)
  • this leaves the inner window with 785 pixels (or 985 with AF prefs)
  • Letterboxing which works in 100s at this scale, drops the inner viewport to 700 (or 900 with AF prefs)

measure

So as you can see, being just under a multiple of 200 available width, and the sidebar being just over a multiple of 200, (and height being just under a multiple of 100), you end up with less real-estate than you could

@Thorin-Oakenpants
Copy link
Contributor

solutions

  • move docker to bottom? IDK = instant 200px hit
  • resize sidebar to 200 (or fractionally under) - just resize it while in TZP and stop when the inner size jumps = instant 100px hit

That's a 300px improvement

@Thorin-Oakenpants Thorin-Oakenpants changed the title privacy.window.maxInnerWidth privacy.window.maxInnerWidth [A: a series of unfortunate near misses of 200s + sidebar] Jan 16, 2022
@ghost
Copy link
Author

ghost commented Jan 16, 2022

Thanks a lot for all that, @Thorin-Oakenpants. Clears up a lot of points. I'll see what I can do to improve.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Development

No branches or pull requests

2 participants