Reviewers: rice,
Description:
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.
Please review this at http://gwt-code-reviews.appspot.com/834801/show
Affected files:
M user/src/com/google/gwt/layout/client/LayoutImplIE8.java
Index: user/src/com/google/gwt/layout/client/LayoutImplIE8.java
===================================================================
--- user/src/com/google/gwt/layout/client/LayoutImplIE8.java (revision 8699)
+++ user/src/com/google/gwt/layout/client/LayoutImplIE8.java (working copy)
@@ -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,6 @@
}
}
- layer.getContainerElement().getStyle().setProperty(prop, value, unit);
+ layer.getContainerElement().getStyle().setProperty(prop, (int) value,
unit);
}
}
--
http://groups.google.com/group/Google-Web-Toolkit-Contributors