Issue: 2282
Patch by: jgw
Review by: ajr, sgross



git-svn-id: https://google-web-toolkit.googlecode.com/svn/trunk@2665 8db76d5a-ed1c-0410-87a9-c151d255dfc7
diff --git a/user/src/com/google/gwt/dom/client/DOMImpl.java b/user/src/com/google/gwt/dom/client/DOMImpl.java
index e9dadd2..3369ea2 100644
--- a/user/src/com/google/gwt/dom/client/DOMImpl.java
+++ b/user/src/com/google/gwt/dom/client/DOMImpl.java
@@ -98,10 +98,6 @@
     return text;
   }-*/;
 
-  public native int getIntStyleAttribute(Element elem, String attr) /*-{
-    return parseInt(elem.style[attr]) || 0;
-  }-*/;
-
   public native Element getNextSiblingElement(Element elem) /*-{
     var sib = elem.nextSibling;
     while (sib && sib.nodeType != 1)
@@ -119,10 +115,6 @@
     return parent;
   }-*/;
 
-  public native String getStyleAttribute(Element elem, String attr) /*-{
-    return elem.style[attr];
-  }-*/;
-
   public native String imgGetSrc(Element img) /*-{
     return img.src;
   }-*/;
@@ -197,14 +189,6 @@
     }
   }-*/;
 
-  public native void setIntStyleAttribute(Element elem, String attr, int value) /*-{
-    elem.style[attr] = value;
-  }-*/;
-
-  public native void setStyleAttribute(Element elem, String attr, String value) /*-{
-    elem.style[attr] = value;
-  }-*/;
-
   public native String toString(Element elem) /*-{
     return elem.outerHTML;
   }-*/;
diff --git a/user/src/com/google/gwt/dom/client/DOMImplOpera.java b/user/src/com/google/gwt/dom/client/DOMImplOpera.java
index e9b4884..e1011fa 100644
--- a/user/src/com/google/gwt/dom/client/DOMImplOpera.java
+++ b/user/src/com/google/gwt/dom/client/DOMImplOpera.java
@@ -68,5 +68,4 @@
   public native void scrollIntoView(Element elem) /*-{
     elem.scrollIntoView();
   }-*/;
-
 }
diff --git a/user/src/com/google/gwt/dom/client/Element.java b/user/src/com/google/gwt/dom/client/Element.java
index adaa581..03a8168 100644
--- a/user/src/com/google/gwt/dom/client/Element.java
+++ b/user/src/com/google/gwt/dom/client/Element.java
@@ -15,7 +15,6 @@
  */
 package com.google.gwt.dom.client;
 
-
 /**
  * All HTML element interfaces derive from this class.
  */
@@ -140,17 +139,17 @@
   /**
    * The height of an element relative to the layout.
    */
-  public final int getOffsetHeight() {
-    return getPropertyInt("offsetHeight");
-  }
+  public final native int getOffsetHeight() /*-{
+    return this.offsetHeight || 0;
+  }-*/;
 
   /**
    * The number of pixels that the upper left corner of the current element is
    * offset to the left within the offsetParent node.
    */
-  public final int getOffsetLeft() {
-    return getPropertyInt("offsetLeft");
-  }
+  public final native int getOffsetLeft() /*-{
+    return this.offsetLeft || 0;
+  }-*/;
 
   /**
    * Returns a reference to the object which is the closest (nearest in the
@@ -164,16 +163,16 @@
    * The number of pixels that the upper top corner of the current element is
    * offset to the top within the offsetParent node.
    */
-  public final int getOffsetTop() {
-    return getPropertyInt("offsetTop");
-  }
+  public final native int getOffsetTop() /*-{
+    return this.offsetTop || 0;
+  }-*/;
 
   /**
    * The width of an element relative to the layout.
    */
-  public final int getOffsetWidth() {
-    return getPropertyInt("offsetWidth");
-  }
+  public final native int getOffsetWidth() /*-{
+    return this.offsetWidth || 0;
+  }-*/;
 
   /**
    * The parent element of this element.
@@ -219,35 +218,35 @@
    * @return the property value
    */
   public final native String getPropertyString(String name) /*-{
-    return (this[name] == null)? null : String(this[name]);
+    return (this[name] == null) ? null : String(this[name]);
   }-*/;
 
   /**
    * The height of the scroll view of an element.
    */
   public final native int getScrollHeight() /*-{
-    return this.scrollHeight;
+    return this.scrollHeight || 0;
   }-*/;
 
   /**
    * The number of pixels that an element's content is scrolled to the left.
    */
   public final native int getScrollLeft() /*-{
-    return this.scrollLeft;
+    return this.scrollLeft || 0;
   }-*/;
 
   /**
    * The number of pixels that an element's content is scrolled to the top.
    */
   public final native int getScrollTop() /*-{
-    return this.scrollTop;
+    return this.scrollTop || 0;
   }-*/;
 
   /**
    * The height of the scroll view of an element.
    */
   public final native int getScrollWidth() /*-{
-    return this.scrollWidth;
+    return this.scrollWidth || 0;
   }-*/;
 
   /**
@@ -431,6 +430,8 @@
    * The element's advisory title.
    */
   public final native void setTitle(String title) /*-{
+    // Setting the title to null results in the string "null" being displayed
+    // on some browsers.
     this.title = title || '';
   }-*/;
 }
diff --git a/user/src/com/google/gwt/dom/client/Style.java b/user/src/com/google/gwt/dom/client/Style.java
index 51d4641..08f4d17 100644
--- a/user/src/com/google/gwt/dom/client/Style.java
+++ b/user/src/com/google/gwt/dom/client/Style.java
@@ -31,7 +31,7 @@
    * Gets the value of a named property.
    */
   public final native String getProperty(String name) /*-{
-    return this[name] || '';
+    return this[name];
   }-*/;
 
   /**