1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 1.2 +++ b/layout/reftests/native-theme/scroll-thumb-minimum-size-notheme.html Wed Dec 31 06:09:35 2014 +0100 1.3 @@ -0,0 +1,32 @@ 1.4 +<!DOCTYPE html> 1.5 +<meta http-equiv="msthemecompatible" content="no"> 1.6 +<div style="width: 200px; height: 200px; overflow: scroll;"> 1.7 + <div style="width: 3725px; height: 3725px"></div> 1.8 +</div> 1.9 +<!-- 1.10 +The size of the inner div is computed as follow: 1.11 + 1.12 +Input: 1.13 + outer_div_size: size of the div containing the scrollbar 1.14 + button_size: size of the scrollbar arrow buttons 1.15 + scrollbar_thickness: width/height of a vertical/horizontal scrollbar respectively 1.16 + thumb_size: height/width of the thumb of a vertical/horizontal scrollbar respectively 1.17 +Output: 1.18 + inner_div_size: size of the div to be scrolled 1.19 + 1.20 +Formula: 1.21 + slider_size = outer_div_size - 2 * button_size - scrollbar_thickness 1.22 + thumb_size = slider_size * (outer_div_size / inner_div_size) 1.23 + which gives: 1.24 + inner_div_size = (outer_div_size - 2 * button_size - scrollbar_thickness) * (outer_div_size / thumb_size) 1.25 + 1.26 +Testcase constants: 1.27 + outer_div_size = 200 1.28 + 1.29 +On XP/Vista at 96 dpi with theme disabled: 1.30 + thumb_size = 8 (minimum size) 1.31 + button_size = 17 1.32 + scrollbar_thickness = 17 1.33 + 1.34 + inner_div_size = (200 - 2 * 17 - 17) * (200 / 8) = 3725 1.35 +-->