Sorry, I sent the old patch in the last message. This is the correct one.
> -----Original Message----- > From: Andrew Skiba > Sent: Sunday, May 21, 2006 17:12 > To: 'Chris Toshok' > Cc: mono-devel-list@lists.ximian.com > Subject: improved patch for ApplyTheme > > Hello, Chris. > > Sorry for the late answer. Please look at the test in > sys.web/Tests/standalone/themes/PageLinks. On dotnet it outputs > > child.set_ImageUrl > child.OnInit > parent.set_ImageUrl > parent.OnInit > page.OnInit > > The property setters set_ImageUrl are called when the theme > is applied. > > This is the output of unpatched sys.web: > > page.OnInit > child.OnInit > parent.OnInit > > In addition to the incorrect flow, this test shows the > invalid behaviour (missing image). After applying the patch, > both the flow and the image are fixed. > > Here is how the flow changed. Was: > > 1. InitializeTheme + ApplyThemeRecursive (incorrect > recursion, should be in the same depth-first search as > OnInit) 2. Init Recursive 3. ApplyMasterPage > > As result, 'ApplyThemeRecursive' did not affect any controls > related to the master page feature. > > After the fix the flow became: > > 1. Initialize Theme > 2. ApplyMasterPage > 3. InitRecursive + ApplyTheme > > As a result, when the theme is applied, all the controls are > already created. > > When I started to trace the order of set_ImageUrl, I found a > mistake in my previous patch: first child.OnInit should be > called, and only then ApplyTheme. Anyway, it's easy to see > that on dotnet ApplyTheme (however it's named) is called > during the same tree travel as OnInit. > > If no one objects I will commit. > > Andrew. >
ApplyTheme.patch
Description: ApplyTheme.patch
_______________________________________________ Mono-devel-list mailing list Mono-devel-list@lists.ximian.com http://lists.ximian.com/mailman/listinfo/mono-devel-list