diff options
author | Gonzalo Paniagua Javier <gonzalo.mono@gmail.com> | 2005-12-08 23:54:16 +0300 |
---|---|---|
committer | Gonzalo Paniagua Javier <gonzalo.mono@gmail.com> | 2005-12-08 23:54:16 +0300 |
commit | 51643b5b334b186860c0d2844deed289cb56827c (patch) | |
tree | 66c91d88a56e856cd72a71b12718aa9860962f2a | |
parent | 2e03062d5cd58316f71a0eb31fa349fdd2f2467c (diff) |
from head
svn path=/branches/mono-1-1-10/mcs/; revision=54123
-rw-r--r-- | mcs/class/System.Web/System.Web.UI/ChangeLog | 4 | ||||
-rw-r--r-- | mcs/class/System.Web/System.Web.UI/Control.cs | 36 | ||||
-rw-r--r-- | mcs/class/System.Web/System.Web/MimeTypes.cs | 1 |
3 files changed, 24 insertions, 17 deletions
diff --git a/mcs/class/System.Web/System.Web.UI/ChangeLog b/mcs/class/System.Web/System.Web.UI/ChangeLog index 5ce8ae0ab60..69a8864e137 100644 --- a/mcs/class/System.Web/System.Web.UI/ChangeLog +++ b/mcs/class/System.Web/System.Web.UI/ChangeLog @@ -1,3 +1,7 @@ +2005-12-08 Gonzalo Paniagua Javier <gonzalo@ximian.com> + + * Control.cs: use _controls instead of the property wherever possible. + 2005-12-05 Gonzalo Paniagua Javier <gonzalo@ximian.com> * Control.cs: use the _controls field instead of the Controls property. diff --git a/mcs/class/System.Web/System.Web.UI/Control.cs b/mcs/class/System.Web/System.Web.UI/Control.cs index cd7ab830d37..ab63b54221e 100644 --- a/mcs/class/System.Web/System.Web.UI/Control.cs +++ b/mcs/class/System.Web/System.Web.UI/Control.cs @@ -437,8 +437,10 @@ namespace System.Web.UI protected bool ChildControlsCreated { get { return ((stateMask & CHILD_CONTROLS_CREATED) != 0); } set { - if (value == false && (stateMask & CHILD_CONTROLS_CREATED) != 0) - Controls.Clear(); + if (value == false && (stateMask & CHILD_CONTROLS_CREATED) != 0) { + if (_controls != null) + _controls.Clear(); + } SetMask (CHILD_CONTROLS_CREATED, value); } @@ -538,7 +540,7 @@ namespace System.Web.UI if (!HasControls ()) return; - foreach (Control c in Controls) + foreach (Control c in _controls) c.NullifyUniqueID (); } @@ -660,7 +662,7 @@ namespace System.Web.UI protected bool IsLiteralContent() { - if (HasControls () && Controls.Count == 1 && (Controls [0] is LiteralControl)) + if (HasControls () && _controls.Count == 1 && (_controls [0] is LiteralControl)) return true; return false; @@ -678,7 +680,7 @@ namespace System.Web.UI return null; Control result = null; - foreach (Control c in Controls) { + foreach (Control c in _controls) { if (String.Compare (id, c._userId, true) == 0) { if (result != null && result != c) { throw new HttpException ("1 Found more than one control with ID '" + id + "'"); @@ -1046,9 +1048,9 @@ namespace System.Web.UI if (!HasControls ()) return; - int len = Controls.Count; + int len = _controls.Count; for (int i = 0; i < len; i++) { - Control c = Controls [i]; + Control c = _controls [i]; c.DataBind (); } } @@ -1139,10 +1141,10 @@ namespace System.Web.UI #endif OnLoad (EventArgs.Empty); if (HasControls ()) { - int len = Controls.Count; + int len = _controls.Count; for (int i=0;i<len;i++) { - Control c = Controls[i]; + Control c = _controls[i]; c.LoadRecursive (); } } @@ -1165,10 +1167,10 @@ namespace System.Web.UI } #endif if (HasControls ()) { - int len = Controls.Count; + int len = _controls.Count; for (int i=0;i<len;i++) { - Control c = Controls[i]; + Control c = _controls[i]; c.UnloadRecursive (dispose); } } @@ -1208,10 +1210,10 @@ namespace System.Web.UI if (!HasControls ()) return; - int len = Controls.Count; + int len = _controls.Count; for (int i=0;i<len;i++) { - Control c = Controls[i]; + Control c = _controls[i]; c.PreRenderRecursiveInternal (); } #if MONO_TRACE @@ -1242,10 +1244,10 @@ namespace System.Web.UI namingContainer.AutoID) namingContainer._userId = namingContainer.GetDefaultName () + "b"; - int len = Controls.Count; + int len = _controls.Count; for (int i=0;i<len;i++) { - Control c = Controls[i]; + Control c = _controls[i]; c._page = Page; c._namingContainer = namingContainer; if (namingContainer != null && c._userId == null && c.AutoID) @@ -1290,10 +1292,10 @@ namespace System.Web.UI int idx = -1; if (HasControls ()) { - int len = Controls.Count; + int len = _controls.Count; for (int i=0;i<len;i++) { - Control ctrl = Controls[i]; + Control ctrl = _controls[i]; object ctrlState = ctrl.SaveViewStateRecursive (); idx++; if (ctrlState == null) diff --git a/mcs/class/System.Web/System.Web/MimeTypes.cs b/mcs/class/System.Web/System.Web/MimeTypes.cs index fa8025100a4..85678ff104a 100644 --- a/mcs/class/System.Web/System.Web/MimeTypes.cs +++ b/mcs/class/System.Web/System.Web/MimeTypes.cs @@ -185,6 +185,7 @@ namespace System.Web mimeTypes.Add ("jfif-tbnl", "image/jpeg"); mimeTypes.Add ("jpe", "image/jpeg"); mimeTypes.Add ("jpeg", "image/jpeg"); + mimeTypes.Add ("jpg", "image/jpeg"); mimeTypes.Add ("jps", "image/x-jps"); mimeTypes.Add ("js", "application/x-javascript"); mimeTypes.Add ("jut", "image/jutvision"); |