Author: krasnov
Date: 2006-07-16 09:12:48 -0400 (Sun, 16 Jul 2006)
New Revision: 62656

Modified:
   trunk/mcs/class/System.Web/System.Web.UI.WebControls/ChangeLog
   trunk/mcs/class/System.Web/System.Web.UI.WebControls/Image.cs
   trunk/mcs/class/System.Web/System.Web.UI.WebControls/Style.cs
Log:
* Style.cs: BorderStyle should be added if BorderWidth greater than 0
* Image.cs: in 2.0 there is no border attribute, but border-width style 
attribute

Modified: trunk/mcs/class/System.Web/System.Web.UI.WebControls/ChangeLog
===================================================================
--- trunk/mcs/class/System.Web/System.Web.UI.WebControls/ChangeLog      
2006-07-16 12:42:57 UTC (rev 62655)
+++ trunk/mcs/class/System.Web/System.Web.UI.WebControls/ChangeLog      
2006-07-16 13:12:48 UTC (rev 62656)
@@ -1,3 +1,9 @@
+2006-07-16 Vladimir Krasnov <[EMAIL PROTECTED]>
+
+       * Style.cs: BorderStyle should be added if BorderWidth greater than 0
+       * Image.cs: in 2.0 there is no border attribute, but border-width
+       style attribute
+
 2006-07-14 Gonzalo Paniagua Javier <[EMAIL PROTECTED]>
 
        * Button.cs: always render the 'name' attribute. Fixes bug #78746.

Modified: trunk/mcs/class/System.Web/System.Web.UI.WebControls/Image.cs
===================================================================
--- trunk/mcs/class/System.Web/System.Web.UI.WebControls/Image.cs       
2006-07-16 12:42:57 UTC (rev 62655)
+++ trunk/mcs/class/System.Web/System.Web.UI.WebControls/Image.cs       
2006-07-16 13:12:48 UTC (rev 62656)
@@ -224,12 +224,15 @@
                                writer.AddAttribute 
(HtmlTextWriterAttribute.Align, "texttop");
                                break;
                        }
-
+#if NET_2_0
+                       if (BorderWidth.IsEmpty)
+                               writer.AddStyleAttribute 
(HtmlTextWriterStyle.BorderWidth, "0px");
+#else
                        // if border-with is not specified in style or 
                        // no style is defined - set image to no border
-                       if (!ControlStyleCreated || 
ControlStyle.BorderWidth.IsEmpty) {
+                       if (!ControlStyleCreated || 
ControlStyle.BorderWidth.IsEmpty)
                                writer.AddAttribute 
(HtmlTextWriterAttribute.Border, "0");
-                       }
+#endif
                }
 
 #if NET_2_0

Modified: trunk/mcs/class/System.Web/System.Web.UI.WebControls/Style.cs
===================================================================
--- trunk/mcs/class/System.Web/System.Web.UI.WebControls/Style.cs       
2006-07-16 12:42:57 UTC (rev 62655)
+++ trunk/mcs/class/System.Web/System.Web.UI.WebControls/Style.cs       
2006-07-16 13:12:48 UTC (rev 62656)
@@ -420,7 +420,8 @@
                        if ((styles & Styles.BorderWidth) != 0) {
                                u = (Unit)viewstate["BorderWidth"];
                                if (!u.IsEmpty) {
-                                       have_width = true;
+                                       if (u.Value > 0)
+                                               have_width = true;
                                        writer.AddStyleAttribute 
(HtmlTextWriterStyle.BorderWidth, u.ToString());
                                }
                        }

_______________________________________________
Mono-patches maillist  -  [email protected]
http://lists.ximian.com/mailman/listinfo/mono-patches

Reply via email to