]> source.dussan.org Git - vaadin-framework.git/commitdiff
Merge commit '5fb05e84c80931fcaa9929ad556a20f5316e06a8'
authorJohn Ahlroos <john@vaadin.com>
Fri, 23 Aug 2013 06:20:37 +0000 (09:20 +0300)
committerJohn Ahlroos <john@vaadin.com>
Fri, 23 Aug 2013 06:20:37 +0000 (09:20 +0300)
Change-Id: Ib3f2d1d269f8ec7ee1f03dfdbc290453e2356387

1  2 
client/src/com/vaadin/client/ui/Icon.java
client/src/com/vaadin/client/ui/button/ButtonConnector.java

index 688507f52579b6d83ed46032ea7d44f751ddd7d6,9d5829c0790c336b5cd6eca0a3d69a0203bc492a..4a0e85879801703e05cff7c678cea9bdc2d1b78b
@@@ -59,22 -51,17 +59,18 @@@ public class Icon extends UIObject 
              DOM.setElementProperty(getElement(), "src", uri);
              myUri = uidlUri;
          }
-         if (uidlAlt != null) {
-             setAlternateText(uidlAlt);
-         } else {
-             setAlternateText("");
-         }
 +
++        setAlternateText(uidlAlt);
      }
  
      /**
       * Sets the alternate text for the icon.
       * 
-      * @param uidlAlt
-      *            with the alternate text. Must be non null
+      * @param alternateText
+      *            with the alternate text.
       */
-     public void setAlternateText(String uidlAlt) {
-         assert uidlAlt != null : "Alternate text must be non null";
-         DOM.setElementProperty(getElement(), "alt", uidlAlt);
+     public void setAlternateText(String alternateText) {
+         getElement().setAttribute("alt",
+                 alternateText == null ? "" : alternateText);
      }
 -
  }