Revision: 9587
Author: jlaba...@google.com
Date: Fri Jan 21 05:38:10 2011
Log: Fixing the overflow-x and overflow-y properties in Style to use
camelCase instead of hyphenated notation.
Review at http://gwt-code-reviews.appspot.com/1315801
Review by: j...@google.com
http://code.google.com/p/google-web-toolkit/source/detail?r=9587
Modified:
/trunk/user/src/com/google/gwt/dom/client/Style.java
/trunk/user/test/com/google/gwt/dom/client/StyleTest.java
=======================================
--- /trunk/user/src/com/google/gwt/dom/client/Style.java Fri Jan 7
10:19:06 2011
+++ /trunk/user/src/com/google/gwt/dom/client/Style.java Fri Jan 21
05:38:10 2011
@@ -682,8 +682,8 @@
private static final String STYLE_PADDING_BOTTOM = "paddingBottom";
private static final String STYLE_PADDING = "padding";
private static final String STYLE_OVERFLOW = "overflow";
- private static final String STYLE_OVERFLOW_X = "overflow-x";
- private static final String STYLE_OVERFLOW_Y = "overflow-y";
+ private static final String STYLE_OVERFLOW_X = "overflowX";
+ private static final String STYLE_OVERFLOW_Y = "overflowY";
private static final String STYLE_OPACITY = "opacity";
private static final String STYLE_MARGIN_TOP = "marginTop";
private static final String STYLE_MARGIN_RIGHT = "marginRight";
=======================================
--- /trunk/user/test/com/google/gwt/dom/client/StyleTest.java Fri Jan 7
10:19:06 2011
+++ /trunk/user/test/com/google/gwt/dom/client/StyleTest.java Fri Jan 21
05:38:10 2011
@@ -185,6 +185,34 @@
style.setOverflow(Overflow.AUTO);
assertEquals(Overflow.AUTO, style.getOverflow());
}
+
+ public void testOverflowX() {
+ DivElement div = Document.get().createDivElement();
+ Style style = div.getStyle();
+
+ style.setOverflowX(Overflow.VISIBLE);
+ assertEquals(Overflow.VISIBLE, style.getOverflowX());
+ style.setOverflowX(Overflow.HIDDEN);
+ assertEquals(Overflow.HIDDEN, style.getOverflowX());
+ style.setOverflowX(Overflow.SCROLL);
+ assertEquals(Overflow.SCROLL, style.getOverflowX());
+ style.setOverflowX(Overflow.AUTO);
+ assertEquals(Overflow.AUTO, style.getOverflowX());
+ }
+
+ public void testOverflowY() {
+ DivElement div = Document.get().createDivElement();
+ Style style = div.getStyle();
+
+ style.setOverflowY(Overflow.VISIBLE);
+ assertEquals(Overflow.VISIBLE, style.getOverflowY());
+ style.setOverflowY(Overflow.HIDDEN);
+ assertEquals(Overflow.HIDDEN, style.getOverflowY());
+ style.setOverflowY(Overflow.SCROLL);
+ assertEquals(Overflow.SCROLL, style.getOverflowY());
+ style.setOverflowY(Overflow.AUTO);
+ assertEquals(Overflow.AUTO, style.getOverflowY());
+ }
public void testPosition() {
DivElement div = Document.get().createDivElement();
--
http://groups.google.com/group/Google-Web-Toolkit-Contributors