[tor-bugs] #30832 [Applications/Tor Browser]: Fix tor-browser tbb-tests

Tor Bug Tracker & Wiki blackhole at torproject.org
Tue Apr 7 23:36:06 UTC 2020


#30832: Fix tor-browser tbb-tests
--------------------------------------+---------------------------
 Reporter:  acat                      |          Owner:  tbb-team
     Type:  defect                    |         Status:  new
 Priority:  Medium                    |      Milestone:
Component:  Applications/Tor Browser  |        Version:
 Severity:  Normal                    |     Resolution:
 Keywords:  ReleaseTrainMigration     |  Actual Points:  3
Parent ID:                            |         Points:
 Reviewer:                            |        Sponsor:  Sponsor58
--------------------------------------+---------------------------
Changes (by acat):

 * actualpoints:  2 => 3


Comment:

 Thanks for the suggestion. I spent some time playing with
 `getBoundingClientRect()` to find out the `line-height`, but I saw some
 inconsistent behaviour. One of the testscases in `test_tor_bug23104.html`
 has arabic characters, which sets its font to `Noto Naskh Arabic`. That
 one, despite reporting a `line-height` of 19px, when measured via
 `getBoundingClientRect()` it turns out to be 29px (using a div to measure,
 instead of a span, the height of which is not affected by `line-height`).
 I assume that there must be some metric of the arabic font which is
 affecting the actual height of the element, which is different than the
 reported in line-height.

 I'm not sure if the issue that #23104 tried to fix is still there, and can
 be measured via `getBoundingClientRect` or similar. In any case, the fact
 that the actual height does not match the line-height with some fonts
 (e.g. `Noto Naskh Arabic`) seems to be a different issue. So perhaps we
 can just leave the test as it is for now (using `layout.css.line-height
 .normal-as-resolved-value.enabled = false`) and investigate it later.

 Still, I was thinking that the issues in #23104 and #29563 only allow
 distinguishing platform, but not subplatform, right? If that's the case,
 perhaps we could consider just dropping the patch for #23104, as leaking
 the os (via fonts?) is not something that we can really avoid.

 Replying to [comment:6 Thorin]:
 > Replying to [comment:5 acat]:
 > > * c73bfe7f3b21421c7349267f2abac9f90f503b73: we need `layout.css.line-
 height.normal-as-resolved-value.enabled = false`, otherwise `line-height`
 property is read as `normal` and we cannot get the number in pixels
 >
 > You should update that to fall back to clientRect (which I do on TZP):
 you'll need to anyway once you are based on ESR78 (or rapid release)

--
Ticket URL: <https://trac.torproject.org/projects/tor/ticket/30832#comment:7>
Tor Bug Tracker & Wiki <https://trac.torproject.org/>
The Tor Project: anonymity online


More information about the tor-bugs mailing list