228 Commits
Author SHA1 Message Date
Alexander Köplinger a22bb15e6b [System.Web] Rename method parameters to match .NET contract 2017-03-16 13:02:09 +01:00
Zoltan Varga 032f313d5f [bcl] Remove NET_4_0 defines from class libs. 2015-01-13 16:06:31 -05:00
Etienne CHAMPETIER 227b0d1b55 [cleanup] System.Web*: remove TARGET_J2EE
done using unifdef
git grep -l TARGET_J2EE | grep -v ChangeLog | xargs -n1 unifdef -m -UTARGET_J2EE

Signed-off-by: Etienne CHAMPETIER <[email protected]>
2014-12-01 23:57:18 +01:00
Marek Safar b0c1e99f75 Fix attribute arguments 2012-07-26 12:48:27 +01:00
Marek Safar df0eff5b03 Fix few obvious NREs 2011-10-24 10:11:41 +01:00
Marek Habersack adc3314eff [asp.net] Fix for bug #681553. Look for direct child controls before calling up on the NamingContainer 2011-03-25 14:19:21 +01:00
Marek Habersack 67ad55bc49 [asp.net] Fix for bug #649034. Control.FindControl continues to search for controls above itself if it's a naming container.
When a control is a naming container and an attempt to find a control with non-segmented id (e.g. 'myControl') is made,
the search continues to the control's naming container if pathOffset is 0, that is we're at the start of the search.
2010-10-29 14:44:56 +02:00
Marek Habersack 244ae1ff20 [asp.net] Fix for bug #646479. Do not call control's OnLoad twice when it is dynamically added.
Control.AddedControl will call the new control's LoadRecursive which would trigger its OnLoad
handler. OnLoad must be called only if control hasn't already been loaded.
2010-10-28 15:59:18 +02:00
Marek Safar aad016fd87 Clean up few more warnings 2010-10-15 15:20:25 +01:00
Marek Habersack 8fd3e7fae6 [asp.net] Fix for bug #636709. ClientID must be reset when ID is assigned. 2010-09-07 23:20:28 +02:00
Marek Habersack 80244984a0 [asp.net,4.0] added ability to store cached user controls in specified output cache provider
This commit implements the ability to programmatically set the name of the output cache provider
to hold cached control data.

* OutputCache.cs: added DefaultProvider internal property to return whatever default provider is
  configured.
  Added GetProvider() method to return instance of a named provider
* BasePartialCachingControl.cs: cache key and cached data are store in instance fields.
  Added 4.0 internal property ProviderName which names the output cache provider to use for storage.
  Removed OnInit from 4.0 profile, replaced with an override of Control's InitRecursive. Control is
  created only when cached data is not found in the provider.
* Control.cs: made InitRecursive virtual for the benefit of BasePartialCachingControl above.
* ControlCachePolicy.cs: added 4.0 property ProviderName
2010-08-06 01:27:34 +02:00
Marek Habersack 84cf768d2d 2010-07-21 Marek Habersack <[email protected]>
* Wizard.cs: made rendering 100% compliant with .NET (button IDs,
	2.0+)
	Implemented LayoutTemplate (4.0+)

	* LinkButton.cs: render id first

	* CreateUserWizard.cs: CreateUserNavigationContainer.UpdateState
	doesn't add a previous button if we're on the first step.

svn path=/trunk/mcs/; revision=160657
2010-07-21 12:58:22 +00:00
Marek Habersack 3e86dae309 2010-07-13 Marek Habersack <[email protected]>
* Control.cs: moved 4.0 ClientID code to a separate method, so
	that the ID_SET flag isn't set when necessary.

2010-07-13  Marek Habersack  <[email protected]>

	* Wizard.cs: wizard table doesn't contain any instances of
	HtmlAnchor or Image controls. Moved rendering of the skip link
	anchor to the TableCellNamingContainer class, which does that in
	RenderChildren by directly writing to the passed writer. Fixes 4.0
	rendering and all the failing Wizard tests.

svn path=/trunk/mcs/; revision=160304
2010-07-13 16:34:23 +00:00
Marek Habersack 66f503db3e 2010-07-10 Marek Habersack <[email protected]>
* Control.cs: when setting ClientIDMode remember the value when
	setting the property for the first time.

svn path=/trunk/mcs/; revision=160187
2010-07-10 00:25:15 +00:00
Marek Habersack 203ea304e7 2010-07-08 Marek Habersack <[email protected]>
* Control.cs: if generating a predictable ID and the current
	control is a naming container, ensure that an ID is generated if
	not specified by user.

