Skip to content

Commit

Permalink
from head
Browse files Browse the repository at this point in the history
svn path=/branches/mono-1-1-10/mcs/; revision=54123
  • Loading branch information
gonzalop committed Dec 8, 2005
1 parent 2e03062 commit 51643b5
Show file tree
Hide file tree
Showing 3 changed files with 24 additions and 17 deletions.
4 changes: 4 additions & 0 deletions mcs/class/System.Web/System.Web.UI/ChangeLog
Original file line number Diff line number Diff line change
@@ -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.
Expand Down
36 changes: 19 additions & 17 deletions mcs/class/System.Web/System.Web.UI/Control.cs
Original file line number Diff line number Diff line change
Expand Up @@ -437,8 +437,10 @@ public virtual bool Visible {
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);
}
Expand Down Expand Up @@ -538,7 +540,7 @@ void NullifyUniqueID ()
if (!HasControls ())
return;

foreach (Control c in Controls)
foreach (Control c in _controls)
c.NullifyUniqueID ();
}

Expand Down Expand Up @@ -660,7 +662,7 @@ protected bool HasEvents ()

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;
Expand All @@ -678,7 +680,7 @@ Control LookForControlByName (string id)
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 + "'");
Expand Down Expand Up @@ -1046,9 +1048,9 @@ void DataBindChildren ()
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 ();
}
}
Expand Down Expand Up @@ -1139,10 +1141,10 @@ internal void LoadRecursive()
#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 ();
}
}
Expand All @@ -1165,10 +1167,10 @@ internal void UnloadRecursive(Boolean dispose)
}
#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);
}
}
Expand Down Expand Up @@ -1208,10 +1210,10 @@ internal void PreRenderRecursiveInternal()
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
Expand Down Expand Up @@ -1242,10 +1244,10 @@ internal void InitRecursive(Control namingContainer)
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)
Expand Down Expand Up @@ -1290,10 +1292,10 @@ internal object SaveViewStateRecursive ()
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)
Expand Down
1 change: 1 addition & 0 deletions mcs/class/System.Web/System.Web/MimeTypes.cs
Original file line number Diff line number Diff line change
Expand Up @@ -185,6 +185,7 @@ static MimeTypes ()
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");
Expand Down

0 comments on commit 51643b5

Please sign in to comment.