Reviewers: jgw,

Description:
DOMImplTrident#isRTL() is protected but appears after a private method.

Element#hasAttribute() is not alphabetical.

Please review this at http://gwt-code-reviews.appspot.com/30806

Affected files:
   user/src/com/google/gwt/dom/client/DOMImplTrident.java
   user/src/com/google/gwt/dom/client/Element.java


Index: user/src/com/google/gwt/dom/client/DOMImplTrident.java
===================================================================
--- user/src/com/google/gwt/dom/client/DOMImplTrident.java      (revision 5304)
+++ user/src/com/google/gwt/dom/client/DOMImplTrident.java      (working copy)
@@ -101,6 +101,7 @@
      return doc.createElement(html);
    }-*/;

+  @Override
    public native void dispatchEvent(Element target, NativeEvent evt) /*-{
      target.fireEvent("on" + evt.type, evt);
    }-*/;
@@ -226,6 +227,10 @@
      super.setScrollLeft(elem, left);
    }

+  protected native boolean isRTL(Element elem) /*-{
+    return elem.currentStyle.direction == 'rtl';
+  }-*/;
+
    private native int getBoundingClientRectLeft(Element elem) /*-{
      // getBoundingClientRect() throws a JS exception if the elem is not  
attached
      // to the document, so we wrap it in a try/catch block
@@ -259,8 +264,4 @@
    private native int getClientTop(Element elem) /*-{
      return elem.clientTop;
    }-*/;
-
-  protected native boolean isRTL(Element elem) /*-{
-    return elem.currentStyle.direction == 'rtl';
-  }-*/;
  }
Index: user/src/com/google/gwt/dom/client/Element.java
===================================================================
--- user/src/com/google/gwt/dom/client/Element.java     (revision 5304)
+++ user/src/com/google/gwt/dom/client/Element.java     (working copy)
@@ -361,6 +361,17 @@
     }-*/;

    /**
+   * Determines whether an element has an attribute with a given name.
+   *
+   * @param name the name of the attribute
+   * @return whether this element has the specified attribute
+   */
+  public final boolean hasAttribute(String name) {
+    String value = this.getAttribute(name);
+    return value != null && value.length() > 0;
+  }
+
+  /**
     * Determine whether an element is equal to, or the child of, this  
element.
     *
     * @param child the potential child element
@@ -516,15 +527,4 @@
       // on some browsers.
       this.title = title || '';
     }-*/;
-
-  /**
-   * Determines whether an element has an attribute with a given name.
-   *
-   * @param name the name of the attribute
-   * @return whether this element has the specified attribute
-   */
-  public final boolean hasAttribute(String name) {
-    String value = this.getAttribute(name);
-    return value != null && value.length() > 0;
-  }
  }



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

Reply via email to