Bug 444858: don't zoom directly to elements, leave some padding to improve legibility, r=stuart
authorGavin Sharp <gavin@mozilla.com>
Thu, 24 Jul 2008 15:37:38 -0400
changeset 64770 da6665ab8f324ffc5ad8b7dd0766513634bcfc4a
parent 64769 2282ab83f0efea8ffcaff8bccf975785469fb830
child 64771 40f6ffdadbabf4453407608582e6431dd5f25f0d
push id19389
push userffxbld
push dateWed, 06 Apr 2011 21:33:21 +0000
treeherdermozilla-central@8e9f90073a20 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersstuart
bugs444858
Bug 444858: don't zoom directly to elements, leave some padding to improve legibility, r=stuart
mobile/chrome/content/deckbrowser.xml
--- a/mobile/chrome/content/deckbrowser.xml
+++ b/mobile/chrome/content/deckbrowser.xml
@@ -503,17 +503,17 @@
           if (contentWidth)
             this._zoomLevel = canvasWidth / contentWidth;
         ]]></body>
       </method>
 
       <method name="zoomToElement">
         <parameter name="aElement"/>
         <body><![CDATA[
-          const margin = 0;
+          const margin = 15;
 
           // scale to the element's width
           var elRect = this._getPagePosition(aElement);
           this._zoomLevel = Math.max((this.browser.boxObject.width) / (elRect.width + (2 * margin)),
                                      2);
 
           // pan to the element
           this._panTo(Math.max(elRect.x - margin, 0),