svn path=/trunk/mcs/; revision=160050
2010-07-08 13:09:32 +00:00
Marek Habersack d8838a6414 This commit introduces a few 4.0 rendering changes which break some tests. The broken tests
fail to work on .NET 4.0 as well, for the most part. I will fix them next week.

    2010-07-02  Marek Habersack  <[email protected]>

    	* TemplateControlParser.cs: added support for ClientIDMode
    	property

    	* Control.cs: implemented 4.0 features - ClientIDMode and
    	RenderingCompatibility.

    	* ClientIDMode.cs, IDataKeysControl.cs: added

    2010-07-02  Marek Habersack  <[email protected]>

    	* Menu.cs: 4.0 API updates.

    	* GridView.cs: implemented 4.0 properties -
    	SortedAscendingCellStyle, SortedAscendingHeaderStyle,
    	SortedDescendingCellStyle, SortedDescendingHeaderStyle,
    	ClientIDRowSuffix, ClientIDRowSuffixDataKeys, ShowHeaderWhenEmpty
    	along with associated rendering changes.

    	* DetailsView.cs, FormView.cs, GridView.cs: 4.0 API changes -
    	renamed ShowPage to SetPageIndex and made it public.
    	Added 4.0 interfaces to inheritance list and implemented them.

    	* DataKeyArray.cs: added internal constructor which accepts IList
    	instead of ArrayList. Changed the 'keys' field type to IList.

    	* ContainedTable.cs: the 'id' attribute must be rendered last.

    	* CheckBox.cs, CheckBoxList.cs, SiteMapPath.cs, Table.cs,
    	TableStyle.cs, TextBox.cs, WebControl.cs: 4.0 rendering changes.

    	* Calendar.cs, CompositeControl.cs, DropDownList.cs, HyperLink.cs,
    	Image.cs, ImageButton.cs, Label.cs, LinkButton.cs, LoginName.cs,
    	Panel.cs, Table.cs, TableCell.cs, TableRow.cs:
    	added new 4.0 property, SupportsDisabledAttribute.

    2010-07-02  Marek Habersack  <[email protected]>

    	* VersionConverter.cs: added support for checking whether the
    	passed version is equal or more than a specified minimal version.

    	* PagesSection.cs: added two 4.0 properties - ClientIDMode and
    	ControlRenderingCompatibilityVersion

    2010-07-02  Marek Habersack  <[email protected]>

    	* TemplateControlCompiler.cs: added support for ClientIDMode 4.0
    	property

    	* PageCompiler.cs, UserControlCompiler.cs: AddStatementsToInitTop
    	must call the base implementation.

svn path=/trunk/mcs/; revision=159826
2010-07-02 19:12:31 +00:00
Marek Habersack 4a49acbd3b 2010-06-02 Marek Habersack <[email protected]>
* ViewStateMode.cs: added

	* Control.cs: implemented 4.0 ViewStateMode

svn path=/trunk/mcs/; revision=158368
2010-06-02 21:36:29 +00:00
Marek Habersack fbbf51a5e4 2010-05-14 Marek Habersack <[email protected]>
* AssemblyInfo.cs: this assembly should be signed with winfx.pub

2010-05-15  Marek Habersack  <[email protected]>

	* HttpResponse.cs: added internal Context property

	* HttpRequest.cs: added a setter to the internal Context property

	* HttpContext.cs: set request and response Context properties to
	'this' in the constructor.

2010-05-15  Marek Habersack  <[email protected]>

	* Control.cs: implemented 4.0 GetRouteUrl overloads and
	GetUniqueIDRelativeTo

2010-05-15  Marek Habersack  <[email protected]>

	* RouteValueExpressionBuilder.cs: added

	* RouteUrlExpressionBuilder.cs: implemented

svn path=/trunk/mcs/; revision=157378
2010-05-15 02:29:09 +00:00
Marek Habersack ad322714f6 2010-04-07 Marek Habersack <[email protected]>
* Control.cs: control cache must be filled using the local
	_controls collection instead of the virtual Controls
	property. Fixes bug #594238
	Check if _controls isn't null before using it.

2010-04-07  Marek Habersack  <[email protected]>

	* ControlTest.cs: added test for bug #594238

2010-04-07  Marek Habersack  <[email protected]>

	* Makefile: moved App_* test resources to separate variables -
	whatever is contained in those variables is preprocessed before
	embedding as resource to include appropriate resource name prefix
	(App_Code/, App_GlobalResources/ for now). This is used in WebTest
	to automatically populate the relevant directories when running
	the test suite.

2010-04-07  Marek Habersack  <[email protected]>

	* WebTest.cs: introduced concept of prefixed resources and added
	an API which handles them - CopyPrefixedResources. All the
	manifest resource names are checked for match with the given
	prefix, and all the matching ones are copied to the specified
	subdirectory of the test directory.

