http://gwt-code-reviews.appspot.com/1727803/diff/1/user/src/com/google/gwt/resources/css/RtlVisitor.java
File user/src/com/google/gwt/resources/css/RtlVisitor.java (right):

http://gwt-code-reviews.appspot.com/1727803/diff/1/user/src/com/google/gwt/resources/css/RtlVisitor.java#newcode43
user/src/com/google/gwt/resources/css/RtlVisitor.java:43: // TODO: These
could be moved to somewhere common before submitting.
Into CssProperty maybe?

http://gwt-code-reviews.appspot.com/1727803/diff/1/user/src/com/google/gwt/resources/css/RtlVisitor.java#newcode44
user/src/com/google/gwt/resources/css/RtlVisitor.java:44: // TODO: Can
GWT use Guava libraries? This would be much easier with
gwt-dev.jar bundles Guava, so you can use Guava from generators.

http://gwt-code-reviews.appspot.com/1727803/diff/1/user/src/com/google/gwt/resources/css/RtlVisitor.java#newcode204
user/src/com/google/gwt/resources/css/RtlVisitor.java:204:
swapFour(values);
Maybe rename swapFour to swapFourBorders?

http://gwt-code-reviews.appspot.com/1727803/diff/1/user/src/com/google/gwt/resources/css/RtlVisitor.java#newcode370
user/src/com/google/gwt/resources/css/RtlVisitor.java:370: if
(parts.length > 2 && "".equals(parts[0])
How about transforming the property name before splitting it?
(also, we could fix the locale-sensitive toLowerCase)

name = name.toLowerCase(Locale.ENGLISH);
if (name.charAt(0) == '-') {
  int nextHyphen = name.indexOf('-', 1);
  if (nextHyphen > 0) {
    String prefix = name.substring(1, nextHyphen);
    if (VENDOR_PREFIXES.contains(prefix)) {
      name = name.substring(nextHyphen + 1);
    }
  }
}
String[] parts = name.split("-");


Alternatively, we could loop over the known prefixes (with
VENDOR_PREFIXES containing the "-webkit-", "-o-", etc.):
name = name.toLowerCase(Locale.ENGLISH);
if (name.charAt(0) == '-') {
   for (String prefix : VENDOR_PREFIXES) {
      if (name.startsWith(prefix)) {
         name = name.substring(prefix.length());
         break;
      }
   }
}
String[] parts = name.split("-");

http://gwt-code-reviews.appspot.com/1727803/

--
http://groups.google.com/group/Google-Web-Toolkit-Contributors

Reply via email to