layout/reftests/native-theme/scroll-thumb-minimum-size-notheme.html

Tue, 06 Jan 2015 21:39:09 +0100

author
Michael Schloh von Bennewitz <michael@schloh.com>
date
Tue, 06 Jan 2015 21:39:09 +0100
branch
TOR_BUG_9701
changeset 8
97036ab72558
permissions
-rw-r--r--

Conditionally force memory storage according to privacy.thirdparty.isolate;
This solves Tor bug #9701, complying with disk avoidance documented in
https://www.torproject.org/projects/torbrowser/design/#disk-avoidance.

     1 <!DOCTYPE html>
     2 <meta http-equiv="msthemecompatible" content="no">
     3 <div style="width: 200px; height: 200px; overflow: scroll;">
     4   <div style="width: 3725px; height: 3725px"></div>
     5 </div>
     6 <!--
     7 The size of the inner div is computed as follow:
     9 Input:
    10   outer_div_size: size of the div containing the scrollbar
    11   button_size: size of the scrollbar arrow buttons
    12   scrollbar_thickness: width/height of a vertical/horizontal scrollbar respectively
    13   thumb_size: height/width of the thumb of a vertical/horizontal scrollbar respectively
    14 Output:
    15   inner_div_size: size of the div to be scrolled
    17 Formula:
    18   slider_size = outer_div_size - 2 * button_size - scrollbar_thickness
    19   thumb_size = slider_size * (outer_div_size / inner_div_size)
    20  which gives:
    21   inner_div_size = (outer_div_size - 2 * button_size - scrollbar_thickness) * (outer_div_size / thumb_size)
    23 Testcase constants:
    24   outer_div_size = 200
    26 On XP/Vista at 96 dpi with theme disabled:
    27   thumb_size = 8 (minimum size)
    28   button_size = 17
    29   scrollbar_thickness = 17
    31   inner_div_size = (200 - 2 * 17 - 17) * (200 / 8) = 3725
    32 -->

mercurial