svn path=/trunk/mcs/; revision=154948
2010-04-07 13:14:11 +00:00
Marek Habersack 5e9719f57c Gotten rid of NET_2_0 ifdefs and 1.1 code from System.Web.UI
svn path=/trunk/mcs/; revision=149929
2010-01-20 21:21:01 +00:00
Marek Habersack 1201ed9a1d 2009-10-30 Marek Habersack <[email protected]>
* HttpRequest.cs: added internal property ClientFilePath, which
	may have a different value than FilePath when virtual path has
	been rewritten, but the caller specified that the client paths
	should still be constructed using the original url.

	* HttpContext.cs: RewritePath always sets Request.FilePath,
	Request.ClientFilePath is set only when setClientFilePath is
	true. This makes client urls work correctly when url rewriting is
	being used.

2009-10-30  Marek Habersack  <[email protected]>

	* Control.cs: ResolveClientUrl takes base path from
	Request.ClientFilePath, so that it works correctly for rewritten
	urls.

2009-10-30  Marek Habersack  <[email protected]>

	* HtmlForm.cs: action is built using Request.ClientFilePath
	(instead of Request.FilePath) and ResolveClientUrl, so that it's
	correct even if url rewriting is being used.

svn path=/trunk/mcs/; revision=145069
2009-10-30 00:52:53 +00:00
Marek Habersack f1d1180ca0 Not fully tested, so no backport to 2.4/2.6 branches yet.
2009-10-09  Marek Habersack  <[email protected]>

	* Control.cs: implemented the LoadViewStateByID property as well
	as saving/restoring the view state by control's ID.

svn path=/trunk/mcs/; revision=143855
2009-10-09 12:16:01 +00:00
Marek Habersack fa1c79515f 2009-08-18 Marek Habersack <[email protected]>
* ControlBuilder.cs: Location property makes a copy of assigned
	ILocation now.

2009-08-20  Marek Habersack  <[email protected]>

	* ControlAdapter.cs: check if Control isn't null before using it.
	CreateChildControls () must forward call to the control. Fixes bug
	#517172

2009-08-20  Marek Habersack  <[email protected]>

	* ControlAdapterTest.cs: added test for bug #517172

svn path=/trunk/mcs/; revision=140299
2009-08-19 22:33:52 +00:00
Miguel de Icaza 0c48a2f633 Found with Umbraco, this method ignores null pages
svn path=/trunk/mcs/; revision=137744
2009-07-11 16:56:38 +00:00
Marek Habersack 5a503b40b1 2009-04-07 Marek Habersack <[email protected]>
* Control.cs: ApplyTheme - make sure Page is not null before using
	it. Fixes bug #492666

svn path=/trunk/mcs/; revision=131214
2009-04-07 10:56:27 +00:00
Marek Habersack 99b5e370f6 2009-03-18 Marek Habersack <[email protected]>
* Control.cs: AppRelativeResourceDirectory no longer returns a
	hard-coded "~/" when template control's virtual path cannot be
	determined. It returns application relative version of
	TemplateSourceDirectory instead.

svn path=/trunk/mcs/; revision=129676
2009-03-18 08:08:19 +00:00
Marek Habersack c2fd4b2317 2009-03-13 Marek Habersack <[email protected]>
* Control.cs: clear the controls cache on control removal. This
	ensures that a subsequent FindControl call won't return the
	removed control.

svn path=/trunk/mcs/; revision=129234
2009-03-13 00:48:58 +00:00
Rodrigo Kumpera d8f9612533 2009-03-03 Rodrigo Kumpera <[email protected]>
* Control.cs (FillControlCache): Remove useless control
	parameter. It's always the same of 'this'.

svn path=/trunk/mcs/; revision=128488
2009-03-03 21:50:44 +00:00
Marek Habersack 98803dbdf1 2009-02-28 Gonzalo Paniagua Javier <[email protected]>
* Control.cs: Avoid double OnInit in scenarios with two master
	pages.

svn path=/trunk/mcs/; revision=128249
2009-02-28 01:37:27 +00:00
Marek Habersack da4068f8c0 Reverting revision 126037, it's already taken care of in IsViewStateEnabled, thanks Gert for noticing it.
svn path=/trunk/mcs/; revision=126045
2009-02-06 14:08:59 +00:00
Marek Habersack ebe289242c 2009-02-06 Marek Habersack <[email protected]>
* Control.cs: partially restore the ViewStateShouldBeSaved method
	in order to introduce a small optimization - when the control's
	EnableViewState is false, there is no point in checking all the
	child controls.

svn path=/trunk/mcs/; revision=126037
2009-02-06 13:09:25 +00:00
Gert Driesen 215b9c88cf * Control.cs: Make IsViewStateEnabled available on 1.0 profile
and use it to determine if viewstate needs to be saved instead of
the newly introduced ViewStateShouldBeSaved. Remove
ViewStateShouldBeSaved.

