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

Thu, 15 Jan 2015 21:03:48 +0100

author
Michael Schloh von Bennewitz <michael@schloh.com>
date
Thu, 15 Jan 2015 21:03:48 +0100
branch
TOR_BUG_9701
changeset 11
deefc01c0e14
permissions
-rw-r--r--

Integrate friendly tips from Tor colleagues to make (or not) 4.5 alpha 3;
This includes removal of overloaded (but unused) methods, and addition of
a overlooked call to DataStruct::SetData(nsISupports, uint32_t, bool.)

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