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

Wed, 31 Dec 2014 06:09:35 +0100

author
Michael Schloh von Bennewitz <michael@schloh.com>
date
Wed, 31 Dec 2014 06:09:35 +0100
changeset 0
6474c204b198
permissions
-rw-r--r--

Cloned upstream origin tor-browser at tor-browser-31.3.0esr-4.5-1-build1
revision ID fc1c9ff7c1b2defdbc039f12214767608f46423f for hacking purpose.

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

mercurial