svn path=/trunk/mcs/; revision=126025
2009-02-06 11:34:39 +00:00
Marek Habersack 08c59df0f6 2009-02-05 Marek Habersack <[email protected]>
* Control.cs: if a control has been added to the controls
	collection, removed and added again do not call OnInit (). At the
	same time OnInit() should be called more than once if a control is
	added to a container which, in turn, is then added to another
	control. To achieve that a new state mask flag has been added -
	REMOVED. Fixes bug #471305

svn path=/trunk/mcs/; revision=125798
2009-02-05 00:56:56 +00:00
Marek Habersack f10126e819 2009-02-04 Marek Habersack <[email protected]>
* Control.cs: update of the fix for bug #470993 - view state of
	the child controls isn't saved when any of their parents has it
	disabled.

svn path=/trunk/mcs/; revision=125663
2009-02-04 10:44:57 +00:00
Marek Habersack 98ad9d57a0 2009-01-30 Marek Habersack <[email protected]>
* Control.cs: don't save the control's state if it's
	disabled. Fixes bug #470993

svn path=/trunk/mcs/; revision=125111
2009-01-30 16:52:34 +00:00
Marek Habersack cd9089259b 2008-11-15 Marek Habersack <[email protected]>
* ContentPlaceHolder.cs, Content.cs, FormViewPagerRow.cs,
	ChangePassword.cs, DetailsViewPagerRow.cs: implements
	INonBindingContainer interface.

	* Wizard.cs: implement INonBindingContainer interface for several
	private/internal classes.

