piroor / treestyletab

Tree Style Tab, Show tabs like a tree.
http://piro.sakura.ne.jp/xul/treestyletab/
Other
3.49k stars 278 forks source link

An old, minor TST bug conflicts with `privacy.resistFingerprinting` since Firefox 55 #1311

Closed Okamoi closed 6 years ago

Okamoi commented 7 years ago

Short description

Since Firefox 55, there is a conflict between a minor TST bug and privacy.resistFingerprinting: On startup, the privacy feature calculates window dimensions required to protect privacy by normalizing window dimensions across the Firefox user base, like Tor Browser. Unfortunately, TST has long had a tiny bug where, when the tab bar is set to auto-hide, it is still displayed for a second on startup. It's not super aesthetic but the bug wasn't worth fixing prior to Firefox 55. But now, this bug messes with the anti-fingerprinting window size calculation, which widens the window as if TST's side bar was permanent, when it is not. That conflicts with the intended goal of normalizing window size.

I know that reading preferences is asynchronous, so the cause of this bug could be that "the side bar shows by default" is hard coded in TST, and by the time the auto-hide pref can be read, Firefox's UI has had time to display the side bar for a split second, and unfortunately right when anti-fingerprinting was busy resizing.

Do you see a way to fix this ?

Steps to reproduce

  1. Start Firefox 55 with clean profile.
  2. Install TST.
  3. Go to about:config and enable privacy.resistFingerprinting
  4. Close Firefox and open it again. Notice the new window size.
  5. Right click on the tab side panel and enable automatic hiding
  6. Close and open Firefox again
  7. See how the window size is "incorrect" with regards to what fingerprint resistance aimed to do

Expected result

Window size as accessible to web content should be consistent whether TST is hiding the tab bar or not.

Actual result

There is a conflict between TST and privacy.resistFingerprinting because on startup, TST is flashing the side bar when the anti-fingerprinting feature calculates the required window size and sets dimensions. Once TST hides the side bar, it's too late, and window dimensions as accessible to web content are not what they should have been.

Environment

piroor commented 6 years ago

TST 0.19.x is already obsolete, so I close this.