Author: mhabersack
Date: 2007-04-30 02:44:10 -0400 (Mon, 30 Apr 2007)
New Revision: 76472
Modified:
trunk/mcs/class/System.Web/System.Web.Compilation/ChangeLog
trunk/mcs/class/System.Web/System.Web.Compilation/TemplateControlCompiler.cs
Log:
2007-04-30 Marek Habersack <[EMAIL PROTECTED]>
* TemplateControlCompiler.cs: fix generation of code for
declarative attribute assignments of the form Font-Size="small"
(i.e. when a font size is assigned a symbolic, relative size
value). This fixes for example rendering of the 0th level of
TreeView controls.
Modified: trunk/mcs/class/System.Web/System.Web.Compilation/ChangeLog
===================================================================
--- trunk/mcs/class/System.Web/System.Web.Compilation/ChangeLog 2007-04-29
21:58:12 UTC (rev 76471)
+++ trunk/mcs/class/System.Web/System.Web.Compilation/ChangeLog 2007-04-30
06:44:10 UTC (rev 76472)
@@ -1,3 +1,11 @@
+2007-04-30 Marek Habersack <[EMAIL PROTECTED]>
+
+ * TemplateControlCompiler.cs: fix generation of code for
+ declarative attribute assignments of the form Font-Size="small"
+ (i.e. when a font size is assigned a symbolic, relative size
+ value). This fixes for example rendering of the 0th level of
+ TreeView controls.
+
2007-04-27 Marek Habersack <[EMAIL PROTECTED]>
* AppCodeCompiler.cs: do not look at the number of errors, check
Modified:
trunk/mcs/class/System.Web/System.Web.Compilation/TemplateControlCompiler.cs
===================================================================
---
trunk/mcs/class/System.Web/System.Web.Compilation/TemplateControlCompiler.cs
2007-04-29 21:58:12 UTC (rev 76471)
+++
trunk/mcs/class/System.Web/System.Web.Compilation/TemplateControlCompiler.cs
2007-04-30 06:44:10 UTC (rev 76472)
@@ -1776,12 +1776,30 @@
if (value is System.Web.UI.WebControls.FontUnit) {
System.Web.UI.WebControls.FontUnit s =
(System.Web.UI.WebControls.FontUnit) value;
+
+ Type cParamType = null;
+ object cParam = null;
+
+ switch (s.Type) {
+ case FontSize.AsUnit:
+ case FontSize.NotSet:
+ cParamType = typeof
(System.Web.UI.WebControls.Unit);
+ cParam = s.Unit;
+ break;
+
+ default:
+ cParamType = typeof (string);
+ cParam = s.Type.ToString ();
+ break;
+ }
+
ConstructorInfo c =
typeof(System.Web.UI.WebControls.FontUnit).GetConstructor (
BindingFlags.Instance |
BindingFlags.Public,
null,
- new Type[]
{typeof(System.Web.UI.WebControls.Unit)},
+ new Type[] {cParamType},
null);
- return new InstanceDescriptor (c, new object[]
{s.Unit});
+ if (c != null)
+ return new InstanceDescriptor (c, new
object[] {cParam});
}
return null;
}
_______________________________________________
Mono-patches maillist - [email protected]
http://lists.ximian.com/mailman/listinfo/mono-patches