2008-11-15  Marek Habersack  <[email protected]>

	* INonBindingContainer.cs: added

	* Control.cs: BindingContainer now checks if a control implements
	INonBindingContainer interface in addition to the
	BINDING_CONTAINER mask check.

	* UserControl.cs: implements INonBindingContainer

	* ControlBuilder.cs: use the new INonBindingContainer interface to
	determine the binding container type in the BindingContainerType
	property. If TemplateBuilder's ContainerType implements that
	interface, the NamingContainer is queried for the binding
	container type. If ContainerType is null, we return our own
	ControlType (if we're TemplateBuilder)

2008-11-15  Marek Habersack  <[email protected]>

	* System.Web.dll.sources: added System.Web.UI/INonBindingContainer.cs

svn path=/trunk/mcs/; revision=118917
2008-11-15 03:40:24 +00:00
Marek Habersack eb9632d1c7 2008-11-13 Marek Habersack <[email protected]>
* Control.cs: added ability to reset child names to a specific
	value, not only to 0.

svn path=/trunk/mcs/; revision=118683
2008-11-13 01:31:59 +00:00
Marek Habersack 81c4068d12 2008-10-17 Marek Habersack <[email protected]>
* ImageMap.cs: added the SupportsEventValidation attribute to the
	class.
	Validate the event in RaisePostBackEvent ().
	Register for event validation in Render ().

	* DropDownList.cs, ListBox.cs: validate the event in LoadPostData ().

	* TextBox.cs: validate the event in LoadPostData ().
	Register for event validation in AddAttributesToRender ().

	* HiddenField.cs: validate the event in RaisePostDataChangedEvent.
	Register for event validation in Render ().

	* RadioButton.cs: validate the event in LoadPostData ().
	Register for event validation in InternalAddAttributesToRender.

	* CheckBox.cs, RadioButtonList.cs: validate the event in
	RaisePostDataChangedEvent.

	* Menu.cs: added the SupportsEventValidation attribute to the
	class.
	Validate the event in RaisePostBackEvent ().
	Register for event validation in GetClientEvent ().

	* DetailsView.cs, GridView.cs: validate the event in
	RaisePostBackEvent ().
	Register for validation in GetCallbackScript () and in OnPreRender

	* Button.cs, Table.cs, BulletedList.cs, Calendar.cs, LinkButton.cs,
	ImageButton.cs, TreeView.cs: validate the event in RaisePostBackEvent ().

2008-10-17  Marek Habersack  <[email protected]>

	* Control.cs: added the ValidateEvent internal method, used by
	classes descending from Control to automatically trigger event
	validation.

	* Page.cs: removed the CheckForValidationSupport method. It moved
	to Control.cs
	RaisePostBackEvent no longer validates the events, this
	functionality has been moved to Control.ValidateEvent.

2008-10-17  Marek Habersack  <[email protected]>

	* HtmlInputHidden.cs: validate the event in LoadPostDataInternal.

	* HtmlInputButton.cs: validate the event in
	RaisePostBackEventInternal ().
	Register for event validation in RenderAttributes ()

	* HtmlTextArea.cs: validate the event in
	RaisePostBackDataChangedEvent ().

	* HtmlButton.cs: validate the event in RaisePostBackEvent ().
	Register for event validation in RenderAttributes ()

	* HtmlAnchor.cs: validate the event in RaisePostBackEvent ().
	Register for event validation in RenderAttributes ().

	* HtmlInputRadioButton.cs, HtmlSelect.cs: validate the event in
	LoadPostData.

	* HtmlInputText.cs, HtmlInputImage.cs, HtmlInputCheckBox.cs,
	HtmlInputPassword.cs: validate the event in
	RaisePostDataChangedEvent ().

2008-10-17  Marek Habersack  <[email protected]>

	* MenuAdapterTest.cs: work around event validation failure in the
	test environment.

2008-10-17  Marek Habersack  <[email protected]>

	* PageTest.cs: use a custom version of HtmlInputHidden control to
	work around the new event validation code which doesn't work in
	this instance.

svn path=/trunk/mcs/; revision=116231
2008-10-17 14:56:19 +00:00
Marek Habersack 071470bef4 2008-10-14 Marek Habersack <[email protected]>
* Control.cs: SaveViewStateRecursive must return view state even
	if EnableViewState is false. This is apparently what .NET does, as
	some commercial ASP.NET controls take advantage of that via
	reflection.

2008-10-14  Marek Habersack  <[email protected]>

	* CompositeDataBoundControl.cs: renamed the itemcount ViewState
	item from "_ItemCount" to "_!ItemCount" for .NET
	compatibility. This item is accessed and used by some commercial
	ASP.NET controls.

	* DataBoundControl.cs: OnPagePreLoad must force databinding also
	when the request is not a postback.

svn path=/trunk/mcs/; revision=115766
2008-10-14 11:36:32 +00:00
Marek Habersack 90e612afe1 2008-08-31 Marek Habersack <[email protected]>
* TemplateControlCompiler.cs:
	Templates are processed before anything else, so that children
	which may depend on parent's templates can get access to them.

2008-08-31  Marek Habersack  <[email protected]>

	* Control.cs: improved FillControlCache

	* ControlBuilder.cs:
	Added a cache for children of TemplateBuilder, used later in
	TemplateControlCompiler.

svn path=/trunk/mcs/; revision=111990
2008-08-31 17:05:28 +00:00
Marek Habersack d84c3da03a 2008-07-11 Marek Habersack <[email protected]>
* Control.cs: if adapter exists for the given control, use it for
	rendering. Patch from Christian Hergert
	<[email protected]>, thanks!

svn path=/trunk/mcs/; revision=107708
2008-07-11 10:09:48 +00:00
Rodrigo Kumpera 1bbd81cd2a 2008-07-02 Rodrigo Kumpera <[email protected]>
* Control.cs: Fix the lookup in ResolveAdapter that I
	broke in the previous change.


svn path=/trunk/mcs/; revision=107123
2008-07-02 23:47:52 +00:00
Rodrigo Kumpera f8717b2b16 2008-07-02 Rodrigo Kumpera <[email protected]>
* Control.cs: Optimize ResolveAdapter a bit more.


svn path=/trunk/mcs/; revision=107121
2008-07-02 23:29:38 +00:00
Rodrigo Kumpera ec7e45ba2f In System.Web.UI:
2008-07-02  Rodrigo Kumpera  <[email protected]>

	* Control.cs: Optimize the Adapter property and ResolveAdapter a bit.


svn path=/trunk/mcs/; revision=107110
2008-07-02 22:13:51 +00:00
Marek Habersack 4944213e17 2008-06-30 Marek Habersack <[email protected]>
* AspGenerator.cs: hush the warnings and fix invalid type
	comparison.

	* AssemblyBuilder.cs: hush the warnings and add some debugging
	CWLs.

	* AspParser.cs, AppResourcesCompiler.cs, TemplateBuildProvider.cs,
	CachingCompiler.cs, BaseCompiler.cs, TemplateControlCompiler.cs,
	SimpleBuildProvider.cs, BuildManager.cs: hush the warnings

2008-06-30  Marek Habersack  <[email protected]>

	* HtmlForm.cs: hush the warnings

2008-06-30  Marek Habersack  <[email protected]>

	* ObjectDataSourceView.cs, Menu.cs, DataList.cs,
	CustomValidator.cs: hush the warnings

2008-06-30  Marek Habersack  <[email protected]>

	* MachineKeyRegistryStorage.cs: hush the warnings

2008-06-30  Marek Habersack  <[email protected]>

	* SqliteMembershipProvider.cs, SqliteRoleProvider.cs: remove
	unused method

	* SqlRoleProvider.cs, AspNetDBSchemaChecker.cs: hush the warnings

2008-06-30  Marek Habersack  <[email protected]>

	* UserControlParser.cs: hush the warnings and remove unnecessary
	code.

	* ControlCachePolicy.cs, PageParser.cs, ControlBuilder.cs,
	TemplateParser.cs, SimpleWebHandlerParser.cs, TemplateControl.cs,
	ApplicationFileParser.cs: hush the warnings

	* Page.cs: Context is protected internal in .NET 3.5
	Initialize encryption IVs before returning the transform.

	* Control.cs: Hush the warnings.

2008-06-30  Marek Habersack  <[email protected]>

	* HttpRuntime.cs, HttpApplication.cs: hush the warnings

	* HttpContext.cs: Hush the warnings.

2008-06-30  Marek Habersack  <[email protected]>

	* SqliteProfileProvider.cs: remove unused method

2008-06-30  Marek Habersack  <[email protected]>

	* CompilationSection.cs: hush the warnings



svn path=/trunk/mcs/; revision=106886
2008-06-30 13:20:58 +00:00
Marek Habersack 62e4247924 2008-06-30 Marek Habersack <[email protected]>
* Page.cs: Context is protected internal in .NET 3.5

	* Control.cs: in 2.0 we should return the context associated with
	the current page. In 1.0 we ignore the never set field _context
	and keep walking up the parent chain. Also, Context is protected
	internal in .NET 3.5

svn path=/trunk/mcs/; revision=106876
2008-06-30 09:13:44 +00:00
Zoltan Varga 2b9e9d580b 2008-06-27 Zoltan Varga <[email protected]>
* Control.cs (ResolveAdapter): Avoid calling the Context property getter 
	multiple times.

svn path=/trunk/mcs/; revision=106809
2008-06-28 03:35:26 +00:00
Marek Habersack c03924371e 2008-04-10 Marek Habersack <[email protected]>
* Control.cs: refactoring - IdSeparator property is internally
	present also in 1.1.

2008-04-10  Marek Habersack  <[email protected]>
	
	* RadioButton.cs: adjust 'name' and 'value' attribute values to
	match MS.NET. Fixes bug #378024

svn path=/trunk/mcs/; revision=100302
2008-04-10 02:06:43 +00:00
Dean Brettle 23000b3144 ++ Test/mainsoft/ChangeLog (working copy)
* add new resources: 
		PageWithAdapter.aspx for PageTest and PageAdapterTest.
		TestCapability.browser for AppBrowsersTest.

	* NunitWebResources/adapters.browser, 
	NunitWebResources/AppBrowsersTest.browser: modified to support
	testing reference nodes with captures, and adapters.

	* NunitWeb/NunitWeb/WebTest.cs: ensure that, during AppDomain
	unload, no new requests are sent to the app host and any
	pending requests are completed before the the unload occurs.
	Also added WebTest.AppUnloaded event that tests can use to wait
	for the app to unload (e.g. after touching Global.asax), and 
	WebTest.CleanApp() which can be called to restart the app with
	the a skeleton directory structure.  Tests which add files that
	could effect other tests (e.g. App_Browsers/*.browser files) should
	call WebTest.CleanApp() during TearDown to return the app to a 
	pristine environment.
	
++ Test/mainsoft/MainsoftWebTest/ChangeLog	(working copy)

	* HtmlAgilityPack/AssemblyInfo.cs: made assembly delay signed so that 
	tests can access System.Web internals now that System.Web is
	InternalsVisibleTo this assembly.

++ Test/System.Web/ChangeLog	(working copy)

	* AppBrowsersTest.cs: added.  Includes tests for Control.Adapter,
	Control.ResolveAdapter,	Control.TagWriter, and
	Control.CreateHtmlTextWriter, when using App_Browsers/*.browser files.
	AppBrowsersTest is currently tagged [Ignore], pending a fix for 
	bug #351878.
	
	* HttpRuntimeTest.cs: added. Includes test for 
	HttpRuntime.UnloadAppDomain().  Marked [Ignore], pending a fix for
	bug #351878.
	
++ Test/System.Web.UI.Adapters/ChangeLog	(revision 0)

	* PageAdapterTest.cs: added tests for PageAdapter.


	* ControlAdapterTest.cs (ConfigCapabilitiesNotCalled): added test to
	ensure that HttpCapabilitiesBase.ConfigCapabilities() is not called
	during normal page processing if no files are in App_Browsers.
	


	* ControlAdapterTest.cs: added tests for ControlAdapter.
++ Test/System.Web.UI/ChangeLog	(working copy)

	* PageTest.cs: add tests for using a PageAdapter.
	
	* ControlTest.cs: moved commented out ResolveAdapter_1 test to 
	../System.Web/AppBrowsersTest.cs.  Fixed typo in test name.  
	Added Customcontroladapter.Adapter property for use by AppBrowsersTest.

++ Test/System.Web.UI.WebControls.Adapters/ChangeLog	(revision 0)

	* MenuAdapterTest.cs: added


	* WebControlAdapterTest.cs, HierarchicalDataBoundControlAdapterTest.cs,
	DataBoundControlAdapterTest.cs, HideDisabledControlAdapterTest.cs: added
++ Test/System.Web.UI.WebControls/ChangeLog	(working copy)

	* MenuTest.cs (Menu_RenderStaticItems): added tests to check that
	result was the same when using the base MenuAdapter as when using
	no adapter.
	
	* MenuTest.cs (Menu_RenderStaticItemsWithAdapter): added test
	to ensure that MenuAdapter.RenderItem() is called.

	* HierarchicalDataBoundControlTest.cs, WebControlTest.cs, 
	DataBoundControlTest.cs: added test for use of ControlAdapters
	when present.
	
	* WebControl.cs: added test for IsEnabled.

++ System.Web/ChangeLog	(working copy)

	* HttpApplicationFactory.cs: Added support for detecting 
	App_Browsers/*.browser files and using them to determine capabilities.
	Also restart the app if the App_Browsers, App_Code, or App_GlobalResources
	directories are created.

	* BrowserCapabilities.cs (TagWriter): get value via internal virtual
	GetTagWriter() method, which is overridden in nBrowser.Result.

	* HttpRequest.cs (BrowserMightHaveSpecialWriter, BrowserMightHaveAdapters):
	internal properties added to allow Page and Control methods to avoid
	accessing Request.Browser to get browser-specific HtmlTextWriters or 
	ControlAdapters.  Those things only exist when there are App_Browsers
	files.

++ System.Web.UI.Adapters/ChangeLog	(working copy)

	* ControlAdapter.cs: made control field internal so
	derived internal classes can access it without using base.Control
	which can involved several typecasts.


	* PageAdapter.cs: implemented all members.
	

	* ControlAdapter.cs: implemented all members.
	
	* PageAdapter.cs, ControlAdapter.cs: add MonoTODO's.
++ System.Web.UI/ChangeLog	(working copy)

	* Page.cs (SavePageControlState, LoadPageControlState): save/load 
	adapter state in 2.0 profile.
	
	* Page.cs (CreateHtmlTextWriter): call Browser.CreateHtmlTextWriter()
	in 2.0 profile.
	
	* Page.cs (RenderPage): call CreateHtmlTextWriter() to get the writer
	in 2.0 profile.
	
	* Page.cs (DeterminePostBackMode, InitOutputCache, 
	RenderClientScriptFormDeclaration,	InternalProcessRequest,
	PageStatePersister): added support for PageAdapters.

	* Control.cs (Adapter, ResolveAdapter): implemented.  Adapter calls
	ResolveAdapter and remembers result.  ResolveAdapter checks for adapters
	of the Type hierarchy until it finds one.
	
	* Control.cs (SaveViewStateRecursive, LoadViewStateRecursive): save/load
	adapter state in 2.0 profile.
	
	* HtmlTextWriter.cs (BeginRender, EndRender): added empty virtual methods
	required by 2.0 profile.  These are called by corresponding methods of
	System.Web.UI.Adapters.ControlAdapter.
	
	* Page.cs, Control.cs: don't access Request.Browser if it couldn't have
	any adapters/writers because there are no files in App_Browsers/.

++ Assembly/ChangeLog	(working copy)

	* AssemblyInfo.cs: made InternalsVisibleTo System.Web.test_net_2_0.dll
	to support ControlAdapterTest.ConfigCapabilitiesNotCalled().

++ ChangeLog	(working copy)

	* System.Web_test.dll.sources: added
		System.Web.UI.WebControls.Adapters/MenuAdapterTest.cs
		System.Web.UI.WebControls.Adapters/WebControlAdapterTest.cs
		System.Web.UI.WebControls.Adapters/HierarchicalDataBoundControlAdapterTest.cs
		System.Web.UI.WebControls.Adapters/DataBoundControlAdapterTest.cs
		System.Web.UI.WebControls.Adapters/HideDisabledControlAdapterTest.cs
		System.Web.UI.Adapters/PageAdapterTest.cs
		System.Web.UI.Adapters/ControlAdapterTest.cs
		
	* Makefile (RESOURCE_FILES_2): added
		System.Web.Configuration_2.0/RandomRoboBotKeywords.txt

	* Makefile (TEST_RESOURCE_FILES): added 
		Test/mainsoft/NunitWebResources/PageWithAdapter.aspx

	* System.Web.dll.sources: added
		System.Web.Configuration_2.0/CapabilitiesBuild.cs
		System.Web.Configuration_2.0/CapabilitiesChecksum.cs
		System.Web.Configuration_2.0/CapabilitiesResult.cs
		System.Web.Configuration_2.0/ICapabilitiesProcess.cs
		System.Web.Configuration_2.0/nBrowser/Result.cs
		System.Web.Configuration_2.0/nBrowser/NodeTypes.cs
		System.Web.Configuration_2.0/nBrowser/Identification.cs
		System.Web.Configuration_2.0/nBrowser/File.cs
		System.Web.Configuration_2.0/nBrowser/Build.cs
		System.Web.Configuration_2.0/nBrowser/Node.cs
		System.Web.Configuration_2.0/nBrowser/Exception.cs
		
++ System.Web.UI.WebControls.Adapters/ChangeLog	(working copy)

	* WebControlAdapter.cs, HierarchicalDataBoundControlAdapter.cs,
	DataBoundControlAdapter.cs: changed to use ControlAdapter.control
	instead of using base.Control or using a new control field.
	
	* MenuAdapter.cs: added	internal constructor that takes a Menu
	parameter.  The constructor is used when writing unit tests.
	
	* MenuAdapter.cs (OnInit, OnPreRender, RenderBeginTag, 
	RenderContents, RenderEndTag): delegate to base instead of
	Control.
	
	* MenuAdapter.cs (LoadAdapterControlState, SaveAdapterControlState,
	RaisePostBackEvent, RenderItem): implemented.
	

	* WebControlAdapter.cs (RenderContents): changed to call 
	control.RenderContents() instead of control.Render().
	
	* WebControlAdapter.cs, HierarchicalDataBoundControlAdapter.cs,
	DataBoundControlAdapter.cs, HideDisabledControlAdapter.cs: added
	internal constructor that takes a parameter of the corresponding
	Control type.  The construct is used when writing unit tests.

++ System.Web.Configuration_2.0/ChangeLog	(working copy)

	* nBrowser/Result.cs, nBrowser/NodeTypes.cs, nBrowser/Identification.cs,
	nBrowser/File.cs, nBrowser/Build.cs, nBrowser/Node.cs, 
	nBrowser/Exception.cs: added.  The code under nBrowser handles *.browser
	files.  It is based on Owen "Ocean" Brady's code, with the following 
	changes and improvements.  Replaced Result.Adapter 
	property with AdapterTypeMap property which maps control Type to adapter
	Type.  Added Result.MarkupTextWriter property.  Added overrides for
	Result.GetAdapters and Result.GetTagWriter to return MarkupTextWriter
	and AdapterTypeMap, resp.  Changed tree building algorithm to not
	depend on nodes with id="Default" and to inject defaultBrowser nodes
	as parents of regular nodes with the same ids.  Changed Node.cs to use
	Item instead of Add when adding a capability or sample header, so that
	values get replaced instead of appended.  Added support for reference 
	nodes (ie. nodes with refID="someID").
		
	* CapabilitiesResult.cs: load RandomRoboBotKeywords.txt resource
	using the correct name.
	
	* RandomRoboBotKeywords.txt: added 

	* HttpCapabilitiesBase.cs (CreateHtmlWriter, Adapters): Added
	support for *.browsers.  Adapters property calls internal virtual
	GetAdapters() method which is overrided in nBrowser.Result 
	returned by nBrowser code.  CreateHtmlWriter uses type specified
	by TagWriter property.
	
++ System.Web.UI.WebControls/ChangeLog	(working copy)

	* DetailsView.cs, ListControl.cs, DataBoundControl.cs, 
	FormView.cs, HierarchicalDataBoundControl.cs, WebControl.cs: 
	added support for using ControlAdapters when present.
	
	* WebControl.cs: fixed implementation of IsEnabled to match 
	documentation.

	* Menu.cs (RenderMenuBody): call Adapter.RenderItem() instead of 
	RenderMenuItem() if an adapter is present.  MenuAdapter.RenderItem() 
	calls back to new Menu.RenderItem() internal method which calls
	RenderMenuItem() with the appropriate parameters.

++ System.Web.Configuration/ChangeLog	(working copy)

	* HttpCapabilitiesBase.cs: changed to use nBrowser for *.browser 
	support.  Also added internal GetConfigCapabilities_called
	flag used by ControlAdapterTest.ConfigCapabilitiesNotCalled() to 
	test that GetConfigCapabilities() is not called during normal page
	processing when there are no files in App_Browsers/.


svn path=/trunk/mcs/; revision=97824
2008-03-09 22:55:22 +00:00
Igor Zelmanovich d192022d97 2008-02-28 Igor Zelmanovich <[email protected]>
* Control.cs:
	fixed exception propagation in case of multiple control with same id
	were found.	 

svn path=/trunk/mcs/; revision=96858
2008-02-28 11:20:48 +00:00