Closed Bug 1418537 Opened 7 years ago Closed 2 years ago

Bad window height set when bookmarks toolbar is open with resistfingerprinting option

Categories

(Core :: Window Management, defect, P3)

defect

Tracking

()

RESOLVED WORKSFORME
Tracking Status
firefox58 --- wontfix
firefox59 --- fix-optional

People

(Reporter: samy.sadi.contact, Unassigned)

References

(Blocks 3 open bugs)

Details

(Whiteboard: [fingerprinting][fp-triaged][tor 27845])

User Agent: Mozilla/5.0 (Windows NT 6.1; Win64; x64; rv:52.0) Gecko/20100101 Firefox/52.0
Build ID: 20100101

Steps to reproduce:

Open firefox, set privacy.resistFingerprinting = true, enable bookmarks toolbar.
Close firefox, reopen firefox. Open scratchpad, inspect screen.height.


Actual results:

The window height is set to 597px, or to another value different from 600px depending on the vertical padding of #PersonalToolbar toolbarbutton.


Expected results:

Window height should be set to 600px
Component: Untriaged → Toolbars and Customization
Component: Toolbars and Customization → General
Product: Firefox → Core
I don't think this is a bug related with toolbars and customization, feel free to update the bug if I am wrong.
Cheers.
Blocks: 1330882
Component: General → XUL
Whiteboard: [fingerprinting]
Component: XUL → Window Management
Priority: -- → P3
This is caused by at least partially by folder icons and favicons. A bookmark toolbar without any icons on a new FF57 (windows) is 2pixels shorter. OP mentions 3 pixels. My 57 profile is out by 1px

See https://github.com/ghacksuserjs/ghacks-user.js/issues/297 for STR
Not sure if it's caused by icons. All I know is that if you change toolbars density (under constumization), then the window height should be shorter of other values than 3px.
 
I use the following temporary fix by modifying chrome/userChrome.css under the profile folder of firefox:

#PersonalToolbar toolbarbutton.bookmark-item:not(.subviewbutton) {
	padding-top: 0 !important;
	padding-bottom: 0 !important;
}

This will ensure that the window height is 600px exactly.
(In reply to Samy Sadi from comment #3)
> Not sure if it's caused by icons. All I know is that if you change toolbars
> density (under constumization), then the window height should be shorter of
> other values than 3px.

Sizing happens when NEW windows are CREATED (eg when you start Firefox). The privacy.resistFingerprinting can do nothing (yet) to stop users AFTERWARDS manually resizing/maximizing, displaying/removing various components (eg Findbar, Dev Toolbar, Sidebar, Titlebar, extra dragspace etc). The problem is the BM toolbar's height is being affected by icons, which means that the initial height value calculated by the resizing code (before icons are populated) causes a miscalculation. This is only happening since the Photon changes (FF57+)
Priority: P3 → P5
Whiteboard: [fingerprinting] → [fingerprinting][fp-triaged]
https://trac.torproject.org/projects/tor/ticket/27845 is a report on our side. ESR 52 was not affected by that.
Status: UNCONFIRMED → NEW
Ever confirmed: true
Whiteboard: [fingerprinting][fp-triaged] → [fingerprinting]
Priority: P5 → P3
Whiteboard: [fingerprinting] → [fingerprinting][fp-triaged]

(In reply to Samy Sadi from comment #3)

Not sure if it's caused by icons.

I think that's the case, according to the analysis in our bug 27845 (see: https://trac.torproject.org/projects/tor/ticket/27845#comment:22 for example).

Whiteboard: [fingerprinting][fp-triaged] → [fingerprinting][fp-triaged][tor 27845]

It sounds like the next step for this bug is to write a (failing) test in https://searchfox.org/mozilla-central/source/browser/components/resistfingerprinting/test/browser that illustrates it; and then we can figure out the best way to solve it (hopefully something simple like the CSS in comment 3)

Specifically: turn on the bookmarks toolbar, launch a new window, confirm the window size is incorrect (all on Windows OS).

(In reply to Tom Ritter [:tjr] (On Leave) from comment #7)

Specifically: turn on the bookmarks toolbar, launch a new window, confirm the window size is incorrect (all on Windows OS).

These are all portable Firefox releases: profiles are pristine (just changes to stop updates, a few test bookmarks on the toolbar etc), and clearing all data on close

STR

  • Open browser, turn RFP on
  • Make sure toolbar is displayed with icons on it (no extension icons)
  • Make sure density is normal < this is important otherwise it changes the results
  • Open new window
  • Visit TZP

Windows 7 (not a VM) (unless stated, height is 1000, the values below are for width)

  • TB8.06: 996
  • TB8.5a: 996
  • ESR60: 996
  • FF60: 996
  • FF61: 996
  • FF62: 997 < changed (this is consistent with css line height changes in 61- vs 62+ - stylo?)
  • FF63: 997
  • FF64: 997
  • FF65: 997
  • FF66: 997
  • FF67: 997

Windows 10 (VM) (due to VM/gfx drivers which is not worth me fixing, my height is limited to 700px)

  • TB8.06: 696
  • ESR60: 696
  • FF60: 696
  • FF61: 696
  • FF62: 697 <- changed
  • FF63: 697
  • FF64: 697
  • FF65: 697
  • FF66: 697
  • FF67: did not test

I will check Linux (mint vm)

^^ I need another coffee .. the values are the HEIGHT, not the width (which was always 1000)

PS: TZP = https://ghacksuserjs.github.io/TorZillaPrint/TorZillaPrint.html

Linux Mint VM (all with their own profiles, same as my windows test ones)

  • TB8.06: 998 <- that's odd
  • ESR60: 997
  • FF60: 997
  • FF61: 997
  • FF62: 997
  • FF63: 997
  • FF64: 997
  • FF65: 997
  • FF66: 997

Note TB8.06 was different to ESR

Debian VM (gnome)

  • TB8.06: 997
  • ESR60: 994

Again, TB differs from ESR

This ticket is resolved with the Proton redesign. It adds enough padding/margins in all densities that the issue cannot occur

pinging tom to close as WORKSFORME :)

Flags: needinfo?(tom)

yay!

Status: NEW → RESOLVED
Closed: 2 years ago
Flags: needinfo?(tom)
Resolution: --- → WORKSFORME
You need to log in before you can comment on or make changes to this bug.