Revision: 7053 Author: j...@google.com Date: Fri Nov 20 06:21:44 2009 Log: Fixes issue where unit measurement divs could create document-level scrollbars on a small window. Review: jlabanca (desk check) http://code.google.com/p/google-web-toolkit/source/detail?r=7053
Modified: /trunk/user/src/com/google/gwt/layout/client/LayoutImpl.java ======================================= --- /trunk/user/src/com/google/gwt/layout/client/LayoutImpl.java Tue Nov 10 10:16:43 2009 +++ /trunk/user/src/com/google/gwt/layout/client/LayoutImpl.java Fri Nov 20 06:21:44 2009 @@ -51,7 +51,11 @@ Style style = ruler.getStyle(); style.setPosition(Position.ABSOLUTE); style.setZIndex(-32767); - style.setLeft(-10000, PX); + + // Position the ruler off the left/top edges, double the size just to be + // extra sure it doesn't show up on the screen. + style.setLeft(-20, widthUnit); + style.setTop(-20, heightUnit); // Note that we are making the ruler element 10x10, because some browsers // generate non-integral ratios (e.g., 1em == 13.3px), so we need a little -- http://groups.google.com/group/Google-Web-Toolkit-Contributors