Bug 1016184 - Part 3h: Fix horizontal scroll bar appears. r=roc
authorTing-Yu Lin <tlin@mozilla.com>
Mon, 28 Jul 2014 21:40:00 +0200
changeset 198013 8ca7975542e288a106fddece56d602e6b2e9cecd
parent 198012 5de01e536c0d3464feb7b86dfa64825f3fd2e7cb
child 198014 174637171dbe57fcbc953d5f8590ad7904493c1a
push id1036
push userrnewman@mozilla.com
push dateWed, 06 Aug 2014 02:14:58 +0000
treeherderservices-central@3fd543e150c8 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersroc
bugs1016184
milestone34.0a1
Bug 1016184 - Part 3h: Fix horizontal scroll bar appears. r=roc The touch caret frame is initialized at (0, 0). When <html> or <body> has dir="rtl", "margin-left: -15px" (in ua.css) makes the horizontal scroll bar appear even if the touch caret is invisible. To compensate this, make width, height, and margin be 0px when the touch caret is invisible.
layout/style/ua.css
--- a/layout/style/ua.css
+++ b/layout/style/ua.css
@@ -328,10 +328,13 @@ div[\_moz_anonclass="mozTouchCaret"].moz
 div[\_moz_anonclass="mozTouchCaret"].moz-selectioncaret-right.tilt {
   background-image: url("resource://gre/res/caret_right.svg");
   margin-left: 0px;
 }
 
 div[\_moz_anonclass="mozTouchCaret"].moz-touchcaret.hidden,
 div[\_moz_anonclass="mozTouchCaret"].moz-selectioncaret-left.hidden,
 div[\_moz_anonclass="mozTouchCaret"].moz-selectioncaret-right.hidden {
+  width: 0px;
+  height: 0px;
+  margin: 0px;
   visibility: hidden;
 }