Author: [email protected]
Date: Wed Apr 29 08:53:57 2009
New Revision: 5306

Modified:
    trunk/user/src/com/google/gwt/dom/client/DOMImplTrident.java
    trunk/user/src/com/google/gwt/dom/client/Element.java

Log:
Removed Element#hasAttribute() at jgw's request because it was accidentally  
committed, and fixed some checkstyle errors.

Patch by: jlabanca
Review by: jgw (desk)



Modified: trunk/user/src/com/google/gwt/dom/client/DOMImplTrident.java
==============================================================================
--- trunk/user/src/com/google/gwt/dom/client/DOMImplTrident.java        
(original)
+++ trunk/user/src/com/google/gwt/dom/client/DOMImplTrident.java        Wed Apr 
29  
08:53:57 2009
@@ -101,6 +101,7 @@
      return doc.createElement(html);
    }-*/;

+  @Override
    public native void dispatchEvent(Element target, NativeEvent evt) /*-{
      target.fireEvent("on" + evt.type, evt);
    }-*/;
@@ -208,6 +209,10 @@
      elem.innerText = text || '';
    }-*/;

+  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
@@ -240,9 +245,5 @@
     */
    private native int getClientTop(Element elem) /*-{
      return elem.clientTop;
-  }-*/;
-
-  protected native boolean isRTL(Element elem) /*-{
-    return elem.currentStyle.direction == 'rtl';
    }-*/;
  }

Modified: trunk/user/src/com/google/gwt/dom/client/Element.java
==============================================================================
--- trunk/user/src/com/google/gwt/dom/client/Element.java       (original)
+++ trunk/user/src/com/google/gwt/dom/client/Element.java       Wed Apr 29  
08:53:57 2009
@@ -28,7 +28,7 @@
     */
    public static Element as(JavaScriptObject o) {
      assert is(o);
-    return (Element)o;
+    return (Element) o;
    }

    /**
@@ -46,7 +46,7 @@
     */
    public static boolean is(JavaScriptObject o) {
      if (Node.is(o)) {
-      return is((Node)o);
+      return is((Node) o);
      }
      return false;
    }
@@ -516,15 +516,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