Revision: 8705
Author: jlaba...@google.com
Date: Thu Sep 2 09:39:09 2010
Log: Fixes a bug in LayoutImplIE8 where we convert the unit conversition to
an integer before multiplying by the height/width, resulting in too much
rounding. For example, 12pt becomes 12px instead of 15px because the
conversion factor (1.33) is converted to 1. We now multiply by the value
first, then convert to an int before setting the property.
Review at http://gwt-code-reviews.appspot.com/834801
Review by: r...@google.com
http://code.google.com/p/google-web-toolkit/source/detail?r=8705
Modified:
/trunk/user/src/com/google/gwt/layout/client/LayoutImplIE8.java
=======================================
--- /trunk/user/src/com/google/gwt/layout/client/LayoutImplIE8.java Wed Jun
30 06:04:21 2010
+++ /trunk/user/src/com/google/gwt/layout/client/LayoutImplIE8.java Thu
Sep 2 09:39:09 2010
@@ -105,8 +105,7 @@
break;
default:
- value = value
- * (int) getUnitSizeInPixels(layer.container, unit, vertical);
+ value = value * getUnitSizeInPixels(layer.container, unit,
vertical);
unit = Unit.PX;
break;
}
@@ -117,6 +116,7 @@
}
}
- layer.getContainerElement().getStyle().setProperty(prop, value, unit);
+ layer.getContainerElement().getStyle().setProperty(prop,
+ (int) (value + 0.5), unit);
}
}
--
http://groups.google.com/group/Google-Web-Toolkit-Contributors