2008-06-26  Chris Toshok  <toshok@ximian.com>

	* dirty.cpp (Surface::ProcessDownDirtyElements): add code to
	re-sort the children by zindex.

	* dirty.h (enum DirtyType): add DirtyChildrenZIndices.

	* panel.cpp (Panel::OnCollectionChanged): don't resort-by-zindex
	here.  just add it to the dirty list.

	* transform.h, transform.cpp: move the OnSubPropertyChanged method
	to MatrixTransform, so we can notify our listeners with the right
	property.

2008-06-26  Chris Toshok  <toshok@ximian.com>

	* transform.h, transform.cpp (Transform::OnSubPropertyChanged): we
	need this to deal with sub-dependencyobjects of transforms (in
	this case, MatrixTransform's Matrix object.)  when you set
	properties on these subobjects, we need to update the transform.

2008-06-26  Chris Toshok  <toshok@ximian.com>

	* brush.h, brush.cpp (Brush::OnSubPropertyChanged): add this (i
	think it used to be there and was removed by me in a flurry of
	propertychanged event fixing way back) to take care of brushes
	properly causing the uielement to invalidate when the Brush's
	transform/relativetransform changes.

2008-06-26  Sebastien Pouliot  <sebastien@ximian.com>

	* geometry.h: #ifdef out GeometryFlags until we start using it.
	* shape.cpp: Remove unused global variable.

2008-06-26  Rolf Bjarne Kvinge <RKvinge@novell.com> 

	* mplayer.cpp: AudioFinished: Check if we still have audio when the
	  callback is reached. Fixes test-double-stop.html.

2008-06-26  Rolf Bjarne Kvinge <RKvinge@novell.com> 

	* mplayer.cpp: When calculating start_time take into account current
	  position. Fixes test-video-only-seek.html (and fox seeking without
	  audio).

2008-06-25  Jeffrey Stedfast  <fejj@novell.com>

	* mms-downloader.cpp: Got rid of overuse of this-> and some int vs
	uint comparisons.

2008-06-25  Sebastien Pouliot  <sebastien@ximian.com>

	* geometry.cpp: Cache bounds, both logical and "physical" for
	PathFigure. This reduce the number of time we need to call 
	cairo_[path|stroke|fill]_extents functions and speed up many
	sites.
	* geometry.h: Add stuff needed for geometry.cpp changes.
	* xaml.cpp: Change geometry_from_str to directly create a 
	moon_path and avoid the PathFigure[Collection] DO. This match
	how Silverlight handle Path Markup Language (PML) and reduce
	memory requirements when huge PML are used.

2008-06-24  Chris Toshok  <toshok@ximian.com>

	* shape.cpp (calc_offsets): we don't want to divide by the sin,
	because as angle approaches either 0, PI, or PI/2, the sin will
	approach 0, and therefore the deltas will grow very, very large.
	Turns out multiplying is what we want.

2008-06-24  Larry Ewing  <lewing@novell.com>

	* runtime.cpp (Surface::Resize): set the width and height properly
	in the windowless case, let the widget resize logic handle it
	otherwise.
	(Surface:render_cb): don't process dirty elements if we are in a
	zombie state, just clear the dirty lists and move on.  Fixes a
	crash we were seeing when calling ForceRender on a zombie plugin.

2008-06-24  Chris Toshok  <toshok@ximian.com>

	* runtime.cpp: in the switch from function pointer to integer in
	the HandleMouseEvent stuff, I didn't catch that C++ apparently
	doesn't flag NULL as different from 0.  This was causing the
	"HandleMouseEvent (NULL" to become effectively become
	"HandleMouseEvent (UIElement::DestroyedEvent" which of course
	breaks all sorts of things.  In bug 401884 it was causing the
	namescope to drop the named item from its hashtable, causing the
	tattoo needle to not move vertically.

2008-06-23  Chris Toshok  <toshok@ximian.com>

	* uielement.cpp (UIElement::PreRender): comment from the code is
	changelog-worthy:
	
	we need this check because ::PreRender can (and will) be called
	for elements with empty regions.
	
	The region passed in here is the redraw region intersected with
	the render bounds of a given element.  For Panels with no
	width/height specified in the xaml, this region will be
	empty. (check panel.cpp::FrontToBack - we insert the ::PreRender
	calling node if either the panel background or any of the children
	intersect the redraw region.)  We can't clip to the empty region,
	obviously, as it will keep all descendents from drawing to the
	screen.

2008-06-23  Chris Toshok  <toshok@ximian.com>

	* uielement.h, uielement.cpp (UIElement::ShiftPosition): virtualize
	the "bounds.x = p.x; bounds.y = p.y" code, since subclasses have
	other, more specialized bounds that also need updating.

	* panel.h, panel.cpp (Panel::ShiftPosition): new method, chain up
	to UIElement::ShiftPosition and also update bounds_with_children.

	* stylus.h, stylus.cpp (InkPresenter::ShiftPosition): new method,
	chain up to Canvas::ShiftPosition, and also update render_bounds.

2008-06-23  Chris Toshok  <toshok@ximian.com>

	* canvas.cpp (Canvas::OnSubPropertyChanged): allow switching
	between UpdatePosition and UpdateTransform according to the
	updatepos=yes/no override.

	* runtime.h, runtime.cpp: add updatepos=yes/no override.
	
2008-06-23  Michael Dominic K.  <mdk@mdk.am>

	* clock.cpp: Fixing a problem with repeating animations. Fixes #401983.

2008-06-21  Rolf Bjarne Kvinge <RKvinge@novell.com> 

	* media.cpp: Don't check markers if from > to, no markers will ever be
	  found in that interval. Also detect forward seeks by checking the
	  difference between from and to, if difference > 1s, behave as a
	  seek (and don't emit markers in that interval). 
	* pipeline-ffmpeg.cpp: Give more missing information to ffmpeg.

2008-06-20  Jeffrey Stedfast  <fejj@novell.com>

	* animation.h: Added "Property Accessor" comments and grouped the
	property accessors, etc.

	* dependencyobject.cpp (EventObject::SetSurface): Reworded debug
	printf.
	(EventObject::AddTickCall): Same.

	* dependencyobject.h (EventObject::GetSurface): Don't amke this
	virtual, nothing overrides it currently.

2008-06-20  Michael Dominic K.  <mdk@mdk.am>

	* animation.cpp:
	* animation.h:
	* clock.cpp:
	* clock.h: When detaching/reattaching to Surface execute a special
	handler on clocks that (in case of animation clocks) removes the update
	property handler. This fixes the (regressed some time ago)
	StoryboardEnterLeave semantics test.

2008-06-19  Jackson Harper  <jackson@ximian.com>

	* animation.h: 
	* type-generated.cpp: Make sure the content property is set.

2008-06-19  Larry Ewing  <lewing@novell.com>

	* uielement.cpp (UIElement::PreRender): work around what appears
	to be a bug in the ftb logic by not clipping to the render region.

	* clock.cpp (SystemTimeSource::Start): make the timer priority
	DEFAULT again since otherwise we can get into starvation
	situations.

	* uielement.cpp (UIElement::PreRender): don't save/restore around
	the clip changes, they restrict the group bounds and speed up
	opacity related masking substantially.  (See bubblemark).

2008-06-19  Jeffrey Stedfast  <fejj@novell.com>

	* font.cpp (FontFace::GetExtents): Only set face pixel size if the
	requested size is not what we already have set.
	(FontFace::LoadGlyph): Same.
	(FontFace::Kerning): Need to set pixel sizes here or our kerning
	could be off.

2008-06-19  Chris Toshok  <toshok@ximian.com>

	* canvas.cpp (Canvas::OnSubPropertyChanged): call
	ui->UpdatePosition instead of UpdateTransform.  Since
	UpdateTransform calls UpdateBounds, this should save us a
	sometimes costly (in the case of Shape's) trip through
	ComputeBounds.

	* uielement.h, uielement.cpp: Add UpdatePosition (adds the dirty
	node) and ComputePosition (called from ProcessDownDirtyElements.)
	(UIElement::ComputePosition): Apply the inverse absolute transform
	to the bounds x/y, compute the new transform, then reapply it to
	the bounds x/y to compute our new position.
	(UIElement::UpdateTransform): clear the DirtyPosition flag.
	(UIElement::UpdatePosition): only add the DirtyPosition flag if
	the Dirty*Transform flags aren't already set.

	
	* dirty.cpp (Surface::ProcessDownDirtyElements): add blocks for
	Clip, LocalClip, and Position (only Position is implemented).

	* dirty.h: clean up the enum some, and add 3 new passes (only one
	of which, DirtyPosition, is implemented).

2008-06-19  Jeffrey Stedfast  <fejj@novell.com>

	* transform.cpp: Started adding property accessor methods.

	* canvas.cpp (Canvas::[G,S]etLeft): Implemented.
	(Canvas::[G,S]etTop): Same.

	* uielement.cpp (UIElement::[G,S]etLeft): Moved to Canvas.
	(UIElement::[G,S]etTop): Same.

2008-06-19  Chris Toshok  <toshok@ximian.com>

	* rect.h: add Get{Top,Bottom}{Left,Right} methods.

	* point.h, point.cpp: add Transform method.

2008-06-19  Michael Dominic K.  <mdk@mdk.am>

	* animation.cpp: In a *AnimationUsingKeyFrames if we don't have any
	keyframes specified the duration is 0, not Automatic. This fixes the 
	http://www.etonline.com/silverlight/grammys50/ website.

2008-06-18  Sebastien Pouliot  <sebastien@ximian.com>
	
	* geometry.cpp: Use the new moon-path functions for ArcSegment
	and QuadraticBezierSegment
	* moon-path.c: Change some validation to use g_return_if_fail

2008-06-18  Jeffrey Stedfast  <fejj@novell.com>

	* runtime.cpp (Surface::ShowFullScreenMessage): Simplified to use
	SetLeft().

	* control.cpp (Control::GetTransformFor): Simplified.

	* uielement.cpp (UIElement::SetLeft): Added for setting
	Canvas.Left property.
	(UIElement::GetLeft): Same.
	(UIElement::SetTop): Same.
	(UIElement::GetTop): Same.

	* canvas.cpp (Canvas::GetTransformFor): Simplified.

2008-06-18  Sebastien Pouliot  <sebastien@ximian.com>

	* shape.cpp: When possible (i.e. if we won't change the bounds
	anyway)	avoid the second pass inside Shape::ComputeStretchBounds.
	This reduce (but does not eliminate) a BIG bottleneck for SL
	applications with many path using stretch (e.g. SL world).

2008-06-18  Geoff Norton  <gnorton@novell.com>

	* media.cpp: The state when Seeking should not be changed to Stopped.
	Fixes another test.

2008-06-17  Jeffrey Stedfast  <fejj@novell.com>

	Partial fix for bug #400657.

	* dependencyobject.cpp (DependencyObject::IsValueValid): If the
	value is a null dependency object, don't check that the types
	match - it doesn't matter.

	* color.cpp (color_to_string): New convenience utility function to
	aid in debugging. Returns a pointer to a static string buffer, so
	be careful...

2008-06-17  Rolf Bjarne Kvinge <RKvinge@novell.com> 

	* playlist.cpp, playlist.h: Only unref/null out the media in
	  PlaylistEntry::Stop if we're a playlist and not if we're a single
	  file.

2008-06-17  Sebastien Pouliot  <sebastien@ximian.com>

	* moon-path.c|h: Add moon_quad_curve_to and moon_arc_to so they
	can be reused without a PathFigure-derived instance. Refactor
	code to expand/realloc paths to reduce duplication.

2008-06-16  Chris Toshok  <toshok@ximian.com>

	* uielement.cpp (UIElement::OnPropertyChanged): call
	Invalidate(GetSubtreeBounds()) and UpdateBounds() directly instead
	of FullInvalidate.
	(UIElement::OnSubPropertyChanged): same.

2008-06-17  Rolf Bjarne Kvinge <RKvinge@novell.com> 

	* playlist.cpp: When Merging items only merge duration if the source
	  has duration.
	* media.cpp: MediaElement::MediaOpened: when setting the media on the
	  current item in the playlist, make sure we set the media on a
	  PlaylistEntry, not on a (nested) Playlist.

2008-06-16  Jeffrey Stedfast  <fejj@novell.com>

	* yuv-converter.cpp (YUVConverter::YUVConverter): Replace
	g_error() with g_warning(). There's really nothing else we can do
	here...
	(YUVConverter::Convert): Check if rgb_uv is NULL, if it is try
	allocating it again? Maybe some resources have been released since
	the ctor was called?

	* pipeline-ffmpeg.cpp (FfmpegDecoder::DecodeFrame): Replace
	g_error() with a g_warning() and return MEDIA_OUT_OF_MEMORY error.

	* mplayer.cpp (MediaPlayer::Open): Change g_error() into a
	g_warning() and return fail.

2008-06-16  Michael Dominic K.  <mdk@mdk.am>
	
	* clock.cpp: Don't do the ExtraRepeat action when seeking.

2008-06-16  Rolf Bjarne Kvinge <RKvinge@novell.com> 

	* media.cpp, media.h: Move Play/Pause due to AutoPlay logic into one
	  method.
	* playlist.cpp: When we stop, clear out our media. This fixes an issue
	  where we didn't correctly download a file if it was stopped after
	  it was opened, but before fully downloaded, and then restarted.

2008-06-13  Jeffrey Stedfast  <fejj@novell.com>

	* dependencyobject.cpp (include): stdlib.h for strtol()

	Fix for jumping to the last page in PageTurn.

	* uielement.cpp (UIElement::OnSubPropertyChanged): Need to call
	UpdateTotalRenderVisibility() when the clip changes.

2008-06-13  Michael Dominic K.  <mdk@mdk.am>

	* animation.cpp:
	* moon-curves.c:
	* moon-curves.h: Cleaning up the KeySpline curve implementation a bit.

2008-06-13  Michael Dominic K.  <mdk@mdk.am>

	* Makefile.am:
	* animation.cpp:
	* animation.h:
	* moon-curves.c:
	* moon-curves.h: First version of the new algho for calculating the "y
	at x" for KeySplines, now with 200% more accuracy guaranteed! Fixes the
	AnimationMatrix2 test.

2008-06-12  Jackson Harper  <jackson@ximian.com>

	* xaml.cpp: Remove some cruft.
	- Rename Custom to Managed
	- We don't need element maps for the namespaces anymore
	- Deploy can go into the default list of namespaces.

2008-06-12  Fernando Herrera  <fherrera@novell.com>

	* playlist.cpp: Parse ASX2 files using GKeyFile API to have sane NULL
	terminated strings. Also keep any uri paramson the mms Ref.

2008-06-12  Jackson Harper  <jackson@ximian.com>

	* xaml.cpp: Use the new stuff for creating wrapped types.
	- make XamlElementInstance pure virtual.

2008-06-12  Jackson Harper  <jackson@ximian.com>

	* xaml.cpp: Clean up API for creating wrapped dependency objects.

2008-06-12  Rolf Bjarne Kvinge <RKvinge@novell.com> 

	* type.cpp: Fix type verification to not check 2.0 types for 1.0
	  builds.

2008-06-12  Rolf Bjarne Kvinge <RKvinge@novell.com> 

	* media.cpp, media.h: Don't AutoPlay playlists which have already been
	  autoplayed. Make Play/Pause/Stop/Seek async.
	* playlist.cpp, playlist.h: Add a AutoPlayed field to Playlist.

2008-06-12  Chris Toshok  <toshok@ximian.com>

	* control.cpp, control.h, deployment.h, frameworkelement.h,
	grid.h, runtime.cpp, size.h, type-generated.cpp, type.h,
	uielement.h, value.h, xaml.cpp: I was a little too aggressive.  we
	can't use SL_2_0 in most places in headers (or rather, shouldn't).
	It might be a good idea to remove all references to it, but this
	at least gets the ms-tests running and passing again --with-mono.
	Switch to using SL_2_0 around the #includes in the .cpp files, and
	in value.h/type.h just include the 2.0 types.

	* usercontrol.h, usercontrol.cpp: split out the code from
	control.h, control.cpp here.

	* Makefile.am: add usercontrol.[h,cpp]

	* typegen/typegen.cs: fix up the header emission.

2008-06-12  Sebastien Pouliot  <sebastien@ximian.com>

	* geometry.cpp|h: Refactor work between PathGeometry and PathFigure
	ComputeBounds to avoid creating/destroying a new cairo context for
	each figure (it's now shared). Refactor PathFigure::Build not to scan
	the path list twice and rely on moon-path automatic size increase.
	Also avoid cairo_fill_extents if the path can't be filled or no fill
	brush is present.

2008-06-12  Rolf Bjarne Kvinge <RKvinge@novell.com> 

	* runtime.cpp: CreateDownloader: don't allow creating downloaders if we
	  can't get a surface, nor if the surface is a zombie.
	* text.cpp, playlist.cpp, media.cpp: Surface::CreateDownloader may
	  return NULL now, add a null check.

2008-06-11  Jackson Harper  <jackson@ximian.com>

	* xaml.cpp: Move GetKind to the info.  Doesn't make sense for
	Instances to have a kind (they can access their kind from their
	info).

2008-06-11  Sebastien Pouliot  <sebastien@ximian.com>

	* geometry.cpp: Remove unneeded cairo_save|restore inside Draw 
	methods (since Shape::Draw already does it) and remove
	cairo_set_fill_rule (since Shape::Fill does it).

2008-06-11  Jackson Harper  <jackson@ximian.com>

	* xaml.cpp: Clean up the namespace map when destroying the parser.

2008-06-11  Sebastien Pouliot  <sebastien@ximian.com>

	* geometry.h: Fix GeometryGround::ComputeBounds so it does
	not always returns 0,0,0,0 (from Geometry).

2008-06-11  Geoff Norton <gnorton@novell.com>

	* downloader.cpp: Only Abort if we have a surface.
	* runtime.cpp: Detach the downloaders when we zombify.

2008-06-11  Sebastien Pouliot  <sebastien@ximian.com>

	* moon-path.c: Reorder ellipse points so the fill rule can be 
	applied correcly (e.g. filling or clipping).

2008-06-11  Michael Dominic K.  <mdk@mdk.am>

	* clock.cpp: Fixing seeking on nested storyboards. Fixes
	seek-test-nested-storyboard.xaml in assorted and one more
	AnimationMatrix2 block. Now only one left to fix...

2008-06-10  Geoff Norton  <gnorton@novell.com>

	* mms-downloader.cpp: Reset our internal state after seeking so
	we can resume the stream in the right place.

2008-06-10  Geoff Norton  <gnorton@novell.com>

	* mms-downlodaer.cpp: Remove some improperly commited debug code

2008-06-10  Chris Toshok  <toshok@ximian.com>

	* control.h, control.cpp, deployment.h, uielement.h,
	uielement.cpp, frameworkelement.h, value.h, grid.h, size.h, xap.h,
	runtime.cpp: wrap everything SL2.0 with INCLUDE_MONO_RUNTIME (for
	now.  I'll be changing that ifdef soon.)  Also, mark all 2.0
	specific types with the following typegen pragma: /*
	@SilverlightVersion="2" */ so that the generated files contain the
	proper ifdefs as well.

	* type-generated.cpp, type.h, value.h: resync with new ifdefs.

2008-06-10  Jackson Harper  <jackson@ximian.com>

	* dependencyobject.cpp: Add todo for Name validation.

2008-06-11  Fernando Herrera  <fherrera@novell.com>

	* xaml.cpp: Accept numbers and strings representing numbers as
	values for BOOL properties. Also accept "true" and "false" case
	variants.
	* playlist.cpp: ASX2 files can use ?MSWMExt=.asf and &MSWMExt=.asf
	ending uris, so just check for "MSWMExt=.asf".
	Fixes hsn.tv, bug #362328.

2008-06-10  Jackson Harper  <jackson@ximian.com>

	* xaml.cpp: ContentProperty should be on the ElementInfo not the
	ElementInstance, since you can only have one content property per
	a type.

2008-06-10  Geoff Norton  <gnorton@novell.com>
	
	* mms-downloader.cpp: Fix some looping logic when seeking (partially
	fixed).  Fix a typo when enumerating the streams array to not exceed
	the bounds.

2008-06-10  Jackson Harper  <jackson@ximian.com>

	* xaml.cpp: Remove default prefix override check.  This must have
	only been in one of the early versions of SL because I can't get
	SL to do it anymore.  This helps fix video page turn.

2008-06-10  Jackson Harper  <jackson@ximian.com>

	* xaml.cpp: Remove x:Code since this isn't used in SL 2.0.

2008-06-10  Chris Toshok  <toshok@ximian.com>

	* dependencyobject.h, dependencyobject.cpp: split the Emit()
	machinery up into 3 methods.  StartEmit, DoEmit, and FinishEmit.
	StartEmit returns a context object passed to the other two
	methods.

	* runtime.h, runtime.cpp: use the new
	EventObject::{Start,Do,Finish}Emit methods to make event bubbling
	more transactional - any changes made to the listener list for the
	event we're bubbling up, for any element in our input list, are
	delayed until after the event has propagated.  Fixes our test id
	191 (test-bubbling.html) as well as bug #351568.

2008-06-10  Sebastien Pouliot  <sebastien@ximian.com>

	* shape.cpp|h: Don't call ComputeShapeBounds(true) unless we need
	its value (i.e. Stretch != None). Make Shape::ComputeShapeBounds
	reuse it's physical bounds for logical instead of computing it 
	twice.

2008-06-10  Michael Dominic K.  <mdk@mdk.am>

	* animation.cpp:
	* animation.h:
	* clock.cpp:
	* clock.h: Replacing CreateClock with AllocateClock implementation and
	making sure the latter is called for Storyboards. That fixes the nested
	storyboards inside other storyboards...
	test-animation-nested-storyboard.xaml and one step more for
	AnimationMatrix2.

2008-06-10  Rolf Bjarne Kvinge <RKvinge@novell.com> 

	* dependencyobject.h: Another greppable comment.

2008-06-10  Rolf Bjarne Kvinge <RKvinge@novell.com> 

	* dependencyobject.cpp: Add comment to assert which shows up while
	  grepping.

2008-06-06  Geoff Norton  <gnorton@novell.com>

	* file-downloader.h: Fix a bug between argument sending and class
	variables that was causing us to free and strdup the free'd pointer.

2008-06-06  Rolf Bjarne Kvinge <RKvinge@novell.com> 

	* mms-downloader.cpp: Return NULL from GetDownloadedFilename and
	  GetResponseText.

2008-06-06  Rolf Bjarne Kvinge <RKvinge@novell.com> 

	* src.mdp: Updated.

2008-06-06  Jeffrey Stedfast  <fejj@novell.com>

	* xaml.cpp: Don't use the c++ ctor initializer stuff, it breaks if
	members change order (like it did recently).
	(wrap_dependency_object): Get rid of unused variables.

	* media.cpp (Image): Made bools share a single int.

2008-06-06  Jackson Harper  <jackson@ximian.com>

	* xaml.cpp: Use the Type system for looking up elements, make
	things a little more OOP so we can easily add some of the 2.0
	features.  Note:  This is going to break x:Code and deployment
	temporarily.
	
2008-06-05  Geoff Norton  <gnorton@novell.com>

	* downloader.cpp, downloader.h: More refactoring to hide the zip related
	details in the FileDownloader.  NOTE: The exposure of the file downloader
	to the Text side is ugly and should be cleaned up.
	* text.cpp: Access obfuscated font details thru the FileDownloader API.
	* file-downloader.cpp, mms-downloader.cpp, internal-downloader.h: Expose
	the filename thru the downlodaer api.
	* downloader.cpp: No longer leak InternalDownloaders.

2008-06-05  Geoff Norton <gnorton@novell.com>

	* mms-downloader.cpp, mms-downloade.h: Implement time measuring of
	the $P packet pair, and implement and initial algorithm to do proper
	bandwidth stream selection.

2008-06-05  Geoff Norton <gnorton@novell.com>
	
	* downloader.cpp:  Remove some left over unused variables, and the
	is_valid_mms_type inline.

2008-06-05  Geoff Norton <gnorton@novell.com>

	* Makefile.am: Add file-downloader and mms-downloader to the build.
	* file-downloader.(cpp|h): This class is a implementation of the new
	InternalDownloader class utilized by the downloader to differentiate
	between MMS and regular requests.  We should move the zip logic here.
	* mms-downloader.(cpp|h): This class is the MMS implementation of the
	InternalDownloader class.
	* internal-downloader.h: Route callbacks from the plugin thru this class
	to their appropriate file (NPStream) / MMS based implementations.
	* downloader.cpp: Update the API to call the InternalDownloader based
	representation instead of large if (mms) branches.

2008-06-05  Geoff Norton  <gnorton@novell.com>

	* downloader.cpp, downloader.h:  Initial implementation of MMS inside
	libmoon.  The API has been extended to register two additional callbacks
	to set HTTP headers, and the HTTP body.

2008-06-05  Michael Dominic K.  <mdk@mdk.am>

	* xaml.cpp: Removing the "broken parsing" of RepeatBehavior in
	--with-compatibility-bugs mode. It looks like the parsing is fine. The
	bug is now "implemented" in clock.cpp.

2008-06-05  Michael Dominic K.  <mdk@mdk.am>

	* clock.cpp: In ComputeNewTime when we're going over our duration time
	and we're AutoReversed, check actually how big the diff is cause it
	might be that we need to "wrap around self" and switch to forward time
	direction anyways (such is the case with seeking). 

	In other words, allow to seek into particular interation of
	RepeatBehavior="XXXx", not only the first one. Fixes one more
	AnimationMatrix2 block and seek-test-multiple-repeat.xaml in assorted.

	This prolly needs a littlbe bit more work still, similiar mechanism
	needs to be present in DoRepeat etc.

2008-06-05  Stephane Delcroix  <sdelcroix@novell.com>

	* stylus.cpp: fixing a bug. stupid me.

2008-06-05  Stephane Delcroix  <sdelcroix@novell.com>

	* rect.h: new Rect (Point, Point) ctor, new ExtendTo (point) and
	ExtendTo (double, double) methods.

	* stylus.h|cpp: new StylusPointCollection::GetBounds (), check for
	intersection of bounds and StylusPointCollection::GetBounds in HitTest
	to avoid checking for stroke intersection in most of the cases. Speed
	up erasing in inkJournal.

2008-06-04  Michael Dominic K.  <mdk@mdk.am>

	* clock.cpp: Interesting -- looks like in SL the timespan-based 
	RepeatBehavior is scaled by the SpeedRatio. Ie. 00:00:10 with SpeedRatio
	0.5 becomes 00:00:05. I wonder if it's a bug or intended feature?
	Anyways, implementing this and fixing two more blocks in
	AnimationMatrix2.

2008-06-04  Michael Dominic K.  <mdk@mdk.am>

	* clock.cpp: Slightly reworking the seek offsett calculations to include
	the SpeeRatio multiplier but do not apply it to BeginTime. Fixes one
	more block in AnimationMatrix2 and the test-seek-spee-ratio-begin.xaml
	assorted test.

2008-06-04  Michael Dominic K.  <mdk@mdk.am>

	* clock.cpp: When seeking include the SpeedRatio calculations. Fixes the
	test-seeking-speed-ratio.xaml from assorted tests and one more block in
	the AnimationMatrix2 test. 

2008-06-03  Jeffrey Stedfast  <fejj@novell.com>

	* control.cpp (user_control_new): %p does what %x was trying to do
	in this case, but without compile warnings :)

2008-06-03  Jeffrey Stedfast  <fejj@novell.com>

	Glyphs rendering optimization.

	* text.cpp (Glyphs::Layout): Accumulate the glyph paths here
	instead of re-looping this logic again in Glyphs::Render().
	(Glyphs::Render): Just blit the path.

2008-06-03  Chris Toshok  <toshok@ximian.com>

	* dependencyobject.cpp (DependencyObject::SetValue): Simplify this
	a bunch and remove all the redundant checks.
	
	(DependencyObject::MergeTemporaryNameScopes): merge both DO and
	Collection versions into the same method to reduce code
	duplication.

	* dependencyobject.h: no need to provide multiple overloads for
	MergeTemporaryNameScopes.

2008-06-03  Jeffrey Stedfast  <fejj@novell.com>

	Text rendering optimization via reduction of font loading.

	* font.cpp (FontFace): A new abstraction for FT_Face which is
	meant to prevent Moonlight from ahving to load the same font face
	multiple times just because the FontSize attributes don't match.
	(TextFont): Greatly simplified this class by using FontFace.

2008-06-02  Jackson Harper  <jackson@ximian.com>

	* xaml.cpp: Make sure we don't try to look up Content Properties
	on anything but elments.  Property elements are given the
	XamlElementInfo of their parent so GetContentProperty on a
	PROPERTY element will return the parent's content property.

2008-06-02  Michael Dominic K.  <mdk@mdk.am>

	* clock.cpp: If we have duration-based RepeatBehavior set the
	repeat_count to 1 in bug-mode (--with-compatibility-bugs).

2008-06-02  Michael Dominic K.  <mdk@mdk.am>
	
	* xaml.cpp: SL seems to correctly parse 0:0:0 TimeSpans in "bug-mode"
	even.

	* clock.cpp: Remove the RepeatBehavior=1.0 forcing in Validate when
	RepeatBehavior=0:0:0.

2008-06-02  Michael Dominic K.  <mdk@mdk.am>

	* clock.cpp: Even more timeline validation rules.

2008-06-02  Sebastien Pouliot  <sebastien@ximian.com>

	* font.cpp: Use the existing DOUBLE_FROM_26_6 instead of dividing
	by 64.0	since this makes it clear why we're doing it.

2008-05-30  Michael Dominic K.  <mdk@mdk.am>

	* clock.cpp: Don't validate animations that have Duration of "00:00:00"
	and RepeatBehavior="Stop". That is what SL does. Fixes the clock41.xaml
	test.

2008-05-30  Michael Dominic K.  <mdk@mdk.am>

	* xaml.cpp: Adding a compatibility option
	(--with-compatibility-bugs=yes) that introduces a Silverlight 1.0
	RepeatBehavior bug.

2008-05-30  Michael Dominic K.  <mdk@mdk.am>

	* clock.cpp: Ceil the delta and ret_time. This is a very poor-man's
	protection against the desync's coming from integers (TimeSpan) being
	multiplied by floating values (SpeedRatio). Better to be non-precise
	forward than backward.

2008-05-30  Michael Dominic K.  <mdk@mdk.am>

	* clock.cpp: The initial ticking difference needs to be multiplied by
	the SpeedRatio as well. This fixes few timing desyncs. Fixes
	clock40.xaml, test-animation-hold-stop-speed.xaml and the RoyalBlue
	block from the AnimationMatrix2.

2008-05-29  Jeffrey Stedfast  <fejj@novell.com>
	
	* media.cpp (Image::OnPropertyChanged): Just like MediaElement, if
	you set an Image's Source property to an empty string (or null),
	it stops rendering the image.

2008-05-29  Stephane Delcroix  <sdelcroix@novell.com>

	* stylus.cpp: fix intersect_line_2d to fix the inkJournal thing.

2008-05-29  Jeffrey Stedfast  <fejj@novell.com>

	* layout.cpp|h (TextRun::IsUnderlined): Replacement for
	TextLayout::IsUnderline().
	(TextLayout::IsUnderline): Removed.

	* font.h (enum TextDecorations): Add a comment explaining that
	this is meant to be used as bit flags and not a normal
	enumeration.

2008-05-29  Sebastien Pouliot  <sebastien@ximian.com>

	* font.h: Revert TextWrapping change as it regress DRT tests
	(it's possible that the value were right, but did not match
	the managed value used by Silverlight 1.1).

2008-05-29  Jackson Harper  <jackson@ximian.com>

	* type.cpp: INVALID types don't have content properties.
	* dependencyobject.h: Content properties are stored on the Type so
	we don't need to store them here.
	* xaml.cpp: Get content properties from the Type system instead of
	the parser's internal type map.
	- We don't need to do any special handling in the start_element
	handler for content properties anymore.
	* control.cpp|h: We don't need to expose the content property
	anymore.
	- Mark the content property for controls.
	
2008-05-29  Sebastien Pouliot  <sebastien@ximian.com>

	* font.h: Fix enum values for TextWrapping
	* layout.cpp: Fix regression (in earlier commit) for wrapping.

2008-05-29  Rolf Bjarne Kvinge <RKvinge@novell.com> 

	* debug.cpp: Fix an invalid read issue found with valgrind.

2008-05-29  Sebastien Pouliot  <sebastien@ximian.com>

	* layout.h|cpp: Handle invalid values for TextDecorations and
	TextWrapping like Silverlight does.

2008-05-29  Rolf Bjarne Kvinge <RKvinge@novell.com> 

	* runtime.cpp: When setting the background color delete any previoys
	  background color.

2008-05-29  Rolf Bjarne Kvinge <RKvinge@novell.com> 

	* uielement.cpp: Fix minor leak.

2008-05-29  Rolf Bjarne Kvinge <RKvinge@novell.com> 

	* src.mdp: Updated.

2008-05-28  Rolf Bjarne Kvinge <RKvinge@novell.com> 

	* http-streaming.cpp: Handle quoted feature strings.

2008-05-28  Rolf Bjarne Kvinge <RKvinge@novell.com> 

	* downloader.cpp: Null out request_position in the ctor.

2008-05-28  Michael Dominic K.  <mdk@mdk.am>

	* clock.cpp: Reverting the change that invalidates the timelines which
	have 00:00:00 duration. It is actually supported by SL. 

2008-05-28  Michael Dominic K.  <mdk@mdk.am>

	* clock.cpp: In Clock::ComputeNewTime all those checks are useless.
	Multiply always instead of recursing down into properties.

2008-05-28  Michael Dominic K.  <mdk@mdk.am>

	* animation.cpp: If "To" and "By" are not specified use the
	defaultOriginValue always instead of "start" (which might be "From").
	Fixes the test-animation-only-from.xaml and the green block in
	AnimationMatrix2.

2008-05-28  Michael Dominic K.  <mdk@mdk.am>

	* clock.cpp: When Validating the timeline, if RepeatBehavior is
	incorrect make it 1.0 instead of marking the timeline as invalid.

2008-05-28  Rolf Bjarne Kvinge <RKvinge@novell.com> 
	
	* downloader.cpp: Fix typo.

2008-05-28  Sebastien Pouliot  <sebastien@ximian.com>

	* enums.c: Fix None value in style_simulations_map and remove
	unneeded one (they exists only in WPF but SL parser does not like
	them).
	* font.cpp|h: Fix FontStyle and FontWeigth properties when the 
	supplied value are invalid. Add new constants specific to SL.
	* text.h: Add simulation_none. Share an integer between all bool
	flags.
	* text.cpp: Invalid values for StyleSimulation does not render
	the Glyphs.
	* runtime.cpp: Invalid MouseCursor values hides the cursor.

2008-05-27  Jeffrey Stedfast  <fejj@novell.com>

	Fixes the Legend (Space Invaders) demo without breaking
	storyboard_EnterLeaveSemantics.htm.

	* clock.cpp|h (Clock::Completed): New virtual method which gets
	called when a clock completes.
	(Clock::ComputeNewTime): If a clock completes (has no more
	repeats, etc) then call ::Complete().
	(ClockGroup::ClockGroup): Changed the name of emitted_complete to
	emit_completed which has also changed the meaning a bit.
	(ClockGroup::Begin): Updated.
	(ClockGroup::RaiseAccumulatedEvents): If emit_completed is true,
	then emit the Completed event and reset emit_completed back to
	false so we don't re-emit.
	(ClockGroup::Completed): Set emit_completed to true.

2008-05-27  Rolf Bjarne Kvinge <RKvinge@novell.com> 

	* media.cpp: MediaElement: Fix refcounting for our 'media' field. In
	  DownloaderComplete only emit DownloadProgressChangedEvent if we
	  have a surface.

2008-05-27  Michael Dominic K.  <mdk@mdk.am>

	* xaml.cpp: Adding a comment/explanation about the RepeatBehavior and
	Silverlight 1.0/2.0 situation.

2008-05-26  Michael Dominic K.  <mdk@mdk.am>

	* clock.cpp: Don't validate timelines that have specified duration of
	00:00:00. Fixes the test-animation-zero-duration test.xaml.

2008-05-26  Michael Dominic K.  <mdk@mdk.am>

	* clock.cpp:
	* clock.h: When Validating the Timeline also make sure that the
	RepeatBehavior is correct, otherwise don't start the anim. Fixes the
	test-animation-zero-repeat-behavior test and brings us closer with
	AnimationMatrix2 test.

2008-05-26  Michael Dominic K.  <mdk@mdk.am>

	* clock.cpp: When Validating TimelineGroup don't forget to call parent's
	base validation method.

2008-05-26  Michael Dominic K.  <mdk@mdk.am>

	* xaml.cpp: Reverting spouliot's commit from 2008-05-08. It looks like
	SL supports the RepeatBehavior="XX:XX:XX" just fine. This fixes the
	test-aniamtion-repeat-behavior.xaml test.

2008-05-23  Rolf Bjarne Kvinge <RKvinge@novell.com> 

	* src.mdp: Updated.

2008-05-23  Sebastien Pouliot  <sebastien@ximian.com>

	* text.cpp: (Glyphs::InsideObject) Avoid expensive, and unneeded,
	cairo_save/cairo_restore since we don't use the context.

2008-05-23  Stephane Delcroix  <sdelcroix@novell.com>

	* dependencyobject.[h|cpp]: merge namescopes on SetValue.

2008-05-23  Jeffrey Stedfast  <fejj@novell.com>

	* font.cpp (TextFont::PixelsPerEM): Removed, the logic was broken.

	* text.cpp (Glyphs::Layout): Reverted previous commit and go back
	to the magic math.
	(Glyphs::Render): Same.

2008-05-22  Chris Toshok  <toshok@ximian.com>

	* stylus.h, stylus.cpp (Stroke::HitTest): correct our width/height
	code.  Only include the +2 to each side if the outline color is
	non-transparent.
	(Stroke::AddStylusPointToBounds): same.
	(Stroke::OnPropertyChanged): new method.  we need to recompute the
	bounds if our DrawingAttributes change.
	(Stroke::OnSubPropertyChanged): same, if width/height/online-color
	of the drawing attributes change.

2008-05-22  Sebastien Pouliot  <sebastien@ximian.com>

	* brush.cpp: Fix defaults when wrong values are being used for
	enumerations from Javascript.
	[Fix part of #340799]

2008-05-22  Jackson Harper  <jackson@ximian.com>

	* dependencyobject.cpp: Only merge temp namescopes.

2008-05-22  Rolf Bjarne Kvinge <RKvinge@novell.com> 

	* dependencyobject.cpp, dependencyobject.h: EventObject: instead of
	  surrounding event emission with ref/unref, set a flag specifying
	  that we're doing event emission, and catch unrefs which would cause
	  object destruction replacing them with a delayed unref.

2008-05-21  Chris Toshok  <toshok@ximian.com>

	* collection.cpp (Collection::Add): remove the check for AddToList
	returning -1.  It never will.  Also, call SetSurface() on the new
	child *before* we create the Collection::Node for it, so we can
	tell (in SetSurface) if it's being added individually to the
	surface, or as part of a subtree.  This is required to fix
	storyboard_EnterLeaveSemantics.

	* animation.cpp (Storyboard::SetSurface): resume the clock when
	we're reattached to the surface, but *only* if we're being added
	as part of a subtree (that is, we already have a logical parent
	when we hit this method.)

	* clock.cpp (Clock::Begin): revert the previous
	change (has_started needs to be initialized to false).  Required
	to fix storyboard_EnterLeaveSemantics.htm.  We'll need to figure
	out another way to fix the site (or a better way that fixes one
	without breaking the other.)

2008-05-21  Jeffrey Stedfast  <fejj@novell.com>

	* text.cpp (Glyphs::Layout): Use PixelsPerEM() instead of
	hard-coding the EM units ourselves.
	(Glyphs::Render): Same.

	* font.cpp (TextFont::PixelsPerEM): New convenience function.

	* clock.cpp (Clock::Begin): Init has_started to true. Fixes
	http://www.tek.co.jp/Legend

	* animation.cpp (Storyboard::storyboard_completed): Merged
	teardown_clockgroup() and invoke_completed() into a single
	callback. Also makes it so that we don't have to remove 2
	CompletedEvent handlers (which we were not doing properly afaict
	in Storyboard::Stop).
	(Storyboard::Stop): After unregistering the CompletedEvent handler
	and stopping the root_clock, tear down the clock group.

2008-05-21  Larry Ewing  <lewing@novell.com>

	* shape.cpp (Ellipse::BuildPath): try to shape our degenerate
	ellipses a little better.
	(Shape::ComputeStretchBounds): modify the needs_clip logic a
	little to catch the degenerate ellipse cases we were running into.

	Fixes test-shape-ellipse-stroke*.xaml.

2008-05-21  Michael Dominic K.  <mdk@mdk.am>

	* clock.cpp: Include the offsett coming from the BeginTime in the
	seek_time calculations. Fixes seek-test-begin-time and
	seek-test-wrapping-set tests. Brings us closer with AnimationMatrix2.

2008-05-21  Michael Dominic K.  <mdk@mdk.am>

	* clock.cpp: Actually do set the seek_time before using it.

2008-05-21  Michael Dominic K.  <mdk@mdk.am>

	* clock.cpp: When seeking ClockGroup, don't seek children as weel
	(results in cumulative behavior).

2008-05-21  Sebastien Pouliot  <sebastien@ximian.com>

	* font.cpp: (TextFont::Path) Avoid expensive save of cairo 
	context since only the transform is changed (current point 
	location is not part of the context).

2008-05-20  Larry Ewing  <lewing@novell.com>

	* runtime.cpp (Surface::motion_notify_callback): always return
	true in the windowed motion handler otherwise we something steals
	mouse events from us.

	Fixes most of MouseInput.htm

2008-05-20  Michael Dominic K.  <mdk@mdk.am>

	* clock.cpp: Fixing a problem where timeline with BeginTime set do not
	respond at all to Seek. Brings us closer with AnimationMatrix2.

2008-05-19  Jackson Harper  <jackson@ximian.com>

	* xaml.cpp: Only do the type wrapping if we are dealing with
	collection types, otherwise we just ignore the property decl.

2008-05-19  Jackson Harper  <jackson@ximian.com>

	* xaml.cpp: When we wrap a property we need to ignore the property
	element so that the children get added to the wrapped object
	properly.
	* dependencyobject.cpp: We also need to merge the collection's
	namescope because collections can be created with their own temp
	namescope using createFromXaml.
	
2008-05-19  Michael Dominic K.  <mdk@mdk.am>

	* animation.cpp:
	* animation.h:
	* clock.cpp:
	* clock.h: Changing ExtraRepeatHandler to ExtraRepeatAction to avoid
	confusion.

2008-05-19  Michael Dominic K.  <mdk@mdk.am>

	* animation.cpp:
	* animation.h: Adding an implementation for ExtraRepeatHandler to
	AnimationClock that fetches target value and sets it on
	AnimationStorage. Fixes clock37.xaml test.

2008-05-19  Michael Dominic K.  <mdk@mdk.am>

	* animation.cpp:
	* animation.h: Adding helper methods to get target value out of the
	given AnimationTimeline. We're still missing implementations for
	keyframe-based anims. Coming soon.

2008-05-19  Michael Dominic K.  <mdk@mdk.am>

	* animation.cpp:
	* animation.h: Adding two helper methods to AnimationStorage:
	GetStopValue (get's current base or (if set) stop value) and
	UpdatePropertyWithValue to manually force prop to a given state.

2008-05-19  Michael Dominic K.  <mdk@mdk.am>

	* clock.cpp:
	* clock.h: Addin a virtual ExtraRepeatHandler to Clock class fired on
	repeat. By default does nothing.

2008-05-19  Jackson Harper  <jackson@ximian.com>

	* xaml.cpp: When createFromXaml ('<some property>...</property>')
	is called, we need to create and return an object that represents
	that property.  ie createFromXaml ('<Canvas.Triggers>...); should
	return a ResourceDictionary object.

2008-05-17  Rolf Bjarne Kvinge <RKvinge@novell.com> 

	* downloader.cpp: Fix warnings.

2008-05-17  Rolf Bjarne Kvinge <RKvinge@novell.com> 

	* clock.cpp: Added comment.

2008-05-17  Rolf Bjarne Kvinge <RKvinge@novell.com> 

	* runtime.cpp: Destroy EventObject::objects_alive upon runtime
	  shutdown.

2008-05-16  Miguel de Icaza  <miguel@novell.com>

	* dependencyobject.h (DependencyObject::GetContentProperty):
	returns a DependencyProperty that is the target for the content of
	a XAML content assignment. 

	* xaml.cpp (XNamespace::SetAttribute): while hydrating, ignore the
	Class attribute as the object has already been created. 

	(start_element): Add support for the ContentPropertyAttribute on
	DependencyObjects to the XAML parser.       This is very primitive
	support at this point, and does not support collections, or type
	conversions as specified on the docs. 

	* control.cpp (Control::SetContent): Refactor setting the
	real_object into its own routine.     Currently takes a Surface
	parameter, not clear that this is even needed, but kept for
	compatibility with the old code. 

	(UserControl::OnPropertyChanged): Hook up setting the Content
	property.

	* runtime.cpp (Surface::Attach): Let the widget be UIElement.

2008-05-16  Larry Ewing  <lewing@novell.com>

	* shape.cpp: draw ellipses with no width/height specified as the
	ms tests indicate.

	Fixes StretchAndShapes.xaml.

2008-05-16  Rolf Bjarne Kvinge <RKvinge@novell.com> 

	* media.cpp: Abort the downloader when we emit MediaFailed, and always
	  emit a DownloadProgressChangedEvent with 1.0 when we're finished
	  downloading (we won't get any writes if the file has already been
	  downloaded and mozilla just gives us the filename).

2008-05-16  Rolf Bjarne Kvinge <RKvinge@novell.com> 

	* src.mdp: Updated.

2008-05-16  Rolf Bjarne Kvinge <RKvinge@novell.com> 

	* downloader.cpp: Don't emit any events if we don't have a surface. Add
	  warnings to Send(Internal) when we have no surface (the plugin is
	  already checking for it, so if the warning is printed we're doing
	  something else wrong).
	* runtime.h, runtime.cpp: Surface: keep a list of the downloaders we
	  create, and when the toplevel canvas changes or the surface is
	  destroyed clear the downloader's surface pointer.

2008-05-16  Jeffrey Stedfast  <fejj@novell.com>

	* downloader.cpp (Downloader::Abort): Set download progress to 0.

2008-05-16  Rolf Bjarne Kvinge <RKvinge@novell.com> 

	* downloader.cpp: Don't emit nor set DownloadProgress(ChangedEvent) in
	  NotifySize, mozilla calls NotifySize for every write.

2008-05-16  Rolf Bjarne Kvinge <RKvinge@novell.com> 

	* type.cpp, type.h, type.h.in: Added Type::LookupEventName.

2008-05-15  Rolf Bjarne Kvinge <RKvinge@novell.com> 

	* playlist.cpp: If we're stopping a playlist, reopen the first entry.
	* media.h: MediaElement: Make EmitMediaOpened and Reinitialize public
	  so that Playlist can call them.

2008-05-15  Larry Ewing  <lewing@novell.com>

	* runtime.cpp (Surface::button_press_callback): stop firefox from
	stealing our focus in the widget case by always returning true on
	button press events.  There may be a better way to handle this by
	only returning true if the press lands on and element but this at
	least improves the situation.

	Fixes FullScreenKey.htm.

2008-05-15  Michael Dominic K.  <mdk@mdk.am>

	* clock.cpp: Also apply the idle_hint when the ClockGroup itself goes to
	Filling state, this makes the idle optimization cover all the cases. Big
	perf boost expected.
	
2008-05-14  Jeffrey Stedfast  <fejj@novell.com>

	Fix for tests/xaml/test-directory-in-zip.html

	* media.cpp (Image::Image): Initialize some new state variables to
	keep track of whether or not the FrameworkElement::Width and
	Height values are ever manually set.
	(Image::DownloaderComplete): Properly set the Width/Height
	property values based on whether a particular Width/Height have
	been requested. Use the image's native width/height if not.
	(Image::OnPropertyChanged): Listen for changes to Width/Height
	properties.

2008-05-14  Larry Ewing  <lewing@novell.com>

	* src/uielement.cpp (UIElement::PostRender): clear any existing
	paths when rendering the bounds rectangle.

2008-05-14  Jeffrey Stedfast  <fejj@novell.com>

	* media.cpp (MediaElement::MediaOpened): Use GetAutoPlay() instead
	of the more complex GetValue API.

	* pipeline.cpp (IMediaSource::ReadSome): Don't return false on
	error, return -1 (since this is an int32 return value, not bool).

2008-05-14  Rolf Bjarne Kvinge <RKvinge@novell.com> 

	* media.cpp, media.h: Added MediaElement::IsLive, and move
	  initialization of this field to before our MediaPlayer is opened.
	* mplayer.cpp, mplayer.h: For live sources the first frame might not
	  come with pts = 0, so store that pts so that later we can correctly
	  calculate how much we've actually played.

2008-05-14  Rolf Bjarne Kvinge <RKvinge@novell.com> 

	* mplayer.cpp, mplayer.h: Add support for Duration tags in ASX files.
	* playlist.h, playlist.cpp: Added a PlaylistEntry::HasDuration method,
	  and skip entries with zero duration.

2008-05-14  Rolf Bjarne Kvinge <RKvinge@novell.com> 

	* dependencyobject.cpp: EventObject::AddTickCall: make sure we release
	  the read lock if don't have a surface or timemanager.

2008-05-14  Michael Dominic K.  <mdk@mdk.am>

	* clock.cpp: No need to SoftStop the ClockGroup itself (unlike the
	children) on DoRepeat (). Fixes a small regression in clock21.xaml
	introduced with last commit.

2008-05-14  Michael Dominic K.  <mdk@mdk.am>

	* clock.cpp:
	* clock.h: Fixing a case for Clock when the clock has RepeatBehavior but
	it doesn't start from 00:00:00. Fixes #388745 (clock22.xaml test).

2008-05-13  Rolf Bjarne Kvinge <RKvinge@novell.com> 

	* runtime.cpp: Don't call Attach (NULL) in Surface::Zombify, it causes
	  crashes when javascript removes the plugin in an eventhandler.

2008-05-13  Jeffrey Stedfast  <fejj@novell.com>

	* media.cpp (MediaElement::DownloaderFailed): Make this more
	easily extensible.

2008-05-13  Fernando Herrera  <fherrera@novell.com>

	* media.cpp: Fix mms:// and rtsp:// fallback uri rewrite.

2008-05-13  Jeffrey Stedfast  <fejj@novell.com>

	* media.cpp (MediaBase::SetSourceAsyncCallback): Prevent memory
	corruption of the source.* variables by creating local references
	to them and setting source.* to NULL before calling
	SetSourceInternal().

2008-05-13  Rolf Bjarne Kvinge <RKvinge@novell.com> 

	* clock.cpp, clock.h: Remove InvokeOnMainThread.
	* dependencyobject.cpp, dependencyobject.h: EventObject: added
	  AddTickCall. Requred when adding ticks from other than the 
	  main thread.
	* downloader.cpp: Send: use a TimeManager to add the timeout.
	* media.cpp, media.h, mplayer.h, mplayer.cpp: Don't use
	  TimeManager::InvokeOnMainThread anymore, add the timeouts using a
	  TimeManager instance.

2008-05-12  Jeffrey Stedfast  <fejj@novell.com>

	* list.cpp (List::List): Init length to 0.
	(List::Clear): Reset length to 0.
	(List::Append): length++
	(List::Prepend): length++
	(List::Insert): length++
	(List::InsertBefore): length++
	(List::Unlink): length--
	(List::Length): Fixed to be O(0) instead of O(n)

	* stylus.cpp (StrokeCollection::HitTest): Use List::IsEmpty()
	instead of comparing List::Length() to 0.
	(Stroke::HitTest): Same.

2008-05-12  Rolf Bjarne Kvinge <RKvinge@novell.com> 

	* media.cpp: Set the MediaOpenedEmitted flag before emitting the event,
	  prevents us from emitting the event again as a consequence of what
	  any of the event handlers do.

2008-05-12  Michael Dominic K.  <mdk@mdk.am>

	* animation.cpp:
	* dependencyobject.cpp: Fix a crash due to bad destroy recursion.

2008-05-12  Michael Dominic K.  <mdk@mdk.am>

	* animation.cpp:
	* animation.h:
	* dependencyobject.cpp:
	* dependencyobject.h: Float the AnimationStorage only when it's the
	current storage.

2008-05-12  Michael Dominic K.  <mdk@mdk.am>

	* animation.cpp:
	* animation.h: Introduce floating state for animation storage that has
	it's clock destroyed but it hasn't been stopped before. We need to keep the
	animation storage (reffed from the DependencyProperty hash) around to be
	able to get proper value for the next (continous) Storyboard on same
	property. Fixes #383879 and #375275.

2008-05-09  Geoff Norton <gnorton@novell.com>

	* mplayer.cpp, pipeline.cpp, pipeline.h:  When iterating streams
	ensure that we select the stream with the highest available bit
	rate, opposed to the first stream that we come across.

2008-05-09  Jeffrey Stedfast  <fejj@novell.com>

	* dependencyobject.cpp (DependencyObject::FindName): Don't need
	nested if/elses.

	* namescope.cpp (NameScope::FindName): Simplify.

2008-05-08  Larry Ewing  <lewing@novell.com>

	* shape.cpp: silence some warnings.

2008-05-08  Larry Ewing  <lewing@novell.com>

	* shape.h: remove ClipOnWidthAndHeight method, replace with
	needs_clip variable.
	
	* shape.cpp (Shape::ComputeStretchBounds): set needs_clip based on
	the actual size of the object before and after the stretch and the
	stretch flags.  

	Speeds up Sprawl and a lot of other applications that use stretch
	extensively.

2008-05-08  Larry Ewing  <lewing@novell.com>

	* runtime.cpp (Surface::expose_to_drawable): fill the background
	instead of painting and don't create the clip until the rendering

2008-05-08  Miguel de Icaza  <miguel@novell.com>

	* xaml.cpp (xaml_hydrate_from_str): New method to hydrate an
	existing DependencyObject with the contents of a XAML string.  

	Needed for Silverlight 2.0 support, for the new model:
	create object then do LoadComponent on it.

2008-05-08  Sebastien Pouliot  <sebastien@ximian.com>

	* xaml.cpp: RepeatBehavior does not use the (documented) 0:0:0
	notation.

2008-05-07  Jeffrey Stedfast  <fejj@novell.com>

	* font.cpp: Removed old layout code.
	(TextFont::GetGlyphInfo): Updated to use some handy Fixed->Double
	conversion macros to make understanding the code easier. Also,
	added FT_LOAD_IGNORE_GLOBAL_ADVANCE_WIDTH bit flag to fix layout
	of broken fixed-width CJK fonts.

	* clock.cpp (TimeManager::Stop): Added for convenience.
	(SystemTimeSource::SystemTimeSource): Init frequency to -1 so we
	can make sure it is init'd properly via SetTimerFrequency() before
	Start()ing.

	* runtime.cpp (Surface::Attach): Call our time_manager's Start(),
	not it's source's Start(). We need things like frequency to be
	setup and other values to be initialized properly.
	(Surface::Attach): After calling canvas->OnLoaded(), check that we
	are not zombied - if we are, return.

2008-05-07  Larry Ewing  <lewing@novell.com>

	* runtime.cpp (Surface::Zombify): call Attach (NULL) to notify the
	objects that the surface is undead.

2008-05-06  Jeffrey Stedfast  <fejj@novell.com>

	* animation.cpp (animation_shutdown): Renamed from
	animation_destroy().

	* text.cpp (text_shutdown): Renamed from text_destroy().

	* clock.cpp: Don't include gtk.h for just gtk_timeout_add(),
	include glib.h and use g_timeout_add() instead.
	(SystemTimeSource::SystemTimeSource): Init the timeout_id to 0,
	not -1 (the timeout ids are uint, not int).
	(SystemTimeSource::SetTimerFrequency): Updated.
	(SystemTimeSource::Start): Updated.
	(SystemTimeSource::Stop): Updated.

	* list.cpp (List::Remove): Don't need to search for the node, we
	already have a pointer to it.

2008-05-07  Larry Ewing  <lewing@novell.com>

	* runtime.cpp (Surface::Resize): handle a resize in windowless mode
	gracefully.

	Fixes part of windowless resizing.
	
2008-05-06  Rolf Bjarne Kvinge <RKvinge@novell.com> 

	* media.cpp: Handle the rtsp protocol too.
	* playlist.cpp, playlist.h: Store base and source_name as Uris.
	  Implement GetFullSourceName better, and do some uri validation.
	* uri.h, uri.cpp: Added a allow_trailing_sep flag to Uri::Parse,
	  disables canonicalization of trailing directory separators since
	  asx playlists may treat urls differently depending on the presence
	  or absence of any trailing directory separators. Added Clone ().

2008-05-06  Michael Dominic K.  <mdk@mdk.am>

	* animation.cpp:
	* animation.h: When attaching new animation storage and previous storage
	exist, flag it as non-resetable (meaning that the storage will never
	reset animated property to base/stop value). This fixes the
	storyboard-stopping-two.html test.

2008-05-06  Michael Dominic K.  <mdk@mdk.am>

	* dependencyobject.cpp:
	* dependencyobject.h: DependencyProperty::AttachAnimationStorage now
	returns the previously attached AnimationStorage.

	* animation.cpp:
	* animation.h: When attaching new animation storage try to inherit the
	resetValue from the previously attached storage. Reset value is the
	value that we reset to when storyboard is stopped (originally it always
	used to be the base value of the current AnimationStorage). 

	This replicates the bahavior of SL where starting a new (second)
	storyboard on a property renders the prev storyboard useless
	(non updating the prop) but keeps it's "starting value" for storyboard
	reset. In other words we can say that starting a new storyboard on a
	prop makes this new storyboard a "continuation" of the prev storyboard.

2008-05-05  Larry Ewing  <lewing@novell.com>

	* runtime.cpp (Surface::render_cb): only call ForceRender if we
	dirtied something.

2008-05-05  Larry Ewing  <lewing@novell.com>

	* runtime.cpp: update the (almost unused) frame count where it can
	get hit in windowless.  Clear existing paths before rendering the
	expose box.

	Minor cleanups to help with debugging the expose regions.

2008-05-05  Jeffrey Stedfast  <fejj@novell.com>

	* clock.cpp (TimeManager::Shutdown): Renamed from
	TimeManager::Stop() and also updated to remove all registered
	timeouts.

	* runtime.cpp (Surface): We no longer keep track of signal ids, we
	simply remove all signals on the widgets with 'this' as the user
	data.

	* clock.cpp (TimeManager::Stop): Added. New method to stop the
	time manager.

	* runtime.cpp (Surface::Zombify): Stop the time manager, prevents
	emission of timeout events.

2008-05-05  Michael Dominic K.  <mdk@mdk.am>

	* src/shape.cpp: Reverting sde's stretch thing for now, breaks a lot of
	other stuff.

2008-05-05  Rolf Bjarne Kvinge <RKvinge@novell.com> 

	* media.cpp, media.h, playlist.cpp, playlist.h: MediaElement: when
	  playing playlists, we only emit MediaEnded if we're playing the
	  last entry in the playlist. Call Playlist::OnEntryEnded manually
	  instead of letting the playlist rely on the MediaEnded event, since
	  the MediaEnded event isn't raised for all entries. Playlist: Added
	  IsCurrentEntryLastEntry.

2008-05-05  Rolf Bjarne Kvinge <RKvinge@novell.com> 

	* media.cpp: MediaElement::UpdateProgress: Don't call BufferingComplete
	  until the pipeline got all the data it was waiting for.

2008-05-05  Rolf Bjarne Kvinge <RKvinge@novell.com> 

	* media.cpp, media.h: Add an EmitMediaOpened method and emit
	  MediaOpened somewhat more aggressively, but only once.

2008-05-05  Jeffrey Stedfast  <fejj@novell.com>

	* text.cpp (Glyphs::GetSizeForBrush): Use this->width and
	this->height for the brush size - fixes TextTransforms.xaml once
	again.

2008-05-05  Rolf Bjarne Kvinge <RKvinge@novell.com> 

	* media.cpp: Don't emit any BufferingProgressChanged events in
	  OnPropertyChanged.

2008-05-05  Rolf Bjarne Kvinge <RKvinge@novell.com> 

	* pipeline-ffmpeg.cpp: Give more information to ffmpeg, otherwise
	  ffmpeg won't decode any wma audio.

2008-05-05  Stephane Delcroix  <sdelcroix@novell.com>

	* shape.cpp: draw the line caps with the stretch_transform matrix.
	Finetune the stretch computation again.

2008-05-05  Miguel de Icaza  <miguel@novell.com>

	* src/control.cpp: Add a skeleton UserControl, to get a bit
	further on the loading of a Silverlight 2 application. 

	See the TODO, there are still many limitations.

2008-05-04  Larry Ewing  <lewing@novell.com>

	* runtime.cpp: restrict invalidations to the active windowless
	bounds.

	Fixes massive drawing issues on http://my.liveatedu.com/ where
	were creating invalidations with a negative coords.

2008-05-04  Miguel de Icaza  <miguel@novell.com>

	* xap.cpp: Expose xap_unpack, include when Mono runtime is
	included. 

	* deployment.cpp: Small fixups.

	* xaml.cpp (deploy_namespace): New namespace used to parse
	AppManifest.xaml files that start with a <Deployment> tag on the
	http://schemas.microsoft.com/client/2007/deployment namespace. 
	
	(xaml_init): Register the deployment classes.

	* type.cpp (type_is_dependency_object): Add new helper method
	to determine if a Kind is a DEPENDENCYOBJECT, the list is no
	longer separated in value-types and DependencyObjects, so its not
	possible to do a fast lookup from managed code. 

2008-05-04  Chris Toshok  <toshok@ximian.com>

	[ fixes #361906, while simultaneously keeping halo3,
	ControlLife.htm, and ControlState.htm happy ]
	
	* runtime.h, runtime.cpp, type-generated.cpp: move back to the
	LoadEvent instead of the broken Attaching event, reverting
	r102288.

	* panel.h, panel.cpp: add a "emitting_loaded" guard around the
	body of OnLoaded so we don't end up re-entering this method.
	Also, revert r102196 as the ordering of parent-to-child was
	correct originally, there were just other ordering constraints we
	weren't handling.

	* control.h, control.cpp: same.

	* dependencyobject.h, dependencyobject.cpp: add a count field to
	EventClosure so we can support the "only_unemitted" arg in
	EventObject::Emit.  The idea is that the Loaded event seems to
	only be emitted on those events that haven't yet been emitted.
	This may also be implemented just by making Loaded event handlers
	one-shot (removing themselves after they fire), but this is easy
	enough and works.  The only event with this odd behavior (that I
	know of) is Loaded.

	* uielement.cpp (UIElement::OnLoaded): set the IS_LOADED
	flag (which may actually be useless now, given the Emit change)
	but don't emit Loaded only when the flag is unset.

	* collection.cpp: remove the last bit of closure access from
	VisualCollection.  The OnLoaded call now happens in
	Panel::OnCollectionChanged, in 1 spot as opposed to 3 different
	spots in VisualCollection.

2008-05-02  Sebastien Pouliot  <sebastien@ximian.com>

	* text.cpp|h: Adjust Glyphs::InsideObject with bounds changes.
	[Complete the fix for #383870]

2008-05-02  Jeffrey Stedfast  <fejj@novell.com>

	* text.cpp (Glyphs::Layout): Take negative vOffset attr's for
	glyphs into account when calculating extents. Fix usage of OriginX
	and OriginY as far as extents goes.
	(Glyphs::GetOriginPoint): Don't leak the TextFont.
	(Glyphs::GetTransformOrigin): Always use 0.0,0.0 as the
	RenderTransformOrigin, Microsoft's implementation for Glyphs
	doesn't seem to take into account the width/height of the bounding
	box.
	(Glyphs::Layout): Use OriginX,OriginY as the bounding box origin
	rather than MIN (OriginX, 0), Min (OriginY, 0)

2008-05-02  Sebastien Pouliot  <sebastien@ximian.com>

	* text.cpp|h: Add Glyphs::InsideObject so Mouse events will work.
	[Partial fix for #383870, bounds are not always correct]

2008-05-02  Jeffrey Stedfast  <fejj@novell.com>

	* text.cpp (Glyphs::Render): Cache the glyph string in a moon-path
	rather than copying it from the cairo context for the same reason
	we did this for TextBlock segment path caching.

2008-05-02  Rolf Bjarne Kvinge <RKvinge@novell.com> 

	* playlist.h, playlist.cpp: Implemented ClientSkip.
	* media.cpp: Handle playlists entry with ClientSkip set correctly.

2008-05-02  Michael Dominic K.  <mdk@mdk.am>

	* animation.cpp:
	* animation.h: For the KeySpline: getting rid of the ugly lookup-table
	with x -> y values and instead using a two-way curve approximation
	methodology for calculating the Spline progress. This is not 100% accurate
	(same as original bezier) for fine-grained values but removes all the
	precision problems and greatly improves the quality for long KeySpline
	animations (no more jags). 

2008-05-01  Larry Ewing  <lewing@novell.com>

	* uielement.cpp (UIElement::OnPropertyChanged): go ahead and
	invalidate here as changes in the upstream opacity could make us
	unable to invalidate later.

	Fixes invalidation of last hex in a sprawl run.

2008-05-01  Larry Ewing  <lewing@novell.com>

	* runtime.cpp: Fix a bunch of rendering bugs in windowless mode.
	Previously there were no time manager handlers listening to events
	in windowless mode so we were missing expose events.  Make all
	invalidations go throw Invalidate so that they get picked up in
	windowless.  Take into account that exposes go to a full size
	window in windowless mode so we don't need to subtract the device
	offsets.

	Fixes most of the issues with
	http://silverlight.r2musings.com/weatherwidget/default.aspx and
	fixes the harness failure on ZIndex.htm.
	
2008-05-01  Chris Toshok  <toshok@ximian.com>

	* runtime.h, runtime.cpp: remove the LoadEvent and instead add an
	AttachingEvent, which is emitted after the toplevel control is set
	on the surface, but before UIElement::LoadedEvent is emitted on
	it.  Used by the plugin for hooking up the plugin onLoad handler.

2008-05-01  Jeffrey Stedfast  <fejj@novell.com>

	* layout.cpp (RenderLine): Instead of grabbing the cairo_path_t
	from the cairo_t after pathing out all of the glyphs for a segment
	of text, keep our own moon_path for caching. Apparently the path
	gotten from cairo_copy_path() has whatever transforms are on the
	context pre-applied which is the cause for the breakage in bug
	#375279.

	* font.cpp (TextFont::AppendPath): New method to append a glyph's
	path to a moon_path for caching purposes.

2008-04-30  Fernando Herrera  <fherrera@novell.com>

	* media.cpp: at MediaElement::DownloaderFailed if the uri was a mms://
	stream, fallback to http:// uri

2008-04-30  Michael Dominic K.  <mdk@mdk.am>

	* panel.cpp:
	* panel.h: Adding the panel_add_child helper method used by the ancient
	demo. It actually makes sense.

2008-04-30  Michael Dominic K.  <mdk@mdk.am>

	* Makefile.am:
	* collection.h:
	* text.cpp:
	* xaml.cpp: Include the utils.h locally in .cpp file and remove it from
	the install. This way we don't need to bundle the zip includes.

2008-04-30  Stephane Delcroix  <sdelcroix@novell.com>

	* shape.cpp: calc_line_bounds: compute the start|end caps in the
	bounds.

2008-04-30  Sebastien Pouliot  <sebastien@ximian.com>

	* panel.cpp: Emit Loaded on Canvas before it's child.
	[Fix part #361906 - i.e. back to original issue]

2008-04-30  Fernando Herrera  <fherrera@novell.com>

	* downloader.cpp:
	* downloader.h: export downloader_get_downloaded_file without the
	partName.

2008-04-29  Rolf Bjarne Kvinge <RKvinge@novell.com> 

	* pipeline.cpp: Mp3FrameReader/Demuxer: Calculate frame duration
	  correctly, and calculate file duration as MS seems to be doing it.
	  SkipFrame: when seeking don't take into account the size of the
	  mpeg header, since we only peaked it. 

2008-04-29  Michael Dominic K.  <mdk@mdk.am>

	* shape.cpp: Clipping is not taken into account with cairo_in_*
	functions therefore do the hit-test in two steps -- first check if
	within clipping bounds and then check if within shape bounds. Fixes
	#383894 and test-shape-cursor-clipping.xaml test. 

2008-04-28  Chris Toshok  <toshok@ximian.com>

	* runtime.cpp (Surface::Attach): emit the canvas's Loaded event
	before we emit our own Load event (and trigger the plugin's onLoad
	handler).

2008-04-28  Chris Toshok  <toshok@ximian.com>

	* runtime.cpp (Surface::Attach): always emit Resize on Attach.
	fixes ControlState.htm.

2008-04-28  Rolf Bjarne Kvinge <RKvinge@novell.com> 

	* typegen/typegen.cs: Minor fix to support C constructors immediately
	  prepended with *.
	* type-generated.cpp: Regenerated (includes a lot more C constructors
	  now).

2008-04-28  Rolf Bjarne Kvinge <RKvinge@novell.com> 

	* geometry.h: Include glib.h before using glib macros.

2008-04-28  Michael Dominic K.  <mdk@mdk.am>

	* xaml.cpp: Silently skip the attributes that are empty instead of
	throwing an error. Fixes the test-parser-empty-property.xaml and
	#383904.

2008-04-28  Michael Dominic K.  <mdk@mdk.am>

	* brush.cpp: Make sure to use proper width for image stretching params.
	Fixes the image-brush-stretch-set.html and bug #383938.

2008-04-25  Jeffrey Stedfast  <fejj@novell.com>

	* shape.cpp: Added property accessors.

2008-04-25  Chris Toshok  <toshok@ximian.com>

	* type-generated.cpp: add the Surface Loaded event.

	* runtime.cpp (Surface::widget_destroyed): null out s->widget if
	it matches too.  no more dangling pointers.

	* runtime.h, runtime.cpp: give the Surface class a Load
	event (used to run the JS OnLoad event in the plugin) and an
	IsLoaded accessor.

	* xaml.cpp (dependency_object_hookup_event): raise a parser error
	if an event is specified with a javascript: prefix.
	
2008-04-25  Larry Ewing  <lewing@novell.com>

	* stylus.cpp (InkPresenter::OnCollectionChanged): wrap the stroke
	changed logic inside a type check.

2008-04-25  Jeffrey Stedfast  <fejj@novell.com>

	* xaml.cpp (geometry_from_str): Use the new gemoetry property
	accessor methods.

	* geometry.cpp: Added property accessor methods

2008-04-25  Rolf Bjarne Kvinge <RKvinge@novell.com> 

	* media.cpp: Always emit DownloadProgressEvents, even if we're
	  buffering.

2008-04-25  Stephane Delcroix  <sdelcroix@novell.com>

	* stylus.cpp: InkPresenter::OnCollectionChanged: call the parent 
	method, so the Canvas.Top, Canvas.Left properties are read. Fixes
	inkJournal.

2008-04-25  Geoff Norton  <gnorton@novell.com>

	* pipeline-ffmpeg.cpp, pipeline-ffmpeg.h:  Support using ffmpeg's
	new libavcodec/avcodec.h

2008-04-25  Jeffrey Stedfast  <fejj@novell.com>

	* runtime.cpp (runtime_init): No longer need to call
	assembly_part_init().

	* deployment.cpp (assembly_part_init): Moved into
	deployment_init().

	* deployment.h: Added missing virtual dtors.

	* collection.cpp (Collection::GetCount): Added.

2008-04-25  Rolf Bjarne Kvinge <RKvinge@novell.com> 

	* media.cpp: Set DownloadProgress to 0 when media fails to load.

2008-04-25  Rolf Bjarne Kvinge <RKvinge@novell.com> 

	* media.cpp: MediaElement::CheckMarkers: if the marker is from a live
	  stream, emit it even if we missed it by up to 0.1 s. Refactored
	  parts of UpdateProgress into GetBufferedSize. Emit MediaOpened only
	  after we've either started playing or finished buffering. Emit
	  MediaFailed/InvalidFileFormat if we failed to initialize the media.
	  Reinitialize the media synchronously in SetSource.
	* media.h: Added

2008-04-25  Michael Dominic K.  <mdk@mdk.am>

	* runtime.cpp:
	* uielement.cpp:
	* uielement.h: Also include the IsHitTestVisible status when checking
	our input_list after handling the mouse event. This fixes the
	mouse-enter-leave-hit-test-visibility.html test.

2008-04-25  Stephane Delcroix  <sdelcroix@novell.com>

	* runtime.cpp: move the hotspot for the eraser, Fixes bnc 375213.

2008-04-24  Jeffrey Stedfast  <fejj@novell.com>

	* clock.cpp: Added property accessor methods for TimelineMarker
	and added c-bindings.

	* downloader.cpp: Same.

	* media.cpp: Added property accessors so that it isn't
	necessary to use long-winded c-function names to get property
	values. Also made all c-wrappers call the c++ property accessor
	methods.

2008-04-24  Rolf Bjarne Kvinge <RKvinge@novell.com> 

	* mplayer.cpp: When a video-only media reaches its end, set target_pts
	  to the last rendered pts, since that's what is reported as our
	  current position.

2008-04-24  Rolf Bjarne Kvinge <RKvinge@novell.com> 

	* mplayer.cpp: When a video-only media reaches its end, set target_pts
	  to the last rendered pts, since that's what is reported as our
	  current position.

2008-04-24  Michael Dominic K.  <mdk@mdk.am>

	* runtime.cpp:
	* uielement.cpp:
	* uielement.h: Renaming UIElement::GetActualRenderVisibility to
	UIElement::GetActualTotalRenderVisibility for better name matching.

2008-04-24  Michael Dominic K.  <mdk@mdk.am>

	* runtime.cpp: Another perf fix for the fix -- make it a corner case
	when the new_input_list needs to be copied. In most cases we can just
	reuse it. 

2008-04-24  Michael Dominic K.  <mdk@mdk.am>

	* runtime.cpp:
	* uielement.cpp:
	* uielement.h: Ooops, so my prev fix was correct but *totally* dumb from
	the perf/sanity point of view. Here goes a better refactor.

	Adding UIElement::GetActualRenderVisibility which returns the visibility
	(like UIElement::ComputeTotalRenderVisibility) without setting the
	flags.

2008-04-24  Michael Dominic K.  <mdk@mdk.am>

	* runtime.cpp: After emitting the events make sure to update our
	input_list since it can be changed -- as a result of somebody ie.
	changing element's visibility in the enter/leave callback. Fixes the
	#375220 (Microsoft downloads index chars).

2008-04-24  Michael Dominic K.  <mdk@mdk.am>

	* animation.cpp: Do a slightly more precise generation of key-spline
	tables. Improves smoothness ie. in test-animation-slow-keyspline.xaml.

2008-04-24  Rolf Bjarne Kvinge <RKvinge@novell.com> 

	* media.cpp, media.h: MediaElement: add a handler for DownloaderFailed
	  and raise MediaFailed.

2008-04-24  Stephane Delcroix  <sdelcroix@novell.com>

	* geometry.h:
	* geometry.cpp:
	* shape.cpp:
	* shape.h: override some Compute[Shape]Bounds method to pass a matrix
	argument. Allows measuration of transformed Pathes and a 2nd pass to 
	refines the guesses we're doing for Stretches.

2008-04-24  Rolf Bjarne Kvinge <RKvinge@novell.com> 

	* src.mdp: Updated.

2008-04-24  Rolf Bjarne Kvinge <RKvinge@novell.com> 

	* media.cpp, pipeline.cpp, pipeline.h: Addded
	  ProgressiveSource::NotifyFinished to notify that the download has
	  finished. This is required for streaming downloads which download 0
	  bytes, otherwise the pipeline will hang waiting for data.

2008-04-24  Rolf Bjarne Kvinge <RKvinge@novell.com> 

	* collection.cpp, collection.h: TimelineMarkerCollection needs to be
	  sorted at all times, added a virtual Collection::AddToList method
	  which appends the item to the list (and overriden by
	  TimelineMarkerCollection to add it in the correct position to keep
	  the collection ordered).

2008-04-24  Rolf Bjarne Kvinge <RKvinge@novell.com> 

	* clock.cpp, clock.h: Added property accessors to TimelineMarker.

2008-04-23  Jeffrey Stedfast  <fejj@novell.com>

	* panel.cpp: Add property accessors and added c-bindings.

2008-04-23  Geoff Norton  <gnorton@novell.com>

	* Makefile.am: Fix make dist when building with ffmpeg.

2008-04-23  Jeffrey Stedfast  <fejj@novell.com>

	* frameworkelement.cpp: Added property accessors so that it isn't
	necessary to use long-winded c-function names to get property
	values. Also made all c-wrappers call the c++ property accessor
	methods.

	* text.cpp: Added property accessors to all text classes so that
	it isn't necessary to use long-winded c-function names to get
	property values. Also made all c-wrappers call the c++ property
	accessor methods.
	(TextBlock::LayoutSilverlight): Removed, logic moved into
	::Layout().

	* animation.h: Make sure all c-API _new() functions take void as
	argument.

	* uielement.cpp: Added some property accessors.

	* text.cpp: Use the new SolidColorBrush ctor.

	* brush.cpp: Added property accessors to all brush classes so that
	it isn't encessary to use long-winded c-function names to get
	property values. Also made all c-wrappers call the c++ property
	accessor methods.
	(SolidColorBrush::SolidColorBrush): New .ctor to make life
	simpler.

2008-04-23  Rolf Bjarne Kvinge <RKvinge@novell.com> 

	* mplayer.cpp: AudioPlayer: prevent calling SetTargetPts on the
	  MediaPlayer with a negative pts.

2008-04-23  Geoff Norton  <gnorton@novell.com>

	* libmoon.h: Drop mango.h
	
2008-04-23  Geoff Norton  <gnorton@novell.com>

	* runtime.cpp: Remove pango support.
	
2008-04-23  Geoff Norton  <gnorton@novell.com>

	* Makefile.h, text.cpp, text.h, mango.cpp, mango.h:  Remove pango 
	support.
	
2008-04-23  Geoff Norton  <gnorton@novell.com>

	* swscale-converter.cpp, pipeline-ffmpeg.cpp, Makefile.am: Only
	include swscale and ffmpeg cpp files in the build if their configure
	flags are set.
	
2008-04-23  Rolf Bjarne Kvinge <RKvinge@novell.com> 

	* type.cpp: When looking for types use case-insensitive type
	  comparison. Fixes #375230 and #375231.

2008-04-23  Rolf Bjarne Kvinge <RKvinge@novell.com> 

	* pipeline.cpp, pipeline.h: MediaClosure: add SetContextUnsafe which
	  don't take a ref to the context, and add a context_refcounted field
	  to keep track of refcounting. This is required for long-living
	  closures which would otherwise cause circular references. Add and
	  implemetn a ASFMarkerDecoderInfo class, and implement notification
	  of found markers back to listeners.
	* src.mdp: Updated.
	* downloader.cpp, downloader.h: Downloader: Add a streaming_features
	  field, so that the plugin can return information about mms streams.
	* http-streaming.cpp, http-streaming.h: Added
	  parse_http_streaming_features.
	* mplayer.h: Add property accessors for CanSeek and CanPause, and
	  implement them. Select any marker streams.
	* media.h, media.cpp: MediaElement: store the marker closure in the
	  instance, so that we can delete it upon destruction. Read the
	  streaming features from the downloader in order to set
	  CanSeek/CanPause properly. TryOpen: if we don't have a filename,
	  but we do have a downloaded file, use the downloaded file as the
	  source (might happen if streaming stops before TryOpen is called).
	* mplayer.cpp: Add property accessors for CanSeek and CanPause, and
	  implement them. Select any marker streams. Don't check if we can
	  pause in Pause (), since MediaElement implements Buffering calling
	  Pause on us. MediaElement is already checking if media can be
	  paused or not.
	* Makefile.am: Added http-streaming.h|cpp.

2008-04-22  Stephane Delcroix  <sdelcroix@novell.com>

	* rect.h: overrides for Union and IsEmpty to take a logical bool,
	allowing logical bounds computation.
	* geometry.cpp: use the overrided Union () in Computebounds
	* shape.cpp: This is the stretches' Holy Grail !

2008-04-22  Jeffrey Stedfast  <fejj@novell.com>

	* eventargs.cpp (MouseEventArgs::GetStylusPoints): Make sure
	event->device non-NULL.

2008-04-22  Larry Ewing  <lewing@novell.com>

	* playlist.h: remove expat references from public symbols.
	* playlist.cpp: Wrap XML_Parser in simple class to hide the symbol
	from the plublic headers.

	Start cleaning things up for ff3.

2008-04-22  Chris Toshok  <toshok@ximian.com>

	* runtime.h, runtime.cpp: add Zombify() which sets the zombie
	flag.  basically this allows us to unwind gracefully from an event
	that has caused the surface to be destroyed.  when the flag is
	set, we basically stop emitting UI events that we're in the
	process of emitting.
	(Surface::widget_destroyed) simplify this, and zero out the
	widgets here so we don't destroy them again in ~Surface().
	
	* dependencyobject.h, dependencyobject.cpp: make unref_delayed
	public again, and don't warn about calling it on the main thread.
	we need it in the plugin.

2008-04-22  Jeffrey Stedfast  <fejj@novell.com>

	* shape.cpp (Shape::DoDraw): Cast extents to int for
	AddToCacheSizeCounter().
	(Shape::IsCandidateForCaching): Same for
	VerifyWithCacheSizeCounter().

2008-04-22  Michael Dominic K.  <mdk@mdk.am>

	* animation.cpp: Safely allow now the KeyTime property to be nullable.
	Fixes the Animation_NegativeTst.htm test.

2008-04-22  Michael Dominic K.  <mdk@mdk.am>

	* animation.cpp:
	* animation.h: Making the Storyboard::Begin return bool (true if
	storyboard started correctly, false otherwise).

2008-04-22  Michael Dominic K.  <mdk@mdk.am>

	* animation.cpp:
	* animation.h:
	* clock.cpp:
	* clock.h: Adding a 'bool Validate ()' virtual to Timeline which is used
	to validate the Timeline before starting it. Timelines are always valid
	by default except for KeyFrame-based animations where we perform a
	check on the keyframes. 

	Storyboard doesn't start if any of it's timelines are not valid. This
	fixes the test-animation-invalid-keyframe-keytime.xaml test.

2008-04-22  Michael Dominic K.  <mdk@mdk.am>

	* animation.cpp: Don't initialize the KeyTime for KeyFrame to a default
	value, make it be NULL by default. This currently causes a segfault in
	the just-added test-animation-invalid-keyframe-keytime.xaml which is
	fine.

2008-04-22  Fernando Herrera  <fherrera@novell.com>

	* pipeline.h:
	* pipeline.cpp: set the new read position after Seeking to pts.
	Added ProgressiveSource::SeekInternal that refuses to Seek to a
	non-filled position.

2008-04-22  Rolf Bjarne Kvinge <RKvinge@novell.com> 

	* dependencyobject.cpp, dependencyobject.h: Added another SetValue
	  overload, to enable calling all SetValues with stack objects.
	* xaml.cpp: Fix a Value leak.

2008-04-21  Jeffrey Stedfast  <fejj@novell.com>

	Fixes a double-destroy bug in FullScreen.htm

	* runtime.cpp (Surface::Surface): Initialize normal_widget - never
	let it be NULL unless we are in windowless mode.
	(Surface::.dtor): Don't call DestroyWidget on 'widget', call it on
	'widget_normal' instead, this way we can't accidently destroy the
	fullscreen widget twice (e.g. if we are in fullscreen mode).
	(Surface::ConnectEvents): Record the unrealize signal id so that
	we can later disconnect from it.
	(Surface::DestroyWidget): Now takes a SignalIds argument so that
	we can disconnect from unrealize/destroy signals which may fire in
	response to destroying the widget.
	(Surface::InitializeWidget): Now takes a SignalIds argument so
	that we can save the destroy signal id.

2008-04-21  Geoff Norton  <gnorton@novell.com>

	* runtime.cpp: Guard against freeing a list in a sub-event
	loop when crossings are invoked.  Fixes bug#378902
	
2008-04-20  Miguel de Icaza  <miguel@roxanne.site>

	* deployment.cpp: new dependency property objects for the
	Deployment class.

	* xap.cpp: XAP loader, unpacks and instantiates deployment, but
	does not load assemblies in VM.  Not sure if this should be done
	here (and add a VM dependency) or in the plugin and later as well
	on mopen.

	* runtime.cpp: Deployment initialization.

	* downloader.cpp Moved some code from here into utils.cpp: Expose
	CreateTempDir instead of MakeTempDir that takes care of creating
	the directory with a unique signature.

2008-04-21  Geoff Norton  <gnorton@novell.com>

	* yuv-converter.cpp: Emit a warning on unaliged memory and fall back
	to the C implementation.

2008-04-18  Larry Ewing  <lewing@novell.com>

	* dirty.cpp (Surface::ProcessDownDirtyElements): When visibility
	changes invalidate our parents bounds to notify them that their
	subtree may have changed.

	Fixes the status boxes on MouseInput.htm

2008-04-18  Jeffrey Stedfast  <fejj@novell.com>

	* runtime.cpp (Surface::ConnectEvents): Connect to focus-in-event
	and focus-out-event.
	(Surface::focus_in_callback): If we have a toplevel canvas, emit a
	GotFocus event on it.
	(Surface::focus_out_callback): If we have a toplevel canvas, emit
	a LostFocus event on it.
	(Surface::Attach): If our widget has focus, emit GotFocus event on
	our canvas right after we emit the Loaded event.

	* uielement.cpp (UIElement::EmitGotFocus): New method.
	(UIElement::EmitLostFocus): New method.

2008-04-18  Geoff Norton  <gnorton@novell.com>

	* yuv-converter.cpp:  It seems that ffmpeg will occasionally
	over-pad the YUV buffers with a SIMD aligned amount (see
	timecode-*.wmv)
	
2008-04-18  Michael Dominic K.  <mdk@mdk.am>

	* animation.cpp: Make sure we always return targetValue when
	progress >= 1.0 for Spline*KeyFrame's.

	This fixes the clock36.xaml test and PopFly bug of "line dirt
	leftovers" when collapsing block list or tutorial list.

2008-04-17  Larry Ewing  <lewing@novell.com>

	* xaml.cpp (xaml_init): register MouseEventArgs as a dependency object.

2008-04-17  Larry Ewing  <lewing@novell.com>

	* src/eventargs.cpp:
	* src/eventargs.h: 
	* src/type-generated.cpp:
	* src/value.h: add a default ctor for MouseEventArgs.

2008-04-17  Larry Ewing  <lewing@novell.com>

	* typegen/typegen.cs: don't require an svn repo for proper
	functioning, try to make the error messages functional still.

2008-04-18  Rolf Bjarne Kvinge <RKvinge@novell.com> 

	* media.cpp: MediaElement::MediaOpened: Advance state to Buffering
	  before trying to play/pause, otherwise nothing will happen (if
	  coming from the Opening state). Fix printf.

2008-04-17  Rolf Bjarne Kvinge <RKvinge@novell.com> 

	* dependencyobject.cpp, dependencyobject.h: Add an always_change flag
	  for DependencyProperty, if a property has this flag, it will always
	  be changed, even if the new value is the same as the old value.
	  DependencyObject::SetValue: honor the new always_change flag.
	* media.cpp: Set the always_change flag to true for
	  MediaBase::SourceProperty.

2008-04-17  Rolf Bjarne Kvinge <RKvinge@novell.com> 

	* media.cpp: MediaElement: Move the Play/Pause/AutoPlay logic to
	  MediaOpened, so that it also happens when TryLoadFinished opens the
	  media. Fixes media not starting to play when the media was
	  downloaded between the moment we tried to open it and it was
	  successfully opened.

2008-04-17  Jeffrey Stedfast  <fejj@novell.com>

	* color.cpp (color_from_str): Handle uint32 color values that are
	not hex.

2008-04-17  Larry Ewing  <lewing@novell.com>

	* dependencyobject.cpp (DependencyProperty::DependencyProperty):
	initialize is_nullable.

	Fixes random failure of ParserErrors.htm.

2008-04-17  Rolf Bjarne Kvinge <RKvinge@novell.com> 

	* media.cpp: MediaElement::TryOpen: always unref the FileSource we
	  create when we're done with it.

2008-04-17  Rolf Bjarne Kvinge <RKvinge@novell.com> 

	* dependencyobject.cpp, dependencyobject.h: EventObject: we need to
	  remember how many events the current type has, since in our
	  destructor we can't get that information anymore. Add a new
	  EventLists class which does the book-keeping.

2008-04-17  Rolf Bjarne Kvinge <RKvinge@novell.com> 

	* media.cpp: MediaElement::Reinitialize: don't call SetValue if we're
	  in the destructor. MediaElement::SetMedia: call ComputeBounds at
	  the end. Fixes xaml/test-canvas-no-size.html

2008-04-17  Michael Dominic K.  <mdk@mdk.am>

	* animation.cpp: It turns out that KeyFrames doesn't have default Value
	of NULL but rather 0/Black/etc.  

	This fixes the the test-animation-null-defaults-*.xaml tests and the bug
	in PopFly where clicking the block list collapser wouldn't do anything
	(it collapses now properly like the tutorial right pane). 

2008-04-17  Rolf Bjarne Kvinge <RKvinge@novell.com> 
	
	* src.mdp: Updated.

2008-04-16  Larry Ewing  <lewing@novell.com>

	* type.cpp: avoid an infinite recursion in LookupEvent.

	Fixes a crash in RuntimeErrors.htm.

2008-04-16  Larry Ewing  <lewing@novell.com>

	* shape.cpp (Shape::ComputeStretchBounds): get another test working.

2008-04-16  Larry Ewing  <lewing@novell.com>

	* shape.cpp (Shape::ComputeStretchBounds): an incomplete fix to
	try to resolve the regression in stretch that had crept in.  Still
	working on a more complete patch.

2008-04-16  Larry Ewing  <lewing@novell.com>

	* geometry.cpp (RectangleGeometry::ComputeBounds): rectangles have
	a logical size.

2008-04-16  Jeffrey Stedfast  <fejj@novell.com>

	* dependencyobject.cpp (free_value): value argument may be NULL.

2008-04-16  Rolf Bjarne Kvinge <RKvinge@novell.com> 

	* dependencyobject.cpp: DependencyObject: Emit DestroyedEvent before
	  decreasing refcount, so that ref in event emission doesn't abort.
	  Reenable ref/unref in event emission.

2008-04-16  Jeffrey Stedfast  <fejj@novell.com>

	* dependencyobject.cpp (set_surface): value argument can be NULL.
	(DependencyObject::IsValueValid): Fixed compile warnings.

	* downloader.cpp: Properly set/reset Status and StatusText
	properties.
	(Downloader::Open): Properly reinitialize all state.
	(Downloader::Write): Clamp progress to 1.0 (altho it should never
	go above, especially not that I've fixed resetting 'total' state).

	* enums.c (initialize_enums): Don't cast arrays using
	GINT_TO_POINTER(), doesn't make any sense.

2008-04-16  Rolf Bjarne Kvinge <RKvinge@novell.com> 

	* collection.cpp: Collection::EmitChanged: don't create a
	  ChangeEventArgs if we don't need one, and unref it when we're
	  finished with it.

2008-04-16  Michael Dominic K.  <mdk@mdk.am>

	* clock.cpp: Add protection against division by 0.

2008-04-16  Michael Dominic K.  <mdk@mdk.am>

	* animation.cpp:
	* animation.h: Don't detach the ClockGroup from parent on the Completed
	event. This is now finally no longer needed. While keeping the
	clockgroup means little perf difference it makes the whole thing much
	more simple to read (there is just one place that explains why Filling
	groups are no longer processed after Completed).

2008-04-16  Larry Ewing  <lewing@novell.com>

	* shape.cpp: tweak the origin tweak again.  This should pass
	test-shape-path-stretch[34].xaml.

2008-04-16  Jeffrey Stedfast  <fejj@novell.com>

	Fix for OMPackagingSource.htm

	* media.cpp (MediaElement::OnPropertyChanged): If the new source
	is empty, Invalidate().
	(MediaElement::Render): Render nothing if our downloader is NULL.

2008-04-16  Larry Ewing  <lewing@novell.com>

	* shape.cpp: don't adjust the origin unless we are adjusting that
	axis.

2008-04-16  Rolf Bjarne Kvinge <RKvinge@novell.com> 

	* playlist.cpp: Simplify printf.

2008-04-16  Rolf Bjarne Kvinge <RKvinge@novell.com> 

	* src.mdp: Updated to (mostly) compile.

2008-04-16  Rolf Bjarne Kvinge <RKvinge@novell.com> 

	* src.mdp: Updated.

2008-04-16  Rolf Bjarne Kvinge <RKvinge@novell.com> 

	* typegen/typegen.sh: Updated to work correctly independently of
	the current directory when executed.

2008-04-16  Rolf Bjarne Kvinge <RKvinge@novell.com> 

	* animation.cpp, animation.h, brush.cpp, brush.h, clock.cpp, clock.h,
	  collection.cpp, collection.h, dependencyobject.h, downloader.cpp,
	  downloader.h, Makefile.am, media.cpp, media.h, runtime.cpp, runtime.h,
	  type.cpp, type.h, type.h.in, typegen/typegen.cs, type-generated.cpp,
	  uielement.cpp, uielement.h: Initialize our type system statically.
	* dependencyobject.cpp: Initialize our type system statically. Comparing a
	  Kind value to another to determine type hierarchy isn't supported
	  anymore, use Value::Is or Type::IsSubclassOf, which are doing the right
	  thing.
	* src.mdp: Updated.
	* type.cpp.in: Removed, no longer required.
	* value.cpp, value.h, value.h.in: Comparing a Kind value to another to
	  determine type hierarchy isn't supported anymore, use Value::Is or
	  Type::IsSubclassOf, which are doing the right thing.

2008-04-16  Larry Ewing  <lewing@novell.com>

	* shape.cpp (Shape::ComputeStretchBounds): fix typo.

2008-04-16  Larry Ewing  <lewing@novell.com>

	* shape.cpp (Shape::ComputeStretchBounds): fix the centering logic
	that got accidentally lost when fixing other bits.

	Fixes regression in StretchAndShapes.xaml.

2008-04-16  Jackson Harper  <jackson@ximian.com>

	* xaml.cpp: {x:Null} evaluates to NULL, if we encounter this value
	we need to check if the property is Nullable and raise an error if
	it isn't.

2008-04-16  Jackson Harper  <jackson@ximian.com>

	* dependencyobject.h|cpp: SetValue now validates values and
	returns false with a GError when invalid values are used.
	Subclasses can (and should) override IsValidValue to do their own
	value validation.
	* xaml.cpp: Use new SetValue that returns errors.
	
2008-04-15  Rolf Bjarne Kvinge <RKvinge@novell.com> 

	* media.cpp: MediaBase::SetSourceAsyncCallback: don't do anything if we
	  don't have a surface anymore. We're probably executing after the surface
	  has been destroyed.

2008-04-15  Rolf Bjarne Kvinge <RKvinge@novell.com> 

	* src.mdp: Updated to include typegen/*.
	* type.cpp, type.cpp.in, type.h, type.h.in: Added type_get_name, and fix
	  Behaviour/Behavior inconsistency.

2008-04-15  Jeffrey Stedfast  <fejj@novell.com>

	* media.cpp (MediaElement::OnPropertyChanged): Moved the
	PositionProperty seek logic into here so we could get rid of
	MediaElement::SetValue() overload.

	* dependencyobject.h (class DependencyObject): SetValue() is no
	longer a virtual method.

2008-04-15  Michael Dominic K.  <mdk@mdk.am>

	* clock.cpp: ret_time is 0 when reaching repeat_count == 0. Fixes the
	clock35.xaml test.

2008-04-15  Michael Dominic K.  <mdk@mdk.am>

	* clock.cpp: Clock::ComputeNewTime - make sure to take the speed ratio 
	into account also when moving back in time. 

	Fixes the clock34.xaml test.

2008-04-15  Michael Dominic K.  <mdk@mdk.am>

	* animation.cpp: Make sure to clamp the progress to 0.0 - 1.0 when we're
	calculating it ourselves (instead of using the CalcProgress). Otherwise
	we're bypassing the clamping and extending animations/values beyond
	their bounds. 

	This is a real fix for the Popfly #378390 (cannot configure the box in
	Popfly). Also fixes the clock34.xaml test-case.

2008-04-15  Michael Dominic K.  <mdk@mdk.am>

	* clock.cpp: Since we're at it, small fix in Clock::Tick -- Clamp time
	when previous OR current state is Clock::Active.

2008-04-15  Michael Dominic K.  <mdk@mdk.am>

	* clock.cpp: Reverting the change that was supposed to fix popfly. It's
	actually totally bad. I knew I was too fast with this one.

2008-04-15  Michael Dominic K.  <mdk@mdk.am>

	* clock.cpp: The time needs to be clamped always. Fixes #378390 (cannot
	configure the box in Popfly). Whoah, that was a nasty one.

2008-04-14  Chris Toshok  <toshok@ximian.com>

	* runtime.cpp (Surface::Attach): don't clear the up/down dirty
	lists here.  Calling toplevel->SetSurface(NULL) ensures that all
	elements from the previous tree have their dirty elements removed,
	so what's left will correspond to 1) things that are about replace
	the current hierarchy, or 2) things that haven't actually been
	added to the hierarchy yet, but need to be associated with a
	surface.

	* collection.cpp (Collection::Clear): emit
	CollectionChangeTypeChanging event before we do the actual change
	so the owner can do something with the children if it needs to.
	(VisualCollection::VisualAdded, VisualCollection::VisualRemoved):
	nuke.
	(VisualCollection::Add): remove call to VisualAdded.  that
	behavior will be handled by Panel in its OnCollectionChanged
	method.
	(VisualCollection::SetVal): same.
	(VisualCollection::Insert): same.
	(VisualCollection::Remove): same, but with VisualRemoved.
	(VisualCollection::RemoveAt): same.
	(VisualCollection::Clear): remove the loop calling VisualRemoved.
	this will be handled by the additional
	CollectionChangeTypeChanging handling in panel.cpp.

	* enums.h (enum CollectionChangeType): add
	CollectionChangeTypeChanging.

	* panel.h, panel.cpp (Panel::OnPropertyChanged): handle the case
	where the ChildrenProperty is changed, by calling ChildRemoved on
	all the old children, and ChildAdded on all the new ones.
	(Panel::ChildAdded): new home for VisualCollection::VisualAdded.
	(Panel::ChildRemoved): new home for
	VisualCollection::VisualRemoved.
	(Panel::OnCollectionChanged): add support for
	CollectionChangeTypeChanging, so we can remove all children.  this
	change type is generated by Collection::Clear.

	* stylus.cpp (Stroke::OnCollectionChanged): add empty handler for
	CollectionChangeTypeChanging.
	(InkPresenter::OnCollectionChanged): same.

2008-04-14  Jeffrey Stedfast  <fejj@novell.com>

	* media.cpp (Image::CreateSurface): Robustification of image
	loading.

2008-04-14  Michael Dominic K.  <mdk@mdk.am>

	* clock.cpp:
	* clock.h: When calculating the new time in DoRepeat use modulo on new
	value. Otherwise we're 'losing' a little bit of time on every repeat and
	end time doesn't match with parent. This fixes a few more "jags" on
	animations ie. clock13.xaml.

2008-04-11  Larry Ewing  <lewing@novell.com>

	* xaml.cpp (value_from_str): make sure we propogate the error if
	color_from_string returns NULL.

	* color.cpp (color_from_str): return NULL on invalid color values
	rather than simply returning black.

	Add an error condition to color_from_string so that we pass the
	color tests in ParserErrors test.
	
2008-04-11  Rolf Bjarne Kvinge <RKvinge@novell.com> 

	* dependencyobject.cpp: Surround event emission with ref/unref of ourselves.

2008-04-11  Jeffrey Stedfast  <fejj@novell.com>

	* playlist.cpp: Disable debugging spew unless DEBUG_PLAYLISTS is
	defined.

	* downloader.cpp (Downloader::Send): Use
	TimeManager::InvokeOnMainThread() here like Rolf did in
	MediaBase. Simplifies things by not needing a surface.

	* text.cpp (TextBlock::SetFontSource): Now takes a Downloader
	object as opposed to a DependencyObject.

2008-04-11  Michael Dominic K.  <mdk@mdk.am>

	* clock.cpp: in Clock, make sure we CalcProgress on the last tick before
	we go Filling/Stopped. Without this we never "finish off" our animations
	and depending on the framerate we get "jags". Fixes the clock32.xaml
	test.

2008-04-11  Jeffrey Stedfast  <fejj@novell.com>

	* runtime.cpp: Make the dot and eraser cursors const to avoid
	compiler warnings.

2008-04-11  Michael Dominic K.  <mdk@mdk.am>

	* enums.c: Removing bolox comment and behavior. Always return -1 on
	fail.

	* xaml.cpp: Push a g_warning when we're hitting bad enums on bad props.
	Should make it a little bit easier to spot problems.

2008-04-11  Michael Dominic K.  <mdk@mdk.am>

	* dependencyobject.cpp: When calling RegisterAllNamesRootedAt be
	actually recursive (I'm not sure why this was commented out? Toshok?). 
	Fixes the sprawl end-game animation, #378748.

2008-04-11  Stephane Delcroix  <sdelcroix@novell.com>

	* runtime.cpp: create the stylus and eraser cursors from xpm. Fixes 
	bnc #375213. Implemented the MouseCursorNone too.

2008-04-10  Larry Ewing  <lewing@novell.com>

	* xaml.cpp (start_element): throw an error if there is an xml
	attribute on a dependency property.

2008-04-10  Larry Ewing  <lewing@novell.com>

	* enums.c (enum_from_str): return -1 on an invalid enum string so
	that we can catch it as a ParserError fixes
	Parser_Invalid_Enum.xaml.

2008-04-11  Rolf Bjarne Kvinge <RKvinge@novell.com> 

	* media.cpp: MediaBase::SetSource: no need to get a
	  Surface/TimeManager instance to do an asynchronous call, just
	  call TimeManager::InvokeOnMainThread.

2008-04-10  Rolf Bjarne Kvinge <RKvinge@novell.com> 

	* mplayer.h, mplayer.cpp: Added MediaPlayer::AudioFinished, called
	  by the audio thread when the audio finishes.

	* media.h, media.cpp: Added MediaElement::AudioFinished, called by
	  the media player when the audio finishes. Enables us to raise
	  MediaEnded for audio-only media.

2008-04-10  Jeffrey Stedfast  <fejj@novell.com>

	* brush.cpp|media.cpp: All SetSource() entry points now take
	Downloader objects rather than DependencyObject arguments - the
	same as MSDN defines.

	* media.cpp (SetSourceInternal): More cleanup /
	simplification. Since *::SetSource() already takes steps to be
	async, no need to use Downloader::Send() which would introduce
	another delay in downloading. It should be plenty safe to call
	Downloader::SendNow() in all ::SetSourceInternal()
	implementations. Also, we now need to handle NULL downloader which
	we get called with if the original SetSource() was passed a NULL
	downloader.
	(Image::SetSource): Don't cleanup the surface here, do that in
	SetSourceInternal() so that we delay until appropriate.
	(Image::SetSourceInternal): If there is a downloader, delay
	CleanupSurface() even longer until the new image has been
	downloaded.
	(Image::DownloaderComplete): Call CleanupSurface() here.

2008-04-10  Jeffrey Stedfast  <fejj@novell.com>

	* media.cpp: Consolidated Image and MediaElement downloader bits
	by putting them into MediaBase.

2008-04-10  Rolf Bjarne Kvinge <RKvinge@novell.com> 

	* dependencyobject.cpp: Guard against calling closures which have
	  been removed during emission of previous events in the same
	  event list: when we're emitting and a closure is removed, mark
	  the closure as pending removal, don't call it anymore, and only
	  remove it when we're finished emitting.

	* dependencyobject.h: Guard against calling closures which have
	  been removed during emission of previous events in the same
	  event list.

2008-04-10  Michael Dominic K.  <mdk@mdk.am>

	* downloader.cpp:
	* downloader.h:
	* media.cpp: A straight-forward fix for "gray flashes" in comic and
	slideshow (#375275). It's circumventing a change to make downloaders
	async for Image. Jeff, maybe you can figure more?

	(The commit that broke the the slideshow was r99065, Jeff from
	2008-03-26).

2008-04-10  Michael Dominic K.  <mdk@mdk.am>

	* shape.cpp: Little fix for new stretching algho by Stephane. Fixes the
	Showcase and test-shape-path-stretch2.xaml.

2008-04-09  Chris Toshok  <toshok@ximian.com>

	* stylus.cpp (Stroke::HitTestEndcapSegment): don't fail if root_1
	is invalid, as root_2 might be.

2008-04-09  Chris Toshok  <toshok@ximian.com>

	[ Fixes some odd behavior in
	  http://www.thedatafarm.com/silverink/, and also fixes bug
	  #375229 ]
	
	* panel.cpp (Panel::FrontToBack): Kind of a screwy change - we
	intersect the expose region with our RenderBounds, not our normal
	Bounds.  This forces us to add the ink presenter to the render
	list even when the exposed area is just going to redraw a stroke,
	not the actual canvas rectangle.  When we go to subtract, however,
	we still only subtract the canvas rectangle.

	* stylus.cpp (InkPresenter::OnPropertyChanged): invalidate the old
	stroke collection's bounds as well as the new stroke collection's
	bounds.
	(InkPresenter::OnCollectionChanged): when the collection has
	changed, we can't just use Invalidate() since that only
	invalidates the canvas bounds.  We need to invalidate our render
	bounds to get rid of strokes that are outside the canvas bounds.
	Also, make sure to also invalidate the new bounds of the stroke
	collection (it will usually be empty, but do it anyway).
	(InkPresenter::ComputeBounds): add logic to compute the
	render_bounds here.
	(InkPresenter::GetRenderBounds): new method.

	* stylus.h (class InkPresenter): add GetRenderBounds, and also add
	an OnPropertyChanged method so we can deal with the stroke
	collection being assigned to something else.

	* uielement.h (class UIElement): as much as I hate to do this, add
	yet another type of bounds (RenderBounds).  this is only here for
	the special case of the inkpresenter, which has the normal canvas
	bounds (the rectangle), the subtree bounds (which unions the
	canvas bounds with the bounds of strokes and children) and render
	bounds (which unions canvas bounds and stroke bounds.)

2008-04-09  Jeffrey Stedfast  <fejj@novell.com>

	* dependencyobject.cpp (resolve_property_path): Alias TextElement
	to TextBlock to work around some buggy beta versions of Blend.

2008-04-09  Stephane Delcroix  <sdelcroix@novell.com>

	* shape.cpp: Shape::ComputeStretchBounds: compute the stretch assuming
	the logical/shape bounds diff stays the same. It's IMHO as close as we
	can go without drawing and recalculating.

2008-04-08  Jeffrey Stedfast  <fejj@novell.com>

	* xaml.cpp: Cleaned up some of the debugging printf's and and
	wrapped them in d() to declutter console spewage when unneeded.
	(xaml_create_from_str): ctype functions take int arguments, where
	normal char values are in the range 0-255 - in order to work with
	non-GNU, need to cast from char to unsigned char.

	* error.h (class ParserErrorEventArgs): Avoid using the c++ ctor
	initializer stuff to be consistent with other classes.

2008-04-08  Sebastien Pouliot  <sebastien@ximian.com>

	* xaml.cpp: Fix (yesterday's fix) on parsing properties. Thanks 
	to Jackson.

2008-04-08  Michael Dominic K.  <mdk@mdk.am>

	* clock.cpp:
	* clock.h: SkipToFill the automatic duration clock groups except if 
	this is the root of all roots clock (the TimeManager's clock). Due to
	the idle_hint optimization, we don't process those clocks anyways.

2008-04-08  Michael Dominic K.  <mdk@mdk.am>

	* value.h: 
	* animation.cpp:
	* animation.h:
	* dependencyobject.cpp:
	* dependencyobject.h: Making sure that each property is animated only by
	a single animation at a time (the last one started). 
	From Silverlight forums:

	"Keep in mind Silverlight only supports a single animation on a
	property at a time, so if you begin multiple animations on the same
	property, the last one will prevail."

	This prevents us from overriding Filling/HoldEnd animations by sb's
	started before. 

	The implementation is: for each prop we create a hash table (when
	needed) which stores objects (keys) + last AnimationStorage attached
	(values). When new AnimationStorage is attached to a prop, the last one
	is notified to stop updating the target (we don't touch the clock
	structure). And then there is some magic to handle destroy's etc. 

	This fixes PopFly mouse enter/leave problems in the toolbox and the 
	http://www.designwithsilverlight.com/tutorials/photoGallery/gallery.html
	problems. Fixes #375231, #362363.

2008-04-07  Jeffrey Stedfast  <fejj@novell.com>

	Fixes needed for Zombomatic

	* downloader.cpp (Downloader::GetDownloadedFilePart): When
	creating the full pathname for parts we are extracting, convert
	everything to lowercase since we need to treat archived filenames
	case-insensitively.
	(Downloader::GetUnzippedPath): Convert filenames from the zip
	archive to lowercase so that it is easier for us to find them
	case-insensitively on the filesystem once they are extracted.

2008-04-07  Sebastien Pouliot  <sebastien@ximian.com>

	* xaml.cpp: Fix parsing properties by ensure they start with the 
	element name (and not something else). Fix crasher.

2008-04-07  Michael Dominic K.  <mdk@mdk.am>

	* src/shape.cpp:
	* src/shape.h: Compute the origin point as a separate step after
	computing the shape bounds and the stretch bounds. This fixes the
	recently broken sprawl.

	I think it also fixes other things. Before, given the way code was,
	the stretch_bounds would affect the origin *only* in the case of Path,
	in other cases (Line, Polygon, Polyline...) they would be ignored.

2008-04-04  Chris Toshok  <toshok@ximian.com>

	* stylus.cpp (Stroke::HitTestEndcapSegment): fix this method.  it
	was missing a bunch of tests (basically it was intersecting
	infinite lines with ellipses, not segments), and some of the math
	was wrong.

2008-04-04  Jeffrey Stedfast  <fejj@novell.com>

	Intended to fix bug #373462, but something else is preventing that
	site from working now...

	* media.cpp (MediaElement::SetSourceInternal): PartName is no
	longer a const char * argument, which means we take ownership of
	the PartName string.
	(MediaElement::SetSourceAsyncCallback): New method which is the
	async callback for SetSource().
	(MediaElement::SetSource): Reinitialize() right away.
	(MediaElement::SetSource): Clear out any pending SetSource async
	data, replacing it with the new downloader/part name info.
	(MediaElement::SetSource): Allow a NULL downloader object but make
	sure we don't crash in that case either.

2008-04-04  Sebastien Pouliot  <sebastien@ximian.com>

	* dependencyobject.cpp (resolve_property_path): Avoid crash on 
	invalid syntax and leaks in other error cases. Fix #377039 (more
	test cases coming soon).

2008-04-04  Jeffrey Stedfast  <fejj@novell.com>

	* animation.cpp (KeyFrameCollection::GetKeyFrameForTime): Return
	immediately if the array len is 0, prevents a crash accessing
	sorted_list->pdata[0] when working backwards in the second
	for-loop. Fixes one of the crashes I found while investigating bug
	#362561.

2008-04-04  Sebastien Pouliot  <sebastien@ximian.com>

	* runtime.cpp: Don't crash in strcase_hash if the hashtable 
	contains NULL values.

2008-04-03  Chris Toshok  <toshok@ximian.com>

	* runtime.cpp (Surface::InitializeWidget): disable the
	GDK_POINTER_MOTION_HINT_MASK stuff for now.  we're not passing
	tests with it enabled.
	(Surface::motion_notify_callback): force the emission of a motion
	event.

2008-04-03  Jeffrey Stedfast  <fejj@novell.com>

	* runtime.cpp (Surface::SetCursor): Stylus cursor should map to
	the pencil cursor. Also updated Hand (which should be a
	left-pointing hand, not right-pointing) and also Eraser (we need
	to make our own icon for this, but I suck at art so I'll pass for
	now).

2008-04-03  Michael Dominic K.  <mdk@mdk.am>

	* shape.cpp:
	* shape.h: Calculate the logical extents when computing the shape bounds
	and pass them to the ComputeStretchBounds. They're currently not used in
	any way.

2008-04-03  Michael Dominic K.  <mdk@mdk.am>

	* shape.cpp: Don't init the stretch matrix to identity on each
	Shape::ComputeShapeBounds. We want to be able to call it freely.

2008-04-02  Michael Dominic K.  <mdk@mdk.am>

	* geometry.cpp: Use the cairo_path_extents to calculate the logical
	bounds instead of faking small stroke.

2008-04-02  Michael Dominic K.  <mdk@mdk.am>

	* shape.cpp:
	* shape.h: Adding new parameter (bool logical) to all the
	Shape::ComputeShapeBounds functions and overrides. See prev commit for
	explanation of what is logical bounds.

	Currently all clients use logical == false. Just adding this
	functionality.

2008-04-02  Michael Dominic K.  <mdk@mdk.am>

	* geometry.cpp:
	* geometry.h:
	* shape.cpp:
	* uielement.cpp: Adding new parameter (bool logical) to all the
	Geometry::ComputeBounds functions and overrides. Calculating logical
	bounds means calculating bounds without stroke included. Ie. a line
	(0,0) - (100, 0) has logical bounds of width=100, height=0, no matter
	what the stroke is. 

	Not used right now, will be used in just a few commits (all current
	ComputeBounds clients call it will logical == false).

2008-04-02  Michael Dominic K.  <mdk@mdk.am>

	* shape.cpp: Don't automatically compute the stretch bounds when
	computing shape bounds. Instead, compute it as a separate step in
	Shape::ComputeBounds.

2008-04-03  Chris Toshok  <toshok@ximian.com>

	* uielement.cpp (UIElement::EmitMouseLeave): turns out that,
	contrary to msdn2, MS *is* indeed emitting this event with
	non-null eventargs.  it's just an EventArgs object, not a
	MouseEventArgs.

2008-04-03  Jeffrey Stedfast  <fejj@novell.com>

	* dependencyobject.cpp (EventObject::Emit): Unref the calldata
	even in the "no such event" exception case.

2008-04-03  Larry Ewing  <lewing@novell.com>

	* xaml.cpp: (expat_parser_error): translate XML_ERROR_NO_ELEMENTS
	into appropriate error code.

2008-04-03  Larry Ewing  <lewing@novell.com>

	* xaml.cpp: Generate errors when trying to set readonly properties.

2008-04-03  Larry Ewing  <lewing@novell.com>

	* xaml.cpp: make sure we set an error if the property name isn't
	valid.

	* runtime.cpp: make it legal to attach to a NULL toplevel, hook up
	the needed events.

2008-04-03  Larry Ewing  <lewing@novell.com>

	* runtime.cpp (Surface::expose_to_drawable): make sure we take
	allocation.x and allocation.y into account when deciding not to
	draw.  Should fix the disappearing gtksilver widget reported on irc.

2008-04-02  Larry Ewing  <lewing@novell.com>

	* xaml.cpp: flush character data at the end of property elements
	too.

2008-04-02  Jackson Harper  <jackson@ximian.com>

	* xaml.cpp: Add the element name for this error.

2008-04-02  Chris Toshok  <toshok@ximian.com>

	* stylus.cpp (Stroke::HitTestEndcapSegment): fix up some math.
	(Stroke::HitTestEndcapPoint): same.
	(point_gte_line): new method.
	(point_lte_line): new method.
	(Stroke::HitTestSegmentPoint): use point_gte_line and
	point_lte_line to determine if the point is inside the segment.
	(global): wrap all spew in DEBUG_HITTEST.
	
2008-04-02  Rolf Bjarne Kvinge <RKvinge@novell.com> 

	* pipeline.cpp, mplayer.cpp, pipeline.h: Remove SeekToStart completely, it's
	  just plain broken.

2008-04-02  Jeffrey Stedfast  <fejj@novell.com>

	* media.cpp (MediaElement::UpdatePlayerPosition): Cast to same
	integer type when comparing.

	* playlist.cpp (Playlist::OnMediaEnded): Prevent a segfault in the
	debugging printfs. Fixes bug #375273.

2008-04-01  Chris Toshok  <toshok@ximian.com>

	* xaml.cpp: back out the SetSurface call removal.

	* dependencyobject.cpp (EventObject::unref): instead,
	SetSurface(NULL) here before we delete the object.

2008-04-01  Chris Toshok  <toshok@ximian.com>

	* control.cpp (Control::InitializeFromXaml): make sure to call
	SetSurface(NULL) on the old real_object since we're detaching it
	from the tree.  Call SetSurface on ourselves (really, should just
	be the real_object, right?) before calling the real_object methods
	that would cause dirty stuff to happen.

	* xaml.cpp (create_custom_element): don't call SetSurface here, it
	will cause problems if there's a parser error (since elements
	can/will be on the surface's dirty list after they're destroyed.)
	(default_create_element_instance): same.

2008-04-01  Rolf Bjarne Kvinge <RKvinge@novell.com> 

	* playlist.cpp, playlist.h: A lot of fixes according to the tests.
	* mplayer.h, mplayer.cpp: Initialize the rgb buffer. Add a start_pts to
	  specify where in the stream we start and (playlists can specify a
	  starting point which isn't in the beginning), and set the duration from
	  the playlist (if the playlist has it).
	* media.cpp: MediaElement::SetMedia: Handle the case if mplayer returns
	  false from MediaPlayer::Open. MediaElement::MediaOpened: Handle the case
	  if the recursive playlist couldn't be replaced.

2008-04-01  Rolf Bjarne Kvinge <RKvinge@novell.com> 

	* media.h: Added MediaElement::GetPlaylist.

2008-04-01  Rolf Bjarne Kvinge <RKvinge@novell.com> 

	* type.cpp, type.cpp.in, type.h, type.h.in, value.cpp, value.h, value.h.in:
	  Remove Type::NPOBJ, it's not needed.

2008-04-01  Michael Dominic K.  <mdk@mdk.am>

	* animation.cpp: Since now the clocks are synced we don't need to
	recursively check the states in the teardown on completed.

2008-04-01  Michael Dominic K.  <mdk@mdk.am>

	* clock.cpp:
	* clock.h: Getting rid of the nasty clock desyncing (setting ClockGroup
	manually to Stopped but not touching the state of children).

	We do this by introducing a new idle_hint on ClockGroup. If idle_hint is
	set, we don't tick the ClockGroup no matter what the state is. Idle_hint
	is set when all children of ClockGroup have state != Active (ie. are
	filling). This can be seen as "optimization" -- not to dumbly process
	filling clocks which keep setting same value all the time (it creates
	insane recursion ie. in Showcase making it unusable). Silverlight seems
	to do something very similiar.

	Before this commit a same effect was achieved by the said "desyncing" --
	forcing the ClockGroup to Stopped. This approach however is a bit more
	clean. 

2008-04-01  Michael Dominic K.  <mdk@mdk.am>

	* animation.cpp: Chain to parent's Clock::Stop in AnimationClock::Stop.

2008-04-01  Rolf Bjarne Kvinge <RKvinge@novell.com> 

	* pipeline.cpp: Use base_unref, base_unref_delayed doesn't exist anymore.

2008-04-01  Rolf Bjarne Kvinge <RKvinge@novell.com> 

	* value.cpp: Remove a few warnings which might give false positives now.

2008-04-01  Rolf Bjarne Kvinge <RKvinge@novell.com> 

	* dependencyobject.h, dependencyobject.cpp: EventObject::unref: check if
	  we're being unreffed on the main thread, if not, call unref_delayed.

2008-04-01  Rolf Bjarne Kvinge <RKvinge@novell.com> 

	* runtime.cpp, runtime.h: Added a Surface::InMainThread.

2008-04-01  Fernando Herrera  <fherrera@novell.com>

	* media.cpp: Remove the request position function when aborting the
	downloader.

2008-04-01  Rolf Bjarne Kvinge <RKvinge@novell.com> 

	* media.cpp, media.h, mplayer.cpp, mplayer.h: Add a dtor parameter to
	  MediaElement::Reinitialize and MediaPlayer::Close to specify if we're
	  being called from the destructor, and if so, null out the element field
	  of the MediaPlayer, so that we don't access a destructed media element.
	  Add an async version of MediaPlayer::EnqueueFrames, so that the audio
	  threads can request more data in a thread-safe manner.

2008-04-01  Fernando Herrera  <fherrera@novell.com>

	* asf/asf.cpp:
	* pipeline.h: Support for live mms streams, that have packet_count as
	0 and return false for CanSeekToPts.

2008-03-31  Chris Toshok  <toshok@ximian.com>

	* namescope.h, namescope.cpp: make no semblance of having a
	superior namescope implementation (where they get transported
	around with the subtree they're attached to when it's
	removed/re-added to the hierarchy.)  Instead follow MS's broken
	implementation where temporary namescopes are completely removed
	when merged into another one.

	* collection.h, collection.cpp (Collection::MergeNames): factor
	out some common code from Add, Insert, and SetVal. Also, deal with
	the fact that merging namescopes now really adds all the names to
	the parent namescope, so clear the old namescope.
	(Collection::SetVal): don't just unregister the old toplevel name,
	but all the names in the subtree.
	(Collection::Remove): same.
	(Collection::Clear): same.
	(Collection::UnregisterAllNamesRootedAt): override DO's method,
	recursing into all our children.
	(Collection::RegisterAllNamesRootedAt): same.
	(VisualCollection::VisualRemoved): clear the IS_LOADED flag so
	UIElement::OnLoaded is called again, and <BeginStoryboard>
	elements restart when the subtree is added to the hierarchy again.

	* control.h, control.cpp (Control::UnregisterAllNamesRootedAt):
	override and forward onto real_object.
	(Control::RegisterAllNamesRootedAt): same.
	
	* dependencyobject.cpp (DependencyObject::ClearValue): add a
	parameter to allow us to specify *not* to notify listeners of the
	property change.  we do this with the NameScope property, which
	noone should be listening too.  It was causing a tremendous
	performance hit when merging a lot of namescopes (as we do in
	inkStylusPointCount.htm)
	(DependencyObject::UnregisterAllNamesRootedAt): used when a DO is
	removed from the hierarchy, we need to unregister all the names
	beneath it.
	(DependencyObject::RegisterAllNamesRootedAt): used when a DO is
	added to the hierarchy, if it doesn't have a temporary
	namescope (in which case we just merge it).

2008-03-31  Rolf Bjarne Kvinge <RKvinge@novell.com> 

	* pipeline.cpp, pipeline.h: MemorySource: Add a value specifying if the
	  MemorySource owns the memory or not (if it will be freed upon
	  destruction or not).

2008-03-31  Jeffrey Stedfast  <fejj@novell.com>

	* stylus.cpp (Stroke::HitTestEndcap): Fixed a bug where the
	for-loop would only use every other point as a starting point for
	a segment. E.g. if you had points a, b, c, d and e - the code only
	checked segments ab, cd, and e when it should have been checking
	ab, bc, cd, and de.

2008-03-31  Fernando Herrera  <fherrera@novell.com>

	* downloader.cpp: Check if aborted before cheking for requested
	position.

2008-03-31  Rolf Bjarne Kvinge <RKvinge@novell.com> 

	* pipeline.cpp, pipeline.h: Moved locking down to IMediaSource from
	  ProgressiveSource.
	* playlist.cpp: Updated according to pipeline changes.
	* mplayer.h: Fix SetState to not overwrite current bits, only current state.
	* media.h, media.cpp: Rework buffering progress to use the available time of
	  media available (pts) instead of doing some funny math on file
	  positions.
	* mplayer.cpp: Don't allow SetTargetPts if we're waiting for a seek.

2008-03-31  Michael Dominic K.  <mdk@mdk.am>

	* animation.cpp: Don't Stop the Storyboard root_clock before begining
	the Storyboard again, just silently tear it down.

	Calling Stop resets the property values to base which is something we
	don't want. When Begin () is called on Sb in SL, the last animated
	values are used. 

2008-03-31  Michael Dominic K.  <mdk@mdk.am>

	* animation.cpp:
	* animation.h: Adding Storyboard::DetachClockGroupFromParent () that
	works similar to Teardown but doesn't destroy the clock/animation
	hierarchy. We need this hierarchy to ie. reset prop values to base when
	Storyboard::Stop is called manually. 

	When Storyboard is completed, call DetachClockGroupFromParent (if not
	Teardown). Otherwise the Storyboard will ghostly change state with parent 
	state changes.

2008-03-31  Michael Dominic K.  <mdk@mdk.am>

	* animation.cpp: Slightly reworking the clock_is_fully_stopped_recursive
	to check for NULL and report stopped == true when both ClockGroup state
	is Stopped and all children are Stopped. 

	To be honest, this never currently reports Stopped == true as we do
	intentional state desync when storyboard reaches end -- setting the
	ClockGroup state to Stopped but keeping the children in Active/Filling.
	This *has* to go away.

2008-03-29  Rolf Bjarne Kvinge <RKvinge@novell.com> 

	* src.mdp: Updated.

2008-03-28  Jeffrey Stedfast  <fejj@novell.com>

	* utils.cpp (TextStream::Read): Better handling of iconv() failure
	cases.

2008-03-28  Chris Toshok  <toshok@ximian.com>

	* animation.cpp, animation.h: remove Storyboard::FindSurface -
	EventObject::GetSurface() always returns the right thing.
	Override SetSurface to check whether we're being detached from or
	attached to a surface, and pause or resume the clock in response.
	This fixes some issues in storyboard_EnterLeaveSemantics.

2008-03-28  Chris Toshok  <toshok@ximian.com>

	* dependencyobject.h,
	dependencyobject.cpp (DependencyObject::SetSurface): new method,
	set the surface for all our DependencyObject subclassed property
	values.

	* collection.h, collection.cpp (Collection::Add): SetSurface work.
	(Collection::Insert): same.
	(Collection::SetVal): same.
	(Collection::Remove): same.
	(Collection::RemoveAt): same.
	(Collection::Clear): same.
	(Collection::SetSurface): new method, iterate over all children
	setting the surface.
	(VisualCollection): remove surface logic here.
	(VisualCollection::VisualAdded): same.
	(VisualCollection::VisualRemoved): same.

2008-03-28  Rolf Bjarne Kvinge <RKvinge@novell.com> 

	* mplayer.cpp: Clear all queues after a seek has completed.

2008-03-28  Jeffrey Stedfast  <fejj@novell.com>

	* text.cpp (deobfuscate_font): Updated for CopyFileTo() rename.

	* downloader.cpp (Downloader::CleanupUnzipDir): Updated for
	RemoveDir() rename.
	(create_unzipdir): Updated for MakeTempDir() rename.

	* utils.cpp (MakeTempDir): Renamed from make_tmpdir() to try and
	be more consistent with moonlight API naming convensions.
	(RemoveDir): Renamed from moon_rmdir().
	(CopyFileTo): Renamed from moon_copy_file()

2008-03-28  Rolf Bjarne Kvinge <RKvinge@novell.com> 

	* debug.cpp: Fix warning.

2008-03-28  Michael Dominic K.  <mdk@mdk.am>

	* clock.cpp: Fixing the clock repeat for duration-based
	RepeatBehavior. 
	
	Fixes the clock14.xaml and clock31.xaml tests. All 31 clock tests are
	passing now (same behavior as in SL).

2008-03-28  Michael Dominic K.  <mdk@mdk.am>

	* clock.cpp: In ComputeNewTime: when we're moving backward and hitting
	the bound decrease the repeat_count no matter what (if auto-reversed or
	not). This makes the auto-reversed storyboard work.

	Fixes the clock7.xaml and clock30.xaml. The only clock test broken now
	is clock14.xaml.

2008-03-28  Michael Dominic K.  <mdk@mdk.am>

	* animation.cpp: Teardown the storyboard in Completed only if the root
	clock is stopped AND all the children are stopped too. After teardown we
	loose the ability to reset-back the values and Completed is
	fired always, even if the clock is filling (a filling clock should reset
	on Stop).
	
	This ie. fixes http://www.idcorporate.com.ar/ and other sites that use
	the popular methodology of beginning a filling Storyboard on MouseEnter
	and stopping it on MouseLeave.

2008-03-27  Michael Dominic K.  <mdk@mdk.am>

	* runtime.cpp: Ignore the enter/leave crossing events coming as a 
	result of grab/press started/finished.

2008-03-28  Rolf Bjarne Kvinge <RKvinge@novell.com> 

	* uielement.cpp, pipeline.h, media.cpp, brush.cpp: Update according to
	  MediaPlayer changes.
	* mplayer.cpp, mplayer.h: Major cleanup in MediaPlayer: make all fields
	  private, and add public accessors when required. Remove all boolean
	  fields and add a single bit/state field with its corresponding enum and
	  public accessors. Removed IncTargetPts, StopThreads and PauseInternal,
	  no longer used. Removed unused defines. Made video and audio structures
	  nested inside MediaPlayer instead of pointers (and queue inside
	  video/audio), avoids pointer accesses and additional malloc/frees, since
	  they were always created anyways. Don't seek to anywhere in Stop if
	  we're stopping because we're closing, since it may cause crashes if
	  we're closing because the MediaElement is being destructed (it may cause
	  the MediaElement to be resurrected). Made public methods private
	  whenever possible.

2008-03-28  Fernando Herrera  <fherrera@novell.com>

	* asf/asf.cpp: Use the pts == 0 optimization before trying to
	SeekToPts.

	* downloader.cpp:
	* downloader.h: Add functions to allow request a remote postition.

	* media.cpp:
	* media.h:
	* pipeline.cpp:
	* pipeline.h: Implement SeekToPts for mms:// sources.

2008-03-28  Rolf Bjarne Kvinge <RKvinge@novell.com> 
	
	* dependencyobject.h: Detect an unrecoverable error condition with
	  refcounting (reffing an object with refcount of 0), and abort instead of
	  crashing randomly and insecurely later on.

2008-03-28  Rolf Bjarne Kvinge <RKvinge@novell.com> 

	* mplayer.h, mplayer.cpp: Remove more unused fields in MediaPlayer.

2008-03-27  Jeffrey Stedfast  <fejj@novell.com>

	* downloader.cpp (Downloader::GetResponseText): Use the new
	TextStream class.

	* utils.cpp (TextStream::Open): Fixed the BOM checking, had LE/BE
	reversed.

	* xaml.cpp (xaml_create_from_file): Oops, if we read 0 bytes, make
	sure to exit the loop ;-)

2008-03-27  Jeffrey Stedfast  <fejj@novell.com>

	* xaml.cpp (xaml_create_from_file): Use the new TextStream class
	instead of doing things the hard way. Might be more performant,
	definitely won't malloc/free nearly as much. Also fixed a bug
	where leading lwsp might be larger than our read buffer.

	* utils.cpp (TextStream): New class for reading text input
	streams, converting them to UTF-8 as they are read.

	* downloader.cpp (Downloader::Send): Handle the case where the
	attached surface is NULL.
	(Downloader::GetResponseText): Handle zero-length files. Also,
	nul-terminate the returned buffer (which is now a char* rather
	than a void*) since it is clear that the javascript expects to be
	able to use this value as a string buffer.

2008-03-27  Rolf Bjarne Kvinge <RKvinge@novell.com> 
	
	* mplayer.h, mplayer.cpp: Don't create any audio threads until we're
	  requested to play audio. Don't hold the lock when polling.

2008-03-26  Jeffrey Stedfast  <fejj@novell.com>

	* downloader.cpp (Downloader::SendInternal): New method that is
	basically the same as the old ::Send().
	(Downloader::Send): Queue the SendInternal() call via
	TimeManager's TickCall API.

2008-03-26  Chris Toshok  <toshok@ximian.com>

	* dependencyobject.h, dependencyobject.cpp (class EventObject):
	add RemoveMatchingHandlers variants that let you pass in a
	predicate to test event handlers with.

2008-03-26  Rolf Bjarne Kvinge <RKvinge@novell.com> 

	* pipeline.cpp, pipeline.h: ASFDemuxer: updated according to asf
	  changes.  Added a MemoryStream.

	* media.cpp: Updated according to API changes.

2008-03-26  Rolf Bjarne Kvinge <RKvinge@novell.com> 

	* mplayer.cpp, mplayer.h: Add a new state to the audio:
	  WaitingForData, in which case we don't poll on that audio
	  node (since the hardware will just tell us it's ready to recieve
	  data). Fixes audio using 100% cpu after when it runs out of
	  data (either because of network hiccup or the stream finished).

2008-03-26  Rolf Bjarne Kvinge <RKvinge@novell.com> 

	* pipeline.cpp, mplayer.cpp, pipeline.h: Made
	  IMediaStream::selected private and add accessors.

2008-03-26  Stephane Delcroix  <sdelcroix@novell.com>

	* shape.h:
	* shape.cpp: set the dash caps for all the shapes, draw start/end caps
	on line and polylines.

2008-03-26  Rolf Bjarne Kvinge <RKvinge@novell.com> 

	* mplayer.cpp: Remove unused fields.

2008-03-26  Rolf Bjarne Kvinge <RKvinge@novell.com> 

	* debug.cpp: Correctly compute base addresses of libraries, and use a
	  thread-safe version of strtok.

2008-03-26  Rolf Bjarne Kvinge <RKvinge@novell.com> 

	* runtime.h, runtime.cpp, pipeline.cpp: Reverse the meaning of our YUV flag
	  - it's now necessary to explicitly disable it in order to get rid of it
	  instead of relying on a default flag to have the right value in order to
	  get it. Makes video work with mopen again.

2008-03-26  Rolf Bjarne Kvinge <RKvinge@novell.com> 

	* pipeline.cpp: Fix a crash.

2008-03-26  Rolf Bjarne Kvinge <RKvinge@novell.com> 

	* mplayer.cpp: Remove Instance (), it's redundant.
	* mplayer.h: AudioPlayer: Remove Instance (), it's redundant. Synchronize
	  everything in the audio player with one semaphore, it simplifies things
	  and removes a couple of problems helgrind found.
	* pipeline.cpp: ~Media: Add a nullcheck. Media::Initialize: Initialize the
	  audio player as well. Use delayed unreffing in destructors which may be
	  called on worker threads.

2008-03-26  Rolf Bjarne Kvinge <RKvinge@novell.com> 

	* runtime.cpp, runtime.h: Remove the pending unref stuff from Surface.
	* dependencyobject.cpp: Remove the surface-based delayed unloading, it's not
	  thread-safe and making it thread-safe isn't worth it. Also use a pthread
	  mutex instead of a glib mutex, since helgrind reports a lot of false
	  positives for glib mutexes. Hold the mutex for the smallest amount of
	  time possible, making it unnecessary to use a recursive mutex.

2008-03-26  Michael Dominic K.  <mdk@mdk.am>

	* shape.cpp: Reverting the clip changes, it was bolox.

2008-03-25  Jeffrey Stedfast  <fejj@novell.com>

	* pipeline.cpp (Mp3FrameReader::EstimatePtsPosition): Get rid of
	the assert - it was only needed during implementation to make sure
	the bsearch worked correctly.
	(Mp3FrameReader::Seek): Same.

2008-03-25  Rolf Bjarne Kvinge <RKvinge@novell.com> 

	* media.cpp: Don't access any TimeManager instance from another thread, just
	  call the static TimeManager::InvokeOnMainThread.

2008-03-25  Michael Dominic K.  <mdk@mdk.am>

	* src/shape.cpp: Shape is empty always when it's bounds are <= 0.0, even
	if Width/Height was specified. Fixes a bogus warning about infinity
	transformations.

2008-03-25  Michael Dominic K.  <mdk@mdk.am>

	* src/shape.cpp: When setting the clipping for the shape also include
	the transformations coming from stretching. This fixes
	test-shape-line-stretch3 test and the missing stripes on Silverlight
	showcase.

2008-03-24  Chris Toshok  <toshok@ximian.com>

	* runtime.h (class Surface): add
	Surface::PropagateDirtyFlagToChildren.

	* dirty.cpp (Surface::PropagateDirtyFlagToChildren): factor this
	duplicated code out of ProcessDownDirtyElements.

2008-03-24  Chris Toshok  <toshok@ximian.com>

	* panel.cpp (Panel::FrontToBack): remove the tree walking
	code (where we walked up the hierarchy looking for cases where we
	shouldn't subtract.)  Instead, we always subtract if the local
	state says we can.  Instead of forcing all leaf elements to walk
	up to their parent panel, we assume they'll operate on local state
	as well, and give them a copy of the region to subtract their
	bounds from, instead of the real region.  We are sneaky.

	* uielement.cpp (UIElement::FrontToBack): Operate on our local
	state only, no walking up the tree.

2008-03-24  Jeffrey Stedfast  <fejj@novell.com>

	* pipeline.cpp (mpeg_parse_header): Fix the MPEG layer parsing, it
	was seemingly getting layer 1 and layer 2 backwards.
	(mpeg_frame_length): Seems like we are never supposed to add 2
	bytes for 16bit crc?

	* layout.cpp (TextLayout::LayoutWrap): If the glyph advance is 0,
	then don't bother applying kerning. Fixes 2 cases in
	LineBreakClasses.htm
	(TextLayout::LayoutWrap): Disable breaking after a
	G_UNICODE_BREAK_AFTER if we can break before the word as this
	seems to fix the last test case in LineBreakBasic1.htm
	(TextLayout::LayoutWrap): Reverted a fix that introduced a
	regression but didn't fix any known test cases.

2008-03-21  Michael Dominic K.  <mdk@mdk.am>

	* src/runtime.cpp: When calling gdk_window_get_pointer in
	motion_notify_ to pop more hints actually use the results as they're
	more valid than x,y in the event passed. Without doing so, we're not
	getting the last mouse coords.

	Fixes the nasty problem that MouseEnter/Leave is not called once in a
	while.

2008-03-21  Rolf Bjarne Kvinge <RKvinge@novell.com> 

	* brush.cpp, media.cpp, mplayer.cpp, mplayer.h: Refcount MediaPlayer. Rename
	  MediaPlayer::GetSurface to GetCairoSurface so that it doesn't conflict
	  with EventObject::GetSurface.

2008-03-20  Jeffrey Stedfast  <fejj@novell.com>

	* font.cpp (TextFont::GetGlyphInfo): Comment out the fixed-width
	font hack for now.

	* text.cpp (deobfuscate_font): New helper function used by
	TextBlock and Glyphs.
	(TextBlock::DownloaderComplete): Check for obfuscated fonts.
	(Glyphs::DownloaderComplete): Same.

	* font.cpp (DecodeObfuscatedFontGUID): New function to decode the
	GUID from a string.
	(DeobfuscateFontFileWithGUID): Deobfuscate a font file in-place.
	(TextFont::OpenFontDirectory): Renamed from OpenZipArchiveFont()
	since we no longer get passed zip files. Instead of extracting
	fonts from a zip archive, we now index the fonts in the
	directory (if they haven't already been indexed) and then try to
	find the best matching font from the indexed fonts.
	(IndexFontDirectory): New function to index all fonts in a
	directory (and all subdirs).
	(TextFont::TextFont): Changed for other API changes.

2008-03-20  Jeffrey Stedfast  <fejj@novell.com>

	* downloader.cpp (Downloader::IsDeobfuscated)
	(Downloader::SetDeobfuscated, Downloader::SetDeobfuscatedFile):
	Some new methods for replacing the original downloaded file with
	another tmp file that will need to be unlinked when the downloader
	is destroyed or a new file is requested.

	* utils.cpp (moon_copy_file): New convenience function.

2008-03-20  Jeffrey Stedfast  <fejj@novell.com>

	* downloader.cpp (Downloader::Downloader): Initialize the unzipdir
	and unzipped state variables. Get rid of part_hash, no longer
	needed.
	(Downloader::CleanupUnzipDir): New method to cleanup the files
	extracted from any zip files we downloaded.
	(Downloader): Call CleanupUnzipDir ().
	(Downloader::GetDownloadedFile): New method that gets the original
	untouched downloaded file path.
	(Downloader::DownloadedFileIsZipped): New method to check to see
	if the downloaded file is a zip archive.
	(Downloader::GetDownloadedFilePart): A new method that replaces
	the old GetResponseFile() API, behaves the same as the old API.
	(Downloader::GetUnzippedPath): New method to get the unzip
	directory path (and unzip the downloaded file if it hasn't already
	been unzipped).
	(Downloader::Open): Cleanup any extracted zip files.

	* utils.cpp (moon_rmdir): New convenience function.

2008-03-20  Larry Ewing  <lewing@novell.com>

	* runtime.cpp (Surface::ShowFullScreenMessage): make sure we set
	the surface first so that the changes to the properties cause
	invalidations.

2008-03-20  Rolf Bjarne Kvinge <RKvinge@novell.com> 

	* src.mdp: Added new files.

2008-03-19  Rolf Bjarne Kvinge <RKvinge@novell.com> 

	* pipeline.h: Added CanSeekToPts and SeekToPts to IMediaStream.

2008-03-19  Rolf Bjarne Kvinge <RKvinge@novell.com> 

	* pipeline.h: Added two more error conditions.

2008-03-19  Jeffrey Stedfast  <fejj@novell.com>

	* font.cpp (TextFont::GetGlyphInfo): Use a different approach to
	caching glyphs. Try to take full advantage of the pre-allocated
	glyphs array before clobbering previously loaded glyphs.

2008-03-19  Michael Dominic K.  <mdk@mdk.am>

	* src/dependencyobject.cpp: Making the prop resolving a bit more
	gracefull (smart) in case of common mistakes. 

	Solves test-crash-gracefull-prop-resolving.xaml.

2008-03-19  Rolf Bjarne Kvinge <RKvinge@novell.com> 

	* pipeline.cpp: We need to unlock the mutex before joining the
	thread. Fixes a dead-lock.

2008-03-19  Geoff Norton  <gnorton@novell.com>

	* yuv-converter.cpp:  Use xmm0 to store a load value to avoid a
	repeated load.

2008-03-19  Geoff Norton  <gnorton@novell.com>
	
	* yuv-converter.cpp:  More 64-bit fixes

2008-03-19  Geoff Norton  <gnorton@novell.com>
	
	* yuv-converter.cpp:  Fix the test/cmp on x86-64

2008-03-18  Geoff Norton  <gnorton@novell.com>

	* yuv-converter.cpp:  Fold RESTORE_COLOR_MODIFIERS into
	CALC_COLOR_MODIFIERS and prepare our own branches rather than trusting
	gcc.  The aligned load/store version of CALC_COLOR_MODIFIERS was
	clobbering (x)mm3 (green coefficient) when processing the high order
	pels.  I've reordered the method to remove some useless load/calc
	patterns that were there simply for readability and fixed the
	clobbering.
	
2008-03-18  Jeffrey Stedfast  <fejj@novell.com>

	* font.cpp (TextFontDescription::CreatePattern): Always return the
	original pattern.
	(TextFont::Load): No longer takes a fromFile argument.
	(TextFont::TextFont): Cache using the original pattern (which is
	what we really wanted to do originally, but were caching the
	"closest-match" pattern before which was wrong).
	(TextFont::GetGlyphInfo): Use FT_Get_Char_Index() rather than
	FcFreeTypeCharIndex(). Doesn't fix any bugs, just avoids use of
	wrapper API that is unnecessary.
	(TextFont::GetGlyphInfo): Added a gross hack for *Che fonts.

2008-03-18  Geoff Norton  <gnorton@novell.com>

	* yuv-converter.cpp: 768bits != 768bytes.  Implement prefetching the 
	cache lines for the Y plane.
	
2008-03-18  Andrew Jorgensen  <ajorgensen@novell.com>

	* plugin-ffmpeg.cpp: Remove avformat dependency (not needed anymore)
	* plugin-ffmpeg.h: Fix conditional swscale inclusion

2008-03-18  Michael Dominic K.  <mdk@mdk.am>

	* animation.cpp:
	* animation.h: Adding a new virtual method GetValueKind to Animation
	that returns the kind/type of values that given animation generates
	(doubles, points, etc.).

	Modyfying the HookupStorage to check if the animation type matches the
	type that the animated property expects. If it doesn't, bail out with a
	helpfull warning in the style of:

	"Ellipse.Fill property value type is 'Brush' but animation type is
	'Color'"

	This fixes a crash in test-crash-color-anim-on-solid.xaml and all
	crashes where we try to animate ie. a color property using doubles.

2008-03-18  Michael Dominic K.  <mdk@mdk.am>

	* animation.cpp: Even more smoothing for KeySpline.

2008-03-18  Michael Dominic K.  <mdk@mdk.am>

	* dependencyobject.cpp: Enabling back the inheritance test for property
	resolving but only when dealing with non-attached properties. 

2008-03-17  Geoff Norton  <gnorton@novell.com>

	* Makefile.am:
	* pipeline-ffmpeg.cpp:
	* pipeline-ffmpeg.h:
	* swscale-converter.cpp:
	* swscale-converter.h:  Refactor the swscale based yuv2rgb converter
	out to a seperate file so it can be included optionally in the build.

2008-03-18  Rolf Bjarne Kvinge <RKvinge@novell.com> 

	* mplayer.cpp: Show error message, not only error number, upon thread
	  creation failure.

2008-03-18  Rolf Bjarne Kvinge <RKvinge@novell.com> 

	* playlist.cpp, playlist.h: Add a way to determine if the playlist was
	  created to play a single file, or if it was created from an asx file
	  (IsSingleFile).

2008-03-17  Chris Toshok  <toshok@ximian.com>

	* dependencyobject.cpp (EventObject::EventObject): reorder things
	to quiet g++.

2008-03-17  Geoff Norton  <gnorton@novell.com>

	* yuv-converter.cpp: __attribute ((aligned ())) can be ignored
	for locals.  Use posix_memalign and share the instance for the 
	lifespan of the converter.
	
2008-03-17  Jeffrey Stedfast  <fejj@novell.com>

	* font.cpp (FontPackFileFace::FontPackFileFace): Now takes an
	index argument, apparently FreeType2 always set face->face_index
	to 0 for these type fonts, so don't rely on it being accurate.
	(FontPack::CacheFileInfo): Pass the index value as an argument to
	FontPackFileFace's ctor.
	(TextFont::TextFont): Do hash lookups based on the matched
	pattern, not the original pattern passed in.

2008-03-17  Jeffrey Stedfast  <fejj@novell.com>

	* text.h: Added #include "layout.h"

	* font.cpp: Removed font.cpp's layout logic which has been
	rewritten in layout.cpp.
	(TextFont::HasGlyph): It seems that Silverlight may wrap text
	differently depending on whether the glyph is in the font?

	* layout.cpp (TextLayout::LayoutWrap): More tweaking action...

2008-03-17  Geoff Norton  <gnorton@novell.com>

	* yuv-converter.cpp: Ensure that our pointer alignment checks are
	64-bit safe.

2008-03-17  Michael Dominic K.  <mdk@mdk.am>

	* animation.cpp: Interpolate linearly between keyspline values. This
	fixes the jags in test-animation-slow-keyspline.xaml.

2008-03-17  Michael Dominic K.  <mdk@mdk.am>

	* animation.cpp: Fixes to the way we generate the KeySpline values to be
	more smooth an precise.

2008-03-17  Larry Ewing  <lewing@novell.com>

	* runtime.cpp: go ahead and invalidate the toplevel before
	cleaning everything up. remove the disconnect call in
	DestroyWidget, all the handlers should be ok with getting called
	on fullscreen or the normal widget.

2008-03-14  Jeffrey Stedfast  <fejj@novell.com>

	* layout.cpp (TextLayout::LayoutWrap): Added some improved unicode
	line breaking logic.

2008-03-14  Geoff Norton  <gnorton@novell.com>
	
	* yuv-converter.cpp: Remove some dead code.

2008-03-14  Geoff Norton  <gnorton@novell.com>

	* mplayer.cpp: We actually need to align % 64 bytes on a 16 byte 
	bounary.  Each pel will expand to 4 bytes.  Since we process 16
	pels at a time in SSE2 we need 64 output bytes per iteration.

	* yuv-converter.cpp: Remove the rest of the unaligned move/stores

2008-03-14  Sebastien Pouliot  <sebastien@ximian.com>

	* xaml.cpp: (flush_char_data) free data inside GString since the
	Value constructed around it creates it's own copy.

2008-03-14  Geoff Norton  <gnorton@novell.com>

	* pipeline-ffmpeg.cpp: Use posix_memalign for the YUV data buffers
	to get a 16byte alignment for SSE2.
	* yuv-converter.cpp: Remove most of our unaligned load/stores.

2008-03-14  Larry Ewing  <lewing@novell.com>

	* collection.h:
	* error.h:     
	* eventargs.h, enventargs.cpp:
	* type.h, type.cpp: make EventArgs a subclass of DependencyObject
	and all that entails.  Still need to look over the properties.

	* runtime.cpp, runtime.h: expose EmitError for now.
	
2008-03-14  Larry Ewing  <lewing@novell.com>

	* mplayer.cpp (MediaPlayer::Open): use posix_memalign to allocate
	with a a 16bit alignment for the yuv converter.

2008-03-14  Sebastien Pouliot  <sebastien@ximian.com>

	* xaml.cpp: (expat_parser_error) ParserErrorEventArgs free it's 
	own copy of the message.

2008-03-14  Jeffrey Stedfast  <fejj@novell.com>

	* font.cpp (TextRun::TextRun): Can't drop non-printable chars
	because soft-hyphen is apparently non-printable.

2008-03-14  Jeffrey Stedfast  <fejj@novell.com>

	* text.cpp (Glyphs::Layout): Check for NULL glyphs (which can
	happen now if the glyph does not exist in the font).
	(Glyphs::Render): Same.

	* font.cpp (TextFont::GetGlyphInfo): Added a new GetGlyphInfo
	which takes a unichar and index. This is now the main
	implementation that the other GetGlyphInfo() and
	GetGlyphInfoByIndex() use. The glyph table is now indexed by index
	rather than unichar.

2008-03-14  Jeffrey Stedfast  <fejj@novell.com>

	* text.cpp (Glyphs::Layout): Don't error out on (1:1) clusters
	without a specified index, these are ok.

2008-03-14  Michael Dominic K.  <mdk@mdk.am>

	* brush.cpp: In ImageBrush, if the image has not been downloaded
	yet, draw nothing like SL does -- instead of the grayish shadow.

2008-03-14  Michael Dominic K.  <mdk@mdk.am>

	* dependencyobject.cpp: Check the types of objects when
	resolving_property_paths and some more verbosity to the error
	reporting. Now test-crash-non-existing-animation-target-prop3
	fails with the proper warning.

	Also, terminate first on first error found.

2008-03-14  Michael Dominic K.  <mdk@mdk.am>

	* dependencyobject.cpp: Even more verbose error reporting in the
	resolve_property_path ().

2008-03-14  Michael Dominic K.  <mdk@mdk.am>

	* animation.cpp: Making the warning report proper error when can't
	resolve property on object. Now we're getting:

	"No property named
	(UIElement.RenderTransform).(TransformGroup.Children)[0].(ScaleTransform.ScaleX)
	on object ball, which has type Ellipse!"

2008-03-14  Michael Dominic K.  <mdk@mdk.am>

	* animation.cpp: Check correctly if we have object and property
	before trying to hookup storage.

	Fixes the crash in test-crash-non-existing-animation-target-prop.xaml
	but the warning message is still incorrect:

		"No object named ball!"

	The object named "ball" exists but it doesn't have the requested
	property.

2008-03-14  Michael Dominic K.  <mdk@mdk.am>

	* animation.cpp: Changing few printf's to g_warnings.

2008-03-14  Stephane Delcroix  <sdelcroix@novell.com>

	* shape.cpp: Deal with different [start|end|dash] caps for lines 
	and polylines.

2008-03-14  Rolf Bjarne Kvinge <RKvinge@novell.com> 

	* mplayer.cpp: Comment out printf.

2008-03-14  Rolf Bjarne Kvinge <RKvinge@novell.com> 

	* mplayer.cpp: AudioNode::Play: property calculate the delay between the
	  play position in the hardware and the pts we just sent to alsa, and
	  subtract it from that pts.

Thu Mar 13 23:25:41 CET 2008 Paolo Molaro <lupus@ximian.com>

	* clock.cpp: use a monotonic clock if available to avoid issues with
	the system time changing.

2008-03-13  Jeffrey Stedfast  <fejj@novell.com>

	* layout.cpp (TextRun::TextRun): Don't drop non-printable
	chars... somehow soft-hyphen (0xAD) is non-printable according to
	glib and so breaks the LineBreakBasic1.htm test.
	(TextLayout::LayoutNoWrap): Keep appending words to the line until
	a line ends beyond max_width, we don't care where it begins (it
	could begin way beyond max_width for all we care).

2008-03-13  Chris Toshok  <toshok@ximian.com>

	* text.cpp (~Glyphs): don't unref the fill, since we don't take a
	ref on it.

2008-03-13  Rolf Bjarne Kvinge <RKvinge@novell.com> 

	* mplayer.cpp: Make this build on SLED until I find a proper workaround.

2008-03-13  Rolf Bjarne Kvinge <RKvinge@novell.com> 

	* media.cpp: Update according to MediaPlayer changes.

2008-03-13  Rolf Bjarne Kvinge <RKvinge@novell.com> 

	* mplayer.cpp, mplayer.h, pipeline.cpp: Play audio on a single
	thread. Fixes #326902.

2008-03-13  Rolf Bjarne Kvinge <RKvinge@novell.com> 

	* Makefile.am: Set our G_LOG_DOMAIN.

2008-03-13  Rolf Bjarne Kvinge <RKvinge@novell.com> 

	* xaml.cpp: default_create_element_instance: Set the surface as soon as
	  possible.

2008-03-13  Michael Dominic K.  <mdk@mdk.am>

	* animation.cpp: Modyfying the KeyFrameCollection::GetKeyFrameForTime
	behavior. When getting the keyframe for time additionally crawl back (if
	needed) to find the last non-null keyframe and non-null previous
	keyframe. By doing so we silently ignore the frames without values set
	and don't crash on nullable types.

	Fixes the crash in AnimationMatrix2.html/xaml and in the
	test-animation-null-keyframe.xaml test.

	Remving the XXX warnings about nullabled types from file since they
	don't apply anymore.

2008-03-13  Rolf Bjarne Kvinge <RKvinge@novell.com> 

	* visual.h, uielement.cpp, visual.cpp: Remove the 'surface' field from
	  Visual, we're already storing the surface in the EventObject.
	* dependencyobject.cpp: EventObject::unref_delayed: remove the #if false,
	  and comment out the warning, since with the current code it's entirely
	  possible to unref a dependecyobject with no surface.

2008-03-13  Stephane Delcroix  <sdelcroix@novell.com>

	* brush.cpp: compute relative transform as it's done in SL. We used to
	derelativize transform to match the absolute ones. Now we map the brush
	to a 1x1 square, apply the transform, and unmap back. It simplify the 
	computation a lot too. Fixes bnc #354892 and a bad gradient in 
	brushes.xaml.

2008-03-12  Chris Toshok  <toshok@ximian.com>

	* media.cpp (expand_rgb_to_argb): use a different codepath if the
	rowstride isn't padded out to be divisible by 4 (or else we read
	off the end by a byte).

2008-03-13  Rolf Bjarne Kvinge <RKvinge@novell.com> 

	* pipeline.cpp: ASFDemuxer: Only seek in the selected streams.

2008-03-12  Rolf Bjarne Kvinge <RKvinge@novell.com> 

	* pipeline.cpp, pipeline.h: Break all media threads upon media shutdown.
	* pipeline-ffmpeg.cpp: Don't check if we've been registered before, the
	  pipeline correctly removes registered infos upon shutdown, so if we're
	  initialized again we should also register again.
	* runtime.cpp: Call Media::Shutdown do shut down the media threads before
	  doing anything else.

2008-03-12  Jeffrey Stedfast  <fejj@novell.com>

	* font.cpp (TextRun::TextRun): Fixed canonicalization logic.

	* text.cpp (TextBlock::LayoutSilverlight): When creating a list of
	TextRun's, if the Run contains \n's, break the text into
	non-linebreak and linebreak TextRun elements. Allows the
	TextLayout::Layout() logic to be simplified considerably.

2008-03-12  Rolf Bjarne Kvinge <RKvinge@novell.com> 

	* dependencyobject.cpp: DependencyObject: Initialize our surface field to
	  NULL.

2008-03-12  Rolf Bjarne Kvinge <RKvinge@novell.com> 

	* pipeline.h, pipeline.cpp: Add logging macros. Use ErrorEventArgs for error
	  reporting so that the errors can easily be bubbled up the pipeline. Add
	  a 'selected' field to IMediaStream, whether the media player is using
	  that stream or not.
	* error.h: Add a MediaErrorEventArgs class.

2008-03-12  Rolf Bjarne Kvinge <RKvinge@novell.com> 

	* pipeline.cpp: Propagate the surface from the media element to the media.

2008-03-12  Rolf Bjarne Kvinge <RKvinge@novell.com> 

	* mplayer.cpp, pipeline.cpp, pipeline.h: Add a 'selected' field to the
	  IMediaStream, indicates whether the stream is being played or not.

2008-03-12  Sebastien Pouliot  <sebastien@ximian.com>

	* dependencyobject.cpp: Add NULL check in method 
	RemovePropertyChangeListener since a bad XAML input can cause a
	NULL entry in the list.

2008-03-12  Michael Dominic K.  <mdk@mdk.am>

	* runtime.cpp:
	* runtime.h:
	* shape.cpp: Properly calculate the shape cache depending on our bpp etc.

2008-03-12  Rolf Bjarne Kvinge <RKvinge@novell.com> 

	* xaml.cpp: xaml_create_from_file: if there was some error loading the file,
	  don't crash, print an error message. Dup all strings put into
	  namespace_map, and free them all upon its destruction.

2008-03-11  Larry Ewing  <lewing@novell.com>
	
	* collection.cpp (VisualCollection::VisualAdded): make sure we set
	the surface as the first step, dirty processing depends on it.
	Fixes OM_RemoveClearRemoveAt.htm regression.

2008-03-11  Larry Ewing  <lewing@novell.com>

	* canvas.h:
	* canvas.cpp (Canvas::OnPropertyChanged): listen to changes on Top
	and Left when we are toplevel so that we can recompute our
	transform.

	* uielement.cpp: if we don't have a parent call GetTransformFor on
	ourself so that Top and Left are taken into account on toplevel
	canvases.  Fixes test-canvas-toplevel.xaml

2008-03-11  Chris Toshok  <toshok@ximian.com>

	* clock.h, clock.cpp: a few changes, the most important
	being (ifdefed for now) code to put the timemanager to sleep when
	it's not needed for animations, rendering, or tick calls.  To do
	this we need a couple of changes to the clock code.  1) propagate
	the time_manager out to all clocks, so we can force it to tick the
	clock hierarchy the first time whenever a storyboard is started.
	2) make Clock/ClockGroup::Tick return a bool, which means "i'll be
	in need of another tick."  Do the same for the tick call stuff,
	where the bool return value means "we have more tick calls
	pending."  Also, add a couple of methods to the
	TimeManager (NeedRedraw, NeedClockTick) which will start up the
	timemanager if it's asleep, and set the proper flag so it'll do
	the right work on the next tick.


	* uielement.cpp: notify the timemanager that we have a redraw to
	process.
	
	* runtime.cpp (Surface::realized_callback): tell the time manager
	to redraw us to get the process moving.

2008-03-11  Sebastien Pouliot  <sebastien@ximian.com>

	* xaml.cpp: Work around the fact that it's not always safe to 
	call some expat functions, like XML_GetCurrentLineNumber, if the
	parsing failed early.

2008-03-11  Chris Toshok  <toshok@ximian.com>

	* namescope.h, namescope.cpp: switch from reffing the objects to
	using the DestroyedEvent.  Otherwise our toplevel canvas has a ref
	cycle with its namescope.  Also, short circuit out if we're
	registering the same object twice.  keeps us from having too many
	DestroyedEvents (since RemoveHandler only removes one).

	* dependencyobject.h, dependencyobject.cpp: move
	GetSurface/SetSurface to EventObject, and add unref_delayed as a
	method.  If the event object has a surface associated with it, add
	it to the surface's pending list of unrefs.  otherwise warn us and
	add it to the global list.  The warnings should be fixed as the
	global list really should go away.

	Also, before we free a value, make sure to remove our handler and
	unset the closure.

	Also, get rid of OBJECT_TRACK_ID.  use an environment variable for
	this.  So if you compile with OBJECT_TRACKING on, nothing new
	happens unless you set the "MOONLIGHT_OBJECT_TRACK_ID" environment
	variable to the id of the object you want to track.  Makes the
	turnaround time a little quicker.

	shift some things around in the header file while I'm making this
	change.

	* runtime.h, runtime.cpp: move some more methods to the .cpp from
	the .h, and also add the per-surface pending unrefs list.  This is
	basically a c&p of the global list from dependency.cpp.

	* downloader.h, downloader.cpp: remove Get/Set Surface in favor of
	using EventObject's.
	
2008-03-11  Sebastien Pouliot  <sebastien@ximian.com>

	* xaml.cpp: Add NULL check in dependency_object_add_child since
	parent->parent->item may be NULL in malformed XAML files.

2008-03-11  Rolf Bjarne Kvinge <RKvinge@novell.com> 

	* pipeline.h, media.cpp, pipeline.cpp: Rename GetPositionOfPts to
	  EstimatePtsPosition and remove the estimate parameter, it's never used.

2008-03-11  Rolf Bjarne Kvinge <RKvinge@novell.com> 

	* runtime.cpp: No need to scream in printfs.

2008-03-11  Jeffrey Stedfast  <fejj@novell.com>

	* font.cpp (TextLayout::Layout): More fixes, this is getting
	gross.

2008-03-11  Sebastien Pouliot  <sebastien@ximian.com>

	* xaml.cpp: Avoid crashing if the PML does not start with a 
	M(ove) instruction.

2008-03-11  Michael Dominic K.  <mdk@mdk.am>

	* src/: Moving implementations from .h to .cpp, leaving only
	setters/getters + simple constructors in .h.

2008-03-11  Larry Ewing  <lewing@novell.com>

	* xaml.cpp (dependency_object_set_property): throw an error if we
	get here without a DependencyObject.  Fixes
	test-property-parsing.xaml

2008-03-10  Larry Ewing  <lewing@novell.com>

	* panel.cpp:
	* uielement.cpp: add more checks to the parent tree.

2008-03-10  Chris Toshok  <toshok@ximian.com>

	* dependencyobject.cpp (~DependencyObject): use
	g_hash_table_foreach_remove, so the dtor of one value can't access
	an already destroyed DO from another value.

2008-03-10  Chris Toshok  <toshok@ximian.com>

	* namescope.cpp: don't explicitly unref the object when removing
	it.  instead use base_unref as the value-dtor for the GHashTable.
	This will cause unrefs when the hash table is destroyed in the
	dtor (a case we were missing before.)

	* collection.h, collection.cpp (class Collection): factor out the
	body of Collection::Clear into a non-virtual method that we can
	call from the dtor.

2008-03-10  Larry Ewing  <lewing@novell.com>

	* uielement.cpp:
	* panel.cpp: make sure we don't subtract the region unless non of
	our anscestors have a slip mask.  This should be implemented in a
	more efficient way.

2008-03-11  Rolf Bjarne Kvinge <RKvinge@novell.com> 

	* playlist.cpp, playlist.h: Move PlaylistContent info PlaylistEntry.

2008-03-11  Rolf Bjarne Kvinge <RKvinge@novell.com> 

	* dependencyobject.h, dependencyobject.cpp: Enable object counting when
	  DEBUG is defined.
	* runtime.cpp: Show a message if we leak objects and DEBUG is defined.
	* pipeline.cpp: Remove printfs.

2008-03-10  Larry Ewing  <lewing@novell.com>

	* geometry.h:
	* geometry.cpp: make IsBuilt check for actual path data as well
	then use it everywhere we need it.  Invalidate the path if the
	figures change.  Fixes test-transform-clip.htm.

2008-03-11  Rolf Bjarne Kvinge <RKvinge@novell.com> 

	* playlist.cpp: Playlist::AddEntry: unref the entry after adding it.

2008-03-11  Rolf Bjarne Kvinge <RKvinge@novell.com> 

	* mplayer.cpp: When stopping, we need to seek to the beginning again. Fixes
	  #368461.

2008-03-11  Rolf Bjarne Kvinge <RKvinge@novell.com> 

	* media.cpp: Update according to pipeline changes. TryOpen: our
	  downloaded_file field may change when we call MediaOpened, so save a
	  local copy before calling MediaOpened. Unref our playlist upon
	  destruction, and 
	* mplayer.cpp: Update according to changes in the pipeline.
	* pipeline.cpp, pipeline.h: Delete all but one of GetNextFrameAsync, the
	  rest aren't used. Make the remaining method take the stream as a
	  parameter, and the resulting frame will be put in the closure. Also
	  handle the case when the codec returns MEDIA_CODEC_DELAYED, in which
	  case just try again with the next frame. Make MediaWork ref/unref the
	  fields that can be ref counted. 
	
2008-03-10  Chris Toshok  <toshok@ximian.com>

	[ Fixes bug #368460 ]
	* collection.cpp (Collection::SetVal): make sure to unregister the
	name of the object(s) we remove from the collection.
	(Collection::Remove): same.
	(Collection::RemoveAt): same.
	(Collection::Clear): same.

	* namescope.cpp (NameScope::RegisterName): ref the object.
	(NameScope::UnregisterName): unref the object.

2008-03-10  Jeffrey Stedfast  <fejj@novell.com>

	* font.cpp (TextLayout::Layout): More line-wrap fixes - implement
	Silverlights TextWrapping="Wrap" bug where it doesn't ever break
	the last word.

2008-03-10  Rolf Bjarne Kvinge <RKvinge@novell.com> 

	* src.mdp: Updated.

2008-03-10  Rolf Bjarne Kvinge <RKvinge@novell.com> 

	* dependencyobject.h: Make the OBJECT_TRACKING stuff public.
	* runtime.cpp: Use GetRefCount, not refcount.

2008-03-10  Chris Toshok  <toshok@ximian.com>

	* runtime.h, runtime.cpp: add surface_get_time_manager.

	* downloader.h, downloader.cpp: add downloader_get_surface.
	
2008-03-10  Michael Dominic K.  <mdk@mdk.am>

	* runtime.cpp:
	* runtime.h:
	* shape.cpp: Making the shape-caching a runtime parameter
	(shapecache=yes). Turned off right now.

2008-03-10  Michael Dominic K.  <mdk@mdk.am>

	* shape.cpp: Tiny refactoring to the surface-size calculation code.

2008-03-10  Michael Dominic K.  <mdk@mdk.am>

	* runtime.h:
	* shape.cpp: Adding functionality to limit the amount of caching
	happening on one surface. Currently set to ~6mb. 

2008-03-09  Larry Ewing  <lewing@novell.com>

	* mplayer.cpp: fix another place that used the wrong stride.

2008-03-09  Geoff Norton  <gnorton@novell.com>

	* yuv-converter.cpp: Make sure we emms after finishing sse/mmx 
	instrucitons.

2008-03-09  Geoff Norton  <gnorton@novell.com>

	* yuv-converter.cpp: Detect the CPU features at runtime.  We
	should now be able to distribute a 32-bit SSE2/MMX build to
	non SSE2/MMX machines

2008-03-09  Geoff Norton  <gnorton@novell.com>

	* yuv-converter.cpp: Implement runtime fallbacks in the Convert
	function (TODO: Still need to runtime detect SSE2/MMX) 

2008-03-09  Larry Ewing  <lewing@novell.com>

	* mplayer.cpp (MediaPlayer::Open): make the stride % 16 for now.

2008-03-09  Larry Ewing  <lewing@novell.com>

	* mplayer.cpp (MediaPlayer::Open): use the proper stride
	calculation functions.

2008-03-08  Geoff Norton  <gnorton@novell.com>

	* yuv-converter.cpp:  Implement a SSE2 version of the YUV2RGB
	codepath along with some code cleanup.  Still some more cleanup
	to do for runtime detection of CPU features.

2008-03-08  Geoff Norton  <gnorton@novell.com>

	* yuv-converter.cpp:  Fix some erroneous math.  U' != U.
	These coefficients are far more sane now and our lum change is 
	reflected properly.

2008-03-08  Chris Toshok  <toshok@ximian.com>

	* clock.cpp (TimeManager::SourceTick): larry gets credit for
	spotting this problem and suggesting the fix.  remove the
	hysteresis code, and *always* set a new timeout, based on what our
	idea of the timeout and the amount of time we spent rendering the
	previous frame.  This smooths things out immensely, removes (for
	me) the animation stutters induced by audio in sprawl, and results
	in fewer dropped frames.

2008-03-08  Geoff Norton  <gnorton@novell.com>

	* yuv-converter.cpp: Fix the luminance problem (Y needs shift;
	and b was pulling the wrong l/h value.

2008-03-08  Chris Toshok  <toshok@ximian.com>

	* value.cpp (Value::CreateUnrefPtr): use GetRefCount() instead of
	accessing dob->refcount.
	(Value::CreateUnref): same.

	* dependencyobject.h, dependency.cpp (class EventObject): reorder
	this class definition so that we don't have multiple
	public/protected/private areas.  confusing as hell :) Also, move
	the implementations of the non-performance critical things into
	the .cpp file, as they were making the .h rather cluttered (ctor,
	dtor, weak ref/unref.)  Lastly, make almost everything private
	instead of public (most importantly the refcount.)

	* debug.h, debug.cpp: random code cleanup.  we don't need to be
	concerned with adding some additional stack methods to the plugin
	in the DEBUG case, so go ahead and just use DEBUG here instead of
	STACK_DEBUG.

2008-03-08  Chris Toshok  <toshok@ximian.com>

	* uielement.cpp, text.cpp, clock.cpp, mplayer.cpp: remove the
	extern guint32 moonlight_flags.

	* pipeline.cpp: if RUNTIME_INIT_CONVERTER_YUV, use the yuv
	converter, otherwise use ffmpeg.

	* runtime.h: add RUNTIME_INIT_CONVERTER_YUV to the list of init
	flags, and (my god) put the extern moonlight_flags here.

	* runtime.cpp: add yuv converter options. use
	MOONLIGHT_OVERRIDES=converter=yuv to enable it.  default is
	"converter=ffmpeg".

2008-03-08  Geoff Norton  <gnorton@novell.com>

	* yuv-converter.cpp: Clear the mmx state when we're done
	processing.  Fixes most problems on x86_32.

2008-03-08  Geoff Norton  <gnorton@novell.com>

	* pipeline.cpp: Disable YUV converter, its crashing on x86_32
	currently.

2008-03-08  Geoff Norton  <gnorton@novell.com>
	
	* pipeline-ffmpeg.cpp:  Dont register YUV converter here.
	* pipeline.cpp: Register YUV converter here.

2008-03-08  Geoff Norton  <gnorton@novell.com>

	* yuv-converter.cpp:  Remove some code duplication and refactor
	to support register starved implementations.

2008-03-08  Geoff Norton  <gnorton@novell.com>

	* Makefile.am: Add yuv-converter.cpp to the build
	* yuv-conveter.*: Our YUV2RGB 420P converter.  Replaces
	libswscale.
	* pipeline-ffmpeg.cpp: Use YUVConverter instead of libswscale.

2008-03-08  Chris Toshok  <toshok@ximian.com>

	* clock.h, clock.cpp, animation.cpp: a few clock related changes.

	1. Revert the change that uses "forward" to tell if we're moving
	forward or not.  This isn't the only indicator, as a parent clock
	might be ticking backward, so we really do need to use "our_delta"

	2. Also, we need to not clamp the time of the clock (on either
	end) when we're filling, as if the parent's duration is longer
	than ours and they autoreverse, there needs to be some padding in
	the reverse direction before we start again.

	3. Only call ComputeBeginTime() on a newly created clock if the
	timeline has a begin time specified.  Otherwise, use
	BeginOnTick/GetBeginOnTick to make it begin on the next tick.
	This fixes the chess animation breakage.  The problem was caused
	by us computing the begin time immediately in Storyboard::Begin,
	which would calculate the clock's begin time relative to the
	*previous* tick.  on the next tick, the clock was almost always at
	1.0 progress, which caused the animations to skip directly to the
	end.

2008-03-08  Chris Toshok  <toshok@ximian.com>

	* value.cpp, type.cpp, type.cpp.in, trigger.cpp, runtime.cpp,
	dirty.cpp, dependencyobject.cpp: more assert removal.  we can't
	assert in a plugin (even if people are running a debug build it's
	not exactly nice to bring down their browser.)

2008-03-07  Chris Toshok  <toshok@ximian.com>

	* value.cpp (Value::CreateUnrefPtr): don't assert here.
	(Value::CreateUnref): same.

2008-03-08  Rolf Bjarne Kvinge <RKvinge@novell.com> 

	* type.cpp.in, typegen.cs, type.cpp: If the type system is accessed when
	  it's not initialized, print a warning and re-initialize it.

2008-03-08  Fernando Herrera  <fherrera@novell.com>

	* pipeline.cpp:
	* playlist.cpp:
	* playlist.h: Add support for ASX2 playlist files returned by
	mediaservers when requesting a mmsh file over plain http. Fixes
	http://channel9.msdn.com.

2008-03-08  Rolf Bjarne Kvinge <RKvinge@novell.com> 

	* pipeline.cpp: Add a couple of null checks in ~Media. Detect ASX files
	  case-insensitively.

2008-03-08  Rolf Bjarne Kvinge <RKvinge@novell.com> 

	* pipeline.h, pipeline.cpp: Refcount IMediaObject, and make dtors in all
	  derived classes protected.
	* media.cpp: Update according to pipeline changes. TryOpen: our
	  downloaded_file field may change when we call MediaOpened, so save a
	  local copy before calling MediaOpened.

2008-03-08  Rolf Bjarne Kvinge <RKvinge@novell.com> 

	* clock.cpp, clock.h: Added TimeManager::InvokeOnMainThread.
	* mplayer.cpp: Use TimeManager::InvokeOnMainThread instead of finding a
	  TimeManager instance to add the timeout to.

2008-03-07  Sebastien Pouliot  <sebastien@ximian.com>

	* downloader.cpp: Fix access to Status from JScript.

2008-03-07  Rolf Bjarne Kvinge <RKvinge@novell.com> 

	* mplayer.cpp: LoadVideoFrame: if we got the last frame, don't request any
	  more frames.

2008-03-07  Sebastien Pouliot  <sebastien@ximian.com> 

	* brush.cpp: Fix default value for ColorInterpolationMode (js
	unit tests)
	* parsertest.cpp: Adapt to API change.
	* xaml.cpp|h: Change value_from_str[_with_typename] to return a
	bool since NULL can be a valid Value in some cases (e.g. empty
	stuff that should not reset the DO default values).

2008-03-07  Rolf Bjarne Kvinge <RKvinge@novell.com> 

	* mplayer.cpp: Add a null check before accessing any time managers.

2008-03-07  Rolf Bjarne Kvinge <RKvinge@novell.com> 

	* brush.cpp, uielement.cpp: Use MediaElement::GetMediaPlayer instead of
	  accessing the field.
	* media.cpp, media.h: Use MediaElement::GetMediaPlayer instead of accessing
	  the field. Update according to pipeline changes.
	* mplayer.cpp, mplayer.h: Update according to pipeline changes.
	* pipeline.cpp, pipeline.h: Make Media inherit from EventObject so that it
	  can be ref counted. Make MediaClosure more intelligent by ref/unreffing
	  the context and media fields. All variations of MediaWork has a closure,
	  so move the closure field out of the union. This simplifies
	  Media::WorkerLoop a bit. Add a Media::SeekToStart, which is required to
	  not cause any reads/seeks which may block. Remove SetQueueCallback, the
	  request takes a closure now. Implement an ASXDemuxer to read ASX files.
	* sizes.cpp: Updated.
	* playlist.h, playlist.cpp: First part of the new playlist support.

2008-03-07  Rolf Bjarne Kvinge <RKvinge@novell.com> 

	* dependencyobject.cpp: Make the output in EventObject::Track print
	  atomically. Really avoids a lot of confusion if several threads are
	  printfing at the same time.

2008-03-07  Rolf Bjarne Kvinge <RKvinge@novell.com> 

	* debug.cpp: Add a couple of null checks.

2008-03-06  Jeffrey Stedfast  <fejj@novell.com>

	* font.cpp (TextLayout::Layout): Don't wrap on a space char, ever.
	(TextLayout::Layout): Don't include trailing lwsp in the line
	width calculation unless it is the last line.
	(TextLayout::Layout): Don't include trailing empty lines in the
	height calculation.

2008-03-06  Chris Toshok  <toshok@ximian.com>

	* clock.h, clock.cpp: some changes to make TimeManager a
	per-surface item, instead of a singleton/global.  The time manager
	creates a root clock group, just like Surface used to, which is
	the parent of all storyboards for a surface.
	
	* dirty.h, dirty.cpp: remove the method prototypes and globals -
	switch everything to be Surface:: methods.
	
	* runtime.h, runtime.cpp: get rid of our ClockGroup and Timeline
	for the root clock, and create a TimeManager instead.  Also, add
	the dirty methods/fields to Surface, even though the
	implementation still lives in dirty.cpp.  Also, call
	toplevel->SetSurface(NULL) early in our dtor so that elements can
	react before, e.g., the time manager has been destroyed.

	* media.h, media.cpp: use the surface's TimeManager instead of a
	global one.  Also override SetSurface so we can tell if we're
	losing access to it, and remove our timeout accordingly.

	* mplayer.cpp: use the media element's TimeManager.

	* visual.h, visual.cpp: add GetTimeManager() method, which just
	does GetSurface()->GetTimeManager().

	* dependencyobject.cpp (base_unref_delayed): as much as I hate to
	do this, use a g_idle instead of a tick call here, since we have
	no access to the surface.

	* animation.cpp (Storyboard::Begin): the surface no longer has the
	root clock group, the surface's TimeManager does.

	* panel.h, panel.cpp (SetSurface): recursively call SetSurface on
	our children.

	* uielement.h, uielement.cpp: translate global dirty calls into
	surface calls, and override SetSurface to remove ourselves from
	the dirty list if we're losing our surface.

	* eventargs.cpp: translate global dirty calls into surface calls.
	
2008-03-06  Michael Dominic K.  <mdk@mdk.am>

	* src/clock.cpp: In ClockGroup Clamp the time *before* ticking on
	child clocks. Othewise children always get a small delta and keep
	going beyond the parent Duration bounds. Fixes the contrained
	storyboard examples.

	Also making the forward/backward ComputeNewTime behavior depend on
	'forward' instead of out_delta (which can be 0 if hitting bounds).

2008-03-06  Sebastien Pouliot  <sebastien@ximian.com>

	* transform.cpp: Fix Matrix default values to match identity 
	matrix (and fix one js unit test).

2008-03-05  Larry Ewing  <lewing@novell.com>

	* shape.cpp: drop the code that checks stretch when building the
	paths for polyline and polygon.  Fix the condition for translation.

2008-03-05  Larry Ewing  <lewing@novell.com>

	* shape.h:
	* shape.cpp: refactor the stretch code slightly and fix the
	original stretch tests (that passed the harness but are clearly
	wrong).

2008-03-06  Rolf Bjarne Kvinge <RKvinge@novell.com> 

	* media.h: Made destructors in objects deriving from EventObject protected,
	  preventing 'delete obj' and stack-allocation for these objects.
	
	* playlist.cpp: Can't delete downloaders anymore, unref it.

2008-03-06  Rolf Bjarne Kvinge <RKvinge@novell.com> 

	* animation.h, brush.h, canvas.h, clock.h, collection.h, control.h,
	  dependencyobject.h, downloader.h, frameworkelement.h, geometry.h,
	  namescope.h, panel.h, runtime.h, shape.h, stylus.h, text.h, transform.h,
	  trigger.h, uielement.h, visual.h: Made destructors in objects deriving
	  from EventObject protected, preventing 'delete obj' and stack-allocation
	  for these objects.
	* demo.cpp, runtime.cpp: Can't delete a surface anymore, unref it.
	* dirty.h: Added header.

2008-03-05  Chris Toshok  <toshok@ximian.com>

	* runtime.h (RUNTIME_INIT_DESKTOP, RUNTIME_INIT_BROWSER): make
	front-to-back rendering the default.

2008-03-06  Rolf Bjarne Kvinge <RKvinge@novell.com> 

	* clock.h, playlist.h, trigger.h, text.h, clock.cpp, playlist.cpp,
	  trigger.cpp, dependencyobject.h, downloader.cpp, dependencyobject.cpp,
	  media.h, animation.h, brush.h, runtime.h, media.cpp, animation.cpp,
	  runtime.cpp, text.cpp: Updated event handling to take an EventArgs*
	  calldata instead of a gpointer.
	* error.h: Added EventArgs, a base class for all *EventArgs.
	* collection.h: Make ChangeEventArgs inherit from EventArgs.
	* uielement.cpp: Create all *EventArgs on the heap and simply the code a
	  bit.
	* collection.cpp: Don't allocate Collection::ChangeEventArgs on the stack.
	* eventargs.cpp, eventargs.h: Added EventArgs, a base class for all
	  *EventArgs. Added MarkerReachedEventArgs.
	* brush.cpp: Updated event handling to take an EventArgs* calldata instead
	  of a gpointer. ~ImageBrush: don't delete, unref.

2008-03-06  Rolf Bjarne Kvinge <RKvinge@novell.com> 

	* value.cpp: Fix warning.

2008-03-05  Larry Ewing  <lewing@novell.com>

	* shape.cpp: Fix line, polyline and polygon to apply stretches
	properly (modulo pesimistic shape bounds bugs).  Mostly fixes
	test-shape-line-stretch2.xaml, test-shape-polyline-stretch2.xaml
	and test-shape-polygon-stretch2.xaml. 

	* shape.h: move stretch transform out of Path and into Shape.

	* stylus.h:
	* stylus.cpp: include the strokes in the subtree bounds so that we
	will get invalidations and update bounds when the collection
	changes.  There are still potential bounds issues point changes,
	those are being looked into.  Fixes invalidation issues in
	test-inkpresenter-position and test-inkpresenter-scale.

2008-03-05  Rolf Bjarne Kvinge <RKvinge@novell.com> 

	* xaml.cpp: Add a null at the end of the namespace array.

2008-03-05  Jeffrey Stedfast  <fejj@novell.com>

	* font.cpp (TextRun::TextRun): Drop \r's and convert non-new-line
	white space into a simple space.
	(TextLayout::Layout): Treat embedded \n's as LineBreaks
	(TextLayout::Layout): When calculating the width of a line that
	ends in a space, don't include the width of the space char -
	Silverlight doesn't seem to.
	(TextLayout::Layout): Don't pad the height. Don't pad the width
	either, altho it seems like a padding of +2.0 is about right but
	ONLY if the text is in a canvas? See OMTextInline.htm's
	actualWidth/Height measurements as well as the out-of-tree
	measurement.

	* xaml.cpp (char_data_handler): Always create the GString cdata,
	we need to note leading lwsp which the old implementation didn't.
	(flush_char_data): Try to emulate Silverlight's chug/chomp
	behavior more closely.

2008-03-05  Chris Toshok  <toshok@ximian.com>

	* canvas.cpp (Canvas::OnSubPropertyChanged): make sure to chain up
	to panel's OnSubPropertyChanged if we don't handle it.

	* dependencyobject.cpp (DependencyObject::NotifyListenersOfPropertyChange):
	make sure we don't call this method with NULL args.  Also, remove
	larry's g_warning (which wasn't the case, i tested with sprawl!),
	and also remove the check for matching property/parent type for
	attached properties.  this will break controls.

	* transform.h, transform.cpp: it used to be that logical parents
	of children could rely on OnSubPropertyChanged being invoked for
	any property change.  This is no longer the case - the only
	instance where it still happens is if there's an attached property
	involved.  All other cases have to use OnCollectionChanged.  So,
	switch OnSubPropertyChanged to OnCollectionChanged here.

2008-03-05  Jeffrey Stedfast  <fejj@novell.com>

	* text.cpp (TextBlock::OnCollectionChanged): We need to update
	bounds/text even if element_args is NULL (because adding/removing
	an item still changes our text).
	(Inline::OnPropertyChanged): Use args->new_value.

2008-03-05  Chris Toshok  <toshok@ximian.com>

	* transform.h, transform.cpp: remove
	TransformCollection::OnSubPropertyChanged.  it was gumming up the
	works.

2008-03-05  Larry Ewing  <lewing@novell.com>

	* shape.cpp: disable the shape caching code for now unless
	USE_OPT_SHAPE_SURFACE_CACHING=1.

2008-03-05  Michael Dominic K.  <mdk@mdk.am>

	* Makefile.am:
	* enums.c:
	* enums.h:
	* xaml.cpp: Taking out all the enum->str (and vice versa) code from
	xaml.cpp and putting it into a new file -> enum.c + some utilities. 

	The enum<->str code is not specific to xaml and is usefull from plugin as
	well.

2008-03-05  Stephane Delcroix  <sdelcroix@novell.com>

	* media.cpp: close the pixbuf_loader to load the small images too.

2008-03-04  Chris Toshok  <toshok@ximian.com>

	* runtime.cpp (Surface::expose_to_drawable): re-enable the
	clearing of the cairo surface, but only if we have a
	widget (i.e. not in the windowless plugin case.)  Should fix
	translucent desklets without breaking the plugin.

2008-03-04  Chris Toshok  <toshok@ximian.com>

	[ rather large change, reworking much of the property change event
	system to be a little smaller api surface-wise, and also cleaning
	up uses of it to remove some of the accumulated cruft that we'd
	developed over the past 10 months.]
	
	* dependencyobject.h, dependencyobject.cpp: A few key changes:

	1. Attach -> AddPropertyChangeListener
	   Detach -> RemovePropertyChangeListener
	   NotifyAttachersOfPropertyChange -> NotifyListenersOfPropertyChange

	   This was done to remove the confusion between "attached"
	   properties and our use of the word "attach" to mean "listen for
	   property changes".  Attached properties are those which
	   implicitly notify the parent when they're changed.
	
	   OnChildPropertyChanged is gone.  Canvas (the only user of it)
	   now uses OnSubPropertyChanged to deal with child property
	   changes.

	2. *PropertyChanged methods take a
	   structure (PropertyChangedEventArgs) that contains the
	   DependencyProperty, as well as the old and new values of it.
	   This was to remove the need for almost every
	   OnPropertyChangedMethod to immediately call GetValue on the
	   property.  Passing the old value requires changing the
	   current_values hash to not have a value destructor, so we have
	   to manually delete values again.

	3. Reordered the args for
	   AddPropertyChangeListener/RemovePropertyChangeListener so that
	   the listener comes first and the second arg defaults to NULL.
	   Cleans up a bit of the use of this method globally.

	* animation.h, animation.cpp: track OnSubPropertyChanged changes.

	* brush.h, brush.cpp (SolidColorBrush::OnPropertyChanged,
	LinearGradientBrush::OnPropertyChanged,
	RadialGradientBrush::OnPropertyChanged): remove, unnecessary.

	also lots of changes to use args->new_value instead of calling
	GetValue(property).

	Clear up confusion regarding the meaning of the property passed to
	AddPropertyChangeListener.

	* canvas.h, canvas.cpp: switch OnChildPropertyChanged to
	OnSubPropertyChanged.
	
	* collection.h, collection.cpp (Node::Node): don't add parent as a
	listener for every property change here.  We handle this
	specifically (and automatically) in
	DependencyObject::NotifyListenersOfPropertyChange, but only for
	attached properties.
	(Node::~Node): don't remove the listener here either.

	lots of tracking the DO api changes here too.

	* control.h, control.cpp: track On*PropertyChanged changes.

	* font.cpp: fix some warnings

	* frameworkelement.h, frameworkelement.cpp: track
	On*PropertyChanged changes.
	
	* geometry.h, geometry.cpp: track On*PropertyChanged changes.
	
	* media.h, media.cpp (MediaElement::OnPropertyChanged): remove a
	lot of the empty blocks here - there's nothing to do for these
	properties, so we might as well not bloat the code.  Also, use
	new_value when we can.
	(Image::DownloaderComplete): add a (I hope) suitably nasty comment
	about calling brush->OnPropertyChanged directly.  code shouldn't
	do this, we should figure out if we can just set the property, and
	if so, do that.  otherwise something else is broken.
	(Image::OnPropertyChanged): use new_value where we can.

	* panel.h, panel.cpp: remove the cached background field.  It
	wasn't used except to Attach/ref + Detach/unref it, and that's
	handled automatically by the DependencyProperty machinery.
	Otherwise just track the On*PropertyChanged api changes.

	* shape.h, shape.cpp: similarly, we don't need to ref/attach our
	cached stroke and fill fields.  They're populated for us (and
	ref'ed/unref'ed as needed), so we don't need anything additional
	here.  Use new_value instead of GetValue in OnPropertyChanged.
	Also, factor out some redundant code from all the subclass
	OnPropertyChanged methods that was nearly the same as the
	Shape::OnPropertyChanged code for it.

	* stylus.h, stylus.cpp: On*PropertyChanged api changes.

	* text.h, text.cpp: mostly On*PropertyChanged api changes, and
	lots of using new_value instead of GetValue, but also get rid of
	the cached TextBlock foreground instance field.  It's easy enough
	to fetch when we need it in the ::Paint method, and the
	dependencyobject stuff already refs and attaches to it.

	* transform.h, transform.cpp: lots of On*PropertyChanged api
	changes, and using new_value instead of GetValue.

	* uielement.h, uielement.cpp: remove the cached opacityMask
	field (it wasn't used except for attach/detach, which is handled
	for us.)  The usual On*PropertyChanged changes as well as using
	new_value instead of GetValue.
	
2008-03-04  Jeffrey Stedfast  <fejj@novell.com>

	* xaml.cpp (style_simulations_map): There's only one
	StyleSimulation value, and that is None.

	* font.cpp (TextLayout::Layout): In Wrap mode, if we overflow the
	width and the text is not part of the first run on a line, break
	at the beginning of the Run. This seems to be what Silverlight
	does in OMTextInline.htm.

2008-03-04  Larry Ewing  <lewing@novell.com>

	* eventargs.cpp: update the dirty list before trying calculating
	relative locations.
	
	* runtime.cpp (Surface::HandleMouseEvent): process dirty elements
	here so that our hit testing has up to date bounds.


	* dirty.h: remove the prototypes for up/down since it isn't safe
	to split the up/down passes.

	* src/uielement.cpp: remove dirty processing.
	
2008-03-04  Stephane Delcroix  <sdelcroix@novell.com>

	* media.cpp: use a pixbuf_loader instead of the pixbuf_new_from_file to
	create the pixbuf from a file, allowing partial rendering of broken
	imagefiles, like in Image.htm

2008-03-04  Jeffrey Stedfast  <fejj@novell.com>

	* text.cpp (Inline::GetDefaultValue): Implemented.

2008-03-04  Michael Dominic K.  <mdk@mdk.am>

	* src/uielement.cpp: When calling uielement_transform_point, make sure our
	transforms are up-to-date (not dirty).

	Since we're updating the transform matrices only in the expose (dirty)
	callback it can happen that two ie. mouse events arrive before we get to
	the expose. If the first mouse event invalidated the transform and the
	second one relies on the transform (ie. tries to obtain relative mouse
	position) it'd get bogus values since the transform has not been
	regenerated yet.

	Fixes the drag & drop behaviour in SL ink journal (the selection tool).
	Fixes: #362227.

2008-03-04  Michael Dominic K.  <mdk@mdk.am> 

	* src/dirty.cpp:
	* src/dirty.h: Splitting the process_dirty_elements () into two individual
	chunks -- process_down_dirty_elements () and process_up_dirty_elements ().
	process_dirty_elements () now calls both. 

	The point here is that we need to process down dirty elements (call
	process_down_dirty_elements ()) from other contextes as well.

2008-03-03  Larry Ewing  <lewing@novell.com>

	* uielement.cpp:  Call FullInvalidate when clip changes so that
	our subtree bounds are updated and invalidated.  Make sure we
	don't reset the forced invalidate flag.
	
	* dirty.cpp: invalidate subtree bounds on forced invalidations.
	Fixes test-clip-invalid-update.htm.
	
2008-03-03  Jeffrey Stedfast  <fejj@novell.com>

	* text.cpp (TextBlock::GetText): New method to generate a string
	representing the Text property from the inlines.
	(TextBlock::SetText): New method (split out from the old
	::SetValue code) to parse the newly set text string into a list of
	Inlines and update out InlinesProperty if changed. Returns whether
	or not the inlines property changed.
	(TextBlock::OnPropertyChanged): Call SetText() to update out
	Inlines if the TextProperty value was changed by an outside
	source. If the InlinesProperty was changed by an outside source,
	update our TextProperty.
	(TextBlock::OnCollectionChanged): Update our TextProperty if an
	Inline was added or removed or if a Run element had its
	TextProperty changed.

2008-03-03  Chris Toshok  <toshok@ximian.com>

	* animation.cpp: plug a memory leak in the 3
	UsingKeyFrames::GetCurrentValue methods.

2008-03-03  Chris Toshok  <toshok@ximian.com>

	* transform.h, transform.cpp: Make Matrix::GetUnderlyingMatrix
	return a cairo_matrix_t instead of a pointer to the
	internal (mutable) field, and update its only use.

2008-03-03  Jeffrey Stedfast  <fejj@novell.com>

	* media.cpp (media_element_get_audio_stream_index): Fixed to
	handle nullable value.
	(media_element_set_audio_stream_index): Same.
	(media_init): Register the AudioStreamIndex property as being
	nullable.
	(MediaElement::Reinitialize): Set the CurrentStateProperty to
	"Closed".

2008-03-03  Jeffrey Stedfast  <fejj@novell.com>

	* media.cpp (media_init): Register AudioStreamCount,
	BufferingProgress, CanPause, CanSeek, CurrentState,
	NaturalDuration, NaturalVideoWidth, NaturalVideoHeight properties
	as being read-only.

	* text.cpp (text_init): Register ActualWidth and ActualHeight
	properties as ReadOnly.

	* transform.cpp (Matrix::GetValue): Removed.
	(Matrix::SetValue): Removed.
	(Matrix::OnPropertyChanged): Implemented.

2008-03-01  Larry Ewing  <lewing@novell.com>

	* shape.cpp (Shape::DoDraw): refactor slightly.

	* geometry.cpp: fix extents calculation when there is only a fill
	on the shape.  Fixes test-path-stretch-fill-extents.xaml.
	
	* shape.cpp (Shape::ComputeShapeBounds): make sure shapes with
	negative widths or heights have no bounds.
	(Shape::DoDraw): Silence warning.

2008-02-29  Larry Ewing  <lewing@novell.com>

	* shape.cpp (Shape::ComputeShapeBounds): tweak shape bounds to
	match StretchAndShapes.xaml.

	* collection.cpp (VisualCollection::Remove): don't fire
	VisualRemoved unless we are going to actually remove the item.
	Fixes OM_RemoveClearRemoveAt.htm.

2008-02-29  Jeffrey Stedfast  <fejj@novell.com>

	* collection.cpp (VisualCollection::ResortByZIndex): Reinitialize
	the z_sorted array before sorting so that we can be sure the end
	result will be a stable sort.
	(VisualCollection::Insert): Don't use g_ptr_array_insert_sorted()
	because we need to take index into account. Instead, grow our
	array and call ResortByZIndex().

2008-02-29  Jeffrey Stedfast  <fejj@novell.com>

	* text.cpp (TextBlock::GetValue): Revert memleak fix, it created
	an even more fun memory corruption bug.

2008-02-29  Larry Ewing  <lewing@novell.com>
	
	src/control.cpp:
	src/frameworkelement.cpp:
	src/geometry.cpp:
	src/media.cpp:
	src/rect.cpp:
	src/rect.h:
	src/shape.cpp:
	src/text.cpp:
	src/uielement.cpp: Fix Rect::Transform, replace all occurances of
	bounding_rect_for_transformed_rect with Rect::Transform.

2008-02-29  Larry Ewing  <lewing@novell.com>

	* geometry.cpp: apply transform to all bounds calculations.  Fixes
	test-geometry-bounds.xaml.

2008-02-29  Larry Ewing  <lewing@novell.com>

	* geometry.cpp: Make sure geometry groups draw their children
	rather than just copying the paths so that local transforms are
	applied correctly.

2008-02-29  Jeffrey Stedfast  <fejj@novell.com>

	* text.cpp (TextBlock::GetValue): Fixed memory leak.

	* media.cpp (MediaElement::GetValue): Fixed compile warning.

	* text.cpp (Inline::OnPropertyChanged): Use GetValueNoDefault()
	rather than calling inline_get_*() which use GetValue().

	* font.cpp (TextFont::TextFont): Don't let the underline thickness
	be < 1.0

	* dependencyobject.cpp (DependencyObject::GetValueNoDefault):
	Simplified.
	(DependencyObject::GetValue): Simplified.
	(DependencyObject::GetDefaultValue): New method to get the default
	value for a property (now used by GetValue()).

2008-02-29  Larry Ewing  <lewing@novell.com>

	* geometry.cpp (PathGeometry::ComputeBounds): take the geometry
	transform into account when computing bounds.  Fixes
	CGeometry_AddToRenderList.xaml

2008-02-29  Larry Ewing  <lewing@novell.com>

	* shape.h:
	* shape.cpp: export calc_line_bounds.

	* geometry.cpp: use calc_line_bounds from shape.h.  Fixes bounds
	problems on Animation_TargetingAndHandoff.xaml.

2008-02-29  Rolf Bjarne Kvinge <RKvinge@novell.com> 

	* pipeline.cpp: Add a missing const modifier.

2008-02-29  Rolf Bjarne Kvinge <RKvinge@novell.com> 

	* mplayer.cpp: Use the first streams found in the media, not the last.

2008-02-28  Stephane Delcroix  <sdelcroix@novell.com>

	* stylus.cpp: if there's an outline, draw a line of at least 2px.

2008-02-28  Stephane Delcroix  <sdelcroix@novell.com>

	* brush.cpp: No longer ignore out-of-bounds offest in
	SetupGradient. Add the bounds stop with linearinterpolation
	between the nearest stop and the outofbounds one. Handle the
	degenerated case with only outofbounds stops.

2008-02-28  Michael Dominic K.  <mdk@mdk.am>

	* shape.cpp: Commenting a left-over debug g_warning.

	Additionally adding a protection against NULL in cache-size reporting (as
	experienced by rolf). However, if GetSurface () returns NULL in the Render
	callback... I guess we're screwed anyways.

2008-02-28  Michael Dominic K.  <mdk@mdk.am>

	* xaml.cpp:
	* xaml.h: Adding convert_property_value_to_enum_str function to
	check/convert if the value for the given property can be represented by an
	enum string. 

	It would be nicer to mover all the enums tables/resolving to a separate
	place in future instead of gluing it to xaml.cpp.

2008-02-28  Stephane Delcroix  <sdelcroix@novell.com>

	* shape.h|cpp: override GetSizeForBrush for Rectangle to honor the
	Stretch property.

2008-02-27  Jeffrey Stedfast  <fejj@novell.com>

	* text.cpp (Glyphs::Render): Use horiBearingX for the first char
	in the Glyphs string just like we do for TextBlock rendering.

2008-02-27  Jeffrey Stedfast  <fejj@novell.com>

	Fixes the last remaining issue in the TextRegressions.htm test.

	* xaml.cpp (flush_char_data): Only preserve LWSP in CDATA between
	non-autogenerated <Run>'s.

	* text.cpp (TextBlock::SetValue): Mark the Inlines auto-generated
	from the TextBlock's Text property as being auto-generated.

2008-02-27  Larry Ewing  <lewing@novell.com>

	* shape.cpp: change the shape surface cache to cache in device
	coordinates and rework the candidate restrictions to reject
	huge shapes and allow scaled caches.

2008-02-27  Larry Ewing  <lewing@novell.com>

	* shape.cpp: center the filled image within the new bounds.

2008-02-27  Rolf Bjarne Kvinge <RKvinge@novell.com> 

	* media.h, media.cpp: When a media is opened, seek to the current
	position.

	* value.cpp: ToString: Return 'NULL' if we're null.

2008-02-27  Michael Dominic K.  <mdk@mdk.am>

	* src/animation.cpp: When storyboard is completed, Teardown the clocks
	only if we're realling stopping (not holding). Fixes the
	StoryBoard_ModifyProperty test.

2008-02-27  Michael Dominic K.  <mdk@mdk.am>

	* clock.cpp: Make sure we actually hit the our_delta < 0 code 
	path. Fixes the AutoReversed/Repeated animations.

2008-02-27  Michael Dominic K.  <mdk@mdk.am>

	* shape.cpp: More cases to invalidate (free mem) of the surface cache.

2008-02-26  Jeffrey Stedfast  <fejj@novell.com>

	* font.cpp (TextFont::TextFont): Precalculate underline position
	and thickness. Also, we need to adjust the position based on 1/2
	the underline thickness.
	(TextLayout::Layout): Only adjust by the horiBearingX if < 0.
	(TextLayout::RenderLine): Same.

2008-02-26  Chris Toshok  <toshok@ximian.com>

	* runtime.cpp (runtime_cairo_create): take the visual too, so the
	plugin can send ours in - we can't rely on the pixmap having a
	visual associated with it, because it's initialized with the
	_foreign api which doesn't fill in the colormap. yay.
	(Surface::Surface): if we're windowless don't create the widget.
	also, init render/render_data and invalidate/invalidate_data to
	NULL.
	(Surface::ConnectEvents): exit early if we're windowless.
	(Surface::Invalidate): call through the invalidate function if
	there is one.  otherwise, default behavior (if we have a widget).
	(Surface::Paint): exit early if no toplevel.
	(Surface::render_cb): call through the render function if there is
	on.
	(Surface::expose_to_drawable): this is most of the guts of
	expose_callback, changed to handle the case where we're already
	drawing to the backbuffer (in the windowless case) and therefore
	don't need the temporary pixmap.  Also, commented out some code
	that clears the contents - do we actually need this?  The comment
	for it is enormous...
	(Surface::expose_event_callback): just call expose_to_drawable
	with the widget's window.

	* runtime.h (class Surface): we need to make the gtk callbacks
	public since the plugin will be invoking them directly.  Also,
	switch the event methods to returning bools, and add a new method
	called expose_to_drawable, so the plugin can direct rendering to a
	pixmap in the windowless case.

	* uielement.h, uielement.cpp: change all the Emit* methods to
	return bool.

	* dependencyobject.h, dependency.cpp: make EventObject::Emit
	return true if there were handlers for the event, and false
	otherwise.

2008-02-26  Jeffrey Stedfast  <fejj@novell.com>

	* text.cpp (TextBlock::TextBlock): Removed the useless
	text_block_set_text() call. This was just a broken hack meant to
	do what MDK's previous commit fixed the right way.

	* font.cpp (TextFont::UnderlinePosition): Fixed to take font
	y_scale metrics into consideration.
	(TextFont::UnderlineThickness): Same.

2008-02-26  Michael Dominic K.  <mdk@mdk.am>

	* src/text.cpp: TextBlock when constructed by default has an empty
	Inlines collection instead of NULL. Along with all the previous
	commits fixes the OM_CreateAddInsert.htm test.

2008-02-26  Michael Dominic K.  <mdk@mdk.am>

	* src/collection.cpp: Don't allow collection insert at negative
	position.

2008-02-26  Michael Dominic K.  <mdk@mdk.am>

	* src/collection.cpp: Don't add the object to the collection if it
	already contains the object (return -1 instead).

2008-02-26  Michael Dominic K.  <mdk@mdk.am>

	* src/animation.cpp:
	* src/animation.h:
	* src/collection.cpp:
	* src/collection.h: The "Add" method of collections returns int (index of
	the element added), not bool. As explained in:

	http://msdn2.microsoft.com/en-us/library/system.windows.media.visualcollection.add.aspx

2008-02-25  Jeffrey Stedfast  <fejj@novell.com>

	* font.cpp (TextFont::OpenZipArchiveFont): Since we aren't going
	through FontConfig, we need to parse the font's family name to
	extract styleistic info so we can do proper font name matching and
	style matching (e.g. "Myriad Pro Cond Black Italic" should match
	"Myriad Pro, Condensed Black Italic").

2008-02-25  Chris Toshok  <toshok@ximian.com>

	* runtime.h, runtime.cpp: s/drawing_area/widget and
	s/DrawingArea/Widget

	* demo.cpp: same.

2008-02-25  Michael Dominic K.  <mdk@mdk.am>

	* src/uielement.h: Adding a virtual CacheInvalidateHint () function that
	can be called on the element to give it a hint that it should free it's
	cache for the time being.

	* src/collection.cpp:
	* src/panel.cpp:
	* src/panel.h: Forward CacheInvalidateHint to all children.

	* src/shape.cpp:
	* src/shape.h: Destroy the surface and path cache when hinted.

	In total improves our memory usage with surface/path caching, ie. in the
	Showcase.

2008-02-22  Michael Dominic K.  <mdk@mdk.am>

	* src/runtime.cpp:
	* src/runtime.h:
	* src/shape.cpp:
	* src/shape.h: Adding functionality to report the cache size usage. By
	default it's turned off. MOONLIGHT_OVERRIDES="cache=show" to turn it on. 

2008-02-22  Michael Dominic K.  <mdk@mdk.am>

	* src/shape.cpp: RoundOut to pixels the extents of the shapes. Causes us
	to expose a few more pixels but helps with surface caching.

2008-02-22  Rolf Bjarne Kvinge <RKvinge@novell.com> 

	* downloader.cpp: downloader_get_response_file: remove any directory
	  components from the part name, otherwise the creation of the tmp file
	  fails. If we're aborted, don't call any callbacks.
	* media.cpp: If we have a downloader and SetSource is called with a new
	  downloader, abort the previous download, not only unref it, otherwise
	  our callbacks and events may still get called from the old downloader.

2008-02-21  Jeffrey Stedfast  <fejj@novell.com>

	* font.cpp (TextFont::TextFont): Simplified the fallback code.

2008-02-21  Jeffrey Stedfast  <fejj@novell.com>

	Fixes Glyphs.xaml

	* text.cpp (Glyphs::SetIndices): Fixed to properly parse glyph
	cluster mappings.
	(Glyphs::Layout): Properly handle glyph clusters.
	(Glyphs::Render): Same.

2008-02-21  Rolf Bjarne Kvinge <RKvinge@novell.com> 

	* media.cpp: When aborting a downloader, null out the write
	functions too.

2008-02-21  Michael Dominic K.  <mdk@mdk.am>

	* src/clock.cpp: Emit the Completed event when Filling as
	well. Together with prev commit fixes: #359024 and #324935.

2008-02-21  Michael Dominic K.  <mdk@mdk.am>

	* src/animation.cpp:
	* src/animation.h: Detach the AnimationStorage update handler from the
	clock when the clock is stopped -- prevents us from overriding the (just
	reset) base value with another update.

2008-02-21  Michael Dominic K.  <mdk@mdk.am> 

	* src/value.cpp: Implementing ToString () for DOUBLE.

2008-02-21  Michael Dominic K.  <mdk@mdk.am>

	* src/color.cpp: A slightly more relaxed/tolerant way of parsing
	the colors... it's the web and it's broken by default. Fixes:
	#362287 (the US candidates website).

2008-02-21  Stephane Delcroix  <sdelcroix@novell.com>

	* text.h|cpp: compute GetOriginPoint and fix GetSizeForBrush

2008-02-20  Jeffrey Stedfast  <fejj@novell.com>

	Fixes the TextBlockFontDownloads.htm test.

	* font.cpp (TextFontDescription::Set*): If the new value is not
	the same as the old, invalidate the loaded TextFont.
	(TextFont::TextFont): Always compare family names unless we're
	requesting the "Sans" (e.g. last) fallback font.
	(TextFont::TextFont): If the requested family name does not match
	the specified font file, fall back to a system font of the same
	name (we were doing this for zip archievs before, but not for
	specified ttf font files).

	* text.cpp (TextBlock::SetFontSource): If the downloader is null,
	set the font filename to null and invalidate the textblock.

2008-02-20  Rolf Bjarne Kvinge <RKvinge@novell.com> 

	* media.cpp: Add a printf to inform when we're trying to load an
	mms stream.  Helps a lot when trying to identify sites depending
	on mms/streaming support.

	* runtime.cpp: Unref debug_selected_element upon
	destruction. Fixes a leak.

2008-02-20  Michael Dominic K.  <mdk@mdk.am>

	* src/shape.cpp: Fixing the shape caching to work also with
	Path/Geometry.  Fixes: #362021.

2008-02-20  Rolf Bjarne Kvinge <RKvinge@novell.com> 

	* media.cpp: MediaElement/Image: Remove event handlers when we abort the
	  downloader, otherwise the handlers might be called after we're
	  destroyed.

2008-02-19  Jeffrey Stedfast  <fejj@novell.com>

	* uri.cpp (Uri::ToString): Now takes a 'flags' argument to let us
	know which, if any, parts of the URI to hide.
	(Uri::Parse): If we don't have a protocol, don't simply assume
	that the entire string is the filename. We might have a fragment
	attached, for example.

	* text.cpp (Glyphs::OnPropertyChanged): Decode the URI here and
	get the font index (if a fragment is set). Also, use the parsed
	Uri's ::ToString() method to hide the fragment so that requesting
	the file actually works.
	(Glyphs::DownloaderComplete): Don't need to parse the URI here
	anymore, we've already got the index from OnPropertyChanged().

2008-02-19  Jackson Harper  <jackson@ximian.com>

	* xaml.cpp: Parser error if we can't find the owner type or
	property name when setting properties.

2008-02-19  Sebastien Pouliot  <sebastien@ximian.com> 

	* geometry.cpp|h: #if out GetOriginPoint which calls moon_get_origin

2008-02-19  Rolf Bjarne Kvinge <RKvinge@novell.com> 

	* pipeline-ffmpeg.cpp: Comment out error message which just shows ffmpeg's
	  shortcomings.
	* media.cpp: Remove printf.

2008-02-19  Sebastien Pouliot  <sebastien@ximian.com>

	* moon-path.c: #if out moon_get_origin since it's not used 
	anymore. Change cairo_path_display output to be easier to read 
	with negative numbers.

2008-02-18  Michael Dominic K.  <mdk@mdk.am>

	* src/media.cpp:
	* src/media.h: Load images slightly faster by skipping one pixbuf blit and
	doing the expansion + conversion in one step.

	Also fixing an ugly memory leak where all RGBA images loaded were leaked
	(two times in memory).

2008-02-15  Michael Dominic K.  <mdk@mdk.am> 

	* src/clock.cpp: Before processing dirty enter/leave gdk threads. We're
	being called from a timeout (unprotected) and we're potentially calling
	gdk_ invalidation functions. I think it only matters (in this case) 
	on non-X backends though. 

2008-02-15  Michael Dominic K.  <mdk@mdk.am> 

	* src/uielement.cpp: Moving the debug timers for rendering slightly and
	uncommenting them so that they work when TIMERS is enabled.

2008-02-15  Michael Dominic K.  <mdk@mdk.am> 

	* src/runtime.cpp:
	* src/runtime.h: Adding an extra DEBUG_MARKER_KEY define (disabled by
	default) that changes your 'd' key into a special debug key. When pressed,
	a message is printed to the console (region start). When pressed again,
	another message is printed (region end). This is usefull to see what
	happens in a particular part of the program timeline (ie. after click). 

	Makes sense obviously only with timers debugging on and stuff.

2008-02-14  Michael Dominic K.  <mdk@mdk.am>

	* src/clock.cpp: Changing max/default FPS to 50. Empirical experience
	shows that SL runs by default at something around that. Also, with the
	recent fixes some sites are suffering from 24 (can run/look much better
	at higher fps).

2008-02-14  Michael Dominic K.  <mdk@mdk.am> 

	* src/shape.cpp:
	* src/shape.h: Adding surface caching for shapes. The strategy
	is to cache big surfaces that have little transformations (such as
	ie. backgrounds, fade overlays, etc.). Improves performance greatly
	for many sites (ie. Showcase).

2008-02-14  Michael Dominic K.  <mdk@mdk.am> 

	* src/uielement.cpp: Commenting out the timer in post-pre render as it's
	broken and blocks the compilation with timers on.

2008-02-12  Michael Dominic K.  <mdk@mdk.am> 

	* src/animation.cpp:
	* src/animation.h: Massive fix for our KeySpline animation calculation
	routines (which were broken and giving wrong values). According to:

	http://msdn2.microsoft.com/en-us/library/ms533119(VS.85).aspx

	"...think of the horizontal axis as the pace with which the interpolation
	proceeds along the timing interval. The vertical axis is the resulting
	value for the animation's progress, yielded by the function that underlies
	the keySplines property. Another way of describing this is that the
	horizontal axis is the input unit time for the interval, and the vertical
	axis is the output unit time."

	Therfore, we need to perform an "Y for X" bezier lookup. The current fix is
	a little bit ugly -- we waste 256 bytes per KeySpline to store
	pre-calculated values in a lookup table. But maybe it's not soo bad, since
	balf function (from prev implementation) was coming up top in the
	profiles anyways.

	The only other way I can (currently) think of would be to solve a cubic
	equation each time we poll the KeySpline for a value. That would be,
	however, a *massive* performance hit. 

	Hence the lookup solution for now (note: the generation of the table is
	very fast, no cubics involved).

2008-02-11  Michael Dominic K.  <mdk@mdk.am>

	* src/runtime.h: Fixing our debug-timing routine. It reported 10x as much
	as it should... yes, our redraws are slow, but not *that* slow ;)

2008-02-09  Michael Dominic K.  <mdk@mdk.am> 

	* src/mplayer.cpp: If we have no audio devices present in the system,
	launch a special audio loop variant to still read/fetch audio (and discard
	it) so that the video playback is not blocked. Fixes: #341835.

2008-02-08  Jeffrey Stedfast  <fejj@novell.com>
	
	* font.cpp (TextFont::TextFont): If the loaded font's family_name
	doesn't match the requested family name, fall back to the default
	font (it means the requested font doesn't exist on the system).
	(TextLayout::Layout): Added a 'first_char' state variable that can
	be used to figure out if if the current char is the first char on
	a line. This is needed for the wrapping logic.

2008-02-08  Jeffrey Stedfast  <fejj@novell.com>

	Fixes some text layout bugs in TextBlockFontFamilies.xaml

	* xaml.cpp (flush_char_data): Now takes a string 'next_element'
	argument rather than a bool 'start' argument so that we can make
	sure that the previous and next element types are <Run>'s because
	lwsp between a <LineBreak/> and a <Run> or a </Run> and a
	<LineBreak/> should be ignored. Also, never g_strchomp() this
	cdata.
	(start_element_handler): Pass the name of the next element to
	flush_char_data().
	(end_element_handler): Pass NULL to flush_char_data() as the
	next_element argument.

2008-02-08  Chris Toshok  <toshok@ximian.com>

	* media.cpp (MediaElement::Render): reorder things so that we're
	calculating the brush pattern matrix with the snapped pixels.

2008-02-08  Stephane Delcroix  <sdelcroix@novell.com>

	* brush.cpp: fix Image|Video|VisualBrushes for Shapes.

2008-02-07  Chris Toshok  <toshok@ximian.com>

	* media.cpp (MediaElement::Render): snap to the pixel grid if
	we're not rotated/skewed.

2008-02-07  Sebastien Pouliot  <sebastien@ximian.com>

	* shape.cpp: Add comment about (missing) Path::ComputeLargestRectangle

2008-02-07  Larry Ewing  <lewing@novell.com>

	* brush.cpp (GradientBrush::SetupGradient): treat stops > 1.0 the
	same as out of bounds stops.

	* shape.cpp: cache the results of CompouteShapeBounds in
	extents rect, use that value in GetSizeForBrush.

2008-02-07  Jeffrey Stedfast  <fejj@novell.com>

	Fixes a rendering glitch for xaml similar to:

	<TextBlock>
           <Run FontStyle="Italic">This </Run>is Dodger Blue
        </TextBlock>

	* xaml.cpp (flush_char_data): Don't g_strchomp() the cdata when
	setting the value of a content_property (e.g. a Run).

2008-02-07  Michael Dominic K.  <mdk@mdk.am>

	* src/color.cpp: Added support to parse scRGB-style color specificators
	(sc#), see #345931. The scRGB -> sRGB conversion is a bit simplified but
	should produce accurate-enough colors for most uses.

	http://silverlight.net/quickstarts/silverlight10/controls.aspx now works.

2008-02-07  Sebastien Pouliot  <sebastien@ximian.com>

	* shape.cpp|h: Split ComputeBounds to avoid calling functions 
	bounding_rect_for_transformed_rect and IntersectBoundsWithClipPath
	inside each shape. This will enable us to reuse the non-transformed
	value elsewhere too. This also fix (for me) the origin point that
	caused problems for some brushes. Started implementing methods 
	ComputeLargestRectangle[Bounds] to optimize drawing.

2008-02-06  Chris Toshok  <toshok@ximian.com>

	* frameworkelement.cpp (FrameworkElement::GetSizeForBrush): we
	want the untransformed size of the element.  otherwise we end up
	with a pattern matrix that scales things too large given that
	we're also scaling the element.  Fixes fullscreen mode in halo3
	and /fox video players (bug #335845).

2008-02-07  Rolf Bjarne Kvinge <RKvinge@novell.com> 

	* mplayer.cpp: AdvanceFrame: Create a target_pts range, if we're within the
	  range, draw the current frame. If we're ahead of the range, do nothing
	  (fixes some video/audio sync problems), and if we're behind drop frames.
	  The range makes sure that we paint every frame even when the audio loop
	  doesn't update the target pts as often as we're drawing video.

2008-02-07  Rolf Bjarne Kvinge <RKvinge@novell.com> 

	* panel.cpp, runtime.cpp: Fix warnings.

2008-02-06  Rolf Bjarne Kvinge <RKvinge@novell.com> 

	* mplayer.cpp: Simplify our advance frame loop: don't lock the queue during
	  the entire loop, only when fetching packets. This allows packets to
	  arrive from the pipeline while in the loop (especially noticable when
	  decoding the video inside the loop).

2008-02-06  Chris Toshok  <toshok@ximian.com>

	* uielement.cpp (UIElement::FrontToBack): use the media state
	accessors, and don't exclude Buffering state - we could be
	buffering with a frame rendered.

2008-02-06  Sebastien Pouliot  <sebastien@ximian.com>

	* shape.cpp|h: Keep track if a rectangle has radii or not.
	* uielement.h: Add a flag for radii

2008-02-06  Chris Toshok  <toshok@ximian.com>

	* uielement.cpp (UIElement::FrontToBack): make sure
	media_element_get_current_state != NULL before we strcmp it.

2008-02-06  Rolf Bjarne Kvinge <RKvinge@novell.com> 

	* src.mdp: Updated.

2008-02-06  Stephane Delcroix <sdelcroix@novell.com>

	* brush.cpp: fix the radialgradientbrush setup.

2008-02-05  Chris Toshok  <toshok@ximian.com>

	* collection.cpp (Collection::EmitChanged): new method.  Emit the
	Changed event and then call closure->OnCollectionChanged.  Also
	replace all references to closure->OnCollectionChanged to
	EmitChanged.

	* collection.h (class Collection): add ChangeEventArgs struct, and
	an EmitChanged method declaration.

	* type.h.in, type.cpp.in (Type::~Type): no need to free all the
	events explicitly.
	(Type::HideEvent): remove the event name from the hash so it's
	inaccessible from javascript.
	(Type::RegisterEvent): use g_hash_table_new_full so we can specify
	a destroy function for keys instead of doing the _foreach in the
	dtor.
	(types_init_manually): add the #if 0 here instead of type.cpp.
	oops.
	(types_init_register_events): register a Changed event for
	Collections.

2008-02-05  Jeffrey Stedfast  <fejj@novell.com>

	* downloader.cpp (Downloader::ll_downloader_get_response_file):
	Simplified by using the new ExtractFile utility function from
	utils.cpp.

	* font.cpp: Moved ExtractFile() and make_tmpdir() into utils.cpp

	* utils.cpp: New collection of utility functions.

2008-02-05  Jeffrey Stedfast  <fejj@novell.com>

	* font.cpp: If a font is requested from a zip archive, extract the
	contents and try to figure out which font is the closest match to
	the one requested. Fixes bug #356044.

2008-02-05  Chris Toshok  <toshok@ximian.com>

	* uielement.cpp (UIElement::FrontToBack): enable the rectangle
	code, and make sure to round in the bounds we're subtracting.
	this was causing the flashing white border on silverlight.net/fox.

2008-02-05  Sebastien Pouliot  <sebastien@ximian.com>

	* shape.cpp: Use existing MIN macro. Use local variables when
	available.

2008-02-05  Rolf Bjarne Kvinge <RKvinge@novell.com> 

	* fullscreen.cs, fullscreen.sh: Tool to generate fullscreen.h

2008-02-05  Chris Toshok  <toshok@ximian.com>

	* runtime.h, runtime.cpp: add support for a "selected" element
	when in debug mode.  Also, make use of the Region methods instead
	of using region->gdkregion, which is private now.

2008-02-05  Chris Toshok  <toshok@ximian.com>

	* region.h, region.cpp (class Region): add Offset().

2008-02-05  Sebastien Pouliot  <sebastien@ximian.com>

	* geometry.cpp|h: PathGeometry does a Build (not a Draw) to 
	populate it's moon_path (like others) so the data can always be 
	used.
	* moon-path.c|h: Add moon_get_origin to get the minimal X and Y
	from a moon_path (Stephane) and moon_merge to merge a subpath into
	a main path.

2008-02-04  Rolf Bjarne Kvinge <RKvinge@novell.com> 

	* pipeline-ffmpeg.cpp: Remove another printf.

2008-02-02  Jeffrey Stedfast  <fejj@novell.com>

	* pipeline.cpp (FileSource::Peek): Only memmove() if we have data
	to move.
	(FileSource::Peek): Slightly better fix.

2008-02-01  Jeffrey Stedfast  <fejj@novell.com>

	* pipeline.cpp (Mp3Demuxer::GetPositionOfPts): Reimplemented to
	estimate the stream position if not known rather than reading data
	to find out as we don't have to return an exact stream position.

2008-02-01  Rolf Bjarne Kvinge <RKvinge@novell.com> 

	* pipeline.h: Update comment.

2008-02-01  Stephane Delcroix  <sdelcroix@novell.com>

	* uielement.h:
	* shape.h:
	* shape.cpp: rename GetOringin into GetOriginPoint

	* brush.cpp: implement a bad origin computation (based on bounds)
	for Shape::Path

2008-02-01  Jeffrey Stedfast  <fejj@novell.com>

	* pipeline.cpp (Mp3Demuxer::GetPositionOfPts): Implemented.
	(FileSource::Peek): As before, only read as much as we need - but
	don't clobber what we had prebuffered, only clobber as much as w
	need to in order to make room for the new data - this way we make
	it more efficient to seek backward later (if need be).

2008-02-01  Stephane Delcroix  <sdelcroix@novell.com>

	* shape.h:
	* shape.cpp: define GettOrigin at the Shape level, compute GetOrigin
	from the path data instead of from bounds.

	* brush.cpp: translate the brushes with a translation matrix.

2008-02-01  Larry Ewing  <lewing@novell.com>

	* brush.cpp: Make sure we use the brush opacity when computing the
	color stops.

2008-02-01  Jeffrey Stedfast  <fejj@novell.com>

	* pipeline.cpp (FindMpegHeader): Now checks for Xing and
	Fraunhofer VBRI headers.

2008-01-31  Chris Toshok  <toshok@ximian.com>

	* uielement.h: include region.h

	* point.h: don't assume the right headers have been included
	before this file - include glib.h to make sure
	G_BEGIN_DECLS/G_END_DECLS is there.

	* region.h, region.cpp: split out the region code from
	rect.h/rect.cpp.

	* rect.h, rect.cpp: remove region code.

	* Makefile.am: add region.h/region.cpp

2008-01-31  Chris Toshok  <toshok@ximian.com>

	* runtime.h, runtime.cpp: remove runtime_cairo_region (we can just
	use Region::Draw instead).

	* panel.cpp: remove references to runtime_cairo_region, and switch
	to the new Region* copy ctor.  also, use Region::IsEmpty instead
	of gdk_region_empty.

	* uielement.cpp: more region cleanup, removing references to
	GdkRegion in favor of our Region class.  Also, commit (ifdef'ed
	out until the rendering glitch is fixed) the rectangle back to
	front special case code.

2008-01-31  Chris Toshok  <toshok@ximian.com>

	* rect.cpp (Region::Region): new overload which takes a Region*,
	so we don't have to access ->gdkregion everywhere when we copy a
	region.

	* rect.h (struct Rect): add a GrowBy method that takes both x and
	y deltas, and have the 1 parameter version call it.
	(class Region): add a copy ctor that takes a Region*.

2008-01-31  Chris Toshok  <toshok@ximian.com>

	* panel.h, panel.cpp: rename use_back_to_front to UseBackToFront
	and add it to the class, protected so subclasses can get at it.

	* stylus.cpp (InkPresenter::PostRender): given the ordering
	required, we have to c&p some of Panel::PostRender here to render
	the children.  Chaining up to Canvas::PostRender at the start of
	the method would have caused the translucency/opacity mask code in
	UIElement::PostRender to be executed *before* we rendered our
	strokes.

2008-01-31  Chris Toshok  <toshok@ximian.com>

	* stylus.h, stylus.cpp (InkPresenter::PostRender): rename
	RenderChildren to this, and chain up to Canvas::PostRender here,
	which will do the RenderChildren call if it needs to.

2008-01-31  Chris Toshok  <toshok@ximian.com>

	* panel.cpp (Panel::FrontToBack): simplify this a bunch with
	Brush::IsOpaque.

	* brush.h (class Brush): remove GetTotalOpacity() which wasn't
	being used anywhere, and add IsOpaque() so that we can use it from
	the new front-to-back stuff (instead of duplicating code in Panel
	and Shape handling parts).

2008-01-31  Rolf Bjarne Kvinge <RKvinge@novell.com> 

	* media.cpp: Update.

2008-01-31  Chris Toshok  <toshok@ximian.com>

	* media.cpp (MediaElement::MediaElement): fix build.
	(Image::Image): fix initialization order to quiet g++.

2008-01-31  Rolf Bjarne Kvinge <RKvinge@novell.com> 

	* mplayer.cpp, mplayer.h: Render: removed, not used. LoadVideoFrame:
	  implemented again. Added an ugly caught_up_with_seek value, used to
	  determine if video is late due to a seek, in which case it shouldn't
	  show any frames (fixes #356053).
	* pipeline.cpp, pipeline.h: Added IMediaDecoder::CleanState and
	  HasDelayedFrame.
	* pipeline-ffmpeg.cpp: Implemented FfmpegDecoder::CleanState and
	  HasDelayedFrame. Use a mutex to serialize access to avcodec_open.
	* pipeline-ffmpeg.h: Implemented FfmpegDecoder::CleanState and
	  HasDelayedFrame.

2008-01-31  Jeffrey Stedfast  <fejj@novell.com>

	* pipeline.cpp (mpeg_parse_samplerate): Doh, need to bitshift the
	value.
	(FindMpegHeader): Now takes an MpegFrameHeader argument, no sense
	having our caller re-parse the header.
	(Mp3Demuxer::ReadHeader): Updated.

2008-01-31  Stephane Delcroix  <sdelcroix@novell.com>

	* brush.cpp: apply the correct offset to RadialGradientBrushes too.

2008-01-31  Rolf Bjarne Kvinge <RKvinge@novell.com> 

	* clock.h: Added macros to convert between pts, milliseconds and timespans.
	* media.cpp, media.h: MediaElement: Updated to normalized pts (starting at
	  0). Use the new macros when converting between time formats. Remove the
	  AdvanceFrame timeout upon reinitialization. Implement a better buffering
	  algorithm (and honor the BufferingTime property).
	* mplayer.cpp, mplayer.h: Remove initial_pts, everything coming from the
	  pipeline is now normalized to start at 0. Use the new macros when
	  converting between time formats.
	* pipeline.cpp, pipeline.h: Normalize all pts to start at 0, and remove
	  start_time/initial_pts handling. Added Demuxer::GetPositionOfPts to
	  estimate the position of a pts. ProgressiveSource::CancelWait: only
	  cancel if we're waiting, and then wait until actually cancelled.

2008-01-31  Stephane Delcroix  <sdelcroix@novell.com>

	* shape.cpp:
	* shape.h: GetOrigin for Polyline and Polygon

2008-01-31  Stephane Delcroix  <sdelcroix@novell.com>

	* uielement.h: add a GetOrigin ()

	* shape.cpp:
	* shape.h: implement GetOrigin for Path

	* brush.cpp: use GetOrigin as offset, fix the Crystal test.

2008-01-30  Chris Toshok  <toshok@ximian.com>

	* mplayer.h (class MediaPlayer): add rendered_frame.

	* mplayer.cpp (MediaPlayer::MediaPlayer): init rendered_frame to
	false.
	(MediaPlayer::Close): reset rendered_frame.
	(render_frame): set rendered_frame to true if we've successfully
	copied data into the video surface.

	* media.cpp (Image::CreateSurface): set CachedSurface::has_alpha
	to the pixbuf's has_alpha if USE_OPT_RGB24.

	* media.h (class Image): make the CachedSurface type and the
	instance field "surface" public, so the front to back stuff can
	get at it.  Also, add "has_alpha" to it, since once the xlib
	surface has been created, we lose that information.

	* control.cpp (Control::FrontToBack): nothing to do but call
	FrontToBack on real_object.

	* control.h (class Control): add override for FrontToBack.

	* panel.cpp (Panel::FindStartingElement): get rid of this crap.
	it was broken and the wrong way to implement it.
	(Panel::Render): remove the RenderChildren call here, we do it in
	PostRender (and only if we're not rendering front to back)
	(Panel::PostRender): if we aren't rendering front to back, call
	RenderChildren.
	(Panel::RenderChildren): remove references to FindStartingElement.
	(Panel::FrontToBack): this method is a little more complicated
	than UIElement::FrontToBack owing to the fact that we're
	flattening things to a list.  We need to prepend a "cleanup node"
	first, before calling FrontToBack on our children, to do the
	Panel::PostRender stuff after our children have been rendered.  We
	remove this cleanup node if none of the children have added
	themselves to the list, and our bounds (without the children)
	don't intersect the expose region.  We apply the same logic to
	removing our rectangular bounds as the UIElement code does, but
	also have to take into account our background brush.  We punt if
	any part of it is transparent, and only handle SolidColorBrush and
	GradientBrush subclasses.

	* panel.h (class Panel): override UIElement:: FrontToBack,
	PreRender, and PostRender.

	* uielement.cpp (UIElement::DoRender): factor out most of the guts
	of this method so it can be used in either front-to-back or
	back-to-front.  Make sure to pass "false" as the front-to-back arg
	for PreRender and PostRender.
	(UIElement::FrontToBack): calculate the intersection of the expose
	region and our bounds.  Add this region to the front of the render
	list, and then do some calculating to decide if we should remove
	it from consideration by elements lower than us in the display.
	Things like "are we opaque", "have we been rotated or skewed, such
	that our rectangular shape no longer fills the bounds entirely",
	stuff like that.  We further limit subtracting in element type
	specific ways - right now just for MediaElement and Image with
	certain constraints (images can't have alpha, media elements must
	have a frame rendered, both types must fill their rectangle, etc).
	If everything passes, we remove our bounds from the expose region.
	(UIElement::PreRender): new method, do the things that DoRender
	used to do before calling Render.
	(UIElement::PostRender): new method, do the things that DoRender
	used to do after calling Render.

	* uielement.h: move the IS_TRANSLUCENT/IS_INVISIBLE #defines here
	so they can be used in panel.cpp.  Also, add 3 new virtual
	methods (FrontToBack, PreRender, PostRender) as well as two
	callback methods to invoke the 2 latter ones.

	* runtime.cpp (overrides): add "render=ftb" and "render=btf"
	overrides (with btf the default) corresponding to
	RUNTIME_INIT_RENDER_FRONT_TO_BACK.
	(Surface::Paint): add support for front-to-back rendering.  If
	it's enabled, make a FrontToBack pass on the fullscreen message
	and the toplevel element.  This populates the render list with a
	back to front ordered list of elements to paint, along with the
	regions they need repainted.  If the render list is empty for some
	reason (or if the user didn't select ftb rendering), we fall back
	to back to back-to-front rendering at the toplevel.
	(RenderNode::RenderNode): add ctor/dtor for RenderNode.

	* runtime.h: add the RenderNode class, used by the front to back
	rendering.

	* rect.h, rect.cpp: add IsEmpty() and two overloads of Subtract()
	to Region.

2008-01-30  Jackson Harper  <jackson@ximian.com>

	* xaml.cpp: Strip leading whitespace from xaml files.
	
2008-01-30  Jackson Harper  <jackson@ximian.com>

	* xaml.cpp: Handle more names for the default namespace.

2008-01-30  Jackson Harper  <jackson@ximian.com>

	* xaml.cpp: Add support for ucs4.

2008-01-29  Jackson Harper  <jackson@ximian.com>

	* xaml.cpp: pull in unistd.h

2008-01-29  Jackson Harper  <jackson@ximian.com>

	* xaml.cpp: Properly handle utf-16, converting it to utf-8 so
	expat doesn't choke.

2008-01-28  Chris Toshok  <toshok@ximian.com>

	* brush.cpp (VisualBrush::SetupBrush): RoundOut doesn't update
	inplace, it returns the new rect.

	* uielement.cpp (UIElement::DoRender): same change.

2008-01-28  Jeffrey Stedfast  <fejj@novell.com>

	* pipeline.cpp (FindMpegHeader): Validate that the sequence is
	actually an mpeg frame header by parsing it and calculating its'
	length and checking that another frame header starts where we
	expect it.
	(Mp3DemuxerInfo::Supports): We need to use FindMpegHeader() here
	too.

2008-01-28  Jeffrey Stedfast  <fejj@novell.com>

	* pipeline.cpp (FindMpegHeader): Scan over binary garbage and find
	an MPEG sync header.
	(Mp3Demuxer::ReadHeader): Use FindMpegHeader() and also use
	IMediaSource's new GetSize() method to help calculate media
	duration as opposed to seeking to the end.

2008-01-28  Rolf Bjarne Kvinge <RKvinge@novell.com> 

	* media.cpp, media.h: Open the media async.
	* pipeline.cpp, pipeline.h: Add and implement OpenAsync.

2008-01-28  Rolf Bjarne Kvinge <RKvinge@novell.com> 

	* media.cpp: MediaElement::AdvanceFrame: Only stop if the media player
	  reached eof and couldn't advance.
	* mplayer.cpp, mplayer.h: Add a seeking flag, allows us to skip frames we
	  get while we're waiting for a seek to happen. Implement a better pause
	  algorithm, the previous one was flawed and dead-locked once in a while.
	* pipeline.cpp, pipeline.h: Media: Add a callback to async seek. ASFDemuxer:
	  Create one frame reader for each stream.

2008-01-27  Jeffrey Stedfast  <fejj@novell.com>

	* media.cpp (MediaElement::UpdateProgress): Check (pos +
	buffering_size) > size, not < size. Duh.

	* pipeline.cpp: IMediaDemuxer ctors now take an IMediaSource
	argument to use in place of media->GetSource().
	(Media::Open): Don't set this->source unless we successfully open
	the source.

2008-01-26  Jeffrey Stedfast  <fejj@novell.com>

	* media.cpp (MediaElement::TryOpen): In the DownloadComplete case,
	set the state to Buffering so that calling Play() will actually
	start playing the media (if the file was local, then we'll be in
	the Opening state which means that calling Play() will only note
	that a Play action was requested, but won't actually play the
	media).
	(MediaElement::SetState): Don't check for downloaded_file == NULL,
	it might fail in the above case.

2008-01-26  Jackson Harper  <jackson@ximian.com>

	* xaml.cpp: Set the encoding when we are reading files also.

2008-01-25  Jeffrey Stedfast  <fejj@novell.com>

	* pipeline.cpp (WaitForPosition): Only update wait_pos if it is
	greater than the current wait_pos.

	* media.cpp (UpdateProgress): Use the buffering_start position
	rather than the current write position to calculate buffer_size.

2008-01-25  Jeffrey Stedfast  <fejj@novell.com>

	* media.cpp (TryOpen): When download is complete and we
	successfully open the media, don't set the state to Paused - this
	breaks Halo3 if the video is cached.

	* media.cpp|h: Consolidated all of the bool state variables into a
	single bitfield.

2008-01-25  Rolf Bjarne Kvinge <RKvinge@novell.com> 

	* pipeline.h, pipeline.cpp: ProgressiveSource: Make the position we're
	  waiting for publicly available.
	* media.cpp: UpdateProgress: use the position the file is waiting for to
	  calculate the buffer size (if it would exceed the default buffer size).

2008-01-25  Rolf Bjarne Kvinge <RKvinge@novell.com> 

	* media.h: Add some descriptive comments.

2008-01-25  Sebastien Pouliot  <sebastien@ximian.com>

	* shape.cpp: Merge UIElement::InsideClip inside Shape::InsideObject
	instead of calling it since it can reduce some heavy cairo calls 
	(cairo_in_*), if there's a clip, otherwise it won't affect 
	performance.

2008-01-25  Rolf Bjarne Kvinge <RKvinge@novell.com> 

	* media.cpp: Initialize play_pending, and when buffering is
	  finished, only play if autoplay or play_pending is true.

2008-01-25  Jeffrey Stedfast  <fejj@novell.com>

	* mplayer.cpp: Get rid of some unused variables and cleaned up
	some code.

2008-01-25  Rolf Bjarne Kvinge <RKvinge@novell.com> 

	* pipeline.cpp, media.cpp: More printfs removed.

2008-01-25  Rolf Bjarne Kvinge <RKvinge@novell.com> 

	* src.mdp: Updated.

	* pipeline-ffmpeg.cpp: Commented out printf.

	* pipeline.h, pipeline.cpp: Removed some dead code. Made all
	interfaces inherit from IMediaObject, and put the media field
	there. Commented out printfs.

	* mplayer.h, mplayer.cpp: Unified Mute and UnMute into SetMuted to
	simplify code a bit. Encapsulated target_pts handling into
	separate methods.

	* media.h, media.cpp: Create one and only one MediaPlayer for the
	life-time of the MediaElement. If not AutoPlay is set, then pause
	instead of play.

2008-01-25  Rolf Bjarne Kvinge <RKvinge@novell.com> 

	* pipeline.cpp, pipeline.h: Media: Don't create the worker thread upon first
	  usage, but on construction, and finish it upon destruction. Fixes race
	  between creating and destructing the thread.

2008-01-24  Chris Toshok  <toshok@ximian.com>

	* stylus.cpp (Stroke::HitTestEndcapSegment): implement.
	(calc_perpendicular_intersection_points): new method.
	(Stroke::HitTestSegmentSegment): use
	calc_perpendicular_intersection_points to give us the end points
	of the outer line segments, and use those for hit testing.

2008-01-24  Jeffrey Stedfast  <fejj@novell.com>

	* media.cpp (UpdateProgress): When switching to Buffering mode,
	save the position where we're currently at in the file so that we
	can use that as a reference point when calculating progress. Also,
	pause the MPlayer so that audio won't continue to play while we're
	waiting for buffering to complete. Fixes bug #356051.

2008-01-24  Sebastien Pouliot  <sebastien@ximian.com>

	* shape.cpp: Avoid calls to cairo_in_[stroke|fill] if no stroke 
	(or fill) are present for the shape.

2008-01-24  Rolf Bjarne Kvinge <RKvinge@novell.com> 

	* pipeline.cpp, pipeline.h: Create a more general worker thread,
	and use unions to save some space in WorkItem. In the ASFDemuxer,
	when seeking, we need to seek to the audio stream, since that's
	what we're using to sync against (if we have audio).
	  
	* list.cpp, list.h: Added List::InsertBefore.

2008-01-24  Rolf Bjarne Kvinge <RKvinge@novell.com> 

	* media.cpp: MediaElement::SetSource: only trigger the download
	after we've attached to the CompletedEvent.

2008-01-23  Chris Toshok  <toshok@ximian.com>

	* runtime.cpp (Surface::HandleMouseEvent): don't crash when we
	re-enter HandleMouseEvent, which can happen when that stupid JS
	timeout dialog pops up.

2008-01-23  Chris Toshok  <toshok@ximian.com>

	* runtime.cpp (Surface::SetMouseCapture): this fails not only if
	there's an existing capture, but also if there's a pending
	capture (so if both a parent and child capture on the same event,
	the child gets it.)  Fixes dragging things around in ink journal.

2008-01-23  Chris Toshok  <toshok@ximian.com>

	* stylus.cpp, stylus.h: initial hit testing stuff.  right now the
	only tests that are implemented are endcap (ellipse) vs. point,
	and segment vs. segment (although this one isn't the full test, as
	we're using the stroke line, as opposed to the exterior lines
	created by the ellipse pen tracing that line).

	* rect.h: add PointInside (Point p).
	
2008-01-23  Jeffrey Stedfast  <fejj@novell.com>

	* pipeline-ffmpeg.cpp: Don't #include "asf/asf-ffmpeg.h" anymore,
	it's no longer part of the build.

2008-01-23  Sebastien Pouliot  <sebastien@ximian.com>

	* shape.cpp|h: Add support for different PenLineCap on Line (part 
	of #345888). Fix Polyline when a single segment is used (removed 
	TODO). Avoid extra work when a start/end PenLineCap is Flat (default)

2008-01-23  Jeffrey Stedfast  <fejj@novell.com>

	* media.cpp (SetSource): Initialize the ProgressiveSource.

	* pipeline.cpp (ProgressiveSource::Seek): Simplified by calling
	parent class's implementation.

2008-01-23  Jeffrey Stedfast  <fejj@novell.com>

	* pipeline.cpp|h: ProgressiveSource now inherits from FileSource.

2008-01-23  Jeffrey Stedfast  <fejj@novell.com>

	* pipeline.cpp (FileSource::Read): Optimized a bit more for cases
	where the caller is trying to read a block larger than our
	internal buffer.
	(FileSource::Seek): Fixed 'n' to be an int64_t rather than a
	uint64_t (which is needed in the case of seeking backwards).

2008-01-22  Larry Ewing  <lewing@novell.com>

	* shape.cpp, shape.h: Move the stretch logic out of geometry.cpp
	and into Path.cpp as a transform not by modifying the data.

	* geometry.cpp, geometry.h: remove stretch logic.

2008-01-22  Jeffrey Stedfast  <fejj@novell.com>

	* pipeline.cpp (FileSource::Seek): Also optimize seeking backwards
	if within our pre-buffered bounds.
	(ProgressiveSource::Write): When restoring position state, use the
	proper offset (e.g. the offset of the end of our pre-buffered
	block).

2008-01-22  Chris Toshok  <toshok@ximian.com>

	* collection.cpp (UIElementZIndexComparer): the magnitude of the
	return value doesn't matter, only the sign.

2008-01-22  Chris Toshok  <toshok@ximian.com>

	* media.cpp (Image::InsideObject): if we have no surface (the
	image hasn't been loaded), we aren't HitTestVisible.

	* media.h (class Image): add InsideObject override.

2008-01-22  Chris Toshok  <toshok@ximian.com>

	* panel.cpp (Panel::OnCollectionChanged): remove the fix for
	#353954 as its redundant after the previous commit.

2008-01-22  Chris Toshok  <toshok@ximian.com>

	* garray-ext.cpp (bsearch): fix this so the g_array_insert_sorted
	function works.

2008-01-22  Jeffrey Stedfast  <fejj@novell.com>

	* media.cpp (TryOpen): Don't leak Media objects. Also make sure to
	call Initialize() on the file source.

	* pipeline.cpp (IMediaSource): Read() now returns the number of
	bytes read rather than true/false and does nto guarantee that all
	of the data was read. Added a ReadAll() method which does what the
	old Read() method did.
	(FileSource): Rewritten to do our own buffering which allows for
	nice optimizations for Peek() and Seek().
	(ProgressiveSource): Also rewritten.

	* asf/asf.cpp: Updated to use IMediaSource::ReadAll()

	* asf/asf-guids.h: Moved all of the guids into asf-guids.cpp and
	just made them extern in the ehader, this way we don't duplicate
	those values in each source file that includes this header.

2008-01-22  Sebastien Pouliot  <sebastien@ximian.com>

	* shape.cpp|h: First part of DoDraw refactoring. Pass all 
	regression tests from harness (moon versus moon) but it's possible
	that some degenerated cases (without test cases) regress.

2008-01-22  Larry Ewing  <lewing@novell.com>

	* clock.cpp: initalize the smoothing to max framerate, the first
	frame is quite likely the slowest frame we'll ever draw.  Bump
	error delta back up to 1/50th.

2008-01-22  Chris Toshok  <toshok@ximian.com>

	* media.cpp (MediaElement::Render): a little cairo cleanup, and
	remove the USE_OPT_REGION_CLIP block.

2008-01-22  Andrew Jorgensen  <ajorgensen@novell.com>

	* pipeline.cpp: include unistd.h, fixes a build error introduced in
	r93311 when building without-ffmpeg

2008-01-22  Larry Ewing  <lewing@novell.com>

	* clock.cpp: reduce delta to 1/100 of a second and fix a bug in
	previous commit.

2008-01-22  Larry Ewing  <lewing@novell.com>

	* clock.cpp: Tweak clock timing and smoothing.  Increase timer
	priority so that ticks get deliver when we want them this doesn't
	change the smoothing calculation but it can raise the actual fps
	by assuring all our clocks are delivered.  Change smoothing alpha
	from 0.3 to 0.03 to improve noise immunity.  Don't reset the timer
	unless our new calculated timeout differs from our old by at least
	1/50 of a second.  Resetting the clock on every tick had the
	effect adding the drawing time to the tick time for every tick
	since the timeout starts over at zero.

2008-01-21  Jeffrey Stedfast  <fejj@novell.com>

	* pipeline.cpp (Mp3FrameReader::ReadFrame): If the bitrate was
	unspecified, encode the bitrate back into the header so that if we
	are using the NullMp3Decoder, it will know how to handle
	it. Probably also needed for any actual Mp3 decoders as well since
	it won't reliably be able to keep track of variable-bitrate
	streams otherwise since it wouldn't know if/when we seek.
	(NullMp3Decoder::DecodeFrame): Implemented.

2008-01-21  Rolf Bjarne Kvinge <RKvinge@novell.com> 

	* pipeline.cpp: Remove printf.

2008-01-21  Rolf Bjarne Kvinge <RKvinge@novell.com> 

	* src.mdp: Remove mplayer2.cpp from here too.

2008-01-21  Rolf Bjarne Kvinge <RKvinge@novell.com> 

	* mplayer.cpp, mplayer2.cpp, Makefile.am: Deleted mplayer.cpp and moved
	  mplayer2.cpp to mplayer.cpp.

2008-01-21  Jeffrey Stedfast  <fejj@novell.com>

	* downloader.cpp (ll_downloader_get_response_file): Fixed to use
	mkstemp() rather than tmpnam_r() and also simplified.

	* pipeline.cpp: Fixed various things about the progressive stream.

2008-01-19  Jeffrey Stedfast  <fejj@novell.com>

	* mplayer2.cpp (audio_play): Get rid of the 'play' argument. Also
	don't memmove() data unless we don't have enough to play a single
	frame. Instead, what we'll do is keep progressing audio->outbuf as
	we play it.

2008-01-19  Chris Toshok  <toshok@ximian.com>

	* uielement.cpp (UIElement::OnPropertyChanged): remove the
	handling of TriggersProperty and ResourcesProperty's closure.

	* trigger.cpp, trigger.h: remove EventTrigger's OnPropertyChanged
	method.

	* transform.cpp (TransformGroup::OnPropertyChanged): remove
	handling of ChildrenProperty's closure.

	* text.cpp, text.h: remove Run::OnPropertyChanged, and also remove
	the handling of Inlines->closure from TextBlock.

	* stylus.cpp, stylus.h: remove a couple of OnPropertyChanged
	methods (InkPresenter and Stroke).

	* panel.cpp (Panel::OnPropertyChanged): remove handling of the
	ChildProperty's closure here.

	* media.cpp, media.h: remove the unnecessary
	MediaBase::OnPropertyChanged.

	* geometry.cpp, geometry.h: remove a few OnPropertyChanged
	methods (GeometryGroup, PathGeometry, and PathSegment.)

	* clock.cpp, clock.h: remove TimelineGroup::OnPropertyChanged.

	* brush.cpp, brush.h: remove the unnecessary
	Brush::OnPropertyChanged and GradientBrush::OnPropertyChanged.

	* animation.cpp, animation.h: remove all the
	*AnimationUsingKeyFrames::OnPropertyChanged methods, since all
	they did was deal with collection closures.

	* dependencyobject.cpp (DependencyObject::SetValue): factor out
	the "collection->closure" setting code from all the
	OnPropertyChanged methods sprinkled around and put it here.  Also,
	set collection->closure to NULL on the old value (something the
	old code didn't do).

2008-01-19  Chris Toshok  <toshok@ximian.com>

	* animation.cpp: the remaining macros (SET_NULLABLE_FUNC and
	NULLABLE_{PRIM_}GETSET_IMPL) are moved here, right before their
	use.

	* animation.h: clean this file up by removing all those disgusting
	macros.  for the DECL macros, just expand them here, as having the
	methods listed in the class declaration is a good thing.

	* collection.cpp (collection_new): remove the switch statement
	from here and use Type::CreateInstance instead.  this largely
	removes the need to be including extra headers (like animation.h).

2008-01-19  Rolf Bjarne Kvinge <RKvinge@novell.com> 

	* media.cpp, mplayer.cpp, mplayer2.cpp, Makefile.am, pipeline.h: Remove all
	  MOON_MEDIA ifdefs and completely disable the old mplayer.cpp
	* src.mdp: Updated.

2008-01-19  Rolf Bjarne Kvinge <RKvinge@novell.com> 

	* media.h, media.cpp: MediaElement: make this a state machine to follow the
	  behaviour specified in MSDN. Implement buffering of media files.
	  MediaSource (and derived): take a IMediaSource instead of a filename.
	* mplayer.h, mplayer2.cpp: Make Open take a Media instead of a filename.
	  Remove all MOON_MEDIA ifdefs, too many changes to support both versions
	  now. Make seeking async.
	* pipeline.cpp, pipeline.h: Changed the FrameReaderLoop into a more general
	  worker thread, seeking can now be done there too. Implement
	  ProgressiveSource.
	* playlist.cpp: Change IsPlaylistFile to peek the file instead of checking
	  the file extension. MediaSource (and derived): take a IMediaSource
	  instead of a filename.
	* playlist.h: MediaSource (and derived): take a IMediaSource instead of a
	  filename.

2008-01-18  Larry Ewing  <lewing@novell.com>

	* uielement.cpp: compute total_opacity for invalidation logic but
	use local_opacity for drawing.  This fixes monotones grid.xaml and
	some hit test regressions.

2008-01-18  Jackson Harper  <jackson@ximian.com>

	* xaml.cpp: KeyFrameCollections can be specified in the xaml if
	they are in a property element.
	- When searching for collections, use is subclass instead of
	making them be the same type, so derivied collections can be used.
	
2008-01-17  Chris Toshok  <toshok@ximian.com>

	* pipeline.h (class IMediaDemuxer): initializer streams and
	stream_count so we don't crash on ltbennett.com.

2008-01-17  Jeffrey Stedfast  <fejj@novell.com>

	* pipeline.cpp (Mp3FrameReader::ReadFrame): If we fail to read an
	MPEG header, set MediaFrame->event to EOF. Same if we can't read
	the frame data.
	(Media::GetNextFrame): Don't try to decode the frame if it is an
	event.
	(ASFDemuxer::ReadFrame): If we reach EOF, set MediaFrame->event to
	EOF.

	* mplayer2.cpp (media_player_callback): pts is allowed to be 0.
	(AdvanceFrame): Handle EOF frame events.
	(audio_loop): Handle EOF frame events.

2008-01-17  Chris Toshok  <toshok@ximian.com>

	* stylus.cpp (InkPresenter::OnCollectionChanged): we need to
	invalidate the old bounds of the stroke for ItemRemoved as well as
	ItemChanged.

2008-01-17  Chris Toshok  <toshok@ximian.com>

	* rect.h (Rect::Transform): new method, allows for transforming a
	rectangle by a cairo_matrix_t, used with transforming the stroke
	bounds back to screen space using the InkPresenter's
	absolute_xform.

	* stylus.cpp, stylus.h: deal with collection changed notifications
	on Stroke::StylusPointsProperty and on
	InkPresenter::StrokesProperty, and correctly invalidate a stroke's
	bounds.  The bounds of a stroke needs to be looked at - right now
	it's in the coordinate space of the InkPresenter, and so it needs
	to be transformed back to screen space before invalidating.  Need
	to check if MS uses screen space for a stroke's bounds (seems
	likely they do, but this was easier to code.)

2008-01-17  Jeffrey Stedfast  <fejj@novell.com>

	* mplayer2.cpp: Updated for MediaFrame changes.

	* pipeline-ffmpeg.cc: Updated for MediaFrame changes.

	* pipeline.cpp: Instead of having a compressed_data and
	uncompressed_data field, simply have a 'buffer' field that gets
	reused by both the demuxer and the decoder. The decoder will set
	the buffer to the compressed data and the decoder will, once
	finished decoding, free the buffer and then update it to point to
	the decoded data. This reduces memory overhead.

2008-01-17  Chris Toshok  <toshok@ximian.com>

	* uielement.cpp (UIElement::InsideClip): use
	uielement_transform_point instead of duplicating it.

	* shape.cpp (Shape::InsideObject): use uielement_transform_point
	instead of duplicating it.

	* text.cpp (TextBlock::InsideObject): use
	uielement_transform_point instead of duplicating it.

2008-01-17  Larry Ewing  <lewing@novell.com>
	
	* shape.cpp (Rectangle::BuildPath): fix the origin calculation for
	unstroked rectangles (see test-rectangle-aliasing.xaml).  Suggest
	more rectangle testing after this.

2008-01-17  Jackson Harper  <jackson@ximian.com>

	* xaml.cpp: After setting a property stop walking up the element
	tree.

2008-01-17  Rolf Bjarne Kvinge <RKvinge@novell.com> 

	* pipeline-ffmpeg.cpp: Comment out a couple of confusing printfs.

2008-01-17  Jeffrey Stedfast  <fejj@novell.com>

	* mplayer2.cpp (audio_decode): Removed as it is no longer really
	needed.
	(audio_loop): We can't assume that an entire decoded audio packet
	will fit into the audio output buffer in a single shot, break it
	up if needed.

2008-01-17  Rolf Bjarne Kvinge <RKvinge@novell.com> 

	* mplayer2.cpp: Max out video frame rate at 60fps.

2008-01-17  Fernando Herrera  <fherrera@novell.com>

	* panel.cpp: Reorder based on ZIndex when a new item is added.
	Fixes bug #353954

2008-01-17  Larry Ewing  <lewing@novell.com>

	* runtime.cpp (Surface::InitializeDrawingArea): disable extended
	input devices until the remaining issues can be resolved.

2008-01-17  Rolf Bjarne Kvinge <RKvinge@novell.com> 

	* mplayer2.cpp, pipeline-ffmpeg.cpp: Plug a leak.

2008-01-16  Larry Ewing  <lewing@novell.com>

	* uielement.cpp, uielement.h: 
	* panel.cpp, panel.h: 
	* collection.cpp, control.cpp: remove Compute/UpdateTotalOpacity.
	Combine the opacity visibility check into the total render
	visibility.  Make sure we compute/invalidate in all the same
	places.

	* dirty.cpp, dirty.h: remove all references to DirtyOpacity.

	* uielement.cpp (UIElement::DoRender): make sure we don't reset
	the coordinate system when setting up the clip calls in the
	opacity and opacity mask cases.  Go back to using the brush
	directly when rendering masks.  Should speed things up a little
	and fixes http://mycomix.wintellect.com/Spotlight.aspx?Item=1041

2008-01-16  Chris Toshok  <toshok@ximian.com>

	* stylus.h, stylus.cpp: a few changes.  Move the
	StylusPointCollection and StrokeCollection classes here from
	collection.h/collection.cpp.  I didn't like the addition of
	stylus.cpp logic in two places.  Convert Stroke::GetBounds use use
	the new DrawingAttributes::ComputeBounds{WithoutDrawingAttributes}
	methods, and build up the bounds for the StrokeCollection by
	unioning all the Stroke bounds (these should be cached, but aren't
	yet.)  StrokeCollection::HitTest has been implemented, just
	looping over the strokes.  Stroke::HitTest is missing its guts at
	the moment, since hit testing is going to be a little bit of a
	pain for it.

	* collection.h, collection.cpp: remove StylusPointCollection and
	StrokeCollection.

2008-01-16  Larry Ewing  <lewing@novell.com>

	* uielement.cpp, uielement.h: Rework the way we handle opacity to
	operate like the reference platform by removing the concept of
	TotalOpacity and instead using push/pop group and paint_with
	alpha.  See test-sibling-opacity.xaml for an example.  Handle
	clipping in DoRender rather than in every subclass because we want
	the clip path active before calling push/pop so that the temporary
	surface is bounded.
	* brush.cpp, panel.cpp: remove GetTotalOpacity references.
	* media.cpp, media.h: cleanup the complicated render logic now
	that things are handled in uielement.
	* shape.cpp, text.cpp: remove RenderClipPath calls.

	* rect.cpp, rect.h: add draw methods.

2008-01-16  Jeffrey Stedfast  <fejj@novell.com>

	* pipeline.cpp: Implemented mpeg seeking support for
	Mp3FrameReader and, thusly, Mp3Demuxer.
	(Mp3Demuxer::ReadHeader): Calculate the duration of the stream.

2008-01-16  Rolf Bjarne Kvinge <RKvinge@novell.com> 

	* mplayer2.cpp: Remove a superfluous variable from Audio.

2008-01-16  Rolf Bjarne Kvinge <RKvinge@novell.com> 

	* mplayer2.cpp: Remove superfluous variables from Video.

2008-01-16  Sebastien Pouliot  <sebastien@ximian.com>

	* moon-path.c: Fix typo (but was same value).

2008-01-15  Jeffrey Stedfast  <fejj@novell.com>

	* pipeline.cpp: Implemented mp3 demuxer.

2008-01-15  Rolf Bjarne Kvinge <RKvinge@novell.com> 

	* mplayer2.cpp: Don't crash if Seek is called before Open.

2008-01-15  Rolf Bjarne Kvinge <RKvinge@novell.com> 

	* mplayer2.cpp: Remove dead code and variables, and only request
	audio/video frames if we have audio/video.

2008-01-15  Jeffrey Stedfast  <fejj@novell.com>

	* mplayer2.cpp: Get rid of extra member variables in Packet.

2008-01-15  Rolf Bjarne Kvinge <RKvinge@novell.com> 

	* mplayer2.cpp: Implement audio decoding on the main thread as well.

2008-01-14  Jeffrey Stedfast  <fejj@novell.com>

	* pipeline.cpp: Partially implemented an mp3 demuxer.

2008-01-14  Rolf Bjarne Kvinge <RKvinge@novell.com> 

	* media.cpp, media.h, mplayer2.cpp, pipeline.cpp, pipeline.h: Make markers
	  work again with the new pipeline.

2008-01-14  Sebastien Pouliot  <sebastien@ximian.com>

	* shape.cpp|h: It looks like we stopped needing consider_fill a 
	while ago.

2008-01-14  Rolf Bjarne Kvinge <RKvinge@novell.com> 

	* mplayer.h: We don't need io_tread anymore, so remove it.
	* mplayer2.cpp: We don't need io_tread anymore, so remove it. Add support
	  for doing the decoding on the main thread with easy (in-code) switch.
	  Comment out printfs, and remove dead/old/commented-out code.
	* pipeline.cpp, pipeline.h, pipeline-ffmpeg.cpp: Add support for doing the
	  decoding on the main thread with easy (in-code) switch.
	* runtime.cpp: Don't print entire object tracking output if nothing leaked.

2008-01-14  Rolf Bjarne Kvinge <RKvinge@novell.com> 

	* xaml.cpp: Unref a matrix object when we are done with it.
	* mplayer2.cpp: Remove printf.

2008-01-14  Rolf Bjarne Kvinge <RKvinge@novell.com> 

	* mplayer2.cpp: Remove printfs.
	* pipeline.cpp, pipeline.h: Remove printfs and only print messages if they
	  are errors.
	* pipeline-ffmpeg.cpp: Free context->extradata upon destruction.

2008-01-14  Rolf Bjarne Kvinge <RKvinge@novell.com> 

	* pipeline.cpp: Fix crash with several web-sites (when seeking before
	  reading anything).

2008-01-11  Chris Toshok  <toshok@ximian.com>

	* clock.h (class Clock): add an instance
	field (calculated_natural_duration).

	* clock.cpp (Clock::ComputeBeginTime): don't include the parent's
	current time here.  this was inflating animation begin time's in
	some cases to be either very close to the parent's calculated
	duration (or even after it).
	(ClockGroup::ComputeBeginTime): don't chain up to
	Clock::ComputeBeginTime.  clock groups in our system need to
	include their parent time in their begin time.  There are only two
	levels of clockgroups - storyboards, and the clockgroup we have
	associated with a given surface (Which will be the parent of all
	the storyboards running on that surface.)
	(output_clock): print out the BeginTime of the clock.
	(TimeManager::AddChild): I don't really like this, but we need to
	force the calculation of the natural duration of the clock when
	it's added to the hierarchy.
	(ClockGroup::AddChild): same here.
	(Clock::Clock): don't calculate the natural duration of the clock
	here - when we instantiated a ClockGroup it was calculating the
	duration before the child clocks were added.

2008-01-11  Rolf Bjarne Kvinge <RKvinge@novell.com> 

	* pipeline.cpp: Seek on the frame reader, not on the source.
	* mplayer2.cpp, mplayer.h: Change all use of audio/video->stream != NULL to
	  HasAudio/Video (). Fix seeking to actually work.

2008-01-11  Rolf Bjarne Kvinge <RKvinge@novell.com> 

	* mplayer2.cpp, mplayer.h: Move the media variable from audio/video into
	  mplayer.h where it belongs.
	* pipeline.cpp, pipeline.h: Implement seeking.
	* pipeline-ffmpeg.cpp: Copy decompressed data instead of using ffmpeg's data
	  directly, since ffmpeg uses one single memory location for all decoded
	  frames, causing us to always show the last decoded frame.

2008-01-11  Sebastien Pouliot  <sebastien@ximian.com>

	* shape.cpp: Add support for PenLineCapTriangle with a patched cairo.
	See bug #345892 for the required cairo patch.

2008-01-11  Rolf Bjarne Kvinge <RKvinge@novell.com> 

	* media.cpp: Initialize Media too upon initialization.
	* pipeline.cpp, pipeline.h, pipeline-ffmpeg.cpp, pipeline-ffmpeg.h,
	  mplayer2.cpp, mplayer.cpp: Implement registration of components, making
	  it possible to completely remove ffmpeg.

2008-01-11  Rolf Bjarne Kvinge <RKvinge@novell.com> 

	* pipeline.cpp: Remove stray character.

2008-01-11  Rolf Bjarne Kvinge <RKvinge@novell.com> 

	* mplayer2.cpp, pipeline.cpp, pipeline.h, pipeline-ffmpeg.cpp,
	  pipeline-ffmpeg.h: Code-cleanup.

2008-01-10  Larry Ewing  <lewing@novell.com>

	* runtime.cpp (Surface::InitializeDrawingArea): realize the widget
	before setting the extension events (lame api) and disable the
	cursor test.

2008-01-10  Chris Toshok  <toshok@ximian.com>

	* runtime.cpp (Surface::InitializeDrawingArea): activate all
	devices that have a cursor associated with them.

2008-10-10  Andrew Jorgensen  <ajorgensen@novell.com>

	* pipeline.cpp: include config.h (fixes an ffmpeg-related build error)

2008-01-10  Rolf Bjarne Kvinge <RKvinge@novell.com> 

	* mplayer.cpp: Surround with ifdef to conditionally include the new
	  MediaPlayer or not.
	* Makefile.am: Added pipeline* and mplayer2.cpp.
	* pipeline-ffmpeg.h, pipeline-ffmpeg.cpp: Added, support for using ffmpeg in
	  the pipeline.
	* pipeline.cpp, pipeline.h: Added.
	* mplayer2.cpp: Added, a MediaPlayer that uses the new pipeline.

2008-01-10  Rolf Bjarne Kvinge <RKvinge@novell.com> 

	* panel.cpp: Delete leaked region.

2008-01-10  Rolf Bjarne Kvinge <RKvinge@novell.com> 

	* src.mdp: Added.

2008-01-09  Chris Toshok  <toshok@ximian.com>

	* stylus.h, stylus.cpp, collection.h, collection.cpp: fix
	_get_bounds.

2008-01-09  Chris Toshok  <toshok@ximian.com>

	* collection.h, collection.cpp: add C wrappers for
	StrokeCollection::GetBounds and ::HitTest.

	* stylus.h, stylus.cpp: same deal for Stroke::
	
2008-01-09  Chris Toshok  <toshok@ximian.com>

	* collection.h, collection.cpp: add empty implementations of
	StrokeCollection::GetBounds and StrokeCollection::HitTest.

	* stylus.h, stylus.cpp: add empty implementations of
	Stroke::GetBounds and Stroke::HitTest.

2008-01-09  Chris Toshok  <toshok@ximian.com>

	* uielement.h, uielement.cpp: change all the Emit* methods that
	deal with mouse events to take a GdkEvent instead of state/x/y,
	and also change their calldata to a heap allocated MouseEventArgs,
	which we unref after the emit.  This is because the pointer itself
	is wrapped by the managed MouseEventArgs, and will be unref'ed in
	~MouseEventArgs at some later time.

	* runtime.h, runtime.cpp: change all the mouse events to pass
	around the actual GdkEvent instead of the state/x/y.  This is due
	to the fact that our MouseEventArgs class now wraps the GdkEvent,
	so we can get at all the stylus/extension event stuff.

	* stylus.h, stylus.cpp: remove stylus_get_current, as it's no
	longer required.  We correctly create a StylusInfo instance from
	the MouseEventArgs.

	* Makefile.am (libmoon_la_SOURCES): add eventargs.cpp
	(libmooninclude_headers): add eventargs.h

	* libmoon.h: add eventargs.h.

	* eventargs.h, eventargs.cpp: new files, splitting out the
	KeyboardEventArgs and MouseEventArgs from uielement.h, and flesh
	out MouseEventArgs, making it a refcounted object with enough
	smarts to handle both the managed case and plugin case.  Include
	all the stylus related code as well, so this *should* make all the
	stylus requiring demos work.

2008-01-09  Jeffrey Stedfast  <fejj@novell.com>

	* geometry.cpp (path_get_bounds): My fix the other day wasn't
	quite ideal. Instead of using a 0.1 line thickness when the
	shape's StrokeThickness is 0, continue using that 0 thickness but
	use cairo_fill_extents() instead. Also, when shape is null, ise a
	0.0 thickness & cairo_fill_extents() as well.

	* shape.cpp (DoDraw): Removed the if (thickness == 0) optimization
	that breaks Paths with a StrokeThickness of 0. Fixes bug #352188.

	* runtime.cpp (EmitEventOnList): Changed to take double x,y
	coordinate arguments rather than int.
	(HandleMouseEvent): Same.

2008-01-09  Jeffrey Stedfast  <fejj@novell.com>

	* list.cpp (List::~List): Added a dtor that deletes all nodes
	currently in the list. This is doable now that List::Nodes are
	classes where the node dtors can be overloaded.

2008-01-09  Jackson Harper  <jackson@ximian.com>

	* xaml.cpp: If a property is a collection, don't assume that the
	collection is already initialized (they used to always be), and
	initialize the collection if needed. This fixes BNC 350893.

2008-01-09  Stephane Delcroix  <sdelcroix@novell.com>

	* brush.cpp: fix (useless) derelativization for MappingmodeAbsolute
	on LinearGradientBrush. Fixes bnc 346308 and lineargrad.xml.

2008-01-08  Chris Toshok  <toshok@ximian.com>

	* animation.cpp (Storyboard::Begin): simple change to fix a nasty
	bug.  we need to add the teardown handler before the completed
	handler.  otherwise cases where people were using a storyboard as
	a timer would break - the completed handler would fire, the JS
	would restart the storyboard, then the teardown handler would free
	the new clock hierarchy.  Fixes the page animation in pageturn,
	and gets the bubbles moving again in the SilverlightCLRBalls demo.

2008-01-07  Jeffrey Stedfast  <fejj@novell.com>

	* geometry.cpp (path_get_bounds): Cairo seems to break if the line
	thickness is 0.0, so if the shape's thickness is set to 0.0, use
	0.1 like we do if shape is null. Fixes bug #351575.

2008-01-07  Sebastien Pouliot  <sebastien@ximian.com>

	* shape.cpp|h: Add NeedsLineCaps and NeedsLineJoin so some shapes,
	that ignore those properties, can avoid setting them on the cairo
	context.

2008-01-04  Chris Toshok  <toshok@ximian.com>

	* runtime.cpp: mostly switch all emit_* calls to take doubles, and
	pass doubles around for button x/y.
	(Surface::motion_notify_callback): if we're gtk > 2.12, use
	gdk_event_request_motions (falling back to gdk_window_get_pointer
	if not).  also, we can use the mouse_event_x/y from the event,
	even when it's a hint.

	* runtime.h: switch back to using doubles for everything mouse
	event related.  Change MoonlightEventEmitFunc to take doubles.

2008-01-04  Jeffrey Stedfast  <fejj@novell.com>

	* runtime.cpp|h: Make mouse_event_x/y ints rather than doubles
	since the events that use them want them as ints anyway.
	(button_release_callback): Cast the button->x/y doubles to int.
	(button_press_callback): Same.
	(motion_notify_callback): Cast event->x/y to int.
	(crossing_notify_callback): Same.

	* dependencyobject.cpp: EventObjects now use a List class for
	event_lists rather than GSList which is far more costly for
	appends.
	(Emit): Reduce the number of linked-list iterations from 5 to 2.

2008-01-04  Chris Toshok  <toshok@ximian.com>

	* runtime.h, runtime.cpp: completely overhaul the way we handle
	mouse events.  Instead of doing both hit testing and event
	dispatch in one recursive tree traversal, we build up a list of
	all elements that will bubble the event, and then use that list
	along with the previous one to generate Enter/Leave events for the
	elements that require it.  Also fix the way capture is done (it's
	not handled until the end) and fix the Enter event dispatch when
	you release mouse capture.

	* uielement.h, uielement.cpp: rename the mouse events to match the
	names used in C# and JS, as it's been singularly annoying to
	remember that ButtonPressEvent -> MouseLeftButtonDown, etc.  Also
	rename all the Handle* event methods to Emit*, as that's all they
	do.  Make them nonvirtual, as the traversal and emission of the
	events now happens in runtime.cpp.  Add a new virtual
	method (HitTest), that is overridden by the container elements,
	which appends elements that are going to bubble the event to the
	list.

	* panel.h, panel.cpp: remove all the Handle* methods, implement
	HitTest.

	* control.h, control.cpp: remove all the Handle* methods,
	implement HitTest.

2008-01-04  Jeffrey Stedfast  <fejj@novell.com>

	* media.cpp (UpdateProgress): Don't SetValue() unless the delta
	was large enough - otherwise we could get into a situation where
	we never emit a progress changed event in a case where the data
	trickles in at < 0.05%.

2008-01-04  Chris Toshok  <toshok@ximian.com>

	* animation.cpp (Storyboard::HookupAnimationsRecurse): look back
	up the clock hierarchy for the target property like we do with the
	target name.

2008-01-04  Chris Toshok  <toshok@ximian.com>

	* media.h: add Image::DownloaderFailed.

	* media.cpp (Image::UpdateProgress): make sure to qualify the
	DownloadProgressProperty we lookup on the Downloader, since
	without the Downloader:: it'll try to get
	Image::DownloadProgressProperty, which will always return 0.0.
	(Image::SetSource): use the static qualifier for
	events (Downloader:: instead of downloader->).
	(Image::DownloaderFailed): new method, emit our ImageFailedEvent.

	* brush.cpp (ImageBrush::image_progress_changed): make sure to set
	our ImageBrush::DownloadProgressProperty before emitting the
	changed event.
	(brush_init): lookup the ImageBrush::ImageFailedEvent.

2008-01-04  Rolf Bjarne Kvinge <RKvinge@novell.com> 

	* runtime.cpp: Free background_color upon surface
	  destruction. Fixes a minor leak.

	* clock.cpp|h: Free the tick_call_mutex upon destruction.

2008-01-03  Jeffrey Stedfast  <fejj@novell.com>

	Fix for bug #350962

	* media.cpp (MediaBase::OnPropertyChanged): Don't emit
	DownloaderProgressChanged events anymore, leave that up to Image
	and MediaElement classes so that we don't emit events when an
	outside source changes the value.
	(MediaElement::UpdateProgress): Emit the DownloaderProgressChanged
	event if the proper download delta has occured.
	(Image::UpdateProgress): Same.

2008-01-02  Rolf Bjarne Kvinge <RKvinge@novell.com> 

	* dependencyobject.h: Remove warning.

2007-12-31  Jeffrey Stedfast  <fejj@novell.com>

	* runtime.h (CreateDownloader): Simplified.

2007-12-31  Rolf Bjarne Kvinge <RKvinge@novell.com> 

	* collection.cpp: Upon destruction on VisualCollection, remove the visual
	  parent of all items.
	* dependencyobject.h: Add weak_ref/unref and a comment explaining when and
	  how to use them.
	* dirty.cpp: Don't take a ref in DirtyNode.

2007-12-31  Rolf Bjarne Kvinge <RKvinge@novell.com> 

	* media.cpp: Add const modifier 

2007-12-26  Rolf Bjarne Kvinge <RKvinge@novell.com> 

	* downloader.cpp: Null-initialize a field.
	* dirty.cpp: Make DirtyNode keep a reference to the element it wraps.

2007-12-21  Rolf Bjarne Kvinge <RKvinge@novell.com> 

	* pipeline.h: Added, the start of the new media pipeline.

2007-12-20  Sebastien Pouliot  <sebastien@ximian.com>

	* collection.cpp|h: Add missing method AddStylusPoints for 
	StylusPointCollection

2007-12-20  Sebastien Pouliot  <sebastien@ximian.com> 

	* geometry.h: Remove hack for PathGeometry::FiguresProperty
	* xaml.cpp: If a collection is null by default then we must call
	parent->SetValue(dp, collection) or the collection, and it's 
	contents, won't be available. Fix (correctly) Chess.

2007-12-19  Sebastien Pouliot  <sebastien@ximian.com> 

	* geometry.cpp: Fix Draw and ComputeBound to deal with the fact that
	there's no default Figure collection. Fix Chess crasher.
	* xaml.cpp: Fix unit test were empty string are parsed as 0.0,
	foir doubles, and as an "empty" (but not NULL) Value for 
	DOUBLE_ARRAY.

2007-12-19  Rolf Bjarne Kvinge <RKvinge@novell.com> 

	* media.cpp, media.h: Implement support for markers as a separate stream
	  (the demuxer will call a callback when it encounters any streamed
	  markers).

2007-12-19  Sebastien Pouliot  <sebastien@ximian.com>

	* xaml.cpp: Add create_item_func for PathFigureCollection. This is 
	now needed since it defaults to null and not an empty collection.

2007-12-19  Stephane Delcroix  <sdelcroix@novell.com>

	* uielement.[h|cpp]: set a default value (0,0) for RenderTransformOrigin.

2007-12-18  Sebastien Pouliot  <sebastien@ximian.com>

	* color.cpp: Handle empty string correctly in color_from_str. Unit 
	tests shows this return 0 (and not transparent).

2007-12-18  Stephane Delcroix  <sdelcroix@novell.com>

	* xaml.cpp: fix for bnc 348581.

2007-12-18  Sebastien Pouliot  <sebastien@ximian.com> 

	* brush.cpp: Fix default color values for SolidColorBrush::Color and
	GradientStop::Color properties (see js unit tests).
	* geometry.cpp|h: Remove default collection from PathGeometry. Fix
	testPathGeometry unit test.

2007-12-18  Rolf Bjarne Kvinge <RKvinge@novell.com> 

	* media.cpp: ReadASFMarkers: Read markers as well as script commands.
	  Subtract the preroll value from the pts before adding the marker. Unref
	  the created collection and markers when finished with them.
	  AdvanceFrame: Always call CheckMarkers, even if we couldn't advance the
	  frame (might be necessary if the last frame has a marker).

2007-12-17  Jb Evain  <jbevain@novell.com>

	* xaml.cpp: fix testMatrixWithZeroItem test case.

2007-12-17  Jb Evain  <jbevain@novell.com>

	* type.cpp|h(.in), value.cpp|h(.in): remove the Matrix
	value type, has SL exposes it as a DependencyObject.

	* transform.cpp|h: define and implement the
	Matrix DependencyObject type.

	* xaml.cpp: create a Matrix DO on a Matrix xaml element.
	Also create such an object with the <MatrixTransform Matrix='...'>
	syntax.

2007-12-17  Sebastien Pouliot  <sebastien@ximian.com>

	* xaml.cpp: Return an "empty" Value (not NULL) if no POINT_ARRAY
	is provided. Fix testAllowEmptyPointsOnPoly[gon|line] JS tests.

2007-12-14  Jeffrey Stedfast  <fejj@novell.com>

	* runtime.cpp (fps_report_default): Default printf FPS report
	callback.
	(Surface::render_cb): Use instance-local variables for keeping
	track of FPS and use the report func if RUNTIME_INIT_SHOW_FPS bit
	is set.

	* runtime.h: Added a RUNTIME_INIT_SHOW_FPS flag
	(class Surface): New method to set the FPS report callback for a
	surface.

2007-12-14  Chris Toshok  <toshok@ximian.com>

	* type.cpp.in, type.cpp (types_init_register_events): need to
	register DownloadProgressChanged and ImageFailed events on
	imagebrushes.

	* brush.h, brush.cpp: same, and hook up the events from
	ImageBrush's embedded image so that we can re-emit the events.
	
2007-12-14  Jeffrey Stedfast  <fejj@novell.com>

	* downloader.cpp (Downloader::Abort): Don't abort if we've already
	been aborted or been notified that we've failed (needed protection
	for the Plugin downloader).
	(Downloader::Send): Set aborted = false.
	(Downloader::NotifyFailed): Don't do anything if we've already
	been notified of failure for this download request.

	* downloader.h (class Downloader): Keep track of aborted state as
	well.

2007-12-14  Stephane Delcroix  <sdelcroix@novell.com>

	* brush.cpp: Fix for bnc 346204: Set both Width and Height for Image if
	only one (Width XOR Height) is provided.

2007-12-14  Sebastien Pouliot  <sebastien@ximian.com> 

	* shape.cpp: Fix Path::GetBrushSize to ensure the geometry has
	been built before calling cairo_stroke_extents. This fix sample
	http://designwithsilverlight.com/tutorials/photoGalleryWall/default.html

2007-12-13  Sebastien Pouliot  <sebastien@ximian.com> 

	* shape.cpp|h: Shortcut path bounds calculation when both Width
	and Height are specified. Add same clipping rules to Line, 
	Polyline and Polygon classes.

2007-12-13  Sebastien Pouliot  <sebastien@ximian.com>

	* geometry.cpp: Resume using cairo_stroke_extents in some cases
	because we need very precise bounds for Fill to work properly.
	This fix Sprawl's cowboy hat ribbon :-)

2007-12-12  Stephane Delcroix  <sdelcroix@novll.com>

	* brush.cpp: Fix RelativeTransform for RadialGradientBrush'es too.

2007-12-11  Jeffrey Stedfast  <fejj@novell.com>

	* downloader.cpp|h: Made the ::Write() method take the same
	int-type args as the NPP_Write() function (which means int32 for
	both offset and nbytes).

2007-12-11  Sebastien Pouliot  <sebastien@ximian.com>

	* stylus.cpp: Fix JS unit tests for Stroke properties by having
	a default DrawingAttributes inside the Stroke.

2007-12-10  Chris Toshok  <toshok@ximian.com>

	* dependencyobject.h, dependencyobject.cpp: more event changes.
	events keep a integer "token" per event, that starts at 0, that is
	returned from the plugin's addEventListener method, and can be can
	be passed to the plugin's removeEventListener method.

2007-12-10  Sebastien Pouliot  <sebastien@ximian.com>

	* shape.cpp: Fix Shape::GetSizeForBrush to adjust to the Stretch
	property of the Shape. Fix bug #346018

2007-12-10  Jeffrey Stedfast  <fejj@novell.com>

	* runtime.cpp (InitializeDrawingArea): Removed the call to
	gtk_widget_set_size_request() - we now call it elsewhere (since
	going fullscreen requiers us to call set_size_request() /before/
	calling gtk_window_fullscreen(). When going to fullscreen mode,
	this was causing the FullScreenMessage item to appear in the
	upper-left corner rather than centered like it should have been.
	(Surface): Make the call to gtk_widget_set_size_request() here now
	that it no longer is called inside InitializeDrawingArea().

2007-12-07  Sebastien Pouliot  <sebastien@ximian.com> 

	* geometry.cpp: Set SHAPE_EMPTY if only Height or Width is specified.
	* shape.cpp|h: Add Shape and Path NeedsClipping methods. Adjust the
	bounds calculation on paths when Height *and* Width are present.

2007-12-07  Sebastien Pouliot  <sebastien@ximian.com>

	* shape.cpp: In Shape::ComputeBounds don't compute half thickness
	unless the value is needed.

2007-12-07  Rolf Bjarne Kvinge <RKvinge@novell.com> 

	* xaml.cpp: Plug more leaks.

2007-12-07  Rolf Bjarne Kvinge <RKvinge@novell.com> 

	* animation.cpp, geometry.cpp: Fix a couple of memory leaks,
	  detected by the javascript tests.

2007-12-06  Jeffrey Stedfast  <fejj@novell.com>

	* media.cpp (media_element_get_attributes): Added.
	(media_element_set_attributes): Added.
	(MediaElement): Set an empty list of attributes as per the spec.

2007-12-06  Stephane Delcroix  <sdelcroix@novell.com>

	* media.cpp:
	* brush.cpp: implement RelativeTransform for image brushes and 
	LinearGradientBrush. RadialGradientBrush still missing.

2007-12-06  Chris Toshok  <toshok@ximian.com>

	* dependencyobject.h, dependencyobject.cpp: make
	EventObject::AddHandler return the id (when using the event_name
	variant).

2007-12-06  Chris Toshok  <toshok@ximian.com>

	* xaml.cpp (xaml_init): register the right constructors for
	PathSegmentCollection, GeometryCollection, and
	TransformCollection.

2007-12-05  Chris Toshok  <toshok@ximian.com>

	* animation.cpp, animation.h: a couple of fixes.  Move away from
	watching the clock state in AnimationStorage and resetting the
	property value there.  instead, just override Clock::Stop in
	AnimationClock and call ResetPropertyValue on the storage.

	Also, when a storyboard's clock group is stopped, free it and
	remove it from the parent clock's list of children.  This should
	keep us from growing the number of clocks over time for
	storyboards which don't have Begin() called again (the only
	circumstance under which we destroy the clock).

	* clock.cpp, clock.h: handle the case where a clock can be started
	and then stopped before the next clock tick.  This happens when
	you move the mouse very quickly over the thumbnails in pageturn.

2007-12-05  Sebastien Pouliot  <sebastien@ximian.com>

	* geometry.cpp: Fix crash when EllipseGeometry is used for clipping
	(no path provided). Fix Build/ComputeBounds when no center point
	is provided.

2007-12-05  Rolf Bjarne Kvinge <RKvinge@novell.com> 

	* uielement.h, visual.h, uielement.cpp, collection.cpp, control.cpp,
	  dirty.cpp: Move UIElement::parent to Visual, rename it to visual_parent,
	  and make it a real property with accessors.

2007-12-05  Rolf Bjarne Kvinge <RKvinge@novell.com> 

	* xaml.cpp, dependencyobject.h, collection.cpp, dependencyobject.cpp,
	  animation.cpp: Rename DependencyObject::parent/SetParent/GetParent to
	  logical_parent/SetLogicalParent/GetLogicalParent.

2007-12-04  Larry Ewing  <lewing@novell.com>

	* media.cpp (Image::Render): fix the conditions for the opacity
	stability count.

2007-12-03  Larry Ewing  <lewing@novell.com>

	* src/media.cpp (Image::Render): use paint_with_alpha if opacity
	is changing, use the old buffered alpha if it is not.

2007-12-04  Jb Evain  <jbevain@novell.com>

	* stylus.cpp|h: add stylus_info_get_current function.
	Right now, it's an hack which always return a StylusInfo
	of type Mouse, not inverted.

2007-12-03  Chris Toshok  <toshok@ximian.com>

	* clock.h, clock.cpp: rename ClampTimeToDuration to ClampTime, as
	it now clamps to [0,duration_timespan].  This fixes the Simon
	"button flying off the screen" bug.

2007-12-03  Jeffrey Stedfast  <fejj@novell.com>

	* clock.cpp (RaiseEnqueuedEvents): Optimized a bit by not
	iterating thru the list 6 times :)
	(ClockGroup::RaiseAccumulatedEvents): Make a copy of the
	child_clocks list here too, or we end up corrupting memory.

2007-12-03  Larry Ewing  <lewing@novell.com>

	* media.cpp (Image::Render): wrap the region clipping in a #define
	for testing.

2007-12-03  Larry Ewing  <lewing@novell.com>

	* media.cpp (Image::Render): remove accumulated drawing cruft.

2007-12-03  Chris Toshok  <toshok@ximian.com>

	* animation.cpp: put back in the calls to ComputeBeginTime that I
	accidentally committed a few days ago (and lewing reverted to fix
	the build).  they're needed with the new clock changes.

2007-12-03  Chris Toshok  <toshok@ximian.com>

	* clock.cpp, clock.h: rework the clock code a bunch.  There are a
	couple of large changes.

	Get rid of the stupid new_ and current_ fields.  Just update the
	field immediately.  This cuts down on logic in if checks, and also
	makes subclocks update much faster in relation to their parent
	clock (we used to have to wait 1 tick per level in the tree for
	state to propagate).

	Abstract out all the QueueEvent calls into setters in clock.h.

	Break up Clock::Tick some, so more of the code is reusable from
	ClockGroup::Tick without having to call Clock::Tick and then work
	behind its back.

2007-12-03  Sebastien Pouliot  <sebastien@ximian.com>

	* brush.cpp: Fix breakage introduced in r90549 (the matrix is 
	already	set on the pattern).

2007-12-03  Jeffrey Stedfast  <fejj@novell.com>

	* dependencyobject.cpp (RemoveHandler): Simplified a little.

	* animation.cpp (Stop): Remove the CompletedEvent root_clock
	handler. Fixes Simon's GAME OVER! textblock storyboard.

2007-12-03  Jeffrey Stedfast  <fejj@novell.com>

	* runtime.cpp: Added clipping/bounding-box override values.

	* uielement.cpp (DoRender): Changed optional bounding-box/clipping
	debugging drawing based on runtime settable bitflags.

2007-12-03  Larry Ewing  <lewing@novell.com>

	* uielement.cpp: Clean up the debug rendering code for bounding
	boxes and clip regions.

2007-12-03  Jeffrey Stedfast  <fejj@novell.com>

	Fixes a bug pointed out by Larry when rendering lines beginning
	with a 'J', where the tail escapes the bounding box.

	* font.cpp (Layout): Use the horiBearingX font metric.
	(RenderLine): Same.

2007-12-03  Larry Ewing  <lewing@novell.com>

	* brush.cpp (RadialGradientBrush::SetupBrush): add debug spew
	if we can't invert the matrix but still draw someting.

2007-11-29  Larry Ewing  <lewing@novell.com>

	* panel.cpp (Panel::ComputeBounds): clip the clip the subpath
	bounds to the clip region as well.

	* control.cpp (Control::ComputeBounds): differenciate between our
	bounds and our subpath bounds.

	* control.h: add bounds_with_children and GetSubpathBounds ().

2007-11-29  Jeffrey Stedfast  <fejj@novell.com>

	* font.cpp (TextFont::GetGlyphInfoByIndex): If we reach the end of
	the font face charmap, use unichar = 0 rather than returning NULL.

2007-11-28  Chris Toshok  <toshok@ximian.com>

	* runtime.cpp (Realloc): when we Realloc(), we need to tell the
	toplevel canvas to update its bounds.  This *may* be wrong, but it
	definitely fixes matrix.
	(UpdateFullScreen): we need to stop the timesource when emitting
	the fullscreenchangeevent.  otherwise we can end up stuck in a
	nested glib mainloop and never return from the emit (actually we
	never even invoke the JS callback in matrix.  the nested loop
	happens somewhere deep in the bowels of NPN_Invoke).

2007-11-28  Jeffrey Stedfast  <fejj@novell.com>

	* media.cpp (MediaElement::UpdateProgress): Got rid of a hardcoded
	hack that forced the assumption of a streaming (vs progressive)
	media download. Also fixed to emit a DownloadProgressChanged event
	at progress == 1.0 (which is what th Silverlight book says we're
	supposed to do).

2007-11-28  Larry Ewing  <lewing@novell.com>

	* src/uielement.cpp (UIElement::DoRender): make sure we don't
	leave a path on the cairo context when clipping.

2007-11-28  Chris Toshok  <toshok@ximian.com>

	* uielement.cpp (UIElement::UIElement): compute the initial total
	hit test visibility.

	* dirty.cpp (process_dirty_elements): don't invalidate/update
	bounds when the hit test visibility changes.

	* frameworkelement.(h,cpp): calculate the bounds here using
	width/height.

	* panel.cpp: chain up to frameworkelement.
	
2007-11-27  Jeffrey Stedfast  <fejj@novell.com>

	* text.cpp (TextBlock::SetValue): Check the resulting Inlines
	collection formed from the Text property being set against the old
	Inlines - if no change, don't set the new Inlines collection,
	simply keep using the old. The idea is to prevent unnecessary
	layout re-calculations and invalidates.

2007-11-27  Chris Toshok  <toshok@ximian.com>

	* dirty.[cpp,h] panel.[cpp,h], control.[cpp,h], uielement.[cpp,h],
	canvas.cpp, collection.cpp, shape.cpp:

	rather large change - don't use a large rectangular bounding box
	encompassing both the panel's frameworkelement bounds as well as
	the bounds of all its children.  Instead, only worry about the
	frameworkelement bounds, and let the children invalidate
	themselves.  but do all this in a way that we still use the
	subtree's bounding box to prune rendering and hit testing.

	since we won't be invalidating the entire box surrounding all
	children, we need to propagate visibility information down the
	tree as we do opacity.

	This should really speed up most animations (such as those in
	sprawl and airlines) since we'll be invalidating far smaller
	areas.
	
	(this code was stupidly hard for lewing and me to get right.  yay
	for jet lag.)

2007-11-23  Larry Ewing  <lewing@novell.com>

	* runtime.cpp: add show=expose to toggle expose display.

2007-11-22  Jb Evain  <jbevain@novell.com>

	* xaml.cpp (XamlElementInstantce::ClearSetProperties): avoid
	a glib warning if set_properties is NULL.

2007-11-21  Chris Toshok  <toshok@ximian.com>

	* media.cpp (MediaElement::UpdateProgress): only set 1 of
	DownloadProgressProperty and BufferingProgressProperty.  The
	former is used if we're playing progressively, the latter if we're
	buffering before playing.  This fixes the buffering animation on
	the halo site.
	
2007-11-21  Chris Toshok  <toshok@ximian.com>

	* runtime.cpp (Surface::Invalidate): add the int case around the
	complete expression to quiet gcc.

2007-11-20  Larry Ewing  <lewing@novell.com>

	* runtime.cpp (Surface::expose_event_callback): take allocation
	offsets into account when invalidating and drawing.  Fixes
	#339010.

2007-11-20  Chris Toshok  <toshok@ximian.com>

	* xaml.cpp (XamlElementInstance::ClearSetProperties): in glib <
	2.12, destroy the hash table and set it to NULL so we'll recreate
	it.

2007-11-20  Chris Toshok  <toshok@ximian.com>

	* collection.cpp (VisualRemoved): switch from using
	item->parent->ChildInvalidated(UIElement), use
	item->parent->Invalidate (item->GetBounds()).

	* uielement.h, uielement.cpp: change ChildInvalidated(Region *) to
	Invalidate (Region*) and update calls to it.  Remove
	ChildInvalidated(UIElement*).  Also, remove all references to the
	children_dirty_region field.  everything goes through dirty_region
	now.

	* dirty.cpp: switch to using item->parent->Invalidate instead of
	item->parent->ChildInvalidated, and remove references to
	children_dirty_region.

2007-11-20  Chris Toshok  <toshok@ximian.com>

	* dependencyobject.cpp: add a ctor for EventClosure, and do a deep
	copy before emitting an event.

2007-11-20  Jeffrey Stedfast  <fejj@novell.com>

	* runtime.cpp (surface_get_toplevel): Removed.

	* uielement.cpp (uielement_get_isloaded): Removed.

2007-11-20  Jb Evain  <jbevain@novell.com>

	* downloader.h (Downloader): override SetSurface and GetSurface
	to work on a custom surface field.
	* downloader.cpp (Downloader::Downloader): initialize
	surface to NULL.
	* runtime.h (Surface::CreateDownloader): initialize the surface
	of the downloader.
	* collection.cpp: when removing an UIElement from an UIElementCollection,
	clear out its surface to NULL.
	* visual.cpp: remove null check preventing to set the surface to NULL.
	* dependencyobject.cpp: (DependencyObject::FindName): if the
	current DO has no parent, fallback to its surface to try
	FindName on its top level element (needed to call FindName
	on a downloader for instance). Fixes #335018.

2007-11-20  Jackson Harper  <jackson@ximian.com>

	* xaml.cpp: If we need to reparse the attributes for an element
	(because we loaded a class and the props need to be set on the new
	class) we have to clear out the hash of properties that are marked
	as already set. Otherwise we get a property already set error.

2007-11-20  Jackson Harper  <jackson@ximian.com>

	* xaml.cpp: Add new function to create a value from a string
	without having the Kind available (you still need to have the type
	in string form).
	- SetAttribute now ensures that the attribute was set properly
	- If the object we are trying to set an attribute on is a managed
	object and there is no DependencyProperty for the attribute, we
	try setting the attribute on the object.

2007-11-20  Sebastien Pouliot  <sebastien@ximian.com>

	* uielement.cpp: Ensure the default value for VisibilityProperty
	is VisibilityCollapsed even if the value is invalid (for Javascript
	compatibility, since 1.1 should throw an exception). See #340799

2007-11-20  Stephane Delcroix  <sdelcroix@novell.com>

	* uielement.cpp: FullInvalidate on setting Viibility to Visible.
	Fixes bnc #342662.

2007-11-19  Larry Ewing  <lewing@novell.com>

	* uielement.cpp: setup the clip before push/pop group so that
	we reduce the temp surface size.

2007-11-16  Sebastien Pouliot  <sebastien@ximian.com>

	* transform.cpp: Use cairo_matrix_init_translate instead of 
	cairo_matrix_init + cairo_matrix_translate where possible (which
	avoid the multiplication with the identity matrix).

2007-11-16  Jeffrey Stedfast  <fejj@novell.com>

	* runtime.cpp (surface_get_toplevel): New function needed by the
	managed land to implement a bit of a hack for the Resize
	event (when someone connects to the Resize event, if the toplevel
	canvas is already loaded, we want to immediately call the
	handler).

	* uielement.cpp (uielement_get_isloaded): Same.

2007-11-15  Jackson Harper  <jackson@ximian.com>

	* Makefile.am:
	* parsertest.cpp: Some tests I use for checking the parsing
	functions.

2007-11-15  Jackson Harper  <jackson@ximian.com>

	* color.h: Add equality operators.

2007-11-15  Jackson Harper  <jackson@ximian.com>

	* xaml.cpp: use isalpha for determining whether or not an int32 is
	an enum.  This allows things like -1 to work.

2007-11-15  Jackson Harper  <jackson@ximian.com>

	* xaml.cpp: Make sure the entire string is validate ie no 25.0XXXX
	for doubles.

2007-11-15  Jackson Harper  <jackson@ximian.com>

	* point.h|cpp:
	* rect.h|cpp: Update signatures to allow for error checking when
	creating types from strings.
	* xaml.h|cpp: Consolidate code to create values from strings, add
	some error checking.  Update most of the parsing methods so it is
	possible to return errors when parsing.
	* playlist.cpp: Sig update.
	
2007-11-15  Jackson Harper  <jackson@ximian.com>

	* stylus.h|cpp: Initialize these collections so we don't get NULLs
	for GetValue on them.

2007-11-14  Chris Toshok  <toshok@ximian.com>

	* runtime.cpp (strcase_hash): swap this out for mono's eglib
	implementation, augmented with g_ascii_tolower, to remove the
	malloc/free and 2 passes over the string.

2007-11-14  Chris Toshok  <toshok@ximian.com>

	* dependencyobject.cpp: move the strcase_hash/equals functions...
	
	* runtime.cpp: here.

	* runtime.h: and make them public.

	* type.cpp.in, type.cpp (RegisterEvent): and use them here
	(RegisterType): and here.

2007-11-14  Jb Evain  <jbevain@novell.com>

	* media.cpp|h: remove specific Image and MediaElement
	accessors for progress property now that the code
	moved to MediaBase.

2007-11-14  Jb Evain  <jbevain@novell.com>

	* type.cpp.in, type.cpp, media.h, media.cpp: Move
	DownloadProgressProperty and DownloadProgressChangedEvent
	to MediaBase so it gets shared for both Image and MediaElement.
	Fixes #325255.

2007-11-14  Jb Evain  <jbevain@novell.com>

	* value.h.in: update code template to match current value.h.

2007-11-14  Sebastien Pouliot  <sebastien@ximian.com> 

	* openfile.cpp: Added support for Filter and FilterIndex.

2007-11-14  Sebastien Pouliot  <sebastien@ximian.com>

	* animation.cpp: Replaced g_assert_not_reached with g_warning.
	At least until #340799 (enum validation) is fixed. Part of #335413
	* shape.cpp: Add g_warning to replace the g_assert_not_reached 
	removed earlier. At least until #340799 (enum validation) is fixed.
	* uielement.cpp: Replaced g_assert_not_reached with g_warning.
	At least until #340799 (enum validation) is fixed. Part of #335413

2007-11-13  Miguel de Icaza  <miguel@novell.com>

	* value.cpp (Value::ToString): Add method to help debug some
	apps. 

2007-11-13  Jeffrey Stedfast  <fejj@novell.com>

	* text.cpp (SetValue): Get rid of \r's and treat \n's as LineBreak
	elements.

2007-11-13  Sebastien Pouliot  <sebastien@ximian.com>

	* brush.cpp|h: Do not compute brush bounds for a SolidColorBrush 
	as this is unrequired (API wise) and can be expensive (it was enough
	to add custom bound calculation code to shapes and geometries).

2007-11-12  Sebastien Pouliot  <sebastien@ximian.com>

	* shape.cpp: Removed g_assert_not_reached and, if any bad value is
	supplied (should be catched well before that, #340799), use the 
	default value. Fix part of #335413

2007-11-09  Chris Toshok  <toshok@ximian.com>

	* dirty.cpp, uielement.h, uielement.cpp: glib was hurting my head.
	convert this over to using our List class.  Also fix a bug where
	elements with down dirty flags weren't being inserted propertly
	into the up dirty list.

2007-11-09  Sebastien Pouliot  <sebastien@ximian.com>

	* animation.cpp: Fix crash on empty BeginStoryboard (#340384)

2007-11-09  Miguel de Icaza  <miguel@novell.com>

	* value.h (struct Value): Cope with NULL strings.

2007-11-09  Jackson Harper  <jackson@ximian.com>

	* xaml.cpp: Closepath needs to draw a line to the path's starting
	point and needs to create a new path figure element at the
	starting point.

2007-11-09  Jackson Harper  <jackson@ximian.com>

	* type.cpp|h.in: Add an accesor for the ContentProperty name.
	
2007-11-09  Jackson Harper  <jackson@ximian.com>

	* xaml.cpp: Rework to allow unparented properties.  createFromXaml
	("<Canvas.Background><SolidColorBrush></Canvas.Background") will
	basically ignore the property and will return the SolidColorBrush
	as the top element. This fixes 335865.

2007-11-08  Chris Toshok  <toshok@ximian.com>

	[ may go a long way toward fixing #337714, if it doesn't fix it
	outright ]
	
	* uielement.h, uielement.cpp: add an overload of ChildInvalidated
	that takes a UIElement* instead of a region.  The implementation
	just invalidates the entire bounds of the child in the parent.

	* collection.h, collection.cpp: we weren't breaking the
	item->parent link when removing visuals from a VisualCollection.
	Add VisualRemoved, which invalidates the child's region (and stop
	using child->Invalidate, since that won't work once the link to
	the parent is broken) and breaks the parent link.  Call
	VisualRemoved from everywhere we remove/replace a visual in our
	collection.  Also, rename VisualUpdated to VisualAdded, since
	that's more indicative of why the method is being called.
	
2007-11-08  Jeffrey Stedfast  <fejj@novell.com>

	* runtime.cpp (Attach): Emit the Resize event.
	(drawing_area_size_allocate): Emit the Resize event.

2007-11-07  Chris Toshok  <toshok@ximian.com>

	* clock.cpp (Clock::Begin): guard against division by zero.

2007-11-07  Chris Toshok  <toshok@ximian.com>

	* runtime.cpp, runtime.h: make GetWidth()/GetHeight() return the
	width the canvas tells the surface to be (if it does).  this fixes
	issues uncovered by larry's improved bounds checking code.  Also,
	remove the instance fields for screen_height/width.  they're only
	used in one place, so make them local to that function.

2007-11-07  Chris Toshok  <toshok@ximian.com>

	* brush.h, brush.cpp: add some c++ setters/getters to make some
	code a little smaller.

2007-11-06  Larry Ewing  <lewing@novell.com>

	* src/frameworkelement.cpp: Force a full invalidate if the width
	or height property because panels include their children in the
	bounds compution and will pass the dirty check.

	* media.cpp: Implement the Region based rendering for MediaElement
	and Image.

	* panel.cpp: Unconditionally pass the region to the Children.

	* panel.cpp: when rendering children treat panels and other
	objects differently.  For containers pass the clipped region
	directly, for elements subdivide the region and paint each block.
	Renable FindStartingElement with a slightly less expensive
	algorithm.

	* rect.cpp: don't collapse complicated regions the drawing code is
	smarter now.

2007-11-06  Jeffrey Stedfast  <fejj@novell.com>

	* font.cpp (TextFont): Fixed to not exit() even when no font could
	be loaded from FreeType.

2007-11-06  Chris Toshok  <toshok@ximian.com>

	* dependencyobject.cpp (GetObjectType): make this g_critical, and
	also print out a stack trace if STACK_DEBUG is enabled.

	* dependencyobject.h: stop Emitting the DestroyedEvent from the
	dtor.  instead do it from unref before we delete the object.

2007-11-05  Chris Toshok  <toshok@ximian.com>

	* rect.h (ToGdkRectangle): quiet countless warnings.

2007-11-05  Larry Ewing  <lewing@novell.com>

	Merge most of dirty region branch.  This makes the dirty logic and
	rendering code use the new region class to track more complicated
	shapes than bounding boxes when processing changed areas.

	* media.cpp: switch back to indirect rendering for drawing media
	elements until a solution to the boundry clipping can be found.

	* panel.cpp: disable FindStartingElement (the buggy) until a more
	optimal method can be found.

	* dirty.cpp: Use dirty regions.  Process DirtyOpacity first (still
	needs to be fixed to order dirty children.

2007-11-03  Chris Toshok  <toshok@ximian.com>

	* clock.cpp (ClockGroup::Tick): instead of calling Clock::Stop,
	call SkipToFill if we have no active child clocks.
	(ClockGroup::Stop): simplify this.
	(ClockGroup::Seek): make this look a little more like ::Stop.

2007-11-03  Chris Toshok  <toshok@ximian.com>

	* xaml.cpp (repeat_behavior_from_str): add support for the
	"ff.ffx" format for repeat behaviors.

	* clock.cpp, clock.h: the first sizeable amount of work done in a
	while to correct the multitude of tiny bugs in clock handling.
	this gets AnimationMatrix.xaml maybe 40% working.  Clean up and
	comment Clock::Tick a lot, and remove a bunch of the old
	CLOCK_DEBUG spew which was making the code that much more
	difficult to look at.
	
2007-11-02  Jeffrey Stedfast  <fejj@novell.com>

	* font.cpp (TextFontDescription::SetScale): Removed, this hack
	wasn't working as well as I'd hoped.
	(TextFontDescription::GetScale): Same.
	(TextFontDescription::CreatePattern): If the requested font size
	is < 41.0 (seems to be the magic number where scaling loses impact
	on metrics), use FontSize=41.0 and do proper scaling to get the
	actual size we want. My worry was that asking for small font sizes
	(smaller than 16.0?) would look ugly with this hack, but that is
	surprisingly not true. By always requesting a font size that will
	yield the generic font metrics (e.g. not some hacked font size),
	we will always be able to wrap identically no matter what FontSize
	is requested (so long as the width gets scaled appropriately).

	* text.cpp (TextBlock::ComputeTransform): Removed.

2007-11-02  Jeffrey Stedfast  <fejj@novell.com>

	* font.cpp (RenderLine): Render glyphs with index 0 too, so that
	we render an empty box for glyphs not in the font (just like
	Silverlight).

	* text.cpp (ComputeTransform): Fixed to use the correct matrix for
	getting the scale values.

2007-11-01  Jackson Harper  <jackson@ximian.com>

	* trigger.h:
	* text.h:
	* geometry.h
	* transform.h:
	* animation.h:
	* brush.h:
	* panel.h: Add ContentProperty 'attributes'.
	* typegen.cs:
	* type.cpp|h:  Add content property information to types.  This
	will be used by the parser and will allow the parser to drop it's
	special type system.

2007-11-01  Rolf Bjarne Kvinge <RKvinge@novell.com> 

	* animation.cpp: AnimationStorage: unregister from registered events on
	  destruction.

2007-11-01  Jeffrey Stedfast  <fejj@novell.com>

	* text.cpp (TextBlock::SetValue): Oops - if we are setting an
	empty string on the Text property, then we need to clear out
	whatever was there before (if anything).

2007-10-31  Jeffrey Stedfast  <fejj@novell.com>

	Fixes for handling lwsp cdata between <Run> elements.

	* xaml.cpp (flush_char_data): Reworked a bit. Now takes a 'start'
	arg suggesting that we are being called in response to a new
	element starting vs an element ending.
	(start_element_handler): Pass true as the start arg to
	flush_char_data().
	(end_element_handler): Pass false as the start arg to
	flush_char_data().

	* text.cpp (SetValue): Only add a run if the string is non-empty.

2007-10-31  Rolf Bjarne Kvinge <RKvinge@novell.com> 

	* dependencyobject.cpp: Guard against calling NULL.

2007-10-31  Rolf Bjarne Kvinge <RKvinge@novell.com> 

	* media.cpp: Redo ASFParser::Malloc to avoid warnings, and make sure the
	  return value is always checked.

2007-10-31  Chris Toshok  <toshok@ximian.com>

	* trigger.cpp (EventTrigger::SetTarget,
	EventTrigger::RemoveTarget): use UIElement::LoadedEvent instead of
	"Loaded".

2007-10-31  Jackson Harper  <jackson@ximian.com>

	* dependencyobject.h|cpp: Give DependencyProperties the ability to
	be readonly.
	* canvas.cpp:
	* animation.cpp: Signature updates
	
2007-10-30  Jackson Harper  <jackson@ximian.com>

	* xaml.h: Add the error args to the loader.
	* xaml.cpp: Make most of our parsing errors match Silverlight.

2007-10-30  Jeffrey Stedfast  <fejj@novell.com>

	* font.cpp (Path): Check the path data != NULL before we make any
	cairo calls, no sense wasting cycles if we will no-op in the end.

2007-10-29  Rolf Bjarne Kvinge <RKvinge@novell.com> 

	* media.cpp, media.h: Fix signedness mismatch warning.

2007-10-29  Rolf Bjarne Kvinge <RKvinge@novell.com> 

	* mplayer.h: Added asf_player field.

2007-10-29  Rolf Bjarne Kvinge <RKvinge@novell.com> 

	* Makefile.am: Add files in asf/.
	* media.cpp, media.h: Read ASF markers from the file. Save the position when
	  advancing frames. Use the difference between the last position and the
	  current position to determine if any MarkerReached events are supposed
	  to be raised.
	* mplayer.cpp: Add some error checking/reporting when opening streams.
	  Register our own demuxer with ffmpeg (defining MOON_DEMUXER is required
	  to actually use it).

2007-10-26  Jeffrey Stedfast  <fejj@novell.com>

	* font.cpp (RenderLine): Split out from TextLayout::Render() and
	made to reset the brush at each segment to match Silverlight's
	behaviour.

2007-10-26  Rolf Bjarne Kvinge <RKvinge@novell.com> 

	* debug.cpp: Added print_gdb_trace with an explaining comment.
	* debug.h: Make print_stack_trace compile (to nothing) when STACK_DEBUG
	  isn't defined.

2007-10-25  Jeffrey Stedfast  <fejj@novell.com>

	* font.cpp (TextLayout::Render): Set y1 before creating/appending
	the path instead of in the segment loop.
	(TextLayout::Render): Make underline pos relative to y1 (aka the
	baseline) that we calculated above. Makes this easier to
	understand.

2007-10-25  Jeffrey Stedfast  <fejj@novell.com>

	* font.cpp (TextLayout::Layout): Always calculate segment->width
	here.
	(TextLayout::Render): Not here.

	* text.cpp (Glyphs::GetTransformOrigin): Implemented.

2007-10-25  Jackson Harper  <jackson@ximian.com>

	* type.cpp|.in:
	* runtime.h|cpp: Add the Error event to the surface.  Raising this
	event will cause the plugins onError handler to be invoked, the
	default onError handler notifies the user of the error with a
	javascript alert.

2007-10-25  Sebastien Pouliot  <sebastien@ximian.com>

	* stylus.cpp|h: Keep the semi-working code as a fast path to
	render strokes (if no outline color is used and when width ==
	height). Added a hack to support OutlineColor.

2007-10-25  Jeffrey Stedfast  <fejj@novell.com>

	* brush.cpp (Brush::SetupBrush): Now takes width and height
	arguments. Updated all brushes.

	* text.cpp (Glyphs::Render): We want to check this->width and
	this->height, not the width/height arguments.

	* brush.cpp (ImageBrush::SetupBrush): If the image isn't loaded
	yet (surface = NULL), return.
	(LinearGradientBrush::SetupBrush): Get rid of some of the valgrind
	warnings.

2007-10-24  Jeffrey Stedfast  <fejj@novell.com>

	* text.cpp (Glyphs::GetSizeForBrush): Implemented.

	* font.cpp (TextLayout::Layout): Slight fix for Wrap mode.

2007-10-24  Jackson Harper  <jackson@ximian.com>

	* type.cpp.in/h.in: Add some c-style functions for creating
	instances.

2007-10-24  Jackson Harper  <jackson@ximian.com>

	* typegen.cs:
	* type.cpp.in/h.in: Add a create instance call to types.  This
	will allow the parser to use our Type object instead of creating
	it's own.

2007-10-24  Chris Toshok  <toshok@ximian.com>

	* clock.cpp (ManualTimeSource::SetCurrentTime): pass FALSE to
	g_main_context_iteration so we don't block if there isn't anything
	to do.  also, emit 3 TickEvents to make sure the tick is
	propagated down into the animations.

2007-10-24  Rolf Bjarne Kvinge <RKvinge@novell.com> 

	* xaml.cpp: No need to check if the created object is an UIElement before
	  calling SetSurface anymore.
	* visual.h: Update SetSurface to virtual.
	* brush.cpp, brush.h: Override SetSurface so that we can forward the call to
	  our Image object.
	* dependencyobject.h: Add virtual Set/GetSurface to DependencyObject (here
	  the methods do nothing, the surface is still stored in Visual, but this
	  allows classes that do not inherit from Visual to correctly set the
	  surface on their members which do inherit from Visual).

2007-10-24  Jeffrey Stedfast  <fejj@novell.com>

	* uri.cpp (Uri::Parse): Treat uri's w/o a protocol as file uri's.

2007-10-23  Jeffrey Stedfast  <fejj@novell.com>

	* text.cpp (TextBlock::ComputeTransform): If the scale has
	changed, set dirty = true so that we recalculate the layout.

	* mplayer.cpp (audio_play): Instead of using the SET_VOLUME()
	macro, just do it w/o so that we hush the compiler warning.

2007-10-23  Chris Toshok  <toshok@ximian.com>

	* clock.cpp (Clock::GetBeginTime): stop treating the BeginTime of
	a clock in absolute terms.  instead, offset it from the current
	time of the parent clock (or time manager).
	(Clock::Begin): clamp progress to 1.0
	(SMOOTHING_ALPHA): switch this to 0.30 to see if that helps things
	by making it less sensitive to immediate changes.

2007-10-23  Chris Toshok  <toshok@ximian.com>

	* mplayer.cpp (Open): if RUNTIME_INIT_AUDIO_DISABLE, don't use
	audio (so we sync to the clock).

	* runtime.h: add RUNTIME_INIT_AUDIO_DISABLE.

2007-10-23  Chris Toshok  <toshok@ximian.com>

	* clock.cpp (ManualTimeSource::SetCurrentTime): call
	g_main_context_iteration as a stopgap to make video elements show
	up.
	(TimeManager::TimeManager): remove spew.
	(TimeManager::Tick): re-enable the clock throttling.  oops.

2007-10-23  Larry Ewing  <lewing@novell.com>

	* src/runtime.cpp: clear the background in more cases.

2007-10-23  Larry Ewing  <lewing@novell.com>

	* src/runtime.cpp: make the eventbox windowless and remove the
	stale event code.  Let gtk do the clearing.

2007-10-23  Jeffrey Stedfast  <fejj@novell.com>

	* mplayer.cpp (MediaPlayer::Open): Re-enable audio :)
	(MediaPlayer::LoadVideoFrame): Keep decoding video until we find
	the correct frame rather than just rendering the first frame we
	find.

2007-10-23  Chris Toshok  <toshok@ximian.com>

	* mplayer.cpp: replace all occurences of av_gettime with
	TimeManager::Instance()->GetCurrentTimeUsec().

	* runtime.cpp (overrides): add the "timesource=manual" OVERRIDE
	thingy.
	(render_cb): re-enable the fps on the console.  oops.

	* runtime.h (RuntimeInitFlags): add
	RUNTIME_INIT_TIMESOURCE_MANUAL.

	* type.h.in, type.cpp.in: remove BASE (should have happened on my
	last commit), and add in the TIMESOURCE's, and TIMESOURCE's "Tick"
	event.

	* type.h, type.cpp: sync to the .in files.

	* clock.h, clock.cpp: add the idea of a TimeSource to the
	TimeManager.  Two are written - SystemTimeSource, which uses the
	gtk timeout, and ManualTimeSource, which allows code to set what
	the global time should be.  Also, add GetCurrentTimeUsec() for use
	by mplayer, so we can switch it away from av_gettime and make it
	possible for video to sync to the ManualTimeSource.

2007-10-23  Rolf Bjarne Kvinge <RKvinge@novell.com> 

	* runtime.cpp: Base -> EventObject changes when OBJECT_TRACKING is defined.

2007-10-23  Larry Ewing  <lewing@novell.com>

	* runtime.cpp: make sure we unref the surface.

2007-10-23  Larry Ewing  <lewing@novell.com>

	* runtime.cpp: avoid making gdk calls that pull in the platform
	cairo.

2007-10-22  Jeffrey Stedfast  <fejj@novell.com>

	* text.cpp: Don't allow Pango rendering if disabled at
	configure-time.
	(TextBlock::ComputeTransform): Moved the scale logic here from
	OnPropertyChanged() so that we catch all transform changes.

	* uielement.h: Made ComputeTransform() virtual.

2007-10-22  Chris Toshok  <toshok@ximian.com>

	* clock.cpp (TimeManager::Shutdown): don't cast to Base anymore..
	we can just cast to Clock here.

	* dependencyobject.h, dependencyobject.cpp: remove the Base class,
	and make roll EventObject and Base into one class (still called
	EventObject).

2007-10-20  Sebastien Pouliot  <sebastien@ximian.com>

	* runtime.h: Add gtk.h (since it depended on stylus.h to get it)
	* stylus.cpp|h: Add some missing functions. Rendering changes 
	(not active, work in progress).

2007-10-18  Chris Toshok  <toshok@ximian.com>

	* dependencyobject.h: fix comment.

	* animation.h, animation.cpp: use the
	Clock::CurrentStateInvalidated event to reset the property value
	to baseValue instead of overriding the Clock::Stop method.  This
	fixes clocks with FillBehavior="Stop" instead of storyboard with
	FillBehavior="Fill".

	* clock.cpp (Clock::Tick): remove a stupid block of code that was
	causing clocks which were Filling to spontaneously end up in their
	Active state again.

2007-10-18  Sebastien Pouliot  <sebastien@ximian.com>

	* geometry.cpp: New code to handle arc segments. No known issues
	(except the handling of near zero values which doesn't seems to
	be constant).
	* libmoon.h, Makefile.am: Remove reference to rsvg.h
	* rsvg.cpp|h: Remove from SVN.

2007-10-17  Andrew Jorgensen  <ajorgensen@novell.com>

	* cairo-embed.h, pixman-embed.h: Added symbol renaming headers
	based on the ones from libgdiplus.

2007-10-17  Chris Toshok  <toshok@ximian.com>

	* xaml.cpp (XNamespace::SetAttribute): make sure to add the newly
	created managed dob to the created_elements list so it gets
	unrefed properly.
	(XamlLoader::XamlLoader): use ->ref() instead of base_ref().
	(XamlLoader::~XamlLoader): use ->unref() instead of base_unref().

2007-10-17  Chris Toshok  <toshok@ximian.com>

	* Makefile.am (demo_LDADD): add MOON_PROG_LIBS.
	(sizes_LDADD): same.

2007-10-17  Rolf Bjarne Kvinge <RKvinge@novell.com> 

	* dependencyobject.h: Add a GET_OBJ_ID macro that resolves to -1 if
	  OBJECT_TRACKING isn't defined.
	* runtime.h: Enable the contextual downloader warning again.
	* dependencyobject.cpp: Fix build when DEBUG is defined.

2007-10-16  Jeffrey Stedfast  <fejj@gnome.org>

	* text.cpp (OnPropertyChanged): When intercepting non-TextBlock
	properties changing value, don't fall thru to the rest of the
	checks (as then we'd re-emit it to sublisteners which isn't what
	we want I don't think). Also, don't change the font scale unless
	it's >= 1.0 (e.g. don't down-scale). Fixes an infinite loop.

2007-10-16  Jeffrey Stedfast  <fejj@novell.com>

	* text.cpp (OnPropertyChanged): Listen for RenderTransformProperty
	changes and apply the y-scale to the font so that we can more
	accurately path the font glyphs at the scale we intend to render
	them at.

	* font.cpp (TextFont): Cache the scale here.
	(Kerning): Apply the scale.
	(Descender): Here too.
	(Ascender): And here.
	(Height): Same.
	(GetGlyphInfo): Create and apply the scale/invert matrix. Also
	scale the glyph metrics.
	(UnderlinePosition): Apply the scale.
	(UnderlineThickness): Same here.
	(TextFontDescription): Added a scale, default to 1.0
	(CreatePattern): Set the scale on the pattern.
	(UnsetFields): When unsetting values, restore them to their
	default values.
	(Merge): Merge the scale.
	(GetScale): New method.
	(SetScale): New method.

2007-10-16  Chris Toshok  <toshok@ximian.com>

	* dependencyobject.cpp (detach_depobj_values): call
	obj->SetParent(NULL) here as well, so we don't reference a
	destroyed parent.

	* runtime.cpp (Surface::Surface): use Surface::timeline instead of
	a local variable.
	(Surface::~Surface): make sure to remove the surface's clock_group
	from the time manager.  Also, unref the timeline we create in the
	ctor.
	(runtime_shutdown): reimplement the oldest 10 alive object
	printing stuff in the face of using a hashtable.

	* runtime.h: add Surface::timeline, so we can clean it up in
	~Surface.

	* dependencyobject.h (Base::) use a hash table to track alive
	objects instead of a list.  this speeds up things immensely.

	* clock.cpp (ClockGroup::~ClockGroup): call SetParent(NULL) on our
	children so any further GetParent() calls won't return a destroyed
	object.

	* animation.cpp (Storyboard::~Storyboard): guard against a crash
	when a parent clock is freed before the child clock.

	* text.cpp (TextBlock::TextBlock): plug a couple memory leaks.

2007-10-15  Chris Toshok  <toshok@ximian.com>

	* animation.[h,cpp]: remove the strong reference from
	AnimationStorage to its target object, and instead use the
	EventObject::DestroyEvent to implement a weak reference.  See the
	TODO for a blurb about generalizing this.

	* typegen.cs (GenerateTypeCpp): remove the special case code that
	makes INVALID the parent of DEPENDENCY_OBJECT - we need it to have
	EVENTOBJECT as the parent for the DestroyedEvent to line up
	properly in the event tables.

	* type.cpp.in, type.cpp (types_init_register_events): register the
	Destroyed event.

	* dependencyobject.[h,cpp]: add EventObject::DestroyedEvent,
	emitted just before we clean up the EventObject's event list.

2007-10-15  Jeffrey Stedfast  <fejj@novell.com>

	* text.cpp (Layout): I think I finally figured out the scaling to
	apply to the units provided in the Indices property and also
	discovered that the Advance is not applied at the uOffset, it is
	applied independently of the uOffset.
	(Render): Same fixes as in Layout().

2007-10-13  Chris Toshok  <toshok@ximian.com>

	* animation.cpp (balf): fix bug 325175 by not taking the square
	root of a negative number (fixes the flashing in the credits for
	Monotone.)  Also clean up this code so that we're not using
	globals to communicate parameters (through Simpson) between balf
	and BezierArcLength, and lower the tolerance (I doubt we need
	*that* much precision).

2007-10-12  Chris Toshok  <toshok@ximian.com>

	* control.[h,cpp], brush.[h,cpp], text.[h,cpp], geometry.[h,cpp],
	dependencyobject.[h,cpp], shape.[h,cpp], animation.[h,cpp],
	transform.[h,cpp]: add an extra parameter to OnSubPropertyChanged,
	which gives the actual object whose property changed.  Also, in a
	few instances fix the NotifyAttachersOnPropertyChanged call that
	some classes used to not use the subprop, but the prop.  The
	subprop doesn't refer to "this" in those instances, but to @obj.
	@prop refers to "this".

	* collection.[h,cpp]: use the above change to correctly support
	the DependencyObject parameter of OnCollectionChanged (when the
	change type is ItemChanged).
	
	* uielement.[h,cpp], panel.[h,cpp]: use the above two changes to
	move the ZIndex property support from UIElement to Panel, which
	makes more logical sense (and is likely the reason MS removed the
	property from UIElement in 1.1) -- ZIndex is about what happens to
	this UIElement in relation to its siblings.
	
2007-10-12  Sebastien Pouliot  <sebastien@ximian.com>

	* shape.cpp: Only set miter limit if line join is set to miter.

2007-10-12  Chris Toshok  <toshok@ximian.com>

	* collection.cpp: move the panel logic away from VisualCollection.
	It belongs in Panel::OnCollectionChanged.

	* panel.cpp: flesh out Panel::OnCollectionChanged, making it do
	everything the VisualCollection code used to do on its behalf.

	* uielement.h, uielement.cpp: introduce a new field for use with
	the dirty code - force_redraw_of_new_bounds.  Basically, we set
	the field according to the parameter passed to UpdateBounds.

	* dirty.cpp (UpdateBounds): force an invalidate if
	el->force_redraw_of_new_bounds is set.

2007-10-12  Chris Toshok  <toshok@ximian.com>

	* clock.h, clock.cpp: add some Timeout functions (AddTimeout,
	RemoveTimeout) which wrap the glib timeout calls we were making.
	This lets us keep track of active timeout ids and remove them all
	when the TimeManager shuts down.  So, if we leak MediaElements
	(which seems to be happening in TopBanana), we don't crash.

	* mplayer.cpp: use the new TimeManager timeout call instead of the
	glib mainloop directly.

	* media.cpp: same.
	
2007-10-12  Jeffrey Stedfast  <fejj@novell.com>

	* downloader.cpp (downloader_init): Default the DownloadProgress
	to 0.0.

2007-10-12  Jackson Harper  <jackson@ximian.com>

	* downloader.h: Add an access to the downloader state.  I need
	this in the plugin.

2007-10-12  Jb Evain  <jbevain@novell.com>

	* brush.cpp|h: add image_brush_set_source.

2007-10-11  Jeffrey Stedfast  <fejj@novell.com>

	* mplayer.cpp (convert_to_rgb): Worked around an swscaler crash
	where it doesn't handle J-Type picture frames.

2007-10-11  Sebastien Pouliot  <sebastien@ximian.com>

	* panel.cpp|h: Split Render into Render and RenderChildren, so 
	the later can be overriden in InkPresenter.
	* stylus.cpp|h: A quick (see FIXME) implementation to render 
	ink found in some xaml files.

2007-10-11  Jeffrey Stedfast  <fejj@novell.com>

	* mplayer.cpp: Updated to use the new Queue class.
	(AdvanceFrame): Accessing the queue directly as a linked list
	allows us to simplify the loop a little so that we don't have to
	keep a reference to the previous packet's decoded frame.

	* list.cpp: Added a new Queue class which will replace GAsyncQueue
	in mplayer.cpp.

2007-10-11  Jeffrey Stedfast  <fejj@novell.com>

	* mplayer.cpp: Added ctors/dtors for Audio and Video structs.
	(AdvanceFrame): Keep a reference to the previous frame in case we
	reach the end of the queue.

2007-10-11  Jb Evain  <jbevain@novell.com>

	* dependencyobject.cpp|h: add dependency_object_set_name.

	* media.cpp|h: add media_attribute_get_value and
	media_attribute_set_value

	* playlist.cpp|h: populate MediaAttributeCollection when
	a playlist entry is opened.

2007-10-11  Larry Ewing  <lewing@novell.com>

        * dirty.cpp, uielement.cpp|h: Use gdk_regions to tract dirty
	areas... have more fun in general.
	
	* src/rect.h: replace Floor function with RoundOut function.
	* panel.cpp, dirty.cpp: use RoundOut where appropriate.  Fixes
	clipping issue in sprawl.

2007-10-11  Sebastien Pouliot  <sebastien@ximian.com>

	* xaml.cpp: Let InkPresenter handle childs like a Canvas (from 
	which it inherits)

2007-10-11  Jb Evain  <jbevain@novell.com>

	* playlist.cpp: replace C++ casts to plain casts.

2007-10-11  Jb Evain  <jbevain@novell.com>

	* collection.cpp: replace dynamic_casts with plain casts
	as per Miguel suggestion.

2007-10-11  Jb Evain  <jbevain@novell.com>

	* collection.cpp|h: add, implement and expose the
	MediaAttributeCollection::GetItemByName method.

2007-10-11  Rolf Bjarne Kvinge <RKvinge@novell.com> 

	* downloader.cpp, downloader.h: Fix some const char/char mismatch warnings.

2007-10-11  Rolf Bjarne Kvinge <RKvinge@novell.com> 

	* text.h, animation.h, text.cpp: Fix some const char/char mismatch warnings.
	* dependencyobject.h, dependencyobject.cpp, animation.cpp: Remove some const
	  char/char mismatch warnings.
	* visual.cpp: Fix no newline warning.
	* runtime.cpp: Fix a initialization warning.
	* demo.cpp: Remove unused variable.

2007-10-11  Rolf Bjarne Kvinge <RKvinge@novell.com> 

	* dependencyobject.cpp: base_unref_delayed: do nothing if base is NULL,
	  matches base_unref behaviour.
	* dependencyobject.h: Use g_atomic_int* to make ref counting atomic
	  operations.

2007-10-10  Chris Toshok  <toshok@ximian.com>

	* runtime.cpp (runtime_shutdown): explicitly drain all remaining
	pending managed unrefs.

	* dependencyobject.cpp: remove the Base::ref/unref implementations
	from here.  Add the threadsafe base_unref_delayed code, as well as
	code to manage a tick call to free up the instances on the next
	clock tick.  Also provide an external api (drain_unrefs -- bad
	name, fix me plz k thx) so that runtime.cpp can explicitly unref
	everything when we shutdown (if they haven't already been dealt
	with.)

	* dependencyobject.h: clean up the OBJECT_TRACKING ifdefs so that
	we don't have 2 implementations of all these methods.  Instead,
	just ifdef the relevant portions of the methods, and keep them in
	dependencyobject.h.  Also, add prototypes for drain_unrefs and
	base_unref_delayed, which is called from managed code.

	* collection.h, collection.cpp: make Clear take an optional
	"emit_event" argument (default = true.)  Call Clear instead of
	list->Clear(true) in our dtor so we clean up the namespaces and
	Detach properly.

	* debug.cpp: use an extern "C" block. looks nicer.

2007-10-10  Sebastien Pouliot  <sebastien@ximian.com>

	* brush.cpp: Handle GradientStop with negative offset like 
	Silverlight (seems to) do.

2007-10-10  Chris Toshok  <toshok@ximian.com>

	* panel.cpp (Panel::~Panel): no need to clear our Children
	collection.  the normal dtor stuff will do that for us.

2007-10-10  Larry Ewing  <lewing@novell.com>

	* media.cpp: Fill with the element extents don't just paint the
	surface because if the stretch is specified we may end up painting
	outside the proper area.

2007-10-10  Rolf Bjarne Kvinge <RKvinge@novell.com> 

	* media.cpp: When updating the MediaElement's progress, get the Downloader's
	  DownloadProgressProperty.

2007-10-10  Rolf Bjarne Kvinge <RKvinge@novell.com> 

	* visual.cpp, visual.h: Added visual_set_surface, and guard against
	  overwriting a set surface with null.

2007-10-10  Jackson Harper  <jackson@ximian.com>

	* collection.cpp: Set the surface when adding a visual element.

2007-10-10  Jackson Harper  <jackson@ximian.com>

	* shape.cpp: We need to do something when line properties are
	changed. Fixes test-animation-line.xaml

2007-10-10  Jackson Harper  <jackson@ximian.com>

	* xaml.cpp: Don't allow the same property to be set twice.

2007-10-09  Jackson Harper  <jackson@ximian.com>

	* xaml.cpp: When we create custom elements we also need to set the
	surface on them and mark them for cleanup.

2007-10-09  Jackson Harper  <jackson@ximian.com>

	* xaml.cpp: When we are creating objects from a string, set the
	encoding to utf8 so that expat doesn't try to determine the
	encoding from the ?xml declaration (which will be incorrect
	because the string is in utf8).

2007-10-09  Chris Toshok  <toshok@ximian.com>

	* clock.cpp (ClockGroup::Stop): If the clock group has children we
	depend on stopping them first.  But if the clock group is without
	children, chain up to Clock::Stop here.

2007-10-09  Jb Evain  <jbevain@novell.com>

	* uielement.h: define new methods RenderClipPath and
	IntersectBoundsWithClipPath.
	* uielement.cpp: implement them.
	* panel.cpp, shape.cpp, media.cpp: use them.

2007-10-09  Chris Toshok  <toshok@ximian.com>

	* clock.cpp, trigger.cpp, uielement.cpp, geometry.cpp, shape.cpp,
	frameworkelement.cpp, transform.cpp, media.cpp, animation.cpp,
	brush.cpp, text.cpp: s/Attachee/Attacher.

	* dependencyobject.h: couple of Detach changes: 1) Add a DetachAll
	call that is used at dtor time to call Detach on all
	DependencyObject-subclassed Values, and 2) make NULL available in
	detach as a wildcard - passing NULL for the property detaches all
	properties that the current object might be watching on.

	Also, correct a longstanding problem in terminology/api.  if A's
	code calls B->Attach (..., this), then A is the Attacher, not the
	Attachee.  Basically s/Attachee/Attacher in all places,
	everywhere.

	* dependencyobject.cpp: same changes as above.  Also, change the
	current_values hash table to key off the DependencyProperty, not
	off the DependencyProperty name.  This allows us to use a direct
	hash, as opposed to a string hash.
	
	* collection.cpp (dtor): make sure sure to detach from all the
	list elements before we clear the list.

2007-10-09  Jeffrey Stedfast  <fejj@novell.com>

	* font.cpp (Layout): Only break words on ASCII lwsp, we should not
	break on nbsp's for example.

2007-10-09  Jackson Harper  <jackson@ximian.com>

	* xaml.cpp: Make sure the Surface gets set on custom created
	UIElements.  Also add them to the created list, so they get freed.

2007-10-09  Jackson Harper  <jackson@ximian.com>

	* control.cpp: Since controls are UIElements we need to make sure
	their surface is set when we create them from XAML.

2007-10-09  Rolf Bjarne Kvinge <RKvinge@novell.com> 

	* dependencyobject.cpp: resolve_property_path: Add a nullcheck.

2007-10-09  Rolf Bjarne Kvinge <RKvinge@novell.com> 

	* debug.cpp, debug.h: Conditionally compile support for managed stack
	  frames.

	* runtime.cpp: add more debug code.

2007-10-08  Jeffrey Stedfast  <fejj@novell.com>

	* text.cpp (OnPropertyChanged): We may need to relayout even if
	the wrapping is set to NoWrap.

2007-10-08  Zoltan Varga  <vargaz@gmail.com>

	* text.cpp (OnPropertyChanged): Do a relayout if the Width property
	changes and text wrapping is enabled.

2007-10-08  Jeffrey Stedfast  <fejj@novell.com>

	* mplayer.cpp (Open): If the media has video, load the first video
	frame.
	(Seek): Same.
	(AdvanceFrame): Fixed to "end" properly.

	* media.cpp: Don't manually call DisplayFrame() anymore.

2007-10-08  Rolf Bjarne Kvinge <RKvinge@novell.com> 

	* xaml.cpp: Set the surface of newly created objects (where applicable).
	* canvas.h, uielement.h, canvas.cpp: Move the surface field to Visual.
	* playlist.cpp, media.cpp, text.cpp: Create the downloader using Surface'
	  brand new CreateDownloader method.
	* visual.h: Added a surface field, complete with setters and getters.
	* downloader.cpp, downloader.h: Add a context field.
	* runtime.h: Add a downloader_context field, and CreateDownloader methods.
	* runtime.cpp: Add a downloader_context field.

2007-10-09  Larry Ewing  <lewing@novell.com>

	* media.cpp: add clipping to shape::DoDraw and to the bounds
	computations.

2007-10-08  Larry Ewing  <lewing@novell.com>

	* media.cpp:
	* panel.cpp: intersect the bounds with the clip path to
	optimize the invalidated region.

	* shape.cpp: return 0.0 when shape_get_stroke_thickness is called
	with a NULL.

2007-10-08  Larry Ewing  <lewing@novell.com>

	* media.cpp:
	* panel.cpp: intersect the bounds with the clip path to
	optimize the invalidated region.

	* shape.cpp: return 0.0 when shape_get_stroke_thickness is called
	with a NULL.

2007-10-08  Larry Ewing  <lewing@novell.com>

	* media.cpp:
	* panel.cpp: intersect the bounds with the clip path to
	optimize the invalidated region.

	* shape.cpp: return 0.0 when shape_get_stroke_thickness is called
	with a NULL.

2007-10-08  Larry Ewing  <lewing@novell.com>

	* media.cpp:
	* panel.cpp: intersect the bounds with the clip path to
	optimize the invalidated region.

	* shape.cpp: return 0.0 when shape_get_stroke_thickness is called
	with a NULL.

2007-10-08  Larry Ewing  <lewing@novell.com>

	* media.cpp:
	* panel.cpp: intersect the bounds with the clip path to
	optimize the invalidated region.

	* shape.cpp: return 0.0 when shape_get_stroke_thickness is called
	with a NULL.

2007-10-08  Larry Ewing  <lewing@novell.com>

	* runtime.cpp: change previous logic to drop the alpha
	completely here until more testing can be done.

2007-10-08  Larry Ewing  <lewing@novell.com>

	* runtime.cpp: draw the background color blended over white.

2007-10-08  Larry Ewing  <lewing@novell.com>

	* media.cpp: render clip paths on media elements.

2007-10-07  Larry Ewing  <lewing@novell.com>

	* xaml.cpp:
	* rect.cpp:
	* point.cpp:
	* array.cpp: use g_utf8_next_char in some places to start making
	the parsers more utf8 safe.  Make rect/point_from_str more robust
	against separator characters

2007-10-07  Chris Toshok  <toshok@ximian.com>

	* clock.cpp (Clock::Tick): make sure we're reversed before
	switching to Fill if the clock is at 0 (and make sure we're not
	reversed before switching to Fill on the other end of the
	timespan).  Some animations were skipping directly to fill without
	ever running.
	(ClockGroup::Tick): don't Tick a child clock if it's about to
	Stop.  the new tick might cause it to fill.. this needs work
	still.

2007-10-06  Jb Evain  <jbevain@novell.com>

	* media.cpp (Image::Render): Deal with clipping.

2007-10-05  Chris Toshok  <toshok@ximian.com>

	* animation.cpp (KeyFrameComparer): fix airlines (and probably a
	host of other keyframe usage besides).  The problem was that this
	function was treating its args as keyframe*'s, when in actuality
	they were keyframe**'s.  that explains the intermittent nature of
	the bug, as well as the faulty sorting I was experiencing earlier.

	* clock.cpp (TimeManager::Tick): reinstate the throttling, yay.

2007-10-05  Chris Toshok  <toshok@ximian.com>

	* clock.cpp (TimeManager::Tick): I have no idea how this is
	possible, but the throttle code is *completely* screwing up the
	Airlines demo animations.

2007-10-05  Jackson Harper  <jackson@ximian.com>

	* control.cpp: need to pass this down.  Fixes dragging controls in
	top banana.

2007-10-05  Jeffrey Stedfast  <fejj@gnome.org>

	* media.cpp (DownloaderComplete): Call mplayer->DisplayFrame() in
	the paused case.
	(Stop): Here too.
	(SetValue): And here too after a Seek() (altho it won't work if
	the media is paused).

	* mplayer.cpp (AdvanceFrame): Introduced a new bool variable,
	update, which is true if any avcodec_decode_video() sets redraw to
	true.
	(DisplayFrame): New method largely based on JB's work to load the
	current video frame into the mplayer surface.

2007-10-05  Jb Evain  <jbevain@novell.com>

	* media.cpp|h, playlist.cpp|h: Don't open the first entry
	when a playlist entry has been stopped before switching to
	the next one.

2007-10-04  Chris Toshok  <toshok@ximian.com>

	* clock.cpp: fix a couple of compilation warnings, and tighten up
	the list_clocks output.

2007-10-04  Jeffrey Stedfast  <fejj@gnome.org>

	* text.cpp (SetIndices): Use g_ascii_strtod() instead of strtod()
	since it is not locale dependant.

	* rect.cpp (rect_from_str): Same.

	* point.cpp (point_from_str): Same.

	* xaml.cpp (get_point): Fixed to update *in properly on success.

2007-10-05  Jb Evain  <jbevain@novell.com>

	* media.cpp: correctly advertise 'Opening' state of MediaElement.

2007-10-04  Jeffrey Stedfast  <fejj@novell.com>

	* xaml.cpp: (more_points_available): Simplified by looping while
	isspace. Also, update our input pointer if we have to scan over
	lwsp.
	(get_point): Now returns bool based on whether it manages to
	extract a point or not.
	(geometry_from_str): Updated.

2007-10-04  Jackson Harper  <jackson@ximian.com>

	* xaml.cpp: Points after the initial two line points should
	actually create new line segments, not a polyline, this fixes
	relative points on multiple lines.

2007-10-04  Jeffrey Stedfast  <fejj@novell.com>

	* text.cpp (TextBlock): Can't use GetValue() here yet as stuff
	hasn't completely been initialized.
	(Glyphs::SetIndices): Do not do scaling here, this seems to be
	font size dependant.

	* shape.cpp (DoDraw): Use 'delete []' to free dmul.

2007-10-04  Jackson Harper  <jackson@ximian.com>

	* xaml.cpp: Handle repeated bezier segments properly.

2007-10-04  Chris Toshok  <toshok@ximian.com>

	* clock.cpp: lots of little changes.  fixes clock16.xaml, and
	therefor the score animation in dr.popper goes away properly.
	also fixes a few other issues with FillBehavior (checked by our
	clock xaml tests.)

2007-10-04  Jeffrey Stedfast  <fejj@gnome.org>

	* text.cpp (Glyphs::.ctor): We no longer have a TextFont member
	variable.
	(Layout): Use a local TextFont variable.
	(Render): Same.
	(text_init): Always call font_init() as Glyphs use it even when
	text=pango is specified.

2007-10-04  Sebastien Pouliot  <sebastien@ximian.com>

	* shape.cpp|h: Shapes that uses their Width and Height must use
	them for brush size. Fix brush rendering when used with 
	UIElement.RenderTransform property.

2007-10-03  Chris Toshok  <toshok@ximian.com>

	* text.cpp: make Glyphs usable even when text=pango.  "usable"
	means "don't crash" :)

2007-10-03  Chris Toshok  <toshok@ximian.com>

	* uielement.h: rename UseAA() to EnableAntiAlias().  it's
	arguably a better name, and more importantly it's the name that
	media.cpp/h changed it too, which broke the AA hack used in
	dirty.cpp.

	* dirty.cpp (process_dirty_elements): rename UseAA() to
	EnableAntiAlias().

2007-10-03  Sebastien Pouliot  <sebastien@ximian.com>

	* array.cpp: Move double array allocations back to new/delete.

2007-10-03  Jeffrey Stedfast  <fejj@novell.com>

	* font.cpp (EmSize): Removed, not needed.
	(GetGlyphInfo): Commented out vertical glyph metrics, saves a fair
	bit of memory that we aren't using.

	* text.cpp (TextBlock::SetFontSource): Implemented.
	(text_init): Default StyleSimulations to None.

2007-10-03  Sebastien Pouliot  <sebastien@ximian.com>

	* brush.cpp|h: SL and Cairo defaults to different values (end 
	color versus start color) when a gradiant is restricted to a 
	single color (e.g. if the start and end points of a linear 
	gradient are identical).

2007-10-03  Jeffrey Stedfast  <fejj@novell.com>

	* text.cpp: Implemented the Glyphs element.

	* font.cpp: Made GlyphMetrics and GlyphInfo structs public for use
	with the the Glyphs element implemented in text.cpp.
	(GetGlyphInfo): Fixes to allow loading of the index=0 glyph.
	(GetGlyphInfoByIndex): New method.
	(CreatePattern): If the filename is specified, don't call
	FcFontMatch(), simply return the constructed pattern.

2007-10-02  Chris Toshok  <toshok@ximian.com>

	* clock.h, clock.cpp: remove TimeManager::current_fps, it's
	unused.

2007-10-02  Chris Toshok  <toshok@ximian.com>

	* runtime.cpp (Surface::UpdateFullScreen): just call
	gtk_window_fullscreen instead of setting decorations/above
	manually.  this puts us on top of the panel.

2007-10-02  Chris Toshok  <toshok@ximian.com>

	* clock.h, clock.cpp: rip out the old stupid throttling code and
	replace it with an exponential moving average of the delays.

2007-10-02  Chris Toshok  <toshok@ximian.com>

	* clock.h, clock.cpp: add Timeline::Get/SetSpeedRatio methods, and
	use them to make test/xaml/clock8.xaml work.

2007-10-02  Larry Ewing  <lewing@novell.com>

	* shape.cpp (Path::ComputeBounds): use the specified width/height
	if stretch is != StretchNone.  Fixes rendering issues with halo
	and several other sites.

2007-10-02  Chris Toshok  <toshok@ximian.com>

	* animation.h, animation.cpp: override Stop() on AnimationClocks
	so we can reset the property value to the baseValue stored in our
	AnimationStorage.

	* clock.h, clock.cpp: fix the starting of stopped clockgroups when
	there are active children (fixes the storyboards running for 1
	tick then stopping).  Add more convoluted code in order to get the
	expected behavior when FillBehavior=Stop on a storyboard.

2007-10-02  Chris Toshok  <toshok@ximian.com>

	* clock.h, clock.cpp: a few changes.  quit with all the delay
	computation in the throttling code, and just deal with fps until
	we're ready to switch to delays.  it simplifies everything a
	bunch.  Also, narrow the type for Clock::Get/SetParent to
	ClockGroup.  Add some rudimentary code for printing out the state
	of all clocks (use TimeManager::Instance()->ListClocks() or
	time_manager_list_clocks()).  Also, remove the TimeManager::Tick
	code which started clocks.  This commit changes the way
	storyboards are registered, so the only things in the
	TimeManager's list should be the per-surface ClockGroups, which
	are started in Storyboard::Begin (if they aren't already running.)

	* collection.cpp (VisualCollection::Add): this is a bug waiting to
	happen.  Call VisualUpdate (thereby setting the child's parent and
	initializing the transforms/opacity) before emitting Loaded on the
	child.

	* animation.h, animation.cpp: Storyboards now add their clocks to
	the per-surface ClockGroup.  This involves some groveling to find
	the surface, but it's nothing we haven't seen before.  There's no
	direct TimeManager calls here now - stopping the surface's
	ClockGroup will stop all animations running on it.

	* runtime.h, runtime.cpp: add the per-surface ClockGroup.  all
	storyboards attach to this, and this attaches to the TimeManager.
	
2007-10-02  Jackson Harper  <jackson@ximian.com>

	* media.cpp: Some default values to avoid nullref exceptions.

2007-10-02  Sebastien Pouliot  <sebastien@ximian.com>

	* xaml.cpp: Add support for 'F' in the PML parser to enable setting
	the FillMode of Geometry objects. Removed default value set as it is 
	identical to the default property value.

2007-10-02  Jb Evain  <jbevain@novell.com>

	* playlist.cpp|h: implemented start time for playlist entries.

2007-10-02  Jb Evain  <jbevain@novell.com>

	* playlist.cpp|h, media.cpp|h: rename MediaSource::OpenSource to OpenInternal.

2007-10-02  Larry Ewing  <lewing@novell.com>

	* uielement.cpp (UIElement::Invalidate): Only invalidate if
	opacity is > 0.
	* dirty.cpp (process_dirty_elements): be sure to invalidate before
	and after the opacity change.

2007-10-02  Jb Evain  <jbevain@novell.com>

	* playlist.cpp: deal with non lowercase file exts.

2007-10-01  Jeffrey Stedfast  <fejj@novell.com>

	* font.cpp: Reduced Glyph table memory usage.

2007-10-01  Chris Toshok  <toshok@ximian.com>

	* dirty.cpp (process_dirty_elements): remove the special if checks
	which kept the ComputeBounds/Invalidate code from running on the
	toplevel surface.  Canvas::ComputeBounds() does the right thing
	for the toplevel surface, so we just trust it.  fixes invalidation
	of root canvases.

	* panel.cpp (OnPropertyChanged): remove the ComputeBounds call.
	(OnSubPropertyChanged): same.

2007-10-01  Sebastien Pouliot  <sebastien@ximian.com>

	* brush.cpp|h: Change SetupBrush and SetupGradient signatures to 
	void (instead of the, now, unused bool);

2007-10-01  Jeffrey Stedfast  <fejj@novell.com>

	* font.cpp (Layout): Made WrapWithOverflow closer to Silverlight's.

2007-10-01  Sebastien Pouliot  <sebastien@ximian.com>

	* shape.cpp|h: Remove Path::IsFilled since the property 
	PathFigure::IsFilledProperty doesn't exists anymore.

2007-10-01  Jeffrey Stedfast  <fejj@novell.com>

	* text.cpp (LayoutPango): Fixed Wrap vs WrapWithOverflow text
	wrapping.

	* font.cpp (Layout): Fixed the TextWrapping="Wrap" case.

2007-10-01  Rolf Bjarne Kvinge <RKvinge@novell.com> 

	* runtime.cpp: Only show the server as the url in the fullscreen
	message.

2007-10-01  Sebastien Pouliot  <sebastien@ximian.com>

	* panel.cpp: Call ComputeBounds before invalidating on Background 
	changes. Fix parts of #327691 (like BubbleMark-CLR and Monotone).

2007-10-01  Rolf Bjarne Kvinge <RKvinge@novell.com> 

	* fullscreen.h, fullscreen.xaml: Added.
	* text.h: Make GetActualHeight and GetActualWidth public.
	* runtime.h, runtime.cpp: Added IsTopLevel (since there can be two toplevel
	  objects now: the fullscreen message and the toplevle canvas),
	  SetSourceLocation and Show/HideFullScreenMessage.
	* dirty.cpp: Use Surface::IsTopLevel instead of comparing directly agains
	  Surface::GetTopLevel.

2007-09-30  Zoltan Varga  <vargaz@gmail.com>

	* xaml.cpp (CreateManagedObject): Move the call to GetMapping ()
	to managed code.

	* text.cpp (text_destroy): Avoid crash if default_foreground_brush
	is not set.

2007-09-28  Chris Toshok  <toshok@ximian.com>

	* Makefile.am: remove the XRANDR conditional here.  it's #defined
	in config.h now.

2007-09-28  Jeffrey Stedfast  <fejj@novell.com>

	* font.cpp (CreatePattern): If a filename has been specified for
	loading a font, don't set family values. Also, call
	FcDefaultSubstitute() on the pattern before trying to find a
	match.

2007-09-28  Jeffrey Stedfast  <fejj@novell.com>

	Optimization hack that saves time by not recalculating the layout
	when the foreground brush changes (since we'd have exactly the
	same layout).

	* font.cpp (TextRun): Now takes the address of the brush than the
	brush itself, so that when brushes change on the Inline, we get
	the brush change for free.

	* text.cpp (LayoutSilverlight): Pass the addresses of the
	foreground brushes to TextRun ctor and don't bother with the
	default foreground brush here, save that for ::Paint-time.
	(LayoutPango): Same idea as LayoutSilverlight().
	(Paint): Get the default foreground and pass that off to the
	pango/silverlight text renderers.
	(OnPropertyChanged): Don't force a re-layout if the property that
	changed was the TextBlock::ForegroundProperty.
	(OnCollectionChanged): Same (but for Inline::ForegroundProperty).

	* mango.cpp (mango_renderer_show_layout): Now takes a default_fg
	argument so that we don't have to specify it in the creation of
	our layout attributes (this saving us a re-layout when a brush
	changes).
	(mango_attr_foreground_new): Now takes the address of the brush
	rather than the brush itself, so that when brushes change on the
	Inline, we get the brush change for free.

2007-09-28  Jeffrey Stedfast  <fejj@novell.com>

	* text.cpp (TextBlock): We cannot re-use the
	default_foreground_brush here because we cannot allow it to be
	altered in any way.

2007-09-28  Jeffrey Stedfast  <fejj@novell.com>

	* font.cpp (TextFont::IsScalable): New method.
	(TextFont::Path): Paths a glyph but does not stroke or fill. Only
	available if the font is scalable.
	(TextLayout::Render): Cache each segment's cairo_path_t so that
	future renders do not have to do it on a glyph-by-glyph basis
	(avoids possible glyph cache misses). May also save time by doing
	a single fill rather than a fill per glyph.

2007-09-28  Jeffrey Stedfast  <fejj@novell.com>

	* font.cpp (RenderGlyphBitmap): No longer takes a TextDecorations
	argument.
	(RenderGlyphPath): Same.
	(UnderlinePosition): New method.
	(UnderlineThickness): New method.
	(TextLayout::Render): Draw our underline here in 1 stroke (haha, I
	made a funny).

2007-09-28  Jeffrey Stedfast  <fejj@novell.com>

	* text.cpp (LayoutSilverlight): LineBreaks don't really care about
	TextDecorations or Foreground properties.

	* font.cpp (TextRun::~TextRun): unref the font.
	(TextSegment): now references the original TextRun instead of
	copying pointers/values.
	(TextLayout::Render): Updated for above change.

2007-09-28  Zoltan Varga  <vargaz@gmail.com>

	* xaml.cpp (SetNameAttribute): New callback to enable managed code to process
	x:Name attributes.
	(LoadCode): Change return type to bool to indicate a loading error.

2007-09-28  Jeffrey Stedfast  <fejj@gnome.org>

	* media.cpp (SingleMedia::~SingleMedia): Close the media stream.
	(MediaElement::AdvanceFrame): If mplayer->AdvanceFrame() returns
	false, then it signifies MediaEnded, no need to explicitly check.
	(MediaElement::SetSource): Delete the current source here.
	(MediaElement::~MediaElement): C++ `delete' operator doesn't
	handle freeing NULL pointers.
	(MediaElement::DownloaderComplete): No need to delete the source
	here, done in SetSource() instead.

	* font.cpp: Created my own GlyphMetrics struct which uses doubles
	instead of ints for more accurate layout/rendering calculations.
	(Layout): When comparing to max_width, add 1.0 to account for
	rounding errors/hinting. Add 1.0 to the Actual/BoundingBox
	width/height values for the same reason.

2007-09-28  Sebastien Pouliot  <sebastien@ximian.com>

	* xaml.cpp: Free locally allocated Points inside get_point_array.

2007-09-28  Jeffrey Stedfast  <fejj@gnome.org>

	* font.cpp (GetGlyphInfo): Don't cache the bitmap if we're caching
	the path.

2007-09-28  Sebastien Pouliot  <sebastien@ximian.com>

	* shape.cpp: ComputeBoundsSlow is no more so we can re-enable the
	thickness == 0 optimization.

2007-09-27  Jeffrey Stedfast  <fejj@novell.com>

	* xaml.cpp (flush_char_data): g_strchomp() the cdata (as
	Silverlight does).

	* text.cpp: Merged with custom text layout code - layout algorithm
	is chosen at runtime_init() via flags or environment variable.

2007-09-27  Jeffrey Stedfast  <fejj@novell.com>

	* runtime.cpp (runtime_init): Don't check pango version info,
	we're just gonna statically link in pango (and/or do
	configure-time checks if the user decides to link to a system
	pango). Implemented some preliminary environment variable parsing
	action to decide if the user wnts to use ffmpeg vs ms codecs,
	pango vs my "silverlight" text layout engine, etc.

2007-09-27  Jeffrey Stedfast  <fejj@novell.com>

	* runtime.cpp (runtime_init): Now takes a flags argument for
	enabling/disabling features. If RUNTIME_INIT_BROWSER is not set,
	then make sure pango is recent enough (if not, print a warning
	akin to the cairo warning).

2007-09-27  Sebastien Pouliot  <sebastien@ximian.com>

	* array.cpp: Fix issues on double parsing, including bug #328915 and
	test cases in /moon/test/xaml/points-torture.xaml

2007-09-27  Rolf Bjarne Kvinge <RKvinge@novell.com> 

	* animation.cpp: Add a few null checks.

2007-09-27  Larry Ewing  <lewing@novell.com>

	* media.cpp: Don't mark our download progress as 100% until we've
	been notified by the downloader that it is complete.  Some
	programs check download progress to decide when they can safely
	poke at the media element properties.
	* downloader.cpp: set the final downloader progress to 1.0 not 100.

2007-09-27  Sebastien Pouliot  <sebastien@ximian.com>

	* xaml.cpp: Don't freak out if <?xml ... ?> isn't on the first 
	line. Fix bug #328907.

2007-09-27  Rolf Bjarne Kvinge <RKvinge@novell.com> 

	* control.h, control.cpp: Added control_initialize_from_xaml_callbacks, and
	  change InitializeFromXaml to take a XamlLoader argument.

2007-09-27  Rolf Bjarne Kvinge <RKvinge@novell.com> 

	* xaml.cpp: More unrefs.

2007-09-27  Rolf Bjarne Kvinge <RKvinge@novell.com> 

	* text.cpp: Unref a few newly created objects.
	* control.cpp: Remove an unnecessary ref.

2007-09-26  Zoltan Varga  <vargaz@gmail.com>

	* text.cpp (SetValue): Implement proper handling of the Text property.
	(GetValue): Ditto.
	(OnPropertyChanged): Force a relayout when the foreground property changes.
	(Layout): Remove the laying out of the contents of the Text property, since the
	text is now contained in the first inline.
	
2007-09-26  Jeffrey Stedfast  <fejj@novell.com>

	* font.cpp (Layout): Include the space char on the line before
	wrapping, this is noticable when TextDecorations="Underline" is
	enabled.
	(TextLayout::RenderGlyphBitmap): Moved to TextFont class.
	(TextLayout::RenderGlyphPath): Same. Also implemented underlining.
	(TextFont::Render): Implemented.

2007-09-26  Sebastien Pouliot  <sebastien@ximian.com>

	* geometry.h: PathFigure::IsFilledProperty doesn't exist anymore
	(and was removed elsewhere, except here);

2007-09-26  Chris Toshok  <toshok@ximian.com>

	* clock.cpp (TimeManager::Tick): a few changes.  first and
	foremost, fix the signs on the FPS_ADJUSTMENTS.  oops.  also, add
	a buffer of 50ms on either side of the timeout before we consider
	the Tick either slow or fast.  Increase the number of out-of-line
	ticks we need and decrease the fps adjustment.

2007-09-26  Jeffrey Stedfast  <fejj@novell.com>

	* text.cpp (OnCollectionChanged): Needs to call Invalidate().

2007-09-26  Chris Toshok  <toshok@ximian.com>

	* clock.cpp: initialize the min_timeout based on a good default
	max fps (60 in our case).  Also, calculate the fps adjustments in
	a nicer way.

	* runtime.cpp: remove the non-xrandr SetMaximumRefreshRate call -
	it's handled by TimeManager's default.

2007-09-26  Jeffrey Stedfast  <fejj@novell.com>

	* font.cpp: A bunch of fixes/changes to mimic Microsoft's
	Silverlight TextBlock layout logic.

2007-09-26  Andrew Jorgensen  <ajorgensen@novell.com>

	* Makefile.am: Added missing files for dist tarball

2007-09-26  Chris Toshok  <toshok@ximian.com>

	* clock.h, clock.cpp: add some very naive, rather lame fps tuning.
	we just adjust fps by a fixed amount (4fps) either up or down, if
	a certain number (5, by default) of ticks in a row take either
	less or more time to complete (respectively), than the current
	timeout.

2007-09-26  Sebastien Pouliot  <sebastien@ximian.com> 

	* moon-path.c: Fix typos.
	* shape.h: Remove old ComputeBounds[Slow|Fast] from header.

2007-09-26  Sebastien Pouliot  <sebastien@ximian.com>

	* shape.h|cpp: Remove Line (direct path manipulation) hack.

2007-09-26  Rolf Bjarne Kvinge <RKvinge@novell.com> 

	* xaml.cpp: Unref collections and matrix transforms we create.

2007-09-25  Sebastien Pouliot  <sebastien@ximian.com>

	* geometry.h|cpp, shape.cpp: Implement GetBounds without a cairo 
	context.

2007-09-26  Zoltan Varga  <vargaz@gmail.com>

	* text.cpp (TextBlock): Set an empty string as a default Text property.
	(InsideObject): Implement this for text blocks.

2007-09-25  Sebastien Pouliot  <sebastien@ximian.com>

	* font.cpp: Fix warning.

2007-09-25  Larry Ewing  <lewing@novell.com>

	* brush.cpp|h: add image_brush_create_similar to simplify creating
	similar surfaces.  Use it where appropriate.

	* media.ccp: use image_brush_create_similar where possible. In
	MediaElement::Render draw with opacity directly rather than
	creating a temporary surface for every frame. Rework image opacity
	cache so that we don't have to recreate the surface every time. 

2007-09-25  Jb Evain  <jbevain@novell.com>

	* media.cpp|h: let the MediaElement be the only one to trigger
	its own events, terminate its friendship with MediaBase.

2007-09-25  Jb Evain  <jbevain@novell.com>

	* playlist.cpp|h: trigger a parsing error when no href attribute
	is found for base and ref elements.

2007-09-25  Jb Evain  <jbevain@novell.com>

	* playlist.cpp|h, media.cpp: Auto play for playlists.

2007-09-24  Jeffrey Stedfast  <fejj@novell.com>

	* font.cpp (Render): Fixed some y1 offset logic that didn't amke
	any sense (and was wrong afaict anyway). We now render exactly
	like Microsoft Silverlight.

2007-09-24  Jb Evain  <jbevain@novell.com>

	* playlist.cpp: close the previous source before playing
	the next one.

2007-09-24  Jb Evain  <jbevain@novell.com>

	* mplayer.cpp: on Close, reset height and width to zero.

2007-09-24  Jeffrey Stedfast  <fejj@novell.com>

	* media.cpp (OnPropertyChanged): Set recalculate_matrix to true if
	either the NaturalWidth or NaturalHeight changes.

2007-09-24  Jb Evain  <jbevain@novell.com>

	* media.cpp|h, playlist.cpp|h: refactor MediaSource so that
	only a SingleMedia deals with the MediaPlay directly. A playlist
	being a collection of either other playlist or singlemedias,
	playing one at a time.

2007-09-24  Jb Evain  <jbevain@novell.com>

	* media.cpp, playlist.cpp: let the Media Sources change
	the state of the MediaElement (Playing/Paused/Stopped).

2007-09-24  Jb Evain  <jbevain@novell.com>

	* media.h: let the media source change the properties
	of the media element. Make MediaSource friend of MediaElement
	to do so.
	* playlist.h, playlist.cpp: adjus to the changes in MediaSource.

2007-09-24  Jeffrey Stedfast  <fejj@novell.com>

	* font.cpp: Added kerning.

	* mplayer.cpp: Added mutex locking for the target_pts variable.

2007-09-24  Jb Evain  <jbevain@novell.com>

	* playlist.cpp: Playlist::IsPlaylistFile: return false
	on null argument.

2007-09-23  Jb Evain  <jbevain@novell.com>

	* playlist.cpp: A base element stores the base in
	a href attribute, not in its body.

2007-09-22  Chris Toshok  <toshok@ximian.com>

	* Makefile.am (USE_XRANDR): define USE_XRANDR.

	* runtime.cpp (Surface::realized_callback): get the RANDR screen
	config info, and set the TimeManager's max refresh to match the
	screen's .

	* clock.h, clock.cpp (TimeManager::SetMaximumRefreshRate): new
	method.

2007-09-22  Zoltan Varga  <vargaz@gmail.com>

	* xaml.h xaml.cpp: Add support for parsing x:Code elements and
	passing them to managed code.

2007-09-21  Jeffrey Stedfast  <fejj@gnome.org>

	* mplayer.cpp (audio_play): Slightly optimized the volume
	adjustment loop.

	* font.cpp (Layout): Keep track of the line ascend and pad our
	extents with an extra pixel on all sides to account for hinting.
	(Render): Starts rendering glyphs 1 pixel in. Also modified the
	logic such that we didn't have to treat path/bitmap glyphs
	differently.

2007-09-21  Jeffrey Stedfast  <fejj@novell.com>

	* font.cpp: Now handles scalable fonts by rendering their outline
	paths rather than rendering bitmaps.

	* moon-path.c (moon_path_move_to): Resize the path auto-magically
	if we don't have enough room. Same for all of the other
	line_to/curve_to/etc.

2007-09-21  Jeffrey Stedfast  <fejj@gnome.org>

	* font.cpp (SetMaxWidth): Oops, set max_width = max (rather than
	the old width extents).
	(Layout): When breaking a long line, the new line height should
	not be set to 0 (duh), it should be set to the font height.

2007-09-21  Rolf Bjarne Kvinge <RKvinge@novell.com> 

	* xaml.cpp, xaml.h: Added a XamlLoaderCalbacks structure that contains all
	  the callbacks XamlLoader needs. Added xaml_loader_set_callbacks for
	  managed code to set them. Keep track of mappings in native code, call
	  into managed code only if a mapping is not found here. Keep a list of
	  missing assemblies, allows managed code to request downloading of
	  several assemblies before trying to parse xaml again. Added
	  XamlLoader::CreateManagedObject, tries to parse xmlns/name, if
	  successful (and only then), requests a vm to be loaded, before calling
	  into managed code to actually create the managed object.

2007-09-20  Chris Toshok  <toshok@ximian.com>

	* type.cpp, type.cpp.in (types_init_register_events): register the
	LostFocus/GotFocus events.

	* uielement.h: add LostFocusEvent/GotFocusEvent.

	* uielement.cpp (uielement_init): lookup LostFocus/GotFocus events.

2007-09-20  Jeffrey Stedfast  <fejj@gnome.org>

	* text.cpp (InsideObject): Removed.

	* font.cpp (Layout): Add the horiBearingX value of the last glyph
	in each line to the width of said line.
	(RenderGlyphBitmap): Cache the surface and use it as a mask when
	filling so that the true source pattern shows thru.

2007-09-20  Jeffrey Stedfast  <fejj@novell.com>

	* mango.cpp (mango_renderer_draw_glyphs): Cache the paths that we
	render.
	(mango_renderer_show_layout): Instead of having pango render the
	text, do it ourselves using our cached paths from the previous
	call to mango_renderer_layout_path().
	(mango_renderer_layout_path): Clear our cache paths.

2007-09-20  Jeffrey Stedfast  <fejj@novell.com>

	* text.cpp (OnPropertyChanged): Don't dirty actual width/height on
	foreground changes.
	(OnSubPropertyChanged): Same.

	* font.cpp (GetFont): No longer need to pass the size to
	TextFont::Load().
	(TextFont::Load): No longer needs the size argument.
	(TextFont::.ctor): We just get the size from the pattern now.
	(TextFontDescription::CreatePattern): Call FcFontMatch() on our
	generated font pattern here instead of having our lower-level
	TextFont::.ctor do it.
	(TextFont::Ascender): Use the size metrics so that this always
	works properly (at least it seems to).
	(TextFont::Height): Same.
	(TextLayout::Layout): Changed line-height logic a bit for
	LineBreaks.

2007-09-20  Chris Toshok  <toshok@ximian.com>

	* type.cpp.in, type.cpp (LookupEvent): fix this to check in parent
	type event hashes as well if we don't find it in ours.

2007-09-20  Sebastien Pouliot  <sebastien@ximian.com>

	* brush.cpp: Implemented MappingMode for LinearGradientBrush.
	Buttons from Dr Popper are now rendered correctly.

2007-09-20  Chris Toshok  <toshok@ximian.com>

	* typegen.cs (GenerateTypeCpp): add a call to
	types_init_register_events.

	* type.h.in, type.cpp.in: add Type::RegisterEvent,
	Type::LookupEvent, Type::GetEventCount, and Type::GetEventBase.

	* type.cpp.in: add types_init_register_events, which registers all
	the events we care about for all the types.  we do it here to
	guarantee that events have been registered by the time any
	instance code is run for any type.
	
	* dependencyobject.h, dependencyobject.cpp: remove the event
	registration from EventObject, it's moving to Type.  so the Type
	will contain the name to id hash, and the EventObject will only
	contain an array of GSLists, where the index into that array is
	the event's id.
	
	* clock.cpp (clock_init): lookup the static events here.

	* runtime.cpp (runtime_init): same.

	* animation.cpp (animation_init): same.

	* downloader.cpp (downloader_init): same.

	* uielement.cpp (uielement_init): same.

	* src/clock.h, src/uielement.h, src/media.h, src/animation.h,
	src/type.h, src/runtime.h, src/downloader.h: events are static to
	the classes now, instead of being per-instance.

	* src/types.h src/types.cpp: regen.
	
2007-09-20  Sebastien Pouliot  <sebastien@ximian.com> 

	* geometry.cpp: Avoid re-allocating path memory when possible.
	* moon-path.c|h: Added documentation and new moon_path_renew and 
	moon_path_clear functions to reduce memory re-allocations.
	* shape.cpp|h: Avoid re-allocating path memory when possible.

2007-09-20  Sebastien Pouliot  <sebastien@ximian.com>

	* brush.cpp|h: Implemented MappingMode for RadialGradientBrush.
	Bubbles from bubblemark.com are now rendered correctly.

2007-09-19  Sebastien Pouliot  <sebastien@ximian.com>

	* shape.cpp|h: Remove dead code.

2007-09-19  Jeffrey Stedfast  <fejj@novell.com>

	* font.cpp: More fixes to make stuff build/work (more or less).

	* text.patch: Patch to make text layout/rendering use my new code
	rather than pango.

2007-09-19  Chris Toshok  <toshok@ximian.com>

	* text.cpp (TextBlock::Layout): don't insert multiple fg_attrs.

2007-09-19  Sebastien Pouliot  <sebastien@ximian.com>

	* moon-path.c|h: New. Create simple or complex paths without a
	(expensive) cairo_context_t using an API similar to cairo.
	* geometry.cpp|h: Use moon_path functions. Added (still inactive)
	code to compute	bounds for paths.
	* shape.cpp|h: Use moon_path functions. Avoid Cairo extents API 
	for Polylines and Polygons. Still not perfect for large thickness 
	and steep angles but 8-10x faster and better (no artifact left) 
	than previous code, see new xaml animation tests).
	* rsvg.cpp|h: Adapt to use moon-path functions.
	* Makefile.am: Add moon-path.c and moon-path.h to the build.

2007-09-19  Jeffrey Stedfast  <fejj@gnome.org>

	* font.cpp: More hackery.

2007-09-19  Rolf Bjarne Kvinge <RKvinge@novell.com> 

	* panel.cpp: Add a null check.
	* xaml.cpp: Created a list that contains most created elements in order to
	  unref them once parsing is finished (we need to unref all created
	  elements except the top one, but the parser callback functions don't
	  know which is the top one, so we delay the unrefing until the end). If
	  parsing is done manually (*_from_str, etc), just use unref.
	* text.h, text.cpp: Add text_destroy to properly destroy the default
	  foreground brush on shutdown.
	* clock.cpp: When we allocate a clock, unref it after adding it to the
	  group.
	* collection.h: Store the parent in the Node, since we can't call
	  obj->GetParent () in a destructor (it will walk up the hierarchy using
	  the type system, but since the parent can be in the destructor, the type
	  system isn't reliable anymore).
	* mango.h, mango.cpp: MangoAttrForeground: hold a reference to the
	  foreground brush, not to the element. Add a mango_renderer_get_type_safe
	  that can reinitialize static variables (after a libmoon reload) from
	  glib.
	* geometry.cpp, transform.cpp, brush.cpp: Use Value::CreateUnref for default
	  values.
	* collection.cpp: Store the parent in the Node, since we can't call
	  obj->GetParent () in a destructor (it will walk up the hierarchy using
	  the type system, but since the parent can be in the destructor itself,
	  the type system isn't reliable anymore).
	* dependencyobject.cpp: Attachee: don't hold a ref to the container anymore.
	* media.cpp: Sprinkle a few unrefs here and there.
	* animation.cpp: Don't ref root_clock, CreateClock already gives us a ref.
	  Add a null check in the Storyboard destructor. Use Value::CreateUnref
	  for default values.
	* runtime.cpp: Attach: Don't attach a null element. Call text_destroy on
	  shutdown.

2007-09-18  Jeffrey Stedfast  <fejj@gnome.org>

	Continued fixes to go along with Rolf's other TextBlock leak
	fixes.

	* mango.cpp (mango_attr_foreground_new): Don't ref the fg.
	(mango_attr_foreground_destroy): Don't unref the fg.

	* text.cpp (default_foreground): Make return a static reference.
	(Layout): Don't ref the fg.

2007-09-17  Jeffrey Stedfast  <fejj@gnome.org>

	* font.cpp: more progress on text layout.

2007-09-17  Rolf Bjarne Kvinge <RKvinge@novell.com> 

	* xaml.cpp, xaml.h: Move callbacks from PluginXamlLoader back to XamlLoader.

2007-09-17  Rolf Bjarne Kvinge <RKvinge@novell.com> 

	* xaml.cpp: Fix warning.

2007-09-17  Rolf Bjarne Kvinge <RKvinge@novell.com> 

	[Removed mono dependency for 1.0 moonlight applications. 
	We now have a native [Plugin]XamlLoader that is the native counterpart of the 
	managed Loader object, the native loader handles xaml loading when the 
	mono runtime isn't loaded.]

	* xaml.cpp, xaml.h: Added a XamlLoader class that replaces the callbacks.
	  Changed xaml_create_from* to take a loader (XamlLoader*) argument. This
	  was necessary because the callback handler isn't given enough
	  information (it needs to know the plugin, but this information is not
	  passed on), and it now also avoids the potential problem of overwriting
	  static callbacks when several plugins are created simultanously.
	* control.cpp, demo.cpp: Update according to API change.

2007-09-17  Rolf Bjarne Kvinge <RKvinge@novell.com> 

	* panel.cpp, dependencyobject.cpp, dirty.cpp: Add some null checks.

2007-09-14  Jeffrey Stedfast  <fejj@novell.com>

	* font.cpp|h: New font/text rendering engine (e.g. replacement for
	pango). Nowhere near complete yet.

2007-09-14  Miguel de Icaza  <miguel@novell.com>

	* media.cpp (Stop, Pause): Do not dereference source if it is not
	yet set (TopBanana does this).

2007-09-13  Jb Evain  <jbevain@novell.com>

	* media.cpp|h, playlist.cpp|h: Work on playlist integration.

2007-09-10  Jeffrey Stedfast  <fejj@novell.com>

	* mplayer.cpp (StopThreads): When resetting current_pts and
	target_pts, use the audio (or video) initial_pts value rather than
	0 since they are meant to be absolute pts values, not
	relative. This fixes a bug in the halo3 site where pressing Stop
	would cause the current time string to become "59:55" when it
	should have been "00:00".

	* media.cpp (OnPropertyChanged): Only Invalidate() on
	PositionProperty changes if we have video content to render. Fixes
	bug #82474.

	* mplayer.cpp (HasVideo): New method that returns true if the
	media source has video content.

2007-09-10  Jeffrey Stedfast  <fejj@gnome.org>

	* mplayer.cpp (Duration): Only use audio duration as the defacto
	duration if we've got a valid pcm handle.

2007-09-10  Chris Toshok  <toshok@ximian.com>

	* animation.cpp (HookupAnimationsRecurse): make the message
	involving failure to hookup a property more verbose.  Looks like
	MS is treating a TranslateTransform as a ScaleTransform in popfly
	- that is, they're trying to animate ScaleX on a
	TranslateTransform (which is oddly enough named "scale".)

	* media.cpp: Emit ImageFailedEvent if we failed to load the image.
	Remove that damn TODO printf.

	* media.h: add ImageFailedEvent to Image, and change signature of
	CreateSurface so we can return false if there's an error.

	* xaml.cpp (parser_error): use the new ParserErrorEventArgs ctor.

	* error.h: make these classes instead of structs, and also make
	them copy/free the type specific strings.  it'll result in more
	allocations but it cleans up the code using them.

2007-09-07  Sebastien Pouliot  <sebastien@ximian.com>

	* shape.cpp: Fixed Polygon "special" case when it only has to draw
	a line. Fixed Line::ComputeBound (Shape::ComputeBoundFast wasn't 
	working) which is now 10x faster than calling ComputeBoundSlow (the
	working alternative). Started to reuse the same concept for Polyline
	and Polygon but the (#def-out) code doesn't yet handle line joins 
	correctly (so it still use the correct ComputeBoundSlow);

2007-09-06  Chris Toshok  <toshok@ximian.com>

	* dirty.cpp (process_dirty_elements): some guards against unioning
	an empty rectangle.

2007-09-06  Chris Toshok  <toshok@ximian.com>

	* runtime.cpp (Surface::Invalidate): only invalidate the actual
	rectangle.  The +1/-2 stuff is done in dirty.cpp, if it needs to
	be.

	* rect.h (Rect::Floor): drop fractional part of all values.

	* media.h,media.cpp: we cheat and turn off AA on MediaElements
	when they aren't rotated or skewed.

	* uielement.h, uielement.cpp: we need to keep track of 2
	dirty_rects.  one for the element itself, which is GrowBy(1)'ed in
	dirty.cpp if the child uses AA, and one for children who have
	passed their invalidation rect up the tree (we don't grow this
	one).  Also, add the default UseAA method, which returns true, and
	the ChildInvalidated method, which mirrors Invalidate(Rect r) but
	uses the children_dirt_rect.

	* panel.h, panel.cpp (Panel::~Panel): clear our children
	collection.
	(Panel::FindStartingElement): the meat of the optimization hack -
	we determine if we can skip parts of the tree if the expose
	rectangle exists completely within the bounds of an opaque
	element, unrotated, unskewed element.
	
	* dirty.cpp (process_dirty_elements): handle
	item->children_dirty_rect as well as item->dirty_rect.  Also, Grow
	the item's dirty_rect by 1 before combining them, if the item uses
	AA.

2007-09-05  Jb Evain  <jbevain@novell.com>

	* playlist.cpp: the asx format is case insensitive, parse it
	accordingly.

2007-09-05  Sebastien Pouliot  <sebastien@ximian.com>

	* animation.h: Make KeySpline::GetObjectType virtual.

2007-09-05  Jb Evain  <jbevain@novell.com>

	* playlist.cpp, playlist.h: work on playlist parsing.

2007-09-05  Jb Evain  <jbevain@novell.com>

	* xaml.h: export timespan_from_str.

2007-09-05  Jb Evain  <jbevain@novell.com>

	* list.h, list.cpp: add Remove(Node) and RemoveAt(int) method.

2007-09-04  Chris Toshok  <toshok@ximian.com>

	* media.cpp (Image::Render): unref the backing pixbuf as soon as
	possible.
	(Image::CleanupSurface): guard against double unreffing the
	backing pixbuf.

2007-09-04  Chris Toshok  <toshok@ximian.com>

	* xaml.cpp (xaml_set_property_from_str): delete the color.
	(dependency_object_set_attributes): same.

2007-09-04  Chris Toshok  <toshok@ximian.com>

	* media.cpp (Image::CreateSurface): if we need to create a new
	surface, make sure to unref the old one.

	* geometry.cpp (PathGeometry::PathGeomtry): use
	Value::CreateUnrefPtr (bad name, imo, but eh)
	(PathFigure::PathFigure): same.

2007-09-04  Jb Evain  <jbevain@novell.com>

	* playlist.h, playlist.cpp: Work on the overall design.

2007-09-04  Jeffrey Stedfast  <fejj@novell.com>

	* brush.cpp (image_brush_create_pattern): Revert previous patch as
	it broke test suite.

2007-09-04  Jb Evain  <jbevain@novell.com>

	* list.h, list.cpp: add a List::ForEach method.

2007-09-04  Jeffrey Stedfast  <fejj@novell.com>

	* brush.cpp (image_brush_create_pattern): Set CAIRO_FILTER_FAST
	(based on lewings performance patch).

2007-09-04  Sebastien Pouliot  <sebastien@ximian.com>

	* text.h|cpp: TextBlock actual_[height|width] are already cached 
	because they're expansive to calculate. Make sure we don't compute
	them until they're really required (e.g. when a lot of properties
	changes when loading an XAML file).

2007-09-04  Chris Toshok  <toshok@ximian.com>

	* animation.cpp (KeyFrameAnimation_ResolveKeyFrames): add the
	keyframes in reverse order so the sort works.

2007-09-04  Jeffrey Stedfast  <fejj@novell.com>

	* list.cpp (Insert): Fixed.

	* runtime.cpp (render_cb): Added some "FPS" debug spew.

	* media.cpp (AdvanceFrame): On MediaEnded, don't remove the source
	timeout id, by returning false, it is removed for us.

Tue Sep 4 17:50:24 CEST 2007 Paolo Molaro <lupus@ximian.com>

	* media.cpp: fix memory leaks and crashes when a download gets
	aborted.

2007-09-04  Jeffrey Stedfast  <fejj@novell.com>

	* mplayer.cpp: Changed all pts variables to int64_t from uint64_t
	as that seems to be what ffmpeg uses internally. Also added a new
	'eof' state so that we can easily tell if we've reached the end of
	the media stream (eof is true and no packets queued).

2007-09-04  Rolf Bjarne Kvinge <RKvinge@novell.com> 

	* media.h, media.cpp: If we get a play request before the media is loaded,
	  save the request and start playing when the media is loaded. Hopefully
	  this is what MS is doing.

2007-09-04  Jeffrey Stedfast  <fejj@gnome.org>

	* collection.cpp (Clear): Use list->IsEmpty () as it is cheaper
	than comparing the Length() to 0.

	* list.cpp: Added more tests.

2007-09-03  Sebastien Pouliot  <sebastien@ximian.com> 

	* rect.cpp: Safer IsEmpty (handles negative values)
	* shape.cpp: In Shape::ComputeBoundsSlow make empty shape returns
	empty bounds. In Shape::DoDraw avoid call to  cairo_set_matrix if 
	shape is empty.

2007-09-03  Sebastien Pouliot  <sebastien@ximian.com>

	* media.cpp: Fix premul and remove confusing macro.

2007-09-03  Rolf Bjarne Kvinge <RKvinge@novell.com> 

	* clock.cpp, uielement.cpp, trigger.cpp, panel.cpp, animation.cpp,
	  canvas.cpp, namescope.cpp: Plug some leaks.
	* value.h.in, value.h, value.cpp: Added CreateUnrefRef and CreateUnref.
	* dependencyobject.cpp: free_attachee: unref the contained dob. Use
	  base_unref () instead of accessing the pointer in a few places to allow
	  for null pointers.
	* debug.cpp: get_stack_trace is now able to get meaningful data for managed
	  parts of the stack trace as well.

2007-09-03  Rolf Bjarne Kvinge <RKvinge@novell.com> 

	* list.cpp: List::Unlink: Link my neighbours to eachother.

2007-09-01  Sebastien Pouliot  <sebastien@ximian.com>

	* rect.cpp: Fix union with empty rectangles (so x and y are not
	assigned to 0 resulting in large bounds). Fix IsEmpty.
	* shape.cpp: Fix possible division by 0, resulting in infinite 
	values (and much too large bounds)

2007-08-31  Jeffrey Stedfast  <fejj@novell.com>

	*.cpp: Updated for the slightly different List API (list nodes no
	longer have Next() or Prev() methods, just access the pointers
	directly).

	* animation.cpp: Made sorted_list a GPtrArray and updated to use
	g_ptr_array_insert_sorted(). Also, a lot of the 'list' (not
	sorted_list) accesses assumed nodes were of type KeyFrameNode,
	which they were not. Fixed.

	* xaml.cpp: Made XamlElementInstance.dtor virtual.

	* collection.h: Made the Collection::Node.dtor virtual.

	* list.cpp: Rewritten, if we add a virtual .dtor to List::Node, we
	can no longer guarantee that List::Node->next will have the same
	address as the List::Node object and so the list implementation
	broke. This rewrite is a bit less fancy, but doesn't rely on that
	feature.

2007-08-31  Sebastien Pouliot  <sebastien@ximian.com> 

	* media.cpp, panel.cpp, shape.cpp, text.cpp: Calling GrowBy 
	doesn't	change the current rectangle (but returns a new one).
	However everything seems to work, so they are probably not needed.

2007-08-31  Jeffrey Stedfast  <fejj@novell.com>

	* text.cpp (OnPropertyChanged): Need to Invalidate() too.

2007-08-31  Rolf Bjarne Kvinge <RKvinge@novell.com> 

	* runtime.h, runtime.cpp: Implement fullscreen support, drawing_area does
	  now reference either the fullscreen drawing area or the normal drawing
	  area. Refactored drawing area initialization and destruction into
	  seperate methods. Modified ConnectEvent to be able to specify whether
	  the drawing area should attach to realize/unrealize events (fullscreen
	  drawing area shouldn't). Only emit ResizeEvent if we're not in
	  fullscreen mode. Added normal_height/width, contains the size of the
	  surface when not in fullscreen (as opposed to screen_height/width for
	  fullscreen mode). Height/width now contains the actual size of the area
	  where we draw, whether in fullscreen mode or not.

2007-08-31  Sebastien Pouliot  <sebastien@ximian.com> 

	* shape.cpp: #ifdef out an optimization that doesn't work with
	ComputeBoundsSlow (a specified stroke brush, with a thickness of 0,
	wouldn't render at all with it's fill brush). Added same shortcut 
	(as before) for Shape::ComputeBoundsSlow.

2007-08-31  Sebastien Pouliot  <sebastien@ximian.com>

	* shape.cpp: Added a shortcut in Shape::ComputeBoundsFast when shapes
	are known to be empty (UIElement::SHAPE_EMPTY).

2007-08-31  Rolf Bjarne Kvinge <RKvinge@novell.com> 

	* shape.h, shape.cpp: Revert to the old CanFill method for shapes,
	  apparently a point is inside a shape unregarding to whether it's filled
	  or not, unlike geometries.

2007-08-30  Sebastien Pouliot  <sebastien@ximian.com> 

	* shape.cpp: Better degenerate handling for round-rectangles and 
	for ellipses.

2007-08-30  Chris Toshok  <toshok@ximian.com>

	* collection.h, collection.cpp: change the prototype of
	Collection::Add, ::Insert, and ::SetVal to return bool.  Make the
	subclasses check the return value before doing their type specific
	handling of the child.  Fixes the crash from invalid xaml in
	alan's testcase.

	* animation.h, animation.cpp: track collection api change.

2007-08-30  Chris Toshok  <toshok@ximian.com>

	* collection.cpp (Collection::Add): make the warning a lot more
	useful if the child isn't of the right type.

2007-08-30  Rolf Bjarne Kvinge <RKvinge@novell.com> 

	* xaml.cpp: Unref the namescope.
	* debug.h, debug.cpp: Added. Implemented get_stack_trace and
	  print_stack_trace.
	* clock.cpp: Unref the _instance.
	* dependencyobject.h, dependencyobject.cpp: Implement object tracking for
	  debug purposes. It's able to log to console object creation,
	  destruction, ref/unrefs with a stacktrace with C++ unmangled function
	  names, file and line number. Keep a count of created and destroyed
	  objects, and a list of objects still alive. Ref and unref attached
	  objects, and free the attachees when we're deleted.
	* animation.h, animation.cpp: Add animation_destroy, and destroy the default
	  dependency property for a few properties.
	* type.cpp, type.cpp.in: Initialize Type::types to NULL.
	* runtime.cpp: Add a g_type_inited to avoid initializing g_types several
	  types. Call animation_destroy on shutdown, and add some object tracking
	  output to runtime_init and runtime_shutdown.
	* Makefile.am: Added debug.*.

2007-08-30  Sebastien Pouliot  <sebastien@ximian.com> 

	* shape.cpp: In some degenerate cases Radius[X|Y] can be ignored 
	for rectangles.

2007-08-30  Jeffrey Stedfast  <fejj@novell.com>

	* mplayer.cpp (AdvanceFrame): If there is no video stream, return
	based on audio state. Also, if current_pts >= target_pts already,
	return true rather than false to pretend we advanced a frame (it's
	really not that important to our caller, all the value is used for
	is updating position).

2007-08-30  Sebastien Pouliot  <sebastien@ximian.com> 

	* shape.cpp: Handle negative values for Height and Width (not 
	drawn) and for Radius[X|Y] (absolute values).

2007-08-30  Jb Evain  <jbevain@novell.com> 

	* media.h, media.cpp: introduce a new MediaSource class that a
	MediaElement uses, so we can have either a SingleMedia or a Playlist
	as a source.
	* playlist.cpp, playlist.h: added
	* Makefile.am: add the previous files.

2007-08-30  Sebastien Pouliot  <sebastien@ximian.com> 

	* shape.cpp: Fix small rectangle fills when no stroke brush is 
	specified.

2007-08-29  Jeffrey Stedfast  <fejj@novell.com>

	* text.cpp (OnPropertyChanged): Don't recalculate width/height nor
	bounds on TextProperty change explicitly, it should already be
	recalculated later in the function in the same place it gets
	reclauclated for other property changes.
	(ComputeBounds): Updated to work the same as the rest of the
	elements work.

2007-08-29  Sebastien Pouliot  <sebastien@ximian.com> 

	* shape.cpp: Fix ComputeBoundsFast to consider the stroke 
	thickness

2007-08-29  Sebastien Pouliot  <sebastien@ximian.com>

	* shape.cpp: Fix Path::BuildPath cairo_path_t caching as we modify 
	the path after we get a copy of it. Remove the now unrequired 
	clipping inside the *::BuildPath for StretchUniformToFill.

2007-08-29  Jeffrey Stedfast  <fejj@novell.com>

	* media.cpp (Render): Cache the pattern matrix.
	(DownloaderComplete): Remove the assert and simply handle that
	case by returning (which defers the call until OnLoaded).

2007-08-29  Rolf Bjarne Kvinge <RKvinge@novell.com> 

	* runtime.cpp: Initialize the FullScreen variables. Helps a lot in
	  making things consistent.

2007-08-29  Chris Toshok  <toshok@ximian.com>

	* merged delayed-rendering-branch branch to head.  ChangeLog is:
	
	2007-08-28  Chris Toshok  <toshok@ximian.com>

		* control.cpp (GetTransformFor): change this to act as
		Canvas::GetTransformFor does - we only put in the transform from
		parent to child here - don't include the parent's transform as
		well.  Fixes the airlines demo.

	2007-08-28  Chris Toshok  <toshok@ximian.com>

		* dirty.cpp (process_dirty_elements): use a different method for
		checking if against the toplevel canvas, and also use
		UIElement::parent instead of DependencyObject::GetParent() to get
		controls working a little better than before.

		* control.h, control.cpp: remove UpdateTransform.  this is handled
		by the dirty.cpp code now.

		* dependencyobject.h, dependencyobject.cpp: copy over the
		event_object_{add,remove}_event_handler change from the trunk so
		we can continue to work with HEAD olive.

	2007-08-22  Chris Toshok  <toshok@ximian.com>

		* uielement.cpp (Invalidate): don't actually invalidate the
		element unless it's visible.
		(OnPropertyChanged): the above change requires us to invalidate
		the element before setting the flags (in the case where we're
		hiding an element).

	2007-08-21  Jeffrey Stedfast  <fejj@novell.com>

		* media.cpp (ComputeBounds): Use the FrameworkElement width/height
		unless unspecified, only then should we use video width/height.

	2007-08-21  Chris Toshok  <toshok@ximian.com>

		* uielement.cpp (DoRender): short-circuit rendering of uielements
		when their opacity is 0.

		* dirty.cpp (process_dirty_elements): handle controls.

	2007-08-21  Chris Toshok  <toshok@ximian.com>

		* shape.h: add Shape::ComputeBoundsSlow, which uses the slow
		(cairo_*_extents) codepath for computing bounds.  Use this path
		for polygons, polylines, and paths.  Implement a Line-specific
		fast ComputeBounds.

	2007-08-20  Chris Toshok  <toshok@ximian.com>

		* media.cpp (MediaElement::ComputeBounds): GrowBy(1).
		(Image::ComputeBounds): use bounding_rect_for_transformed_rect.

	2007-08-20  Chris Toshok  <toshok@ximian.com>

		* rect.h, rect.cpp: add bounding_rect_from_transformed_rect.

		* panel.cpp (Panel::ComputeBounds): use the bounding_rect
		call, and Rect::GrowBy

		* media.cpp (MediaElement::ComputeBounds): use the bounding_rect
		call.

	2007-08-20  Chris Toshok  <toshok@ximian.com>

		* shape.h, shape.cpp: move the ellipse bound computing to shape
		instead.

2007-08-29  Rolf Bjarne Kvinge <RKvinge@novell.com> 

	* clock.h: Implement TimeManager::GetObjectType.
	* dependencyobject.h, dependencyobject.cpp: Move all type management down to
	  Base (GetObjectType, Is, GetType, GetTypeName), and implement
	  GetObjectType in the classes that don't do it already. Remove
	  BASE_FLOATS, simplifying ref counting.
	* type.cpp.in, type.h, type.cpp, type.h.in: Added Base and inherited classes
	  that don't already inherit from DependencyObject.
	* runtime.h, runtime.cpp: Add the Fullscreen API (not implemented yet, only
	  raises events), and implement GetObjectType.

2007-08-28  Sebastien Pouliot  <sebastien@ximian.com> 

	* shape.cpp: Fix StretchUniformToFill

2007-08-28  Sebastien Pouliot  <sebastien@ximian.com>

	* shape.cpp: Fix StrokeDashArray and StrokeDashOffset as they now
	(new since refresh?) need to be multiplied with the stroke's 
	thickness

2007-08-28  Jeffrey Stedfast  <fejj@novell.com>

	* text.cpp (Render): Fixed the "no text to render" optimization:
	don't check TextBlock::TextProperty to see if we have any text to
	render, instead check TextBlock::layout (which will have any text
	from inlines as well).
	(OnPropertyChanged): If the TextProperty changes, recalculate the
	layout and bounds.

2007-08-28  Sebastien Pouliot  <sebastien@ximian.com>

	* geometry.h: Add a Path* parameter to Draw as we need to know some 
	stuff (e.g. stroke thickness) in order to detect degenerate cases.
	* geometry.cpp: Handle degenerate case for RectangleGeometry.
	* panel.cpp, uielementy.cpp: Adjust Draw calls for optional Path 
	element (NULL in the case of clipping).
	* shape.cpp|h: Move cairo_path_t caching logic from Path to Shape
	class. Add GetFillRule method. Handle most cases where a large stroke
	thickness change the SL drawing behaviour (wrt Cairo behaviour)
	* uielement.h: Add flags for empty/normal/degenerate shapes

2007-08-28  Rolf Bjarne Kvinge <RKvinge@novell.com> 

	* panel.cpp: InsideObject: The point is only inside us if we have a
	  background, otherwise we act like if we were transparent (which is what
	  we are if we aren't painting anything inside us).
	* geometry.h, uielement.cpp, shape.h: Rename CanFill to IsFilled so that
	  it's closer to what it actually does.
	* shape.cpp: Changed implementation of Shape::CanFill to return true only if
	  we're actually filled, and rename CanFill to IsFilled so that it's
	  closer to what it actually does. 

2007-08-27  Jackson Harper  <jackson@ximian.com>

	* dependencyobject.cpp|h: Don't return Collections when getting
	parents.

2007-08-27  Jeffrey Stedfast  <fejj@novell.com>

	* mplayer.cpp (Play): Always add a timeout, even for audio-only
	media, so that the callback can check if the media has ended and
	emit the MediaEnded event.

	* media.cpp (AdvanceFrame): Emit the MediaEndedEvent.

	* mplayer.cpp (MediaEnded): New convenience function.

2007-08-27  Sebastien Pouliot  <sebastien@ximian.com>

	* shape.cpp: Remove cairo_new_path call in moon_rounded_rectangle
	as this clear any path data in the context (see
	test-path-group.xaml)

2007-08-27  Jeffrey Stedfast  <fejj@novell.com>

	* mplayer.cpp (audio_play): Implement software balance/volume here
	rather than using the system's mixer (as that changes the
	balance/volume for all applications which is a bad thing). Fixes
	bug #82602.

2007-08-27  Rolf Bjarne Kvinge <RKvinge@novell.com> 

	* panel.cpp: InsideObject: only skip checking the children if the
	  point is not in the clipped area.

	* uielement.h, uielement.cpp: Added InsideClip, and moved the
	  corresponding code from InsideObject to InsideClip.

2007-08-27  Sebastien Pouliot  <sebastien@ximian.com>

	* xaml.cpp: Fix calculation for smooth quadatric bezier (T) as seen in
	tests/xaml/test-path-smoothquadraticbezier.xaml

2007-08-27  Rolf Bjarne Kvinge <RKvinge@novell.com> 

	* uielement.h, uielement.cpp: Implement InsideObject here too, the same
	  implementation as Shape has (for our Clip property).
	* frameworkelement.cpp: InsideObject: call new base implementation as well.
	* panel.cpp: InsideObject: don't check our children, the mouse may be over
	  them, but they're not visible for some reason (the parent object might
	  be clipped, etc).

2007-08-27  Rolf Bjarne Kvinge <RKvinge@novell.com> 

	* panel.cpp: Panel::HandleMotion, if we're the captured element, handle the
	  motion event even though the mouse isn't over us.
	* runtime.h: Add a public Surface::GetCapturedElement.

2007-08-24  Jeffrey Stedfast  <fejj@novell.com>

	* mplayer.cpp (StopThreads): Need to reset current_pts to 0 so the
	video frames will update if we seek backwards.

	* uielement.cpp (DoRender): Shortcut out if total_opacity == 0.0

	* media.cpp (UpdateProgress): Use the downloader progress value as
	the buffering progress value as well (since we don't yet stream).
	(DownloaderComplete): Call UpdateProgres() here so that we can
	flush the 100% progress value.

	* downloader.cpp (Write): Update the progress first, so that the
	writer callback can query the actual progress (all data read up to
	and /including/ this point in time).
	(NotifyFinished): Set progress to 100% and emit an event.

2007-08-23  Rolf Bjarne Kvinge  <RKvinge@novell.com>

	* value.h[.in]: Added AsNPObj.
	* type.cpp[.in]: Initialize Type::NPOBJ correctly.

2007-08-23  Rolf Bjarne Kvinge  <RKvinge@novell.com>

	* media.cpp: (DownloaderCompleted): The initial state of media
	elements that aren't autoplayed is 'Paused'.

2007-08-23  Jeffrey Stedfast  <fejj@novell.com>

	* media.cpp (MediaElement): Initialize 'loaded' to false.
	(SetSource): Don't call DownloaderComplete() if we haven't been
	loaded yet.
	(GetValue): Convert to position from ms to TimeSpan ticks.
	(OnLoaded): Set loaded to true and, if we have a downloader which
	has completed the download, call DownloaderComplete() which will
	then open the media file and autoplay if appropriate.
	(OnPropertyChanged): Protect against creating a downloader for an
	empty string uri.

2007-08-23  Jeffrey Stedfast  <fejj@novell.com>

	* media.cpp (DownloaderComplete): If we fail to open, emit the
	MediaFailedEvent and set some default values.
	(OnPropertyChanged): Don't StopLoader() here, do that all in
	SetSource (since SetSource needs to do it anyway).
	(SetSource): Call StopLoader() here and close the MediaPlayer,
	etc.

2007-08-23  Jackson Harper  <jackson@ximian.com>

	* runtime.cpp|h: Make Resize use our event system (so the plugin
	can use it).
	* dependencyobject.cpp|h: Rename the add/remove handler functions
	to not require dependencyobjects.

2007-08-23  Jeffrey Stedfast  <fejj@novell.com>

	* media.cpp (OnPropertyChanged): Don't autoplay here.
	(advance_frame): Do ms->TimeSpan conversion here, too.
	(DownloaderComplete): Instead of calling ::Pause(), just set the
	pause state since the MediaPlayer already starts out in paused
	state.

2007-08-23  Rolf Bjarne Kvinge  <RKvinge@novell.com>

	* clock.h: Add defines and methods to convert between timespans and
	floats.
	* media.cpp: Create a default (empty) Markers collection. When setting
	MediaPlayer time values, convert between ticks (in TimeSpans) and 
	milliseconds (which is what MediaPlayer expects). Emit MediaOpened
	when we're finished downloading a media, and if we're not autoplaying
	it, we're pausing it. Update uses of Value (gint64) constructors.
	* value.cpp|h|h.in: Remove the Value (gint64) constructor and add a 
	Value (gint64, Type::Kind) constructor to avoid mixups between
	INT64 and TIMESPAN values. Check for null before unref'ing a 
	dependency object.
	* xaml.cpp: Update uses of Value (gint64) constructors.
	
2007-08-23  Rolf Bjarne Kvinge  <RKvinge@novell.com>

	* type.[cpp|h].in: Add const's here that were only added manually
	to the generated files.

2007-08-23  Jeffrey Stedfast  <fejj@novell.com>

	* mplayer.cpp: Implemented volume/balance

2007-08-23  Sebastien Pouliot  <sebastien@ximian.com>

	* shape.cpp: Remove unneeded (cairo_close_path) and dead (break)
	code in Polygon::Draw.

2007-08-22  Chris Toshok  <toshok@ximian.com>

	* clock.cpp (Tick): guard against division by zero.  gets
	"monotone" displaying.

2007-08-22  Sebastien Pouliot  <sebastien@ximian.com>

	* shape.cpp|h: Provide GetTransformOrigin on Shape and remove them 
	from Rectangle and Ellipse. Monotone requires that on Path and I can't
	recall the reason I made this (while all the test cases I made still
	work that way).

2007-08-22  Jeffrey Stedfast  <fejj@novell.com>

	* mplayer.cpp (MediaPlayer): Init mixer variables.

2007-08-22  Jeffrey Stedfast  <fejj@novell.com>

	* media.cpp (advance_frame): Don't bother invalidating here, we'll
	do that in OnPropertyChanged() for the PositionProperty.
	(OnPropertyChanged): Invalidate if Position has changed and
	opacity > 0.0f (and we actually have video).
	(ComputeBounds): Use the FrameworkElement width/height if set.
	(GetTransformOrigin): Same.

2007-08-21  Jeffrey Stedfast  <fejj@novell.com>

	* mplayer.cpp (Open): Merged both Open() implementations into a
	single one. We no longer use Open() without passing a uri (since
	Stop() has been implemented in a better way).
	(AdvanceFrame): Keep track of our current pts so that we won't get
	ahead of the audio if called too often.

2007-08-20  Chris Toshok  <toshok@ximian.com>

	* rect.cpp (bounding_rect_for_transformed_rect): oops, got
	MAX2/MIN2 mixed up.

2007-08-20  Chris Toshok  <toshok@ximian.com>

	* rect.h, rect.cpp (bounding_rect_for_transformed_rect): horrible
	name, I know, but we need this functionality.  it's not enough to
	use UL and LR corners of the rectangle when computing the bounding
	rect for a transformed rectangle.  we have to test all 4 points.

	* panel.cpp (ComputeBounds): use
	bounding_rect_for_transformed_rect.

2007-08-17  Chris Toshok  <toshok@ximian.com>

	* dependencyobject.cpp (strcase_equal, strcase_hash): new case
	insensitive hash functions.
	(RegisterFull): the property hash tables (per type, used for
	GetDependencyProperty) need to be case insensitive.

2007-08-17  Chris Toshok  <toshok@ximian.com>

	* xaml.cpp: remove Hidden from the visibility_map.
	(enum_from_str): if we don't see a name we recognize, try to parse
	it as a number.  This could maybe be someplace else.

	* enums.h: remove VisibilityHidden

	* uielement.h, uielement.cpp: remove
	VisibilityHidden/LAYOUT_VISIBLE

	* control.h: remove GetLayoutVisible.

	* panel.cpp (ComputeBounds): switch from item->GetLayoutVisible to
	item->GetVisible, since there's no need to distinguish between the
	two anymore.

2007-08-17  Jackson Harper  <jackson@ximian.com>

	* clock.h: Add ToSeconds utility functions.

2007-08-16  Jeffrey Stedfast  <fejj@novell.com>

	* list.cpp (InsertSorted): For the stable evrsion, work backwards
	instead of forwards (improves performance in the typical case,
	altho we aren't gonna sue this feature anymore - z-sorted lists
	will now be GPtrArrays).

	* garray-ext.cpp|h: New src file containing an extension to
	GPtrArray for inserting an item into a presorted array.

	* collection.cpp (VisualCollection): z_sorted is now a GPtrArray,
	updated all usages of it.

	* panel.cpp (Render): Updated now that z_sorted is an array
	instead of a linked list.

2007-08-16  Jackson Harper  <jackson@ximian.com>

	* xaml.cpp: Transforms can be set as attributes, they are just a
	matrix in string form, that become a MatrixTransform on the
	object.
	- Made the debug a little nicer

2007-08-15  Jackson Harper  <jackson@ximian.com>

	* xaml.cpp: Since the callback setting is now a once per a domain
	thing, we don't want to check if they are already set. The 'are
	they already set' check only worked when we were setting them at
	the beginning of each parsing attempt.  With our current setup it
	was causing everything to get loaded in the same domain.

2007-08-13  Jeffrey Stedfast  <fejj@novell.com>

	* mplayer.cpp (AdvanceFrame): Init frame to NULL so we don't
	segfault if there are no packets in the queue.

2007-08-13  Chris Toshok  <toshok@ximian.com>

	* animation.cpp (*KeyFrame::InterpolateValue): for all the
	keyframes, if we don't have a Value defined, don't bother
	interpolating anything, just return baseValue.

2007-08-13  Chris Toshok  <toshok@ximian.com>

	* collection.cpp: fix merging/unmerging of child namescopes.

	* namescope.h, namescope.cpp: add a flag (merged) and a list of
	child merged namescopes which are searched any time this namescope
	is searched.  Reimplement merge as list->Append, and unmerge as
	list->Remove.

	* dependencyobject.h: add ClearValue, and make GetParent
	inlineable.

	* dependencyobject.cpp: add impl for ClearValue, and remove
	GetParent.  Also, when finding a name we only check non-merged
	namescopes.  The merged ones in the hieararchy will be checked as
	the children of the non-merged ones.  Given that the set of names
	in merged scopes can't overlap, I'm not strictly sure this is
	necessary, except to reproduce Silverlight's faulty lookups after
	subtree removal.

2007-08-10  Jeffrey Stedfast  <fejj@novell.com>

	* collection.cpp (Clear): Unregister the object names.

	* dependencyobject.h (GetName): uhh... just return the value, lets
	not go returning "(null)" in string form.

2007-08-10  Chris Toshok  <toshok@ximian.com>

	* runtime.h, runtime.cpp (key_press_callback): map the gdk keyval
	to the silverlight Key and call s->toplevel->HandleKeyDown.
	(key_release_callback): same.
	(gdk_keyval_to_key): new function, to map between gdk and
	silverlight.
	
	* uielement.h, uielement.cpp: add HandleKeyDown/HandleKeyUp, which
	just package up the args into a structure and Emit the event.

	* enums.h: add the Key enum from the silverlight docs.

2007-08-10  Jeffrey Stedfast  <fejj@novell.com>

	* dependencyobject.cpp (resolve_property_path): Keep track of the
	last '.' so that when we go to get the DependencyProperty, we can
	pass the property name component rather than the full path of the
	property name. Fixes the color fades in Monotone.

2007-08-09  Chris Toshok  <toshok@ximian.com>

	* animation.h, animation.cpp: if any keyframe's keytime changes,
	we need to re-resolve the collection.

2007-08-09  Jeffrey Stedfast  <fejj@novell.com>

	* mplayer.cpp (Play): Only start up the io/audio threads if we
	aren't simply paused (e.g. if they are already alive).
	(IsPlaying): Return true only if playing && !paused.
	(audio_loop): Changed the locking logic to lock outside of the
	loop rather than inside. We now only release the lock inside the
	loop if/when the paused state changes.

2007-08-08  Chris Toshok  <toshok@ximian.com>

	* animation.h: sprinkle Resolve() methods and resolved flags
	around.

	* animation.cpp (Storyboard::HookupAnimationsRecurse): call
	Resolve() on the animation as we recurse.
	(KeyFrameNodeComparer): compare using the keyframe's resolved
	keytime.
	(KeyFrameNodeFinder): nuke.
	(KeyFrameCollection::Add): just mark the collection as needing to
	be resolved.  don't muck with the sorted list here.
	(KeyFrameCollection::Insert): same.
	(KeyFrameCollection::Remove): same.
	(KeyFrameCollection::Clear): also mark the collection as
	unresolved.
	(KeyFrameCollection::GetKeyFrameForTime): use resolved keytime.
	(KeyFrameAnimation_ResolveKeyFrames): implement most of the
	algorithm posted at
	http://msdn2.microsoft.com/en-us/library/ms742524.aspx to resolve
	keytimes of different types.  this is all untested, unfortunately,
	as I can't get non-TimeSpan keytimes to work on SL.
	(*AnimationUsingKeyFrames::GetCurrentValue): use resolved
	keytime.
	(*AnimationUsingKeyFrames::GetNaturalDurationCore): resolve
	the key frames before using sorted_list.
	(*AnimationUsingKeyFrames::Resolve): override the empty
	default, and call KeyFrameAnimation_ResolveKeyFrames.

2007-08-08  Chris Toshok  <toshok@ximian.com>

	* clock.cpp (Begin): make sure we handle clocks that seek in the
	first tick.

2007-08-08  Chris Toshok  <toshok@ximian.com>

	* canvas.cpp (Canvas::Canvas): create a temporary namescope
	whenever we create a canvas.  We need this for animations that are
	started before the canvas is attached to the tree, or in any case
	where FindName is called on code associated with a subtree before
	it's added to the surface.

	* animation.cpp (Storyboard::HookupAnimationsRecurse): turns out
	Storyboard.TargetName can be assigned to the parent storyboard as
	well as the animation.  Loop up the clock hierarchy when looking
	for the targetname.
	
2007-08-07  Chris Toshok  <toshok@ximian.com>

	* animation.cpp, animation.h
	(*AnimationUsingKeyFrames::GetNaturalDurationCore): no need to
	iterate over all the keyframes looking for the last one - just
	look at the last one in the sorted list.

2007-08-07  Jeffrey Stedfast  <fejj@novell.com>

	* media.cpp (SetValue): Only crop position values if we're not
	updating state from the media player (we're allowed to set values
	outside of the duration range from the media player). Also, do our
	seeking here.
	(OnPropertyChanged): Don't do our seeking here because we can't
	get the actual seek position as GetValue()'s override will
	re-query the media player for its actual position.

	* mplayer.cpp (Open): Don't create the threads here anymore,
	create them in Play() instead. Also calculate ahead of time the
	new audio->pts_per_frame value which allows the video to keep even
	better sync with the audio (we used to base this on actual time
	spent playing the audio frame rather which could sometimes be off
	a smidgen).
	(AdvanceFrame): If seek_pts is non-zero, then we need to base
	target_pts on it rather than video->initial_pts (assuming we have
	no audio to sync to).
	(Play): Set playing = true and create the audio/io threads.
	(Close): A lot of the logic has been moved into a new method,
	StopThreads().
	(StopThreads): Stop the threads and reset minimal state.
	(Stop): Call StopThreads() and seek back to the beginning of the
	av stream.
	(Seek): Implemented.
	(Position): Back to subtracting the initial_pts so that we always
	have a range of 0:duration. If seek_pts is set and >target_pts,
	use that rather than target_pts so even if we are in a stopped
	state, querying the position will return expected results.
	(audio_play): Return audio->pts_per_frame rather than the actual
	time difference.

2007-08-06  Jackson Harper  <jackson@ximian.com>

	* xaml.cpp: add VisualCollections.

2007-08-06  Chris Toshok  <toshok@ximian.com>

	* clock.cpp, clock.h: this might be completely wrong and break
	other demos... but childless clockgroups Stop when they hit their
	duration, they don't SkipToFill.  fixes the silverlightclr balls
	demo.

2007-08-06  Larry Ewing  <lewing@novell.com>

	* dependencyobject.h:
	* dependencyobject.cpp:
	* media.cpp:
	* type.h: 
	* type.cpp: add const to the various string apis.

2007-08-06  Jeffrey Stedfast  <fejj@novell.com>

	* mplayer.cpp: Fixes to make it work with media files w/ no audio
	(or where we are unable to play the audio).

2007-08-04  Chris Toshok  <toshok@ximian.com>

	* brush.h, brush.cpp: add VisualBrush.

	* xaml.cpp (xaml_init): hookup VisualBrush parsing.

	* value.h, type.h, type.cpp: sync up the VisualBrush stuff.

2007-08-04  Chris Toshok  <toshok@ximian.com>

	* panel.cpp (Panel::ChildInvalidated): for the Invalidated stuff
	to work properly, panel needs to call
	FrameworkElement::Invalidate, not parent->ChildInvalidated
	directly.

	* uielement.h, uielement.cpp: add an Invalidated event for use by
	the visual brush.
	
2007-08-03  Chris Toshok  <toshok@ximian.com>

	* collection.cpp (Collection::Add, Collection::Insert): reinstate
	jackson's merging code, but only do it if @data's namescope is
	temporary.

	* namescope.h, namescope.cpp: Add {Set,Get}Temporary.

	* xaml.cpp (xaml_create_from_str): set the namescope to be
	temporary if create_namescope is false.
	(xaml_create_from_file): same.

2007-08-03  Chris Toshok  <toshok@ximian.com>

	* panel.h, panel.cpp: add an optimization for the 2 updates that
	travel down the tree (UpdateTotalOpacity and UpdateTransform).
	Since we're already invalidating the panel's bounds (in fact we do
	it before traversing), we can ignore the invalidates which come
	back up the tree from the children.

	* media.cpp, media.h: make NaturalDuration a Duration.  this gets
	the last of roeder's demos sorta working.

2007-08-03  Jeffrey Stedfast  <fejj@novell.com>

	* mplayer.cpp: Whenever we change the 'paused' state, signal to
	the other thread(s) that it has changed so that they can go on
	with their lives immediately rather than waiting for the kernel to
	context switch.

2007-08-02  Chris Toshok  <toshok@ximian.com>

	* control.cpp (GetTransformFor, OnSubPropertyChanged): now, before
	you get your panties in a twist, check this out.  If you have a
	control and set both its Canvas.LeftProperty and that of its root
	object (the return value of InitializeFromXaml), the effects are
	*additive*, yet GetValue on each object returns exactly what you'd
	expect - the value you set on it.  The only reasonable explanation
	for this is that Control has Canvas's layout algorithm c&p'ed into
	it.

2007-08-02  Chris Toshok  <toshok@ximian.com>

	* xaml.h, xaml.cpp: switch the xaml_create_from_{file,str}
	functions to returning DependencyObjects instead of UIElements.
	in javascript you can create arbitrary xaml hierarchies (transform
	groups, brushes, etc).

	* control.cpp: need a cast here due to the above change.

2007-08-02  Chris Toshok  <toshok@ximian.com>

	* runtime.h, runtime.cpp (Surface::Invalidate): add this call, and
	stuff the gtk_widget_queue_draw_area call there.

	* uielement.h, uielement.cpp, canvas.h, canvas.cpp, panel.h,
	panel.cpp, control.h, control.cpp: change the way
	UIElement::Invalidate works.  It used to call GetSurface() which
	would recurse up the tree to the root, and return the Surface*
	back down.  It would then call gtk_widget_queue_draw_area there.
	This left little room for optimization.  Switch everything over to
	using a new method implemented by all container classes,
	ChildInvalidated.  Basically Invalidate's recurse up to the root
	as before, but the actual gtk call happens at the root (well, 1
	level above it.  at the Surface itself).  In the future we can
	freeze Invalidates in container elements when they do things like
	update their transform so we'll just send 1 Invalidate up the
	tree, not N Invalidates for N children.
	
2007-08-02  Jeffrey Stedfast  <fejj@novell.com>

	* media.cpp (DownloaderComplete): Set the CanPause and CanSeek
	properties.

	* mplayer.cpp (~MediaPlayer): Destroy the pause_mutex
	(IsPaused): New method.

	* media.cpp (MediaElement::GetValue): If the Position is being
	requested, query the MediaPlayer.
	(MediaElement::SetValue): Make sure the PositionProperty value is
	within bounds and force it to be if not.
	(MediaElement::Stop): Do nothing if we aren't playing/paused.
	(MediaElement::OnPropertyChanged): Call mplayer->Seek() if the
	position changed.

2007-08-02  Chris Toshok  <toshok@ximian.com>

	* uielement.h, uielement.cpp: propagate opacity changes the way we
	do transform changes.  Store the total opacity of an item in the
	item, as we do with absolute_xform.  This keeps us from doing a
	walk up to the root of the hierarchy every time we have to draw an
	element (which we we were doing before in
	UIElement::GetTotalOpacity.)

	* panel.cpp, panel.h: when we update our total opacity, loop over
	the children telling them to update as well.

	* collection.cpp: propagate the panel's total opacity downward
	into the newly added subtree.

2007-08-02  Chris Toshok  <toshok@ximian.com>

	* uielement.h, uielement.cpp, canvas.h, canvas.cpp: inline
	GetSurface/SetSurface.

2007-08-02  Chris Toshok  <toshok@ximian.com>

	* canvas.cpp (Canvas::OnChildPropertyChanged): return true if we
	handle the property changing.

	* control.h, control.cpp: rip out all the proxying behavior.
	Control now works as a very specialized container.  Imagine if
	Panel had only 1 child, and no generalized way of manipulating it
	(other than initializing it from a xaml fragment), and you have
	Control.

2007-08-01  Larry Ewing  <lewing@novell.com>

	* xaml.cpp: don't ever make the previous point relative.

2007-08-01  Jeffrey Stedfast  <fejj@novell.com>

	* text.h: Removed deprecated enum values for FontWeights

	* media.cpp, mplayer.cpp: Updated to add features newly added with
	the July 2007 release of Silverlight 1.1

2007-07-31  Chris Toshok  <toshok@ximian.com>

	* runtime.cpp (Attach): attach a namescope to the toplevel canvas
	if there isn't one when it's attached.

2007-07-31  Jeffrey Stedfast  <fejj@novell.com>

	* media.cpp: NaturalDuration is actually a TimeSpan, not a
	Duration.

2007-07-31  Chris Toshok  <toshok@ximian.com>

	* media.h, media.cpp: move the MediaBase events to MediaElement.

2007-07-31  Jeffrey Stedfast  <fejj@novell.com>

	* text.h: Added StyleSimulations enum values.

	* xaml.cpp: Updated the StyleSimulations enum mapping.

2007-07-31  Chris Toshok  <toshok@ximian.com>

	* text.h, text.cpp: Glyph.StyleSimulations changed from a char* to
	enum StyleSimulations.

	* xaml.cpp: add stylesimulations enum map.

2007-07-30  Chris Toshok  <toshok@ximian.com>

	* uielement.cpp, uielement.h: add the Tag property.

2007-07-30  Chris Toshok  <toshok@ximian.com>

	* animation.h, animation.cpp: add the three KeyFrameCollection
	subclass types, and switch all references to "KeyFrameCollection"
	to the more specific types.

	* xaml.cpp (xaml_init): make KeyFrameCollection a ghost element
	with Color/Double/PointKeyFrameCollections as subclasses.

	* value.h, type.h, type.cpp: sync up with the KeyFrameCollection
	type changes.
	
2007-07-30  Larry Ewing  <lewing@novell.com>

	* color.cpp: make sure that we size expand 3 digit color
	specifications properly.

2007-07-30  Chris Toshok  <toshok@ximian.com>

	* uielement.h, uielement.cpp: remove InsideObject from here, and
	move its warning to Visual::InsideObject instead.

	* visual.h, visual.cpp: add visual.cpp, and move implementation of
	InsideObject there.

	* Makefile.am (libmoon_la_SOURCES): add visual.cpp

2007-07-30  Larry Ewing  <lewing@novell.com>

	* xaml.cpp: correct smooth path segments to use the correct value for
	cp1 and don't try to make it relative because all the sources are
	absolute.  Test case at http://intertwingly.net/stories/2007/05/06/?icon=caution
	
2007-07-30  Chris Toshok  <toshok@ximian.com>

	* clock.h, clock.cpp: add very naive, probably broken first pass
	at Clock::Seek.

2007-07-30  Chris Toshok  <toshok@ximian.com>

	* geometry.h, geometry.cpp: PathFigure.IsFilled is gone in RC1.

2007-07-30  Chris Toshok  <toshok@ximian.com>

	* brush.h, brush.cpp: track breaking change of the
	Brush.Transform/RelativeTransform properties - they're speced to
	be Transforms, not TransformGroups.

2007-07-29  Chris Toshok  <toshok@ximian.com>

	* collection.h, collection.cpp: change "ResourceCollection" to
	"ResourceDictionary".

	* uielement.cpp: same.

	* type.cpp, type.h, value.cpp, value.h: same.

	* xaml.cpp: same.

2007-07-27  Chris Toshok  <toshok@ximian.com>

	* xaml.cpp (xaml_set_property_from_str): look up the enum map from
	the property name, not the value.

2007-07-27  Chris Toshok  <toshok@ximian.com>

	* transform.h, transform.cpp: cache the transformation matrix once
	we recompute it.  This gives us the responsiveness of delayed
	updating without the cost of calculating the matrix once per
	object associated with it.  a property change just sets the
	"need_update" flag, which causes a recompute on the next
	GetTransform call.

2007-07-27  Larry Ewing  <lewing@novell.com>

	* uielement.cpp: implement initial support for OpacityMask.

2007-07-26  Miguel de Icaza  <miguel@novell.com>

	This implements support for relative MediaElement sources and
	makes all of them go through the downloader, like we do for
	images.
	
	* media.cpp (MediaElement): Do an implementation of SetSource
	similar to the one in Image.   Although there is some code that
	could be shared, the problem is that some parameters get in the
	way.   

	(MediaElement::DownloaderComplete): Move the playback here. 
	
	(StopLoader): Utility routine, factor this out also on the Image
	case, and hook this up to the destructor of Image and
	MediaElement.
	

2007-07-25  Chris Toshok  <toshok@ximian.com>

	* media.h, media.cpp: add the MediaElement events,and emit
	DownloadProgressChanged and CurrentStateChanged.

2007-07-25  Chris Toshok  <toshok@ximian.com>

	* media.h, media.cpp: register the 3 MediaBase events.  now we
	need to figure out where to emit them.

2007-07-25  Jackson Harper  <jackson@ximian.com>

	* value.cpp: Assign the kind for NPOBJs.

2007-07-25  Miguel de Icaza  <miguel@novell.com>

	* openfile.cpp (open_file_dialog_show): Change this method to
	return an array with all the selected files.   

2007-07-24  Chris Toshok  <toshok@ximian.com>

	* runtime.h, runtime.cpp: permit setting of the the surface's
	background color, which is used to fill the widget before we
	render the toplevel canvas.  only do this, though, if the canvas
	is not transparent.

2007-07-24  Chris Toshok  <toshok@ximian.com>

	* runtime.cpp (Surface::Attach): call Canvas::SetSurface instead
	of making the assignment.

	* canvas.h, canvas.cpp: make surface private, and add SetSurface
	for runtime.cpp to use.

2007-07-24  Chris Toshok  <toshok@ximian.com>

	* brush.h, brush.cpp: make ImageBrush::SetSource take a const
	char*.

2007-07-24  Jackson Harper  <jackson@ximian.com>

	* type.h.in: Add the NPOBJ type.
	* value.h.in: Add the npobj value, it's just stored as a pointer
	so that we don't become dependent on mozilla.
	* value.cpp|h,type.h: sync.

2007-07-24  Jackson Harper  <jackson@ximian.com>

	* typegen.cs: Kind.cs lives in agmono now.


2007-07-24  Chris Toshok  <toshok@ximian.com>

	* media.h, media.cpp: const-ify the PartName argument of the
	SetSource methods.  also, ref the new downloader before unreffing
	the old one in Image::SetSource.  they could be the same object.

2007-07-24  Chris Toshok  <toshok@ximian.com>

	* geometry.cpp (RectangleGeometry::Draw): if the geometry's rect
	is NULL, return early.

2007-07-23  Chris Toshok  <toshok@ximian.com>

	* Makefile.am (libmooninclude_headers): add some missing headers.

	* error.h: split out the error classes here.

	* libmoon.h: include error.h

	* xaml.h: remove the error classes from here.

	* xaml.cpp: include error.h

2007-07-23  Miguel de Icaza  <miguel@novell.com>

	* runtime.cpp: Removed the timer code from here, move to plugin.

2007-07-20  Chris Toshok  <toshok@ximian.com>

	* xaml.cpp (custom_add_child): this method is what's called when
	we add a child to an element of a custom namespace.  Trouble is,
	it might be a panel subclass.  If it is, and the child is a
	UIElement subclass, go ahead and add the child using
	panel_child_add.  This gets the Loaded events working properly in
	the chess demo (the trouble was that the custom children weren't
	even added to the tree, so their OnLoaded methods weren't being
	called)

2007-07-20  Miguel de Icaza  <miguel@novell.com>

	* collection.cpp: Add support for RemoveAt. 

	* runtime.cpp (html_timer_timeout_add): Added helper routine to
	setup Html timeouts.

2007-07-20  Chris Toshok  <toshok@ximian.com>

	* canvas.cpp, canvas.h, panel.cpp, panel.h: move much of the guts
	from Canvas to Panel.  I consider this cleaning up the source, as
	it's entirely possible to write Panel subclasses that aren't
	Canvas subclasses, but if you did that you'd have no
	rendering/event handling.

	Now pretty much all logic that involves iterating over the list of
	children is in Panel.  This also greatly simplifies Canvas.  It is
	now just a Panel with 2 interesting things about it: 1) it
	provides 2 attached properties to lay out its children, and 2) it
	allows the surface to dictate its bounds if it's the toplevel
	element.

2007-07-20  Chris Toshok  <toshok@ximian.com>

	* downloader.cpp (Open): set the uri of the downloader.

2007-07-20  Chris Toshok  <toshok@ximian.com>

	* dependencyobject.cpp: allocate the event hash/ptrarray lazily,
	so the potentially large number of objects which don't register
	events don't allocate them.

2007-07-20  Chris Toshok  <toshok@ximian.com>

	* clock.h, clock.cpp: lock around access to the tick_call list, so
	tick calls can be added from other threads.

2007-07-16  Miguel de Icaza  <miguel@novell.com>

	* media.cpp (SetSource): Also handle Completed.

	* downloader.cpp (Send): If a send operation is performed on an
	object that has completed its operation, immediately emit the
	finished event or error event.

	(Open): During open invalidate the state, to
	ensure that new downloads are properly triggered. 

2007-07-16  Chris Toshok  <toshok@ximian.com>

	* frameworkelement.h, frameworkelement.cpp: we need
	framework_element_new so managed subclasses of FrameworkElement
	are possible.

	* uielement.h, uielement.cpp: same for this type.

2007-07-13  Chris Toshok  <toshok@ximian.com>

	* frameworkelement.cpp (FrameworkElement::OnPropertyChanged):
	normally we'd only update the bounds of this element on a
	width/height change, but if the render transform is someplace
	other than (0,0), the transform needs to be updated as well.

2007-07-12  Chris Toshok  <toshok@ximian.com>

	* runtime.h, runtime.cpp, uielement.cpp, uielement.h: Add mouse
	capturing.  This should be on Visual and not UIElement, but we
	don't dispatch events that way.

2007-07-12  Chris Toshok  <toshok@ximian.com>

	* downloader.h, downloader.cpp: make the Downloader object a bit
	more C++ friendly, and make all the private data private.

	Also, take this opportunity to switch to using RegisterEvent/Emit
	to generate events, instead of the custom listeners.  This will
	let JS hook up to the events.

	* media.h, media.cpp: track the downloader changes.

2007-07-11  Jackson Harper  <jackson@ximian.com>

	* collection.cpp: Comment out the namescope merging stuff for now,
	it causes some regressions.

2007-07-12  Jackson Harper  <jackson@ximian.com>

	* xaml.cpp: Restart the whole attribute parsing loop when the
	reparse flag is set, otherwise the first attribute will be
	skipped.

2007-07-11  Chris Toshok  <toshok@ximian.com>

	* uielement.cpp (UIElement::UIElement): the event names need to
	match those used by microsoft.  makes it easier to handle the
	event hooking up in the plugin, where the event names are used.

2007-07-11  Chris Toshok  <toshok@ximian.com>

	* xaml.cpp (xaml_set_property_from_str): the plugin does its own
	resolution of properties now, so it doesn't need to pass the
	property name.  Change this to take the DependencyProperty*
	instead.

	* xaml.h: change prototype for xaml_set_property_from_str.

2007-07-11  Jackson Harper  <jackson@ximian.com>

	* collection.cpp: When new objects are added to a collection, try
	to merge them into the containers namescope.

2007-07-11  Jackson Harper  <jackson@ximian.com>

	* xaml.cpp: We need to stop parsing if there is an error while
	resolving a custom namespace type.

2007-07-10  Chris Toshok  <toshok@ximian.com>

	* dependencyobject.cpp (resolve_property_path): we need to reset
	"expression_found" when we hit a '.' so that we'll lookup what
	comes after it.

2007-07-10  Chris Toshok  <toshok@ximian.com>
	
	* dependencyobject.cpp (resolve_property_path): we need to be able
	to handle more than just single digit indexers.  use strtol and
	recompute 'i' afterward.

	* canvas.cpp (Canvas::InsideObject): revert the change that helped
	dr.popper because it breaks lunareclipse.

2007-07-09  Chris Toshok  <toshok@ximian.com>

	* demo.cpp: don't pass the parser callbacks to the individual xaml
	functions.

	* control.h, control.cpp: don't pass the parser callbacks to
	initialize_from_xaml.

	* xaml.h, xaml.cpp: remove the parser callbacks from the
	individual parsing methods, and add xaml_set_parser_callbacks.

2007-07-09  Jeffrey Stedfast  <fejj@novell.com>

	* mplayer.cpp (audio_loop): If we break out of the loop because
	the media player was stopped, don't forget to unlock the pause
	mutex.
	(Close): Don't free the uri here.
	(~MediaPlayer): Free it ehre, though.

2007-07-09  Chris Toshok  <toshok@ximian.com>

	* uielement.h, uielement.cpp: we need to register the
	KeyUp/KeyDown events (even if we aren't emitting them) to keep
	from getting a warning when running aglayoutdemo.

	* xaml.cpp (timespan_from_str): port our System.TimeSpan.Parse
	method (and remove all error handling, which should likely go back
	in) and replace the previous implementation.  It was failing to
	parse timespans like this: 0:0:0.20000000 because it was treating
	it as if I wanted "20000000" tenths of a second, instead of 2.
	This makes the 'pop' animation in dr.popper actually show up.
	
2007-07-09  Chris Toshok  <toshok@ximian.com>

	* animation.cpp: fix some missing NotifyAttacheesOfPropertyChange
	calls.
	(Storyboard::Begin): This is a dubious change.  Remove the check
	to see if we weren't already Active.  This fixes the calendar view
	in airlines, since there's a window where the start animation is
	startable when we enter a day, but the end animation isn't (since
	it's still active) when we leave.  So we're left with a selected
	day.

	* clock.cpp: instead of Stopping clocks that come to the end of
	their active period, move to the Filling state.  ClockGroups with
	automatic duration and no Active children still stop correctly.

2007-07-08  Chris Toshok  <toshok@ximian.com>

	* many-files (again!): another, smaller change to the event stuff.
	stop using strings for everything that we can.  Register events at
	object construction time, and use those id's for everything else.
	The string interface is still around because of
	EventTrigger::Set/RemoveTarget, as well as the managed code.

	One further change that's needed - the id's are per-instance now,
	which is stupid.  they should be static.

	This further cuts down the work (in terms of hash functions) that
	needs to be performed in order to dispatch an event.
	
2007-07-08  Chris Toshok  <toshok@ximian.com>

	* many-files: fairly big change.  Stick the EventObject class
	between Base and DependencyObject in the hierarchy, and get rid of
	DependencyObject's "events" field.  Get rid of all the registered
	events on surface, and emit them directly from the elements where
	they occur.  This allows us to remove the Surface* parameter to
	all the event methods.  Also, change the EventHandler signature to
	include the sender of the event as well as a "calldata" pointer,
	which is where we stuff the unmanaged MouseEventArgs (and later
	will the KeyboardEventArgs).

	Next step is to add RegisterEvent in EventObject and use that
	integer id everywhere instead of the string name when we Emit
	events.

2007-07-07  Chris Toshok  <toshok@ximian.com>

	* dependencyobject.h: add GetName() instance method.

	* dependencyobject.cpp (dependency_object_get_name): and call it
	here.

	* shape.h, shape.cpp (Shape::GetSizeForBrush): we need this
	implementation here since FrameworkElement just goes by
	Width/Height.

	* canvas.cpp (Canvas::FindMouseOver): remove the "still over the
	same element" optimization.  it's stupid and doesn't work. what
	was i thinking?
	(Canvas::ComputeBounds): simplify this by using
	item->GetLayoutVisible instead of item->GetValue.
	(Canvas::Render): enable the rendering optimization where we only
	bother rendering elements whose bounds intersect those of the
	rectangle we're repainting.  This seriously speeds up airlines.

	* uielement.cpp, uielement.h: add GetLayoutVisible() method, and
	another flag.  now the three VisibilityProperty states are
	represented by two flags.

	Also, remove the implementation of GetSizeForBrush (not all
	UIElements are stroked) and warn callers.

	* control.cpp: Attach to the real object, and report back its
	property changes to our parents.  Also, control_initialize_from_xaml
	should call Control::InitializeFromXaml.

	* control.h: override the 3 Get*Visible methods from UIElement,
	and return our real_object's state.

	

2007-07-07  Jeffrey Stedfast  <fejj@gnome.org>

	* demo.cpp (FileDownloadState::Send): Only notify complete if uri
	!= NULL (if uri is NULL, then it means it couldn't be opened).
	(FileDownloadState::Open): notify error if we can't open the file.

	* mplayer.cpp: Fix to make sure we have
	AVCODEC_MAX_AUDIO_FRAME_SIZE bytes left in our output buffer
	before calling decode to prevent an ffmpeg warning.

2007-07-07  Chris Toshok  <toshok@ximian.com>

	* brush.cpp: make sure to use GetSizeForBrush for everything
	instead of cairo_stroke_extents, which won't work for non-stroked
	elements like canvases.  Also, notify changes to the
	GradientStopCollection up the hierarchy properly.

	* frameworkelement.h, frameworkelement.cpp: add a GetSizeForBrush
	implementation for FrameworkElement so Canvases (and other
	uielement subclasses) can have brushes assigned to them (canvas
	uses it for its background.)

	* canvas.cpp (Canvas::Render): remove the unused label.

2007-07-06  Miguel de Icaza  <miguel@novell.com>

	* media.cpp: Do not pass the filename as the result now on the
	calls.   Code must use the downloader_get_response_text or
	downloader_get_response_file to get the contents from the download
	(as the request will include the part name).

	* downloader.cpp: Add a cache for zip file parts.

	* media.h (Image): track the part name that was requested on the
	call to SetSource.

2007-07-06  Chris Toshok  <toshok@ximian.com>

	* canvas.cpp (Canvas::ComputeBounds): if the width/height
	framework element properties haven't been set (their default is
	0.0), then don't union it with the rest of our bounds.

2007-07-06  Chris Toshok  <toshok@ximian.com>

	* runtime.h, runtime.cpp: continue the marginalization of
	Surface-as-general-data-dumping-ground by passing the cairo
	context to all the event handlers that need it (all but Leave, but
	should we make this distinction?).
	
	Make tons of stuff private that doesn't need exposing.  Add
	accessors for the easier things, and leave the callbacks public
	for now.  Also clean up the partially C/partially c++
	implementation in runtime.cpp.  Now the C api is a thin wrapper
	around instance method calls, and all the gtk/clock event
	callbacks are static methods so they can still access the private
	data.

	* canvas.h, canvas.cpp, control.h, control.cpp, uielement.h,
	uielement.cpp: fallout from the event signature changes - add
	cairo_t* to a lot of places, basically.

	* demo.cpp: no need to use the C api for Surface here.  just use
	the c++ one.

2007-07-06  Jeffrey Stedfast  <fejj@novell.com>

	* media.cpp (OnPropertyChanged): Oops, be consistant with other
	implementations - only chain up if it wasn't a property owned by
	us.

	* text.cpp: We don't use TextBlock::Inlines anymore, so remove it
	to save object size.

	* media.cpp (OnPropertyChanged): Fixed to always notify property
	listeners and chain up to our parent impl.

2007-07-06  Miguel de Icaza  <miguel@novell.com>

	* downloader.cpp: Implement the zip file support for the
	downloader using miniZip, from:

		http://www.winimage.com/zLibDll/minizip.html

	The implementation is in C++, so there are no needs to delegate
	this to the managed side as previously planned. 

	There are two APIs: one returns a filename, the other returns the
	file loaded into memory, with the size of the memory blob.

2007-07-06  Chris Toshok  <toshok@ximian.com>

	* uielement.h, uielement.cpp (UIElement::OnPropertyChanged): keep
	track of the visibility (boolean, not three-state) and hit test
	visibility state in our flags.  implement GetVisible() and
	GetHitTestVisible() using the flags.

	* canvas.cpp (Canvas::CheckOver): use GetVisible and
	GetHitTestVisible to avoid property lookups when dispatching
	events.

2007-07-06  Chris Toshok  <toshok@ximian.com>

	* runtime.cpp (measuring_context_create): we keep a singleton
	measuring context now.
	(measuring_context_destroy): do nothing here.  it's freed in
	runtime_shutdown.
	(runtime_shutdown): free up our measuring context.

	* canvas.cpp, canvas.h, control.cpp, control.h,
	frameworkelement.cpp, frameworkelement.h, shape.cpp, shape.h,
	text.cpp, text.h, uielement.cpp, uielement.h, visual.h: change
	InsideObject to take the cairo_t* instead of the Surface.
	
2007-07-06  Chris Toshok  <toshok@ximian.com>

	* runtime.cpp (Surface::SetCursor): new method, used in the event
	code to update the cursor as we enter/leave elements.

	* runtime.h: add method, cursor_instance field, and move the body
	of the Surface ctor (and initializations) to the .cpp file.
	
	* xaml.cpp: fix name of Cursor property enum mapping.

	* canvas.h, canvas.cpp, uielement.h, uielement.cpp, control.h,
	control.cpp: add MouseCursor* arg to HandleMotion so we can report
	back cursor changes on elements.

	Also, in canvas.cpp, implement IsHitTestVisible checking in
	CheckOver.

	* enums.h: add the MouseCursor enum.
	
2007-07-05  Chris Toshok  <toshok@ximian.com>

	* Makefile.am (libmooninclude_headers): remove cutil.h
	(libmoon_la_SOURCES): remove cutil.cpp

	* cutil.h, cutil.cpp: remove.  no longer necessary.

	* text.cpp (TextBlock::ComputeBounds): load the identity matrix
	before stroke/fill_extents to work around a cairo bug that was
	giving us enormous bounds on rotated elements.  also, -1 from x/y
	and +2 to width/height of our bounds.

	* media.cpp (MediaElement::ComputeBounds): load the identity
	matrix before stroke/fill_extents to work around a cairo bug that
	was giving us enormous bounds on rotated elements.  also, -1 from
	x/y and +2 to width/height of our bounds.
	(Image::ComputeBounds): same.

	* shape.cpp (Shape::DoDraw): only call cairo_new_path if there's
	no stroke, we drew it, and do_op was true.
	(Shape::ComputeBounds): load the identity matrix before
	stroke/fill_extents to work around a cairo bug that was giving us
	enormous bounds on rotated elements.  also, -1 from x/y and +2 to
	width/height of our bounds.

	* uielement.cpp (OnSubPropertyChanged): we don't need to watch for
	subproperty changes on RenderTransformOrigin, since it's a point
	and not a dependency object.

2007-07-05  Chris Toshok  <toshok@ximian.com>

	* runtime.cpp, runtime.h: store the last mouse position of events
	so that we can continue to update after the clock tick (and
	provide motion/enter/leave events to elements that might have
	moved under the pointer).

	The "update-input" event isn't presently emitted (see clock.cpp)
	because it results in this code calling HandleMotion on every
	tick, which ends up emitting the C# event (which is wrong).

	* clock.h, clock.cpp: add a (presently unused) phase to the clock
	tick to update the current mouse over after we've updated our
	clocks (and therefore possibly updated the transforms on
	elements).

2007-07-05  Chris Toshok  <toshok@ximian.com>

	* dependencyobject.cpp (dependency_object_get_name): change this
	to return the x:Name value if there is one (and "(null)" if not).
	(dependency_object_get_type_name): and make this function do the
	job originally done by _get_name.

	* dependencyobject.h: add dependency_object_get_type_name
	prototype.

2007-07-05  Chris Toshok  <toshok@ximian.com>

	* uielement.h, uielement.cpp, canvas.h, canvas.cpp: refactor the
	mouse event code so that the Handle* calls return void, like the
	Enter/Leave calls do.  Also, all checks for "inside"-ness happen
	in the canvas/parent object.  Also factored out the loop over
	children to "FindMouseOver", with the checks happening in
	"CheckOver".

	This needs more testing to make sure that we're still emitting
	events in the right order/amount as silverlight.

	In uielement.cpp, also add support for showing the bounding
	rectangle.

	* control.h, control.cpp: track event refactoring.

	* frameworkelement.cpp (FrameworkElement::InsideObject): remove
	the bounding rect check.  that's handled in the parent object now.

2007-07-04  Chris Toshok  <toshok@ximian.com>

	* media.cpp, media.h: rework our caching for images.  we now
	properly refcount things, don't leak the filename (or the
	surface), share 1 xlib surface amongst all Image's, and don't
	crash.  improvements all around!

2007-07-04  Miguel de Icaza  <miguel@novell.com>

	* value.cpp (Value): Add a couple of extra cases I had missed
	where we should be using g_new instead of new as FreeValue always
	uses g_free.

2007-07-03  Jackson Harper  <jackson@ximian.com>

	* xaml.cpp: Add the stylus types and some missing collections,
	this brings us up to sync with everything implemented in
	moonlight.

2007-07-03  Chris Toshok  <toshok@ximian.com>

	* shape.cpp (Shape::DoDraw): if we aren't going to stroke (but we
	filled), we need to call cairo_new_path.

2007-07-03  Jackson Harper  <jackson@ximian.com>

	* xaml.cpp: Some post parsing memory cleanup and a little extra
	debug code.

2007-07-03  Chris Toshok  <toshok@ximian.com>

	* text.h: add prototype for text_block_set_font_source.

2007-07-03  Chris Toshok  <toshok@ximian.com>

	* shape.cpp, shape.h: add Shape::OnSubPropertyChanged to deal with
	brush property changes.  Property chain up to
	Shape::OnSubPropertyChanged from Path::OnSubPropertyChanged.
	(Shape::ComputeBounds): we need to do the fill, so pass true as
	consider_fill to DoDraw.  otherwise a stroke-less filled shape
	gets bounds with w == h == 0.0.

2007-07-03  Chris Toshok  <toshok@ximian.com>

	* collection.cpp (VisualCollection::Clear): force the invalidate
	when we update our bounds.  Also, don't do anything if the length
	of the collection is 0.

2007-07-03  Chris Toshok  <toshok@ximian.com>

	* canvas.cpp (Canvas::ComputeBounds): we need to always include
	our FrameworkElement::Width/Height in our bounds computation,
	instead of only consulting them if we have no children.

2007-07-03  Chris Toshok  <toshok@ximian.com>

	* media.cpp, media.h: add an image surface cache.  we don't cache
	the xlib surface unfortunately, so there's still a slowdown from
	generating 1 per Image for shared pixbufs.
	
2007-07-03  Miguel de Icaza  <miguel@novell.com>

	* collection.cpp: Add support for reporting errors if the iterator
	gets out of sync with the collection.

	* demo.cpp: Updated to the new downloader interface.

	* downloader.cpp: Eliminates the in-memory buffer during
	download. 

	We still do the progressive updates as those are necessary for the
	progress indicators, and if we ever need to hook up during
	progressive downloads again.   

	But now downloads on completion must notify the downloader of the
	local file where the download contents have been placed (necesary
	for implementing the Zip-file support).

	(Downloader): eliminate our in-memory buffer byte_array_contents 

	(downloader_notify): takes a new extra argument, overloaded
	depended on the operation.
	
	(get_response_text): currently not implemented, it needs to be
	implemented by a callback into managed code so we can use ZipLib
	(unless we can find a suitable unmanaged version).

	* media.cpp: Remove the stale code for progressive image
	downloads. 
2007-07-02  Miguel de Icaza  <miguel@novell.com>

	* media.cpp (SetSource): If we had a previous downloader, unref
	it.  

2007-07-02  Chris Toshok  <toshok@ximian.com>

	* collection.cpp (VisualCollection::Remove): punt on the optimized
	behavior for now.  invalidating just the item should work if the
	item's bounds are correct, but for some reason the map path
	segments in the airline demo aren't redrawing properly.  So, for
	now we just invalidate the parent container when an item is
	removed.

	* control.h, control.cpp: override GetValue to report back values
	from our real_object if there is one, from us otherwise.  and
	override SetValue to set values both on us and the real_object if
	there is one.

	Also, do nothing in our ComputeBounds call.  Our GetBounds always
	returns the right thing (the bounds of the real_object), so
	there's no need to do any computation.

	lastly, remove the OnChildPropertyChanged. This is only invoked
	for attached properties, so we shouldn't ever be called.

2007-07-02  Chris Toshok  <toshok@ximian.com>

	* canvas.cpp (Canvas::OnChildPropertyChanged): we don't need to
	updatebounds/invalidate here.  UpdateTransform will take care of
	that for us.

2007-07-02  Chris Toshok  <toshok@ximian.com>

	* shape.cpp (Shape::OnPropertyChanged): turns out we need to
	update our bounds on the FillProperty changing as well, for shapes
	that aren't stroked.

2007-07-02  Miguel de Icaza  <miguel@ximian.com>

	* collection.cpp: Guard for cases where we are not attached to
	anything (closure is set to NULL).

2007-07-02  Chris Toshok  <toshok@ximian.com>

	* collection.cpp (collection_iterator_move_next): rework the logic
	here so we don't do the "current = next" assignment if
	iterator->first is true.
	(VisualCollection::Add): fix g++ warning.
	(TriggerCollection::SetVal): return the old element.

2007-07-02  Jackson Harper  <jackson@ximian.com>

	* xaml.cpp: Convert char data into Runs and set them on
	TextBlocks, also flush the char data when starting elements, so
	things like: <TextBlock>line one<LineBreak />line two</TextBlock>
	work properly. <TextBlock><TextBlock.Inlines>text... is illegal
	though.

2007-07-02  Miguel de Icaza  <miguel@novell.com>

	* value.cpp: Use g_malloc/g_free as the managed code is not able
	to use C++ new operator, so we have a potential error when we
	mismatch g_new with new and g_free with delete. 

	Reported by Valgrind.

	* uielement.cpp: Add new helper method needed by Alan.

2007-07-01  Chris Toshok  <toshok@ximian.com>

	* frameworkelement.cpp (FrameworkElement::OnPropertyChanged):
	notify attachees here.

	* text.cpp (TextBlock::OnPropertyChanged): need to notify on
	Actual Width/Height property changes, even if we don't recalc
	anything.

2007-07-01  Chris Toshok  <toshok@ximian.com>

	* panel.cpp (Panel::OnSubPropertyChanged): oops, didn't follow the
	guidelines here.  need to chain up to FrameworkElement.  fixes
	airline demo.

2007-07-01  Chris Toshok  <toshok@ximian.com>

	* shape.cpp (Line::OnPropertyChanged): use recommended pattern.
	(Polygon::OnPropertyChanged): same.
	(Path::OnPropertyChanged): same.
	(Shape::OnPropertyChanged): same.
	(Rectangle::OnPropertyChanged): same.

	* geometry.cpp (GeometryGroup::OnPropertyChanged): use recommended
	pattern.
	(PathGeometry::OnPropertyChanged): same.
	(PathFigure::OnPropertyChanged): same.

	* brush.cpp (Brush::OnPropertyChanged): use the recommended
	pattern.
	(SolidColorBrush::OnPropertyChanged): same.
	(GradientBrush::OnPropertyChanged): same.
	(LinearGradientBrush::OnPropertyChanged): same.
	(RadialGradientBrush::OnPropertyChanged): new method.


	* brush.h: add RadialGradientBrush::OnPropertyChanged.

	* animation.cpp (animation_init): mark the storyboard TargetName
	and TargetProperty properties as attached.

	* text.cpp (Inline::OnPropertyChanged): follow recommended pattern
	for chaining.
	(Run::OnPropertyChanged): same.
	(Inline::OnSubPropertyChanged): add to handle the inline's
	foreground brush changing.

	* text.h: add Inline::OnSubPropertyChanged.

	* panel.h, panel.cpp: add OnSubPropertyChanged for the panel's
	background brush, and invalidate whenever it changes.

2007-06-30  Chris Toshok  <toshok@ximian.com>

	* shape.cpp (Shape::OnPropertyChanged): when need to update our
	bounding rectangle when a number of the stroke properties change.
	Also update them when the stroke itself is changed.

2007-06-29  Chris Toshok  <toshok@ximian.com>

	* text.cpp, text.h: Add back in TextBlock::OnSubPropertyChanged -
	we need it for the foreground property.  Make this explicit.
	also, add an OnSubPropertyChanged method for Glyphs, to handle the
	FillProperty.

2007-06-29  Chris Toshok  <toshok@ximian.com>

	* uielement.cpp (UIElement::UpdateBounds): oops.  really only do
	that invalidate if the flag is true.

2007-06-29  Chris Toshok  <toshok@ximian.com>

	* text.cpp: Do CalcActualWidtHeight on any property that might
	cause a change.  This is going to be a performance hit, but we
	need to take this step backward to get things working with the new
	ComputeBounds stuff.  we'll need to reoptimize this so that it
	still works.  Make sure to listen to OnCollectionChanged so we'll
	update our bounds (and recompute our actual width/height) on
	Inlines collection changes.

	* text.h: remove OnSubPropertyChanged (since it's not used.)  Add
	OnCollectionChanged.
	
2007-06-29  Chris Toshok  <toshok@ximian.com>

	* uielement.cpp (UIElement::OnPropertyChanged): reformat this so I
	can actually read it, and notify attachees of our property
	changes.  this makes ZIndex setting resort the parent panels list.

	* uielement.h: add an arg to UpdateBounds (a bool that defaults to
	false) to force an invalidation of the new bounds.

2007-06-29  Chris Toshok  <toshok@ximian.com>

	* panel.h, panel.cpp: okay, i'm stupid.  it's not
	OnChildPropertyChanged either.  it's OnCollectionChanged.  we
	seriously need to clean this stuff up.

2007-06-29  Chris Toshok  <toshok@ximian.com>

	* panel.h, panel.cpp: child ZIndex property changes are reflected
	via OnChildPropertyChanged, not OnSubPropertyChanged.

2007-06-28  Chris Toshok  <toshok@ximian.com>

	* canvas.cpp (Canvas::ComputeBounds): fix the debug printf's.

	* collection.cpp (VisualCollectoin::Clear): update the panel's
	bounds after the clear so we redraw everything.

2007-06-27  Chris Toshok  <toshok@ximian.com>

	* uielement.h: stop using x1,y1,x2,y2 for bounds, use a Rect
	instead.  Also, rename getbounds to ComputeBounds(), and add a new
	GetBounds which returns the bounding rectangle.

	* canvas.cpp (Canvas::ComputeBounds): rename GetBounds to this.
	Simplify it a bit by using Rect's instead of the 4 doubles.  Note
	that the calls to item->GetBounds do *not* cause item's bounds to
	be computed.
	(Canvas::OnChildPropertyChanged): just call UpdateTransform on the
	child when its Left/Top properties change.
	(Canvas::HandleMotion): use Rect.PointInside to clean up the
	check.
	(Canvas::HandleButton): same.
	(Canvas::Render): remove the local "item_rect" and just use the
	item's bounds.

	* uielement.cpp (UIElement::UpdateBounds): remember the old
	bounds, compute the new bounds, and (if they're different)
	invalidate both and chain up to the parent's UpdateBounds method.
	(UIElement::UIElement): init the bounds.
	(UIElement::OnPropertyChanged): when switch away from a lot of the
	FullInvalidate calls.  If the clip or OpacityMask is changed, just
	Invalidate.  If the RenderTransform or RenderTransformOrigin is
	changed, called UpdateTransform.
	(UIElement::UpdateTransform): all UpdateBounds, since it's
	uncommon that our transform will change without our bounds
	changing..
	(UIElement::OnSubPropertyChanged): These shouldn't be necessary,
	but again switch away from FullInvalidate to other more targeted
	methods.  If the transform properties change, call
	UpdateTransform, for clip and OpacityMask just call Invalidate.
	(UIElement::Invalidate): add a Rect taking one that just
	invalidates the rect, and make the default variety call it with
	bounds as the arg.
	(UIElement::ComputeBounds): rename GetBounds().

	* shape.cpp (ComputeBounds): don't use GetSurface.  use a
	measuring cairo context.
	(Shape::OnPropertyChanged): if the Stretch property changed,
	UpdateBounds.  also, change from FullInvalidate to just Invalidate
	for everything.  Remove the UpdateTransform call as that gets
	handled by UIElement::OnPropetyChanged.
	(Rectangle::OnPropertyChanged): we only need to invalidate on a
	property change.
	(Polygon::OnPropertyChanged): if the Points property changes we
	need to UpdateBounds and force an Invalidate.  otherwise, just
	Invalidate.  no need for FullInvalidate always.
	(Polygon::OnCollectionChanged): new method.
	UpdateBounds+Invalidate to catch changes to the points collection.
	(Polyline::OnPropertyChanged): analogous changes as were made to
	Polygon::OnPropertyChanged.
	(Polyline::OnCollectionChanged): same as
	Polygon::OnCollectionChanged.

	* text.cpp (TextBlock::TextBlock): move the SetValue call to the
	end, past all the initialization of things that might be needed in
	ComputeBounds, which gets called.
	(TextBlock::ComputeBounds): don't use GetSurface.  use a measuring
	cairo context.
	(TextBlock::CalcActualWidthHeight): use a measuring context here.
	(TextBlock::OnPropertyChanged): remove unnecessary call to
	FrameworkElement::OnPropertyChanged from the end of the method.
	(Glyphs::ComputeBounds): return Rect (0,0,0,0).

	* media.cpp (MediaElement::ComputeBounds): don't use GetSurface.
	use a measuring context.
	(Image::ComputeBounds): same.
	(OnPropertyChanged): just Invalidate here, no need for
	FullInvalidate.
	(DownloaderEvent): just Invalidate here, not FullInvalidate.

	* frameworkelement.cpp (FrameworkElement::InsideObject): use
	Rect.PointInside.

	* control.cpp (Control::GetBounds): use a Rect here.
	(Control::ComputeBounds): forward on to the real_object.

	* collection.cpp (VisualCollection::VisualUpdate): when adding an
	element, we need to force its invalidation, but not the parent's.
	we just update the parent's bounds and UpdateBounds will do the
	invalidating if it needs to.

	* runtime.cpp (surface_attach): we don't need to do a full
	invalidate.  just update the bounds of the toplevel (which sets
	the width and height to the widget's) and force an invalidate
	(just in case the user set the width/height to exactly the same
	thing before attaching).
	(surface_size_allocate): same thing here - no need for
	FullInvalidate.  Just update the bounds.
	(measuring_context_create): create a tiny surface and a cairo_t
	for use in measuring things.
	(measuring_context_destroy): destroy the surface and cairo_t.

	* control.h, text.h, canvas.h, media.h, shape.h: GetBounds ->
	ComputeBounds.
	
2007-06-28  Miguel de Icaza  <miguel@novell.com>

	* runtime.cpp (expose_event_callback): Introduce a new
	"transparent" field in the Surface.   If set, we clear the
	region with a transparent region.

2007-06-27  Miguel de Icaza  <miguel@novell.com>

	* runtime.cpp: Event handlers will work with or without GdkWindows
	on the GtkWindows in preparation to support Larry later.

	Paint the surface with alpha transparency for now, this breaks the
	F-Spot embedding but will be fixed later when we can paint at an
	offset, wonder if this will affect performance for now.

	Call gtk_event_box_set_visible_window () with TRUE, so that we
	have a window, for now we require this to get the events working
	properly. 
	
	* canvas.cpp: Drop the translate transform on the topmost canvas
	as that was breaking all the code that depended on the inverse
	matrix transform to work for doing coordinate mapping based on the
	absolute_xform. 

	Instead we need to draw the cairo context at the given offset
	in the repaint routine.  This is left as an excercise for Larry. 

	Tests to validate that the mouse input is working:

		* test/demo.exe: enter/leave
		* surface demo
		* silverlight airlines
		* LunarEclipse designer.
	
	* value.cpp (FreeValue): New method that does the actual releasing
	of the value.   We do this here so the managed code can release
	things in the same way.

	(value_free_value): helper method.

2007-06-27  Chris Toshok  <toshok@ximian.com>

	* clock.cpp (RaiseEnqueuedEvents): ref/unref the clocks around the
	calls to RaiseAccumulatedEvents.

2007-06-27  Chris Toshok  <toshok@ximian.com>

	* clock.cpp (get_now): turns out we really do want this extra *10
	in there, so that it matches up with mono's TimeSpan.Tick values.

2007-06-27  Chris Toshok  <toshok@ximian.com>

	* canvas.cpp (Canvas::GetBounds): Collapsed elements shouldn't
	take part in bounds computation.
	(Canvas::HandleButton): !Visible elements don't take part in hit
	testing.
	(Canvas::HandleMotion): same here.

2007-06-27  Jackson Harper  <jackson@ximian.com>

	* xaml.cpp: Use Type to lookup the property owner, because it
	might be a "ghost" type that the xaml parser can't lookup.

2007-06-27  Miguel de Icaza  <miguel@novell.com>

	* control.cpp: When handling events, we also need to pass the
	event notification to the control, not only to the "real_object"
	that we are proxying for.   This is what cause the calendar to
	malfunction. 

	* canvas.cpp (GetBounds): Do not use 0, 0, 0, 0 for the bounds of
	the canvas, instead use the point at (0,0) and the width, height
	with its absolute transformation.

	Otherwise canvases with children would end up with
	(0,0,0,0) and when compounded would extend the bounding box of
	containing ones to include this region even when not needed.

2007-06-26  Chris Toshok  <toshok@ximian.com>

	* uielement.h: add virtual GetSurface() method.

	* uielement.cpp: implement UIElement::GetSurface to just chain up
	to the parent element if we have one, and return NULL otherwise.
	Also, make item_get_surface call this method.  removes the
	dependency on canvas.h from this file.

	* canvas.h: we override UIElement::GetSurface ()

	* canvas.cpp (Canvas::GetSurface): if we're the toplevel canvas,
	return our surface.  otherwise call our base class's GetSurface.

	* media.h: rename Image::GetSurface here to GetCairoSurface to
	avoid name collision.

	* brush.cpp, media.cpp: track media.h change.

2007-06-26  Miguel de Icaza  <miguel@novell.com>

	* collection.h: Change of course.   The actual public interface
	implements IList<T> and ICollection<T> not IList nor ICollection
	which means that Add does not need to return an index, and Remove
	must return whether it actually removed the object.
	
	* collection.h (Add): Make this method return the index of the
	object just created, so we can implement int IList.Add(...).

	Removed all the empty Add/Remove methods from collections that
	were not doing anything interesting with them, the remaining
	chunks of old hacks.
	
	* (SetVal): This method is used to replace a value at a given
	index with another one.   For the C# IList.this [int] indexer.

2007-06-26  Chris Toshok  <toshok@ximian.com>

	* clock.cpp: make a copy of the child clocks lists before
	traversing them calling callbacks that could result in the lists
	being modified.

2007-06-26  Chris Toshok  <toshok@ximian.com>

	* dependencyobject.h: add OnCollectionChanged to allow
	propertychange notifications from elements in collections to
	bubble up to their parent.

	* collection.h: make the closure a DependencyObject*, just to be
	explicit.  also, add OnSubPropertyChanged to Collection so we can
	generate OnCollectionChanged notifications.

	* collection.cpp: hook things up on elements in collections, and
	generate proper notifications from the collection to its closure.

	* enums.h: add CollectionChangeType for use in
	OnCollectionChanged.

	* geometry.h, geometry.cpp, shape.h, shape.cpp: use the new
	collection notification stuff to bubble changes up the hierarchy.
	
2007-06-26  Jeffrey Stedfast  <fejj@novell.com>

	* list.cpp (Replace): Added.

	* dependencyobject.cpp (dependency_object_get_value_no_default):
	New binding function.
	(dependency_object_get_object_type): Renamed from get_kind() which
	didn't mirror the native API at all.

2007-06-26  Sebastien Pouliot  <sebastien@ximian.com>

	* geometry.cpp|h: Add missing PathSegment::OnPropertyChanged
	* shape.cpp: Remove debugging output.

2007-06-26  Chris Toshok  <toshok@ximian.com>

	* uielement.h: change render/dorender to take a cairo_t* instead
	of a Surface*.

	* canvas.h, control.h, text.h, geometry.h, canvas.cpp,
	uielement.cpp, geometry.cpp, shape.cpp, media.h, shape.h,
	media.cpp, control.cpp, runtime.cpp, text.cpp: fallout from the
	above change.
	
2007-06-25  Jeffrey Stedfast  <fejj@gnome.org>

	* brush.cpp (LinearGradientBrush::SetupBrush): Use
	uielement->get_size_for_brush() because the framework width/height
	might be 0.

	* text.cpp: Implement text wrapping and clipping to Width/Height
	bounds if specified.

2007-06-25  Miguel de Icaza  <miguel@novell.com>

	* runtime.cpp: Cope with the fact that we are now windowless and
	we will be sharing the parent's window.   Fixes mouse events.

	* collection.cpp (collection_get_value_at, collection_count): Add
	new methods.

2007-06-25  Jeffrey Stedfast  <fejj@novell.com>

	Mango-licious.

	* text.cpp: Rewritten to use the new MangoRenderer and
	MangoAttrForeground classes.

	* mango.cpp: New source file implementing a PangoRenderer and
	providing a new PangoAttribute for brushes.

2007-06-25  Chris Toshok  <toshok@ximian.com>

	* runtime.h: add decl for Panel::OnSubPropertyChanged.

	* runtime.cpp (UIElement::OnPropertyChanged): handle changes to
	zIndex by invalidating the item's rectangle.
	(UIElement::OnSubPropertyChanged): add braces around all the if
	blocks for consistency.
	(Panel::OnSubPropertyChanged): if a child changes its z index we
	need to resort our visual collection.
	(Canvas::render): loop over the z sorted list of children instead
	of the default collection list.
	(item_init): just to be anal, cast the Zindex default value to
	gint32.

x2007-06-25  Chris Toshok  <toshok@ximian.com>

	* collection.cpp: keep a z-sorted list in VisualCollection,
	adding/removing elements from it when needed, and clearing it when
	the collection is cleared.

	* collection.h: add a virtual clear method so VisualCollection can
	override it.  Also, add a z_sorted_list member to
	VisualCollection, so we can deal with the ZIndices of children.

2007-06-24  Alan McGovern  <amcgovern@novell.com>

	* runtime.(cpp|h): Implemented UIElement.ZIndexPropery

2007-06-24  Larry Ewing  <lewing@novell.com>

	* runtime.cpp: rework size allocation and make toplevel Canvas
	items read the allocation->x and allocation->y offsets from the
	surface widget when computing their position.

2007-06-24  Chris Toshok  <toshok@ximian.com>

	* Makefile.am (libmooninclude_HEADERS): add collection.h
	(libmoon_la_SOURCES): add collection.cpp

	* collection.h, collection.cpp: new files.  split out Collection
	and all the collection-related code from runtime.h/runtime.cpp.
	arguably the collections specific to certain elements should exist
	completely in those .cpp/.h files, instead of here.

	* runtime.h, runtime.cpp: remove collection stuff.

	* clock.h, animation.h, transform.h: #include collection.h

	* value.h, value.h.in: #include <string.h> here so we can stop
	requiring it for everyone else.  really, though we should be using
	g_strcmp or something that's already pulled in from glib.
	
2007-06-24  Chris Toshok  <toshok@ximian.com>

	* Makefile.am (libmoon_la_SOURCES): add array.cpp
	(libmooninclude_HEADERS): add array.h

	* xaml.cpp, value.cpp, shape.cpp, geometry.cpp: include array.h

	* array.h, array.cpp: new files, split them out from
	runtime.h/.cpp.

2007-06-24  Chris Toshok  <toshok@ximian.com>

	* Makefile.am (libmooninclude_HEADERS): add xaml.h

	* xaml.h: split this out from...

	* runtime.h: ... here.

	* xaml.cpp, runtime.cpp, control.h, demo.cpp: #include xaml.h
	
2007-06-24  Chris Toshok  <toshok@ximian.com>

	* Makefile.am (libmooninclude_HEADERS): add control.h

	* control.h: split out class Control stuff...

	* runtime.h: .. from here.

	* runtime.cpp: #include control.h

	* control.cpp: same.

2007-06-24  Chris Toshok  <toshok@ximian.com>

	* runtime.h: add OnLoaded methods to UIElement, Panel, and
	Control.

	* runtime.cpp (UIElement::OnLoaded): emit the Loaded event if we
	haven't already.
	(VisualCollection::Add): only invoke OnLoaded on the item if the
	closure (the parent of the collection) has been loaded.
	(VisualCollection::Insert): same.
	(Panel::OnLoaded): call OnLoaded on all our children, then chain
	up.
	(surface_attach): call canvas->OnLoaded instead of
	emit_loaded_events(canvas).  also, don't use a special IS_CANVAS
	flag - just use the type system.
	(item_get_surface): get rid of the IS_CANVAS flag and just use the
	type system.

	* control.cpp (Control::OnLoaded): new method, invoke OnLoaded on
	the real object before chaining up.

2007-06-24  Larry Ewing  <lewing@novell.com>

	* runtime.cpp: disable transparent surfaces while fixing the
	drawing offset problem.

2007-06-24  Larry Ewing  <lewing@novell.com>

	* brush.cpp: use cairo_create_similar rather than using an image
	brush.

2007-06-24  Chris Toshok  <toshok@ximian.com>

	* runtime.cpp (VisualCollection::Add): only emit Loaded if the
	tree we're adding it to has already been loaded.

2007-06-24  Larry Ewing  <lewing@novell.com>

	* demo.cpp: add -trans flag to demo to make the toplevel transparent.

2007-06-24  Larry Ewing  <lewing@novell.com>

	* runtime.cpp: add comments to the new gtk functions.

	* runtime.h: expose surface_paint.

2007-06-23  Miguel de Icaza  <miguel@novell.com>

	* runtime.cpp: Since unrealize does not seem to be called when our
	widget is destroyed by Mozilla, we need to cleanup on destroy the
	tick event.   This takes care of one of the plugin crashers.

	There are still others that I have to find out, I added some
	debugging prints for now.

2007-06-24  Larry Ewing  <lewing@novell.com>

	* runtime.cpp: derive from EventBox not drawing area so that we
	can use it as a quick method of switching back and forth between
	transparent and not.  Add a method to let external code paint to a
	cairo context.

2007-06-23  Jeffrey Stedfast  <fejj@gnome.org>

	* text.cpp (SetValue): Overridden to enforce Text strings not
	preserving any leading nor trailing whitespace (as defined in the
	Silverlight docs).

2007-06-22  Jeffrey Stedfast  <fejj@novell.com>

	* xaml.cpp (matrix_value_from_str): use delete[] to free the array
	of doubles instead of g_free() as it was allocated with new, not
	g_malloc().

	* text.cpp (Layout): D'oh, make sure to always init text/block
	width/height values. This fixes VideoBrush again.

2007-06-22  Jeffrey Stedfast  <fejj@novell.com>

	* mplayer.cpp: Initialize 'opened' state variable.

	* text.cpp (GetValue): Override DependencyObject::GetValue() so
	that we can special-case getting TextBlock::Actual[Width,Height]
	properties (this allows us to prolong re-calculating these values
	until after the user has set the values he's going to set -
	re-calculating on ever property change is too expensive.

	* runtime.h: Make DependencyObject::GetValue() virtual.

2007-06-22  Jeffrey Stedfast  <fejj@gnome.org>

	* text.cpp: Stubbed out the required virtual methods for Glyphs
	and attempted to make ActualWidth and ActualHeight calculated
	immediately in an attempt to get DrPopper working better.

2007-06-22  Sebastien Pouliot  <sebastien@ximian.com>

	* shape.cpp: Small hack to avoid calling Draw 2 times during render.

2007-06-22  Chris Toshok  <toshok@ximian.com>

	* xaml.cpp (key_spline_from_str): free up the point arrays from
	point_array_from_str after we use them.
	(xaml_set_property_from_str): same.

2007-06-22  Chris Toshok  <toshok@ximian.com>

	* value.cpp (Value): the copy ctor is definitely corrupting memory
	in the MATRIX case - we need to allocate the destination matrix.

2007-06-21  Chris Toshok  <toshok@ximian.com>

	* Makefile.am: not that anyone should be installing this yet,
	install the headers to $(includedir)/libmoon.

2007-06-21  Jeffrey Stedfast  <fejj@novell.com>

	* text.cpp: Reworked text layout/rendering logic - we now cache
	width/height info for each text string as well as the overall
	block width/height. This info is then used to align text strings
	on each line along the bottom edge (rather than along the top
	edge) of the line of text.

	* xaml.cpp (char_data_handler): Ignore insignificant lwsp CDATA

2007-06-21  Rolf Bjarne Kvinge  <RKvinge@novell.com>

	* stylus.h|cpp: Add InkPresenter.
	* media.h|cpp: Add C methods to stop, pause and play a MediaElement.
	* value.h, type.h|cpp: Updated.

2007-06-21  Rolf Bjarne Kvinge  <RKvinge@novell.com>

	* animation.cpp: Register *KeyFrame::Value properties as nullable.
	* clock.cpp: Register TimelineMarker properties.

2007-06-21  Jackson Harper  <jackson@ximian.com>

	* xaml.cpp: When setting the x:Name also set the name property.

2007-06-21  Rolf Bjarne Kvinge  <RKvinge@novell.com>

	* stylus.cpp|h: Added Stroke and DrawingAttributes.
	* runtime.h: All collections can now implement GetElementType.
	* value.h, type.h, type.cpp: Updated.
	
2007-06-21  Rolf Bjarne Kvinge  <RKvinge@novell.com>

	* stylus.cpp|h: Added.
	* runtime.cpp|h: Define and call stylus_init.
	* Makefile.am: Add stylus.cpp|h.
	* value.h, type.h, type.cpp: Updated.

2007-06-21  Jackson Harper  <jackson@ximian.com>

	* xaml.cpp: Add a global set of callbacks, so that all of the
	custom callbacks for a given parsing instance use the same
	methods.  This needs to be encapsulated properly, but for now is
	fine.

2007-06-20  Chris Toshok  <toshok@ximian.com>

	* animation.cpp, animation.h: KeyFrameCollection overrides
	Collection::Clear to clear its sorted list.

	* runtime.cpp, runtime.h: add overrideable Collection::Clear
	method, and move collection_clear's body into it.

2007-06-21  Jackson Harper  <jackson@ximian.com>

	* runtime.cpp|h: Don't return false on single element collections
	on the first item.

2007-06-21  Jeffrey Stedfast  <fejj@gnome.org>

	* text.cpp: Use absolute font sizes, makes the fonts not so huge.

2007-06-20  Jackson Harper  <jackson@ximian.com>

	* xaml.cpp: Set namecopes earlier, and make sure to copy the
	namescope when we recreate a class using x:Class.
	- When we use x:Class reparse the element's attributes, so it can
	hook up to events and set properties.
	* runtime.cpp|h: When the Name property is set, register it with
	the proper NameScope.
	
2007-06-20  Chris Toshok  <toshok@ximian.com>

	* runtime.cpp, runtime.h: add rudimentary Visibility support.  we
	only support Visible/Hidden really, and treat Collapsed as Hidden.

	* xaml.cpp (enum_from_str): use g_strcasecmp here.

2007-06-20  Sebastien Pouliot  <sebastien@ximian.com> 

	* shape.cpp|h: Implement caching of Path (this could be extended to
	all shapes).
	* geometry.cpp|h: Notify on changes.

2007-06-20  Sebastien Pouliot  <sebastien@ximian.com>

	* xaml.cpp: Don't allocate (and free) a copy of the PML before 
	calling	geometry_from_str.

2007-06-20  Sebastien Pouliot  <sebastien@ximian.com> 

	* shape.cpp: Fix some Stretch modes for paths. This can get very
	expansive, next step is to cache the cairo_path_t* in the Path and
	recompute it only on changes.

2007-06-20  Chris Toshok  <toshok@ximian.com>

	* xaml.cpp (is_valid_event_name): new function.
	(dependency_object_hookup_event): only allow valid events to be
	hooked up.

2007-06-20  Jackson Harper  <jackson@ximian.com>

	* runtime.cpp|h: New method for finding an objects namescope.
	- Call an objects loaded event when it is added to a Collection
	- Some bits of namescope merging, these functions aren't called
	yet though.

2007-06-20  Chris Toshok  <toshok@ximian.com>

	* xaml.cpp (dependency_object_hookup_event): we need more than
	just the Loaded event.

2007-06-20  Jeffrey Stedfast  <fejj@novell.com>

	* text.cpp (Run): Don't set default font values here... we need
	them to be unset if they aren't explicitly set by the user so that
	we can inherit font properties from our parent TextBlock.
	(Draw): Fixed to make Runs inherit unset font properties from the
	TextBlock at render-time. Also fixed to make sure we have a
	foreground brush to draw with... if unset, use the default brush.

2007-06-20  Chris Toshok  <toshok@ximian.com>

	* runtime.cpp (UIElement::render): make this print the classname
	like UIElement::getbounds() does.

	* runtime.h, runtime.cpp: make control_initialize_from_xaml take
	the xaml parser custom element callbacks.

2007-06-20  Chris Toshok  <toshok@ximian.com>

	* runtime.cpp (runtime_shutdown): set inited to false, since we
	want people to be able to call runtime_init again after this.

	* type.cpp.in (Type::RegisterType): allocate types if we need to.
	(Type::Shutdown): free types.

	* type.h.in (private): make the types array dynamically allocated.

	* type.h, type.cpp: sync

2007-06-20  Jeffrey Stedfast  <fejj@novell.com>

	* text.cpp (TextBlock): Need to actually set ActualWidth and
	ActualHeight values.

2007-06-20  Chris Toshok  <toshok@ximian.com>

	* clock.cpp (Clock::Tick): if we hit our natural duration but our
	duration is Automatic, go to Fill mode, since we may have child
	clocks that started after us and need a chance to run their last
	tick.

2007-06-20  Jeffrey Stedfast  <fejj@novell.com>

	* runtime.cpp (collection_iterator_move_next): If we can't iterate
	to the next item, don't set current = NULL.
	(dependency_object_get_name): New function needed for the binding.

2007-06-20  Larry Ewing  <lewing@novell.com>

	* runtime.cpp: use gdk_cairo helper functions and clip to the
	expose event region.

	* runtime.h: remove unused members.

	* media.cpp: use cairo_get_target rather than keeping track of
	pixmap.

2007-06-20  Jackson Harper  <jackson@ximian.com>

	* xaml.cpp/runtime.h: Add one more callback, this one will hookup
	events to methods. So things like Loaded=CanvasLoaded will work.
	* demo.cpp:
	* control.cpp:
	
2007-06-20  Jackson Harper  <jackson@ximian.com>

	* xaml.cpp: More verbose debug output with namespace lookup
	errors.
	- Map in the default namespaces if we are unable to lookup the
	proper namespace name.

2007-06-20  Sebastien Pouliot  <sebastien@ximian.com> 

	* shape.cpp: Call cairo_[stroke|fill]_extents inside Shape::getbounds
	or the mouse moving won't work.

2007-06-20  Sebastien Pouliot  <sebastien@ximian.com>

	* shape.cpp: Fix Shape::getbounds to work even if no stroke brush is
	assigned, in that case we get the extents of the fill.

2007-06-20  Chris Toshok  <toshok@ximian.com>

	* animation.cpp: um.. "oops".

	* xaml.cpp (xaml_init): enable the parsing of the color/point
	spline key frames.

2007-06-20  Chris Toshok  <toshok@ximian.com>

	* animation.cpp: guard against division by zero in the double
	keyframe GetCurrentValue method.  I'll fix this method up some
	more and then report it to the other animation types.

	Also, add the Spline(Color,Point)KeyFrames.

	* clock.cpp, clock.h: fixes to get all this working again while
	still supporting the needed things from the last patch (like
	BeginTime.)

	* transform.cpp (GetTransform): i hate like hell to have to do
	this, but if we scale by 0.0 cairo can't invert the matrix and
	then everything goes belly up.  0.00002 is the smallest number I
	found (0.00001 doesn't work, for instance) where cairo doesn't
	complain about the inverse stuff.

	* media.cpp (media_element_set_buffering_time): we have to use the
	hacky Value ctor here.
	(media_element_set_position): and here.

	* runtime.cpp (emit_loaded_events): new function to walk the tree
	and emit loaded events.
	(surface_attach): call emit_loaded_events here - the docs specify
	that Loaded is emitted after it's associated with the host but
	before it's rendered.
	(Canvas::render): don't emit Loaded here.
	(runtime_init): output a nice message here if you run cairo
	against a verion of cairo that you shouldn't be using.

	* type.h, type.cpp, value.h: resync.

2007-06-20  Jackson Harper  <jackson@ximian.com>

	* xaml.cpp: Improve the way we handle x:Class attributes failing
	to load.

2007-06-20  Jackson Harper  <jackson@ximian.com>

	* xaml.cpp: Hookup attached properties in the property_from_str
	method.

2007-06-19  Chris Toshok  <toshok@ximian.com>

	* media.cpp (media_element_get_buffering_time): use AsTimeSpan().
	(media_element_get_position): same.
	(media_init): mark BufferingTime and Position as TimeSpan's.

2007-06-19  Chris Toshok  <toshok@ximian.com>

	* clock.cpp, clock.h: bad time for a a rearchitecting, perhaps,
	but this was necessary to get BeginTime's to be supported.  It
	reintroduces the "popping" in the surface demo, though, and
	honestly I'm unsure how we can ever guarantee that enough ticks
	will have occured to be sure we won't see the initial state of the
	surface objects.

	* animation.cpp: track clock api changes.

	* runtime.h: decl for FramworkElement::OnPropertyChanged.
	
	* runtime.cpp (EventObject::Emit): make a copy of the list before
	we start emitting, to keep us crashing if the list is modified
	while we're traversing it.
	(FramworkElement::OnPropertyChanged): invalidate on width/height
	changes.

	* xaml.cpp: when parsing a TIMESPAN property, use
	timespan_from_str.  This fixes the parsing of BeginTime
	attributes.

	* type.cpp.in: register TIMESPAN.

	* value.h.in: add a AsTimeSpan method, and special hacky
	constructor so the parser can construct a value of type TIMESPAN
	(which is problematic since it's typedef'ed to gint64.)  Move the
	TimeSpan typedef here.

	* value.cpp: add the impl for that hacky ctor.
	
	* type.h.in: add a TIMESPAN kind.

	* type.h, value.h, type.cpp: sync.

2007-06-19  Jackson Harper  <jackson@ximian.com>

	* xaml.cpp: we need to new the points.

2007-06-19  Sebastien Pouliot  <sebastien@ximian.com> 

	* geometry.cpp: Add safety to ensure the number of points are 
	valid before iterating on them.

2007-06-19  Jackson Harper  <jackson@ximian.com>

	* xaml.cpp: make sure to get all the points.
	- sneak peek at the exciting new attached property setting code.
	- improve error message
	- dont step off the end of the string when the trailing characters
	are white space.

2007-06-19  Jeffrey Stedfast  <fejj@gnome.org>

	* *.cpp: Updated to use the new List type.

	* runtime.cpp|h (Collection): Modified to use List instead of
	GList which made some code simpler, we get to take advantage of
	destructors, woo!

	* demo.cpp (main): Removed surface_destroy() and
	runtime_shutdown() out of the delete_event callback (gtk timeouts
	could still fire after the gtk_main_quit() call it seems).

2007-06-19  Sebastien Pouliot  <sebastien@ximian.com>

	* runtime.cpp: Enforce UIElement::ClipProperty when rendering
	Canvas

2007-06-19  Jackson Harper  <jackson@ximian.com>

	* xaml.cpp: Content properties can be inherited.

2007-06-19  Jackson Harper  <jackson@ximian.com>

	* xaml.cpp: Make sure that we have a previous figure.

2007-06-19  Sebastien Pouliot  <sebastien@ximian.com> 

	* geometry.cpp|h: Revert previous changes. That didn't work well
	with groups/collections.
	* shape.cpp: Path::Draw now process the path (find and susbtract
	origin) when Stretch requires it.

2007-06-19  Jackson Harper  <jackson@ximian.com>

	* xaml.cpp: Set the namescope right away, so FindName will work in
	element constructors.

2007-06-19  Jeffrey Stedfast  <fejj@gnome.org>

	* animation.cpp: Switched to use List instead of GList.

2007-06-19  Sebastien Pouliot  <sebastien@ximian.com> 

	* geometry.cpp|h: Change API so the Strech value is propagated from
	the shape to all the geometry figures. Fixed Stretch for LineGeometry,
	EllipseGeometry and RectangleGeometry.
	* shape.cpp: Path::Draw now supply the Stretch property value to
	all Geometry objects drawing methods.

2007-06-19  Sebastien Pouliot  <sebastien@ximian.com> 

	* shape.cpp: Don't call cairo_new_path inside moon_ellipse. It's
	the caller responsbility to do so, if required (e.g. it isn't for
	geometry stuff).

2007-06-19  Jackson Harper  <jackson@ximian.com>

	* xaml.cpp: Implement all the optional points on path markup.

2007-06-19  Sebastien Pouliot  <sebastien@ximian.com> 

	* shape.cpp: Fix Stretch for Polyline and Polygon.

2007-06-19  Jeffrey Stedfast  <fejj@novell.com>

	* xaml.cpp: Updated to use a real linked list implementation.. for
	added uberness. Also reduces memory leakage.

	* mplayer.cpp: Stubbed out a few more things and can now return
	the video duration.

2007-06-19  Sebastien Pouliot  <sebastien@ximian.com> 

	* shape.cpp|h: Set Shape::Stretch default to None and set Stretch
	property to fill inside Rectangle and Ellipse ctors.

2007-06-19  Jeffrey Stedfast  <fejj@novell.com>

	* runtime.cpp (Insert): Make this use SharedAdd too, which I
	presume was the whole point.

2007-06-19  Sebastien Pouliot  <sebastien@ximian.com> 

	* shape.cpp: Fix Strech support for Rectangle (it behave more like
	Ellipse but that shows only with non squares).

2007-06-19  Jeffrey Stedfast  <fejj@novell.com>

	* mplayer.cpp (audio_loop): Fixed muting to advance the correct
	number of pts and not hang forever in a g_usleep() (gah, the timer
	was a huge negative value).

2007-06-19  Rolf Bjarne Kvinge  <RKvinge@novell.com>

	* clock.h: Added TimelineMarker.
	* type.h, type.cpp, value.h: Updated.

2007-06-19  Sebastien Pouliot  <sebastien@ximian.com> 

	* shape.h: Fix filling for Polyline. MS supports filling polylines,
	even unclosed ones.

2007-06-19  Chris Toshok  <toshok@ximian.com>

	* runtime.cpp (surface_realloc): make sure to reassign s->cairo to
	s->cairo_xlib after recreating the xlib stuff.  avoids a crash
	when resizing surfaces.

2007-06-19  Sebastien Pouliot  <sebastien@ximian.com> 

	* shape.cpp: Add Strech support for Ellipse.

2007-06-19  Sebastien Pouliot  <sebastien@ximian.com>

	* shape.cpp: Add Strech support for Rectangle (only None is different).
	Add comments to Line as Stretch doesn't apply for this Shape.

2007-06-19  Miguel de Icaza  <miguel@novell.com>

	* runtime.cpp (Collection): Add new Insert method, and update all
	the callers that overwrote it.   We probably need to cleanup
	everything that is doing virtual overrides and is a no-op 

2007-06-19  Chris Toshok  <toshok@ximian.com>

	* runtime.cpp (clear_drawing_area): this method doesn't need to
	clean up the xlib cairo context/surface and the pixmap.

	There are two possibilities:

	1) the drawing area has been realized, which means we have xlib
	surface/context + pixmap.  We're guaranteed to hit
	unrealized_callback before this method is called, so they will
	have already been freed.

	2) the drawing area has not been realized, which means we have no
	xlib surface/context + pixmap, and this method doesn't need to do
	anything.

2007-06-19  Jackson Harper  <jackson@ximian.com>

	* runtime.h/shape.cpp: Fix typo.

2007-06-19  Jeffrey Stedfast  <fejj@novell.com>

	* text.cpp (Run::OnPropertyChanged): Always chain up to our parent
	implementation and if one of our properties changed, notify our
	attachees.
	(Inline::OnPropertyChanged): Same.
	(TextBlock::OnPropertyChanged): Keep track of Inlines changes.
	(TextBlock::Draw): Use our foreground brush directly and the same
	for run's foreground brush.

2007-06-19  Miguel de Icaza  <miguel@novell.com>

	* runtime.cpp: Implement collection iterators.

2007-06-19  Chris Toshok  <toshok@ximian.com>

	* xaml.cpp (timespan_from_str): don't walk off the end of the
	string.

2007-06-19  Rolf Bjarne Kvinge  <RKvinge@novell.com>

	* animation.h|cpp: Remove pureness from KeyFrame::InterpolateValue.

2007-06-19  Rolf Bjarne Kvinge  <RKvinge@novell.com>

	* animation.h|cpp: Add *_key_frame_new.

2007-06-19  Jackson Harper  <jackson@ximian.com>

	* xaml.cpp\runtime.h: Add a public function for setting
	properties, from strings.  Basically a copy and paste of my
	set_attributes code.  Eventually I should be able to merge the
	two, but they use different name lookup mechanisms right now.

2007-06-19  Jeffrey Stedfast  <fejj@gnome.org>

	* animation.cpp (Remove): Remove the KeyFrame from the sorted list
	before removing it from the collection (since it may be freed by
	Collection::Remove).

2007-06-19  Miguel de Icaza  <miguel@novell.com>

	* runtime.cpp: Add support for notifying the consumer that the
	surface has resized.

	Add support for resizing objects.

2007-06-19  Jeffrey Stedfast  <fejj@gnome.org>

	* brush.cpp (~VideoBrush): We want to detach from the media
	element, not ourselves. Doh.

2007-06-19  Sebastien Pouliot  <sebastien@ximian.com>

	* shape.h: Update comments about which shapes needs, or not, to 
	provide a getxformorigin method.

2007-06-19  Rolf Bjarne Kvinge  <RKvinge@novell.com>

	* media.h|cpp: Add media_base_new.

2007-06-19  Rolf Bjarne Kvinge  <RKvinge@novell.com>

	* value.cpp|h|in: Inline the non-DependencyObject
	As* functions as well.

2007-06-19  Rolf Bjarne Kvinge  <RKvinge@novell.com>
	
	* typegen.cs: Removed some dead code.
	* value.cpp.in: Deleted, not needed anymore.
	* runtime.cpp, value.cpp, type.cpp.in: Moved 
	implementation of Value and Type into their own files.
	* type.cpp: Updated.

2007-06-19  Rolf Bjarne Kvinge  <RKvinge@novell.com>

	* type.h, type.h.in: Created, moved declaration of Type here.
	* *.h|cpp|in: Move Value:Kind to Type::Kind and update all
	references. Move the Value::As* into the header.
	* typegen.cs: Updated to cope with Kind changes.

2007-06-19  Rolf Bjarne Kvinge  <RKvinge@novell.com>

	* runtime.cpp|h, value.h.in: Remove current nullable code,
	it's easier to store an is_nullable flag in the registered
	property, and store NULL values in the objects hashtable.
	* xaml.cpp: Revert unnecessary fixes.
	* value.h: Updated.

2007-06-19  Chris Toshok  <toshok@ximian.com>

	* runtime.h: get rid of the specialized surface callbacks for
	mouse events.  we can dispatch them directly to the UIElements.
	Change the EventObject signatures to permit an event/call data as
	well as the closure.  add the sender object for kicks while we're
	at it.

	* runtime.cpp: dispatch element events through the
	DependencyObject's events object.

	* animation.h, animation.cpp: update signatures for event
	handlers.

	* control.cpp (handle_button): track signature change.

	* clock.cpp: same.

2007-06-18  Chris Toshok  <toshok@ximian.com>

	* clock.cpp (TimeManager::Tick): add a lot of timing foo.
	(ClockGroup::RaiseAccumulatedEvents): raise the Completed event if
	we switching to the stopped state and our progress is 1.0 (that
	is, if we've finished).

	* animation.h, animation.cpp (Storyboard::Begin): rather heavy
	handed (but bulletproof) approach to making Begin work on a
	storyboard that has run its course - destroy the clock hierarchy
	and recreate it.  Also, add a handler for the ClockGroup's
	"Completed" event so we can reflect that back to managed land.

	* runtime.h: add C functions to add/remove handlers from the
	EventObject inside a dep object.

2007-06-18  Jackson Harper  <jackson@ximian.com>

	* xaml.cpp: Set text context properties from char data.  This
	allows you to do things like <Run>Hi I am some text</Run>.  As far
	as I can tell, Run is the only element that allows this.

2007-06-18  Sebastien Pouliot  <sebastien@ximian.com>

	* shape.cpp|h: Fix Line and Ellipse getxformorigin.

2007-06-18  Jackson Harper  <jackson@ximian.com>

	* xaml.cpp: Now implement the smooth beziers correctly, much
	thanks to spouliot for figuring out the formula to reflect control
	points.

2007-06-18  Chris Toshok  <toshok@ximian.com>

	* clock.h, clock.cpp: ifdef some debug spew, add a bitmask for
	what the timemanager should do on a given tick, and add some
	#defines/logic to calculate the gtk delay from the desired
	framerate.  Set the desired framerate to 20fps.

2007-06-18  Jeffrey Stedfast  <fejj@novell.com>

	Instead of attaching to Brush::ChangedProperty, connect to NULL.

	* media.cpp (render): If the width/height are 0.0, then use the
	video's natural width/height.
	(OnPropertyChanged): chain up.

	* shape.cpp (OnPropertyChanged): Always chain up to our parent.

2007-06-18  Chris Toshok  <toshok@ximian.com>

	* xaml.cpp (dependency_object_set_attributes): suggestion by rolf.
	fixes setting of nullable property values.

2007-06-18  Rolf Bjarne Kvinge  <RKvinge@novell.com>

	* runtime.cpp: Store NULL again in the property hashtable,
	but use the lookup_extended function to detect this and return
	a correct NULL value instead of the default value.

2007-06-18  Chris Toshok  <toshok@ximian.com>

	* runtime.cpp (RemoveHandler): more cleanups.

2007-06-18  Chris Toshok  <toshok@ximian.com>

	* runtime.cpp (RemoveHandler): g_free'ing a new'ed c++ object =
	bad.

2007-06-18  Jackson Harper  <jackson@ximian.com>

	* xaml.cpp: Implement path closing and ArcSegments.

2007-06-18  Miguel de Icaza  <miguel@novell.com>

	* runtime.cpp (SetValue): This looks painful, now
	DependencyObjects are stored inside the hash but they might
	contain a NULL.   This seems bad.
	
	(Value): Do not delete null dependency objects.

	Remove this patch, and try demo.exe, enter/leave/enter, this
	crashes now, because the leave sets the fill to "null" and the
	enter then tries to access it

2007-06-18  Jeffrey Stedfast  <fejj@novell.com>

	* brush.cpp: Do proper OnPropertyChanged proagation.
	(ImageBrush::OnPropertyChanged): Notify using the generic
	Brush::ChangedProperty.
	(VideoBrush::OnPropertyChanged): Same.
	(VideoBrush::OnSubPropertyChanged): Same.

	* shape.cpp (Shape): Need to keep track of our stroke/fill brushes
	so we can listen for change notification.

	* runtime.cpp (UIElement): Same.
	(Panel): Here too.

	* text.cpp (TextBlock): Same here (need to do it for Inlines too
	at some point).

	* media.cpp (media_base_new): Removed, you can't instantiate a
	MediaBase.
	(advance_frame): Optimization hack: don't invalidate if our
	opacity is 0.
	(MediaElement::render): Respect opacity and stretch properties.

2007-06-18  Jackson Harper  <jackson@ximian.com>

	* xaml.cpp: We need to create new figures if we get a Move
	command.

2007-06-18  Chris Toshok  <toshok@ximian.com>

	* demo.cpp: use TimeManager::AddTickCall for the async file
	loading.  This makes the image visible immediately for me, instead
	of requiring the animations be paused to see it.

	* clock.cpp, clock.h: add a one-shot "tick call" idle handler of
	sorts to TimeManager.  This way we can better control when the
	cross thread downloader calls happen, and keep them from affecting
	the frame rate, and also keep them from being starved by an
	overzealous demo.cpp.

2007-06-18  Chris Toshok  <toshok@ximian.com>

	* runtime.cpp (unrealized_callback): remove the render handler.
	(realized_callback): attach the render handler.
	(render_surface): a very simple render handler.  We just force gtk
	to process all pending updates.

	* clock.cpp (TimeManager::Tick): as a temporary hack, have
	TimeManager emit the "render" event after every animation tick.
	We should add tuning to this method to achieve usable framerates
	without killing the cpu.

	* clock.h: make TimeManager subclass from EventObject so we can
	hook up to events on it.

2007-06-18  Sebastien Pouliot  <sebastien@ximian.com>

	* shape.cpp: getbounds gets bad results if stroke (or fill) isn't 
	called. We create a new path so the bounds, for an invisible object,
	will be empty.

2007-06-18  Chris Toshok  <toshok@ximian.com>

	* clock.cpp (Clock::TimeUpdated): return immediately if we're stopped.

2007-06-18  Jackson Harper  <jackson@ximian.com>

	* xaml.cpp: Fix smooth quadratic bezier's.

2007-06-18  Chris Toshok  <toshok@ximian.com>

	* media.cpp, media.h (Image::render): on our first rendering,
	convert to using an xlib surface to speed up future redraws.

2007-06-18  Chris Toshok  <toshok@ximian.com>

	* runtime.cpp (UIElement::dorender): add this, and make everything
	that calls ->render call ->dorender.

	* control.cpp (render): call dorender on the realobject.

	* runtime.h: add STARTTIMER/ENDTIMER macros, and add
	UIElement::dorender which can be used to wrap render calls with
	debug info (in this case timer info.)

	* clock.h: add prototype for get_now().

	* clock.cpp (get_now): make this public, so we can use it for
	timers.

2007-06-18  Jackson Harper  <jackson@ximian.com>

	* xaml.cpp: Implement Path Geometry parsing.

2007-06-18  Jeffrey Stedfast  <fejj@novell.com>

	* brush.cpp (VideoBrush::SetupBrush): Get a reference to the
	MediaElement if we don't already have one.
	(VideoBrush::OnPropertyChanged): SourceName does not refer to a
	uri, instead SourceName refers to a MediaElement.

	* media.cpp: Implemented some more helper "setters", defaulted
	some more MediaElement property values to correct values, and
	implemented updating of both the CurrentState property and the
	PositionProperty.

	* mplayer.cpp (Position): Implemented.

2007-06-18  Sebastien Pouliot  <sebastien@ximian.com>

	* media.cpp: Close the path after rendering the image.
	* shape.cpp: Avoid the filling operation in calls to getbounds. Also
	open and close a path before drawing normal (square) rectangles.

2007-06-18  Rolf Bjarne Kvinge  <RKvinge@novell.com>

	* runtime.h|cpp: Add DependencyObject::RegisterNullable. Add a few
	C-style methods to access Type and DependencyProperty fields.
	In Type::IsSubclassOf don't take into account nullability.
	* animation.cpp, clock.cpp: Register nullable properties as such.

2007-06-18  Rolf Bjarne Kvinge  <RKvinge@novell.com>

	* media.h|cpp: Add media_base_new.

2007-06-18  Rolf Bjarne Kvinge  <RKvinge@novell.com>

	* value.h.in: Make checked_get_subclass handle null values. Include the
	Kind::*Null* values in the C# Kind.cs, and change their values to fit
	in a signed int.
	* value.h: Updated.

2007-06-18  Miguel de Icaza  <miguel@novell.com>

	* media.cpp (DownloaderEvent): If the Width/Height have not been
	set explicitly, provide them from the images (demo works, but it
	takes a while, due to the idle handler being too busy to be
	invoked).

	* runtime.cpp (Canvas::render):  Cope with rounding from floats to
	ints, add 2, fixes the droppings in the surface.

	Include some of my debugging helpers (you sprinkle
	draw_grid in key places to see whats going on, useful to debug the
	bounding boxes and visually inspect if things are right.
	
	* media.cpp (getbounds): use the framework width/height not the
	pixbuf image size, this shrinks the size of the bounding box.
	(getxformorigin): Use it here too.

2007-06-18  Sebastien Pouliot  <sebastien@ximian.com>

	* brush.cpp|h: SetupBrush and SetupGradient now returns a boolean that
	indicates if their use would be visible or not (e.g. opacity > 0.0).
	* shape.cpp: Don't setup brush for getting bounds (do_op == FALSE). 
	Don't Fill or Stroke if the brush is invisible (opacity == 0).

2007-06-18  Marek Habersack  <grendello@gmail.com>

	* mplayer.cpp (ALIGN): make sure the ALIGN macro is correct on 64
	bit platforms too.

	* ffvideo.cpp (ALIGN): as above.

2007-06-18  Chris Toshok  <toshok@ximian.com>

	* clock.cpp: simplify pausing and stopping a clock that has
	children by keeping track of the new state (the one the clock will
	take at the end of this tick).  This is necessary because the
	parent clock doesn't actually stop until the end of the tick, so
	we still need to update child clocks after we've determined the
	parent clock should stop.

Mon Jun 18 19:35:56 CEST 2007 Paolo Molaro <lupus@ximian.com>

	* runtime.cpp: properly remove items from the doubly-linked list.

2007-06-18  Chris Toshok  <toshok@ximian.com>

	* animation.cpp (AnimationStorage::~AnimationStorage): delete the
	baseValue here.
	(Storyboard::Begin): force a TimeManager tick after we've hooked
	up the clock, so that all the animations have proper values before
	the next render.  Fixes the "popping" in the surface demo.

2007-06-18  Rolf Bjarne Kvinge  <RKvinge@novell.com>

	* runtime.cpp: Changed DependencyObject::SetValue to never store 
	a null value in the hashtable.

2007-06-18  Sebastien Pouliot  <sebastien@ximian.com>

	* brush.cpp: Refactor the pattern creation to allow caching.
	* media.cpp|h: Add caching of cairo_pattern_t to Image.

Mon Jun 18 17:53:03 CEST 2007 Paolo Molaro <lupus@ximian.com>

	* runtime.cpp: use motion hints for smoother motion event handling.

2007-06-18  Jeffrey Stedfast  <fejj@gnome.org>

	* text.cpp|h: Runs now cache their own PangoFontDescription and
	PangoLayouts as an optimzation (seems to be very slight for simple
	us-ascii text, but might help enormously for more complex
	languages). Also added some FIXME thoughts.

2007-06-18  Everaldo Canuto  <ecanuto@novell.com>

	* downloader.cpp: Add missing downloader_notify_finished.

2007-06-18  Rolf Bjarne Kvinge  <RKvinge@novell.com>

	* downloader.cpp: Only set dummy downloader functions if they
	aren't already set.

2007-06-18  Rolf Bjarne Kvinge  <RKvinge@novell.com>

	* runtime.cpp: Add a few null checks.
	* downloader.cpp: Add initial dummy downloader functions to get
	meaningful messages if the downloader functions aren't initialized.

2007-06-18  Rolf Bjarne Kvinge  <RKvinge@novell.com>
	
	* typegen.cs: Special case a few things for DependencyObject, 
	and make a few messages more informative.
	* runtime.h|cpp: Add a value_type field to Type, and a constructor
	to specify the value. Add a constructor to DependencyProperty that
	can specify default value and type (in the case the default value
	doesn't have the same type as the property). Changed
	DependencyObject::SetValue to never store a null value in the 
	hashtable. In Value destructor check for null pointers in a few 
	cases. Update all uses of Value.k to Value.GetKind.
	* type.cpp.in: Update to specify value_type information.
	* value.h.in: Implement nullable type handling in Value.
	* value.cpp, type.cpp, value.h: Updated.

2007-06-18  Jeffrey Stedfast  <fejj@gnome.org>

	* text.cpp (get_size_for_brush): Calculate width/height if they
	are unset.
	(Draw): Don't use the brush if we aren't going to render (this is
	needed so that we don't get into a recursive loop since we have to
	manually calculate width/height).

2007-06-18  Jeffrey Stedfast  <fejj@gnome.org>

	* text.cpp (get_size_for_brush): Implemented (since
	cairo_stroke_extents() won't work for us).

	* brush.cpp (VideoBrush::SetupBrush): Use get_size_for_brush().
	(ImageBrush::SetupBrush): Same.

	* runtime.cpp (UIElement::get_size_for_brush): New method to get
	width/height needed by Brushes for scaling.

2007-06-17  Jeffrey Stedfast  <fejj@gnome.org>

	* runtime.cpp (UIElement::OnPropertyChanged): Chain up to our
	parent.

2007-06-17  Atsushi Enomoto  <atsushi@ximian.com>

	* text.cpp : added text_block_set_font_source().

2007-06-17  Miguel de Icaza  <miguel@novell.com>

	* brush.cpp (brush_init): Create a BRUSH property called
	"FrameChange", it is internal and the sole use of it is so that
	upper layers that care about brush changes act on it by updating
	their elements.

	* runtime.cpp (UIElement::OnSubPropertyChanged): Changes on
	brushes only trigger an invalidate, there is no need to recompute
	bounds. 

2007-06-17  Jeffrey Stedfast  <fejj@gnome.org>

	* xaml.cpp: c++ isn't smart enough to invoke the correct .dtor on
	delete for a void pointer, it can only delete known class types.

2007-06-17  Jackson Harper  <jackson@ximian.com>

	* xaml.cpp: Implement x:Class, we can now load the Surface demo's
	XAML file, and it's custom Canvas class (things still don't work
	though because the custom canvas uses a downloader.)

2007-06-17  Miguel de Icaza  <miguel@novell.com>

	The surface rotate and translate controls should both work, and
	the enter/leave events are now correct.
	
	* runtime.cpp (UIElement::handle_motion, handle_button): Change
	the semantics to better match Silverlight.   Now these methods
	should check if the mouse is inside their region before calling
	the callback.

	This is necessary because children of the canvas (and panel) are
	within the confines of the bounding box, but the canvas can be
	smaller than that.   The canvas is a container whose boundaries
	are only used for paiting, children might be outside of these
	boundaries.

	It is necessary in these cases to pass the events to all the
	children within the canvas bounding box and for each child to
	determine if the event was within its range. 

	(inside_object): replaced the default implementation for
	FrameworkElements with a more performing version: instead of
	mapping the point and using cairo_in_stroke and in_fill operations
	on a rectangle with mapped coordinates, we map the coordinates and
	check against the rectangle.

	(Canvas::getbounds): if we are the topmost canvas, the boundaries
	are those from the Surface, not the ones that include the maximum
	extent from the children.   Used to do precise mouse enter/leave. 

2007-06-17  Jeffrey Stedfast  <fejj@gnome.org>

	* media.cpp (MediaElement::OnPropertyChanged): Chain to parent
	when its not our property.

	* brush.cpp: Implemented VideoBrush (tho it's not yet debugged).

	* mplayer.cpp (GetSurface): Added.

	* text.cpp (text_init): Fixed to use RegisterFull for Froeground
	so we can specify Value::BRUSH as the default value type instead
	of it using SolidColorBrush as the type.

2007-06-17  Chris Toshok  <toshok@ximian.com>

	* xaml.cpp (timespan_from_str): fix parsing of timespans shorter
	than 1 second.

2007-06-17  Chris Toshok  <toshok@ximian.com>

	* clock.cpp (Clock::TimeUpdated): remove a special case for the
	clock's duration being Automatic.  Fixes infinite animation in
	Surface port.

	* runtime.cpp (crossing_notify_callback): return type is gboolean,
	and make sure we always return something.
	
2007-06-17  Miguel de Icaza  <miguel@novell.com>

	Propagate changes from children of the transform up to our
	containers, this is done in several steps:

	* runtime.cpp (DependencyObject::Attach, Detach): New methods that
	are used to attach an object to a container and detach it.   They
	were previously inlined inside SetValue.

	(Collection::Add, Remove): Attach and detach objects when they are
	added/removed. 
	
	* transform.cpp (Transform::OnPropertyChanged): if any class
	derived from Transform has one of its properties changed, it
	has a visual effect, propage this to the attacchees.

	(TransformGroup::OnSubPropertyChanged): Escalate here as well,
	this will catch the messages coming from anyone in the collection
	to its container. 

	(TransformCollection::OnSubPropertyChanged): Buble the event up
	here as well.

	* runtime.cpp (handle_motion): Change the order in which we send
	the events to the UIElement, we should start at the topmost
	element, and have the toplevel canvas be last.

2007-06-17  Sebastien Pouliot  <sebastien@ximian.com>

	* brush.cpp: Refactor ImageBrush::SetupBrush to reuse parts of it
	inside Image::render.
	* media.cpp: Use code from ImageBrush to render image with it's
	properties (e.g. Stretch)
	* transform.cpp: Update (commented) debug output.

2007-06-17  Miguel de Icaza  <miguel@novell.com>

	* runtime.cpp (GetValueNoDefault): This is necessary so we can
	distinguish a value that has been explicitly set from one that has
	not.
	

	* media.cpp (Image): use Framework::Width,Height for the image
	dimensions instead of the pixbuf width/height, used in extents and
	rotation computation.

	* runtime.cpp (Canvas::render): Set the clipping path on the
	identity matrix so we do not miss-clip.

	Render the canvas from 0, 0, fwidht, fheight, not the expose
	area. 

2007-06-16  Miguel de Icaza  <miguel@novell.com>

	* runtime.cpp (Cairo::render): The canvas also needs to set the
	matrix and clear its background. 

	(surface_resize): convenience entry point to resize a surface.
	Notice that this will resize the surface, but not the toplevel
	canvas. 

2007-06-16  Jackson Harper  <jackson@ximian.com>

	* demo.cpp:
	* runtime.h:
	* control.cpp:
	* xaml.cpp: Use a callback for setting custom attributes in
	elements.

2007-06-16  Jeffrey Stedfast  <fejj@gnome.org>

	* media.cpp: Implemented all the needed virtual methods for
	MediaElement to work, using my new MediaPlayer class.

	* mplayer.cpp|h: New class for playing media sources.

	* ffvideo.cpp: Removed from the build.

2007-06-16  Miguel de Icaza  <miguel@novell.com>

	Observation: either it is the surface, or something else is very
	slow, but entering the surface is quite slow right now to show the
	handles.   Not sure what it could be.
	
	* runtime.cpp (OnPropertyChanged): We probably should catch the
	property changes here, and not in the Sub* variant of this thing,
	this will update the canvas properly now.

	(dump_hierarchy): useful bit to debug what is going wrong. 
	
	(Canvas::get_xform_for): Do not apply extra
	transformations to the child other than the absolute_xform.

	(surface_attach): On attach we need to do a full invalidate, so
	the transformations are computed, otherwise it uses the defaults
	for the toplevel (zero), this fixes the atom.xaml issue. 

	* control.cpp (get_xform_for): This is not proxied to the real
	object, this is proxied to the parent.
	(control_initialize_from_xaml): Set the parent link here.

2007-06-16  Chris Toshok  <toshok@ximian.com>

	* transform.cpp, transform.h, runtime.cpp, runtime.h,
	  geometry.cpp, geometry.h, animation.cpp: Another pass (the last)
	  at removing all cached instance collections and using GetValue
	  for them.

2007-06-16  Chris Toshok  <toshok@ximian.com>

	* media.cpp (Image::SetSource): we want events even if we attach a
	downloader that's been started.

2007-06-16  Sebastien Pouliot  <sebastien@ximian.com>

	* shape.cpp: If StrokeThickness == 0 then don't stroke, otherwise it
	will mess with the earlier filling.

2007-06-16  Chris Toshok  <toshok@ximian.com>

	* runtime.h, runtime.cpp: remove the instance cached
	Panel::children, use accessor to get it when we need it.

	* brush.h, brush.cpp: same for the GradientBrush::children
	property.

2007-06-16  Chris Toshok  <toshok@ximian.com>

	* runtime.h: make these const Rect&'s.

2007-06-16  Sebastien Pouliot  <sebastien@ximian.com> 

	* control.cpp|runtime.h: control_initialize_from_xaml needs to return
	the Value::Kind of the object that was created so the managed side do
	a Lookup on it.

2007-06-16  Sebastien Pouliot  <sebastien@ximian.com>

	* control.cpp|runtime.h: control_initialize_from_xaml needs to return
	the element as the managed side needs (and defines) it.

2007-06-16  Miguel de Icaza  <miguel@novell.com>

	* control.cpp: Implement Control.

	* downloader.cpp: Implement a system to send various notifications
	as Chris wants his notifications and managed world wants the
	notifications as well. 

	Should they ahve been separate?   For now I just added a list of
	them.   This code is turning uglier every minute.

2007-06-16  Jackson Harper  <jackson@ximian.com>

	* xaml.cpp: Kill top_kind, I have no idea how this guy crept back
	in.
	- Handle expat errors a little better.

2007-06-16  Sebastien Pouliot  <sebastien@ximian.com>

	* runtime.h: Implement missing IntersectsWith and Intersection to fix 
	build.

2007-06-15  Chris Toshok  <toshok@ximian.com>

	* runtime.cpp (Canvas::render): small optimization.  only call the
	item's render method if its bounds actually intersects with the
	rectangle we're rendering.  Also, clip to the bounding rectangle
	of the item here.

2007-06-16  Chris Toshok  <toshok@ximian.com>

	* clock.cpp, clock.h: don't use a constant for the timeout in
	gtk_timeout_add, and add methods to add/remove the timeout.

	(ClockGroup::TimeUpdated): if we're paused or stopped,
	don't call child clock TimeUpdated methods at all.  they always
	generate CurrentTimeInvalidated even when the time hasn't changed,
	which triggers redraws that don't need to happen.

2007-06-16  Jackson Harper  <jackson@ximian.com>

	* runtime.cpp|h: We still need C style base_ref/unref.
	* demo.cpp:
	* xaml.cpp: Takle a callback for the from_file method also.
	
2007-06-16  Jeffrey Stedfast  <fejj@gnome.org>

	* ffvideo.cpp (Stop): Implemented.
	(.ctor): init paused to false (maybe this is why video
	didn'talways work?).
	(.dtor): Stop() the video and unhook the timeout.

	* runtime.cpp: Implement Base::ref and Base::unref instead of
	doing it the c way.

	* *.cpp: Updated for above change.

	* shape.cpp (shape_set_stroke): Don't unref the old stroke.
	(shape_set_fill): Same.

	* text.cpp (text_init): Use a separate brush for TextBlocks and
	Inlines.
	(text_block_set_foreground): Don't unref the old brush.
	(inline_set_foreground): Same.

2007-06-15  Chris Toshok  <toshok@ximian.com>

	* xaml.cpp: little leak fixes here and there.

2007-06-15  Chris Toshok  <toshok@ximian.com>

	* demo.cpp (delete_event): destroy the surface and shutdown the
	runtime before we quit, just to make finding leaks a little
	easier.

	* ffvideo.cpp (MediaElementFfmpeg): re-order the
	close/g_io_channel_close calls to quiet down glib.

	* media.cpp: don't close the loader in DownloaderEvents.  do it in
	the dtor for now, to keep from getting that stupid gdk warning.
	this is wrong, but at least it's quiet.

	* text.cpp: delete the color we initialize the solid color brush
	with in text_init.

	* animation.cpp, animation.h: remove the cached key_frames
	collections.

	* runtime.h, runtime.cpp: clean up our cleanup a lot.

	in the copy constructor we actually need to make a copy (or
	ref in cases where we can) everything we store as a pointer in
	our union.  This is to facilitate us destroying it in the
	destructor.

	in surface_destroy just delete the surface.  move all the destroy
	code to the destructor.  Also, in the destructor unhook from the
	gtk events, since we get an unrealize event as part of widget
	destruction, apparently.

	Add DependencyObject::Shutdown which destroys our properties
	hashtable.  Create all the hashtables with _new_full so we can
	give free functions for keys/values.  actually make use of them,
	and clean up the relevant destructors.

	Add a destructor for Type, and have the Type ctor take its
	arguments.  free the name in the dtor.  Same deal with _new_full
	for hashtable creation, and also add Type::Shutdown.

	(runtime_shutdown): call TimeManager::Shutdown, Type::Shutdown,
	and DependencyObject::Shutdown to free all our stuff.
	
	* clock.h, clock.cpp: add TimeManager::Shutdown.

2007-06-15  Jeffrey Stedfast  <fejj@gnome.org>

	* demo.cpp (gettime): Improved fps reporting.

2007-06-15  Miguel de Icaza  <miguel@novell.com>

	* media.cpp (SetSource): Make it so we use the data from a
	downloader that might have already finished.

2007-06-15  Chris Toshok  <toshok@ximian.com>

	* runtime.cpp: simplify refcounting a little more.  we now have 3
	rules:

	    1. Value() holds a ref to its contained dependency object.
	       This means we don't have to do anything special for
	       anything stored in a DP.
	
	    2. Collections hold a ref to their constituents.

	    3. If you *must* cache an DO pointer in an instance field, you
	       must ref/unref it properly.  But really, you shouldn't need
	       to cache it, and I'll likely go through and remove all the
	       ones I can find.

	* media.cpp (media_element_set_markers): remove the ref/unref
	stuff.

	* animation.cpp: comment out some spew, and follow a safer pattern
	in OnPropertyChanged.

	* brush.cpp (OnPropertyChanged): safer pattern.

	* geometry.cpp (OnPropertyChanged): safer pattern.

	* runtime.h: make all these dtors virtual.

	* clock.cpp, clock.h: remove the cached child_timelines instance
	field to clean up some of the ref counting problems.

2007-06-15  Miguel de Icaza  <miguel@novell.com>

	* media.cpp (SetSource): Make it so we use the data from a
	downloader that might have already finished.

	We now accumulated data as we go.
	
	* downloader.cpp (downloader_get_response_text): Return
	accumulated data.

2007-06-15  Jackson Harper  <jackson@ximian.com>

	* demo.cpp:
	* runtime.h:
	* xaml.cpp: Callback into managed code to create custom element
	instances.

2007-06-15  Jeffrey Stedfast  <fejj@novell.com>

	* media.cpp (media_base_new): Removed, not instantiable.
	(Image::getbounds): Need to set the absolute_xform matrix :)

2007-06-15  Miguel de Icaza  <miguel@novell.com>

	* media.cpp (Image::getxformorigin): Implement getxformorigin, so
	rotations are correct.

	(Image::getbounds): Implement getbounds correctly, the coordinates
	should be in device coordinates with the transform applied.

2007-06-15  Jeffrey Stedfast  <fejj@novell.com>

	* demo.cpp (main): Add some Inlines to the TextBlock to test
	bounding box calculations.

	* text.cpp (OnPropertyChanged): If the property that changed is
	the Actual width/height, then don't invalidate anything - simply
	return (these are just cache values that only we can set
	internally).
	(Draw): Keep track of the pixel width/height of the entire
	rendered TextBlock+Inlines.
	(getbounds): Use the cached width/height of the TextBlock+Inlines
	and draw a rectangle instead to improve performance.

2007-06-15  Sebastien Pouliot  <sebastien@ximian.com>

	* media.cpp|h: Add media_base_new.

2007-06-15  Miguel de Icaza  <miguel@novell.com>

	* Add destructors to classes that are caching DO collections and
	keeping refs to those, thanks to Chris Toshok for the pattern to
	use here. 

2007-06-15  Chris Toshok  <toshok@ximian.com>

	* media.cpp (Image::render): use the uielement's opacity when
	painting.  Fixes the DrPopperSilverlight Bubble.xaml file.

2007-06-15  Miguel de Icaza  <miguel@novell.com>

	* runtime.cpp (UIElement): The problem was that:

		The ~UIElement destructor was setting the collection
		properties to NULL in an attempt to unref stuff (these
		are now automatically unrefed).

		This caused the hash table destructor to unref the values
		that were held in the collection.

		At a later point, since "triggers" was cached and
		OnPropertyNotify was called, we attempted to unref the
		value, but that cached value pointed to an object that had
		already been released.

	* Everywhere: remove duplicated code that got copy/pasted
	everywhere for tracking collections and caching values.  

	This should help fixing the crashing problem, but I still need to
	review the rules for reference counting and keeping a cache of
	variables in instance fields. 

2007-06-15  Jeffrey Stedfast  <fejj@novell.com>

	* text.cpp (Draw): Now renders inlines.

2007-06-15  Chris Toshok  <toshok@ximian.com>

	* Makefile.am (EXTRA_DIST): add alpha-premul-table.inc from
	libgdiplus.

	* demo.cpp: notify the downloader of the image file size so that
	it'll generate a COMPLETED event for the Image.

	* media.h, media.cpp: make image downloading non-progressive (we
	only create the surface when the downloader notifies the download
	is complete), but gain something in return: images with alpha
	channels.

	* downloader.h, downloader.cpp: add closure to event_notify, and
	expose the Event kind.

2007-06-15  Miguel de Icaza  <miguel@novell.com>

	* runtime.cpp (UIElement, Canvas): send events to the objects as
	well.   My original test on orcas was buggy.

2007-06-15  Sebastien Pouliot  <sebastien@ximian.com>

	* runtime.cpp|h, type.cpp, value.cpp|h: Add Control.

2007-06-15  Jeffrey Stedfast  <fejj@novell.com>

	* xaml.cpp (dependency_object_add_child): If the col_v collection
	value is NULL, create a new collection and add it to the
	DependencyObject.

	* runtime.cpp: Added a generic collection_new() function which
	takes a Value::Kind to specificy which collection-type it should
	allocate.

2007-06-15  Miguel de Icaza  <miguel@novell.com>

	* downloader.cpp: Implement DownloadProgress property and event
	notification. 

	* runtime.h (DependencyObject::Is): new method, similar to C# is.

	* runtime.cpp (surface_repaint): We clear the background here
	again, to allow canvases to have transparent brushes.

2007-06-15  Sebastien Pouliot  <sebastien@ximian.com>

	* runtime.cpp: Panel.Background is NULL by default, which means it's
	transparent. This fixes Canvas inside Canvas.

2007-06-15  Jackson Harper  <jackson@ximian.com>

	* runtime.cpp|h: Implement some Inlines stuff that the parser will
	need.
	* xaml.cpp: Add some of the pieces for creating textblock inlines.
	- Added some TODO areas for creating late bound collections (maybe
	this should just be illegal??).

2007-06-15  Jeffrey Stedfast  <fejj@novell.com>

	* text.cpp: Have inlines cache their PangoFontDescription and
	added logic to render textblock inlines.

2007-06-15  Alan McGovern  <amcgovern@novell.com>

	* runtime.cpp|h: Added DependencyProperty.NameProperty

2007-06-15  Rolf Bjarne Kvinge  <RKvinge@novell.com>

	* transform.cpp|h: Add Transform C constructor.
	* runtime.cpp: Better warning message.

2007-06-15  Miguel de Icaza  <miguel@novell.com>

	* runtime.cpp (surface_attach): Only hook up the events when we
	get a toplevel attached.   

	* downloader.h: Drop the C++ API with a C proxy API, switch to a
	pure C API as we need this from the managed side anyways.

	* downloader.h: Move downloader defs into .h file

	Add a notification system for reporting the size of a stream, so
	we can do progress indication.

	* downloader.cpp: Move downloader to its own file.

2007-06-15  Sebastien Pouliot  <sebastien@ximian.com>

	* brush.cpp: Implement ImageBrush.Opacity like MS does it in 1.1 alpha
	(i.e. Brush.Opacity isn't considered, only UIElement.Opacity is)
	* geometry.cpp: PathFigure::IsFilledProperty is ignored in Mix and
	will be removed in 1.0.
	* media.cpp|h: Make Image aware of ImageBrush (so we can update too)
	* runtime.cpp|h: Move calculation of "total" opacity of UIElement at
	the *right* place.

2007-06-15  Jeffrey Stedfast  <fejj@gnome.org>

	* text.cpp (text_init): Set more default values.

	* runtime.cpp (Panel::OnPropertyChanged): Free children->list (as
	we iterate thru them) and set the resulting list to NULL (in case
	we don't hold the last ref) before unreffing the children object
	(in case we do own the last ref).
	(EventTrigger::OnPropertyChanged): Same.
	(UIElement::OnPropertyChanged): Same.

	* transform.cpp (OnPropertyChanged): Same.

	* geometry.cpp (GeometryGroup::OnPropertyChanged): Same.
	(PathGeometry::OnPropertyChanged): Same
	(PathFigure::OnPropertyChanged): Same.

	* clock.cpp (TimelineGroup::OnPropertyChanged): Same.

	* animation.cpp
	(DoubleAnimationUsingKeyFrames::OnPropertyChanged): Same.
	(ColorAnimationUsingKeyFrames::OnPropertyChanged): Same.
	(PointAnimationUsingKeyFrames::OnPropertyChanged): Same.

2007-06-15  Sebastien Pouliot  <sebastien@ximian.com> 

	* brush.cpp: Complete ImageBrush.Transform
	* shape.cpp: Please at least one side of the lines.

2007-06-15  Jeffrey Stedfast  <fejj@gnome.org>

	* text.cpp (text_init): No longer should ref the foreground brush
	or we leak refs.

	* xaml.cpp: Added support for Runs/LineBreaks

	* text.cpp: Implemented Run/LineBreak classes.
	(inline_new): Removed (can't instantiate this class).

2007-06-15  Miguel de Icaza  <miguel@novell.com>

	* runtime.cpp (~DependencyObject, free_value): unref all the
	values that are stored in the object on destruction

	* runtime.cpp: Add support for enter/leave events.

2007-06-14  Jeffrey Stedfast  <fejj@gnome.org>

	* text.cpp (getbounds): Set the actual width/height values to keep
	them up-to-date.

2007-06-14  Jeffrey Stedfast  <fejj@gnome.org>

	* text.cpp (getbounds): Revert prior change.
	(getxformorigin): Same.

	* shape.cpp (getbounds): Revert prior change.

	* ffvideo.cpp (getbounds): Revert prior change.

	* runtime.cpp (update_xform): Revert my last change.
	(item_update_bounds): Same.

2007-06-14  Jackson Harper  <jackson@ximian.com>

	* xaml.cpp: Set content properties when adding child elements.  We
	now no longer need to special case any elements except panel.

2007-06-14  Jackson Harper  <jackson@ximian.com>

	* xaml.cpp: I must have been very tired when I wrote that.

2007-06-14  Sebastien Pouliot  <sebastien@ximian.com>

	* media.h: Expose Image's Height and Width (required for ImageBrush)
	* brush.cpp: Implement all Strech and Alignment[X|Y] options. Nothing
	(yet) force an update of the drawing once the image is available.

2007-06-14  Jeffrey Stedfast  <fejj@gnome.org>

	* demo.cpp: Updated s/textblock/text_block/g

	* xaml.cpp: Don't register TextBlock twice.

	* ffvideo.cpp (getbounds): Can now depend on surface being set.

	* text.cpp: s/textblock/text_block/g
	(getbounds): Can now depend on surface being set.
	(getxformorigin): Same.

	* shape.cpp (getbounds): Can now depend on surface being set.

	* runtime.cpp (item_update_bounds): Don't update bounds if the
	surface hasn't been set yet.
	(update_xform): Same.

2007-06-14  Jackson Harper  <jackson@ximian.com>

	* xaml.cpp: Add keyspline parsing.

2007-06-14  Jackson Harper  <jackson@ximian.com>

	* value.h: This guy doesn't exist anymore, he is a
	DependencyObject now.

2007-06-14  Jackson Harper  <jackson@ximian.com>

	* animation.cpp:
	* runtime.cpp|h: We also need to update the DependencyObject when
	resolving PropertyPaths.

2007-06-14  Jackson Harper  <jackson@ximian.com>

	* runtime.cpp|h: New function that follows PropertyPath's to
	DependencyProperties.
	* animation.cpp: Use new function to resolve animation target
	properties.

2007-06-14  Jackson Harper  <jackson@ximian.com>

	* runtime.cpp (GetDependencyProperty): If there is no table for a
	property, we still need to lookup the property in the parent
	chain (assumming inherit is true).
	- Fix some typos with types_by_name

2007-06-14  Jeffrey Stedfast  <fejj@novell.com>

	* demo.cpp (main): Rotate our demo text inside a filled rectangle
	around the center of the text.

	* text.cpp (TextBlock.ctor): Initialise a cached
	PangoFontDescription that we will update when properties change.
	(TextBlock.dtor): Free our font/layout.
	(getbounds): Implemented correctly.
	(getxformorigin): Implemented.
	(Draw): Simplified since we don't need to create our layout/font
	anymore (just use the cached ones).
	(OnPropertyChanged): Implemented.

2007-06-14  Miguel de Icaza  <miguel@novell.com>

	* brush.cpp (Brush, SolidColorBrush, LinearGradientBrush,
	RadialGradientBrush): Notify owners when changes happen in the
	Brush.

	This makes the demo test-color-animation.xaml work without fps.

	* runtime.cpp: Make Canvas use the Background property to render
	the background.

2007-06-14  Chris Toshok  <toshok@ximian.com>

	* demo.cpp (main): create a namescope to attach to the canvas, and
	also make sure to add the storyboard to the tree someplace so that
	it can find the names of things.

	* xaml.cpp: create a namescope to attach to the top_element.

	* runtime.cpp (FindName): rework this to walk up the tree.  Drop
	the global namescope.

2007-06-14  Sebastien Pouliot  <sebastien@ximian.com>

	* brush.cpp|h: Add ImageBrush functions, which delegates most of its
	work to Image (downloader).
	* media.cpp|h: Expose the cairo_surface_t that contains the image.

2007-06-14  Chris Toshok  <toshok@ximian.com>

	* demo.cpp (FileDownloadState::AsyncFillBuffer): increase buffer
	size from 1024 to 8192 (and make it an instance instead of stack
	variable).  Also, add a return statement that will cause the idle
	handler to no longer be called when we get a write of 0 length.
	This might be wrong in the long term.

	* media.cpp, media.h: add cleanup methods for the Image class, and
	add a dtor as well.

2007-06-14  Chris Toshok  <toshok@ximian.com>

	* media.cpp (LoaderSizePrepared): fill in the initial state of the
	image to gray with black border.
	(LoaderAreaUpdated): invalidate the item.

	* media.h: fix the progressive image loading.

2007-06-14  Chris Toshok  <toshok@ximian.com>

	* demo.cpp: use the MediaBase::SourceProperty to set the image's
	source.

	* media.h, media.cpp: add Image::OnPropertyChanged so we can watch
	for changes in MediaBase::SourceProperty and kick off the download
	and stop the currently running one.

2007-06-14  Chris Toshok  <toshok@ximian.com>

	* demo.cpp: track downloader api change.

	* media.cpp: track downloader api change.

	* runtime.h, runtime.cpp: the downloader's write function needs an
	offset as well as a length to work with mozilla's streaming api.

2007-06-14  Jeffrey Stedfast  <fejj@novell.com>

	* demo.cpp (main): Draw some text

	* text.cpp (text_init): Set a default solid black brush for
	foreground properties on Inline/TextBlock objects.
	(Draw): Setup the Brush stuff before drawing.

2007-06-14  Jackson Harper  <jackson@ximian.com>

	* xaml.cpp: Add support for loading all implemented (and semi
	implemented) dependency object types.
	* text.cpp|h: C style constructors.

2007-06-14  Chris Toshok  <toshok@ximian.com>

	* animation.cpp (KeySpline): default should be 1,1 for
	controlPoint2.

2007-06-14  Sebastien Pouliot  <sebastien@ximian.com>

	* xaml.cpp: Add support for Matrix (non-DO) type.

2007-06-14  Chris Toshok  <toshok@ximian.com>

	* runtime.cpp (downloader_write): add C-style downloader_write
	method so we can call into it from the binding.

2007-06-14  Chris Toshok  <toshok@ximian.com>

	* value.cpp, animation.h, type.cpp, value.h, runtime.cpp,
	type.cpp.in, value.h.in: make KeySpline subclass from
	DependencyObject like it should, and fix resulting fallout.

2007-06-14  Miguel de Icaza  <miguel@novell.com>

	* runtime.cpp (Canvas): Implement OnChildPropertyChanged so we can
	catch cases of Top/Left being set on a child, this makes changes
	to the object after it has been created (adding/removing the
	property) work. 

2007-06-14  Sebastien Pouliot  <sebastien@ximian.com> 

	* brush.cpp|h: Much closer results for RadialGradients (but I still
	have a test case that fails). Also added Transform support for 
	LinearGradient.

2007-06-14  Jackson Harper  <jackson@ximian.com>

	* animation.h: C style constructors.
	* clock.cpp|h: C style constructors.
	* runtime.cpp|h: Follow proper naming convention for
	TimelineMarker C style constructors.

2007-06-14  Chris Toshok  <toshok@ximian.com>

	* runtime.h, runtime.cpp: remove the hack UnmanagedDownloader from
	here, and made Downloader pluggable with a set of functions.

	* demo.cpp: use the pluggable nature of Downloader to put
	UnmanagedDownloader here (and call it FileDownloadState).

	* value.cpp, value.h, type.cpp: resync.

2007-06-14  Jeffrey Stedfast  <fejj@novell.com>

	* text.cpp: Fixed Brush accessors for the NULL case.

	* media.cpp: Fixed accessors that could return NULL
	(media_init): init MediaBase and MediaElement items.

2007-06-14  Jackson Harper  <jackson@ximian.com>

	* animation.cpp: C style constructor.
	* media.cpp|h: Add some C style constructors.
	* xaml.cpp:  Add parsing hooks for new components.

2007-06-14  Chris Toshok  <toshok@ximian.com>

	* demo.cpp: make one of the videos an image instead.

2007-06-14  Jeffrey Stedfast  <fejj@novell.com>

	* xaml.cpp: Fixed the font_widths and font_stretches maps to
	reflect the numeric enum values defined in text.h (and msdn docs).

	* text.h: Sync enum values to documented numeric values.

2007-06-14  Rolf Bjarne Kvinge  <RKvinge@novell.com>

	* transform.cpp|h, media.cpp|h, brush.cpp|h, runtime.cpp|h:
	Make all classes that inherit from DO constructable, and add
	missing C-style constructors.

2007-06-14  Jackson Harper  <jackson@ximian.com>

	* runtime.cpp|h: Hookup the resource collection.
	* xaml.cpp: Parse resource collections.

2007-06-14  Chris Toshok  <toshok@ximian.com>

	* type.cpp, value.h, type.h: resync these.

	* media.h, media.cpp: add naive Image class.

	* runtime.h, runtime.cpp: add some Downloader methods, and
	subclass Downloader with a *very* hackish UnmanagedDownloader
	class that just loads from files.  Also add a "write_func"
	callback that the downloader can call when it has new data to hand
	off.

2007-06-14  Chris Toshok  <toshok@ximian.com>

	* animation.cpp: import an arc length calculator I found on the
	net (at http://steve.hollasch.net/cgindex/curves/cbezarclen.html)
	and use that for KeySpline::GetSplineProgress.  The results don't
	match MS's exactly, though.

2007-06-14  Rolf Bjarne Kvinge  <RKvinge@novell.com>

	* geometry.cpp, geometry.h: Add collection constructors.
	* brush.cpp, brush.h: Add ImageBrush and VideoBrush DPs.
	* runtime.cpp|runtime.h: Implement collection add/remove methods. 
	Add Downloader DPs.
	* media.cpp: Add MediaAttribute DP.	

2007-06-14  Sebastien Pouliot  <sebastien@ximian.com> 

	* brush.cpp|h: Refactor Opacity to make it reusable to other brushes
	(as it cannot be globally applied). Added DP, and related functions,
	to TileBrush.

2007-06-14  Miguel de Icaza  <miguel@novell.com>

	* Improve the destruction scenario to release the resources that
	we have acquired, we are now up to the point of stopping clocks
	properly, but more work is going to be needed in the long term to
	properly track refs and objects.

	Ensured that all virtual GetObjectType are flagged with virtual.

	* Makefile.am: Put runtime.cpp at the top, to improve
	compile/test cycle.

2007-06-14  Sebastien Pouliot  <sebastien@ximian.com> 

	* brush.cpp|h: One step closer for RadialGradientBrush
	* geometry.cpp: Fix ArcSegment sweep direction. All chess pieces now 
	render (shape-wise) correctly.
	* shape.cpp: Draw before setting the brush. This allows the brush
	setting code to ask for the extents to stroke/fill.

2007-06-13  Chris Toshok  <toshok@ximian.com>

	* animation.cpp (KeySpline::GetSplineProgress): reimplement this
	to return a percentage of the arc length of the bezier that is
	traversed when t = linearProgress, taking the algorithm from
	http://steve.hollasch.net/cgindex/curves/cbezarclen.html

2007-06-13  Chris Toshok  <toshok@ximian.com>

	* brush.h, geometry.h, animation.h, clock.h: add GetElementType
	collection overloads.

	* type.cpp: resync to track UIElement : Visual relationship.

	* runtime.h: add Collection::GetElementType, and add overloads
	(some commented out) for the collections listed.  Also, fix
	UIElement's superclass to be Visual.

	* runtime.cpp (Add): make sure we're only adding subclasses of our
	element type.

2007-06-13  Chris Toshok  <toshok@ximian.com>

	* clock.cpp (AddChild): just pass the child, unwrapped.

	* runtime.h: remove the Value* overloads for Collection::Add and
	Collection::Remove.

	* xaml.cpp (dependency_object_add_child): just pass the dependency
	object, unwrapped.

2007-06-13  Jeffrey Stedfast  <fejj@novell.com>

	* text.cpp: Implemented a ton of stuff...
	(text_init): Added.

	* runtime.cpp (runtime_init): Call text_init().

2007-06-13  Miguel de Icaza  <miguel@novell.com>

	* runtime.h (Collection): Since it seems that everything we have
	so far are collections of dependency objects, the code is now
	simplified and will also take refs and remove refs on destruction.

	The only reason to implement the Add/Remove methods is if you must
	do something as a hook during add/remove
	
	* runtime.cpp (SetValue): Enable NULLs to be set on Dependency
	Objects. 
	
	(OnPropertyChanged): Allow the value to be NULL, cope with that,
	we use this to clear all of our objects.

2007-06-13  Chris Toshok  <toshok@ximian.com>

	* xaml.cpp (xaml_create_from_str): make the from_str a little
	closer to from_file.  fixes hooking up names when loading from
	strings.

2007-06-13  Chris Toshok  <toshok@ximian.com>

	* runtime.cpp (runtime_init): start the time manager here.

	* demo.cpp (main): instead of here.

2007-06-13  Jackson Harper  <jackson@ximian.com>

	* xaml.cpp: Gracefull handling of error conditions. Being
	intentionally non strict about some things while we are
	developing (like unknown elements, and attributes, and missing
	namespaces).

2007-06-13  Sebastien Pouliot  <sebastien@ximian.com> 

	* brush.cpp: Better, but still imperfect, RadialGradientBrush

2007-06-13  Jackson Harper  <jackson@ximian.com>

	* runtime.h: Add some of the error event handler args, so i can
	use these in the parser.

2007-06-13  Jeffrey Stedfast  <fejj@novell.com>

	* brush.cpp (OnPropertyChanged): Free list nodes as we iterate
	(soptimsation, woot).

	* text.cpp: Implemented c wrappers for Inline

2007-06-13  Sebastien Pouliot  <sebastien@ximian.com> 

	* brush.cpp: Implemented LinearGradientBrush::SetupBrush
	* xaml.cpp: Handle GradientStops correctly (at GradientBrush) and add
	support for LinearGradientBrush.

2007-06-13  Jeffrey Stedfast  <fejj@novell.com>

	* text.cpp: Stubbed out TextBlock and Glyphs

2007-06-13  Jackson Harper  <jackson@ximian.com>

	* xaml.cpp: GradientBrush is a Brush.

2007-06-13  Miguel de Icaza  <miguel@novell.com>

	* runtime.cpp (dependency_object_find_name): Add new wrapper 

2007-06-13  Chris Toshok  <toshok@ximian.com>

	* animation.cpp, animation.h: add public storyboard methods for
	begin/pause/resume/seek/stop.  also start in on the spline
	keyframe/KeySpline stuff.

	* type.cpp: resync.

	* value.cpp: resync.

	* value.h: resync.

	* value.h.in: add keyspline stuff.

	* type.cpp.in: add keyspline stuff.

2007-06-13  Chris Toshok  <toshok@ximian.com>

	* demo.cpp: a few changes - none of the animations run forever
	now.  also, add some gtk events (button press/release/motion).  we
	pause animations on press, resume them on release.

	* clock.cpp: keep track of the offset caused by pausing/resuming
	the clock from our parent's time.

	* animation.cpp: split out all the logic for finding the current
	(and previous) keyframes into
	KeyFrameCollection::GetKeyFrameForTime.  Also, make the key frame
	collection maintain a separate sorted list of keyframes.

2007-06-13  Jeffrey Stedfast  <fejj@novell.com>

	* media.cpp (media_base_get_source): Implemented; use char*
	instead of Uri - we'll make the binding convert between the types.
	(media_base_set_source): Same.

2007-06-13  Rolf Bjarne Kvinge  <RKvinge@novell.com>

	* runtime.cpp: Xlib and we are both defining Visual,
	so implement a workaround.

2007-06-13  Sebastien Pouliot  <sebastien@ximian.com> 

	* brush.cpp|h: Added code for LinearGradientBrush and partial setup
	for all gradient-related brushes (needs testing). Add all color 
	definitions supported by XAML.
	* mkcolor.cs: Tool to generate colors from System.Drawing (as they
	are identical).

2007-06-13  Rolf Bjarne Kvinge  <RKvinge@novell.com>
	
	* runtime.h: Add Visual.
	* value.cpp, value.h, type.cpp: Updated.

2007-06-13  Jeffrey Stedfast  <fejj@gnome.org>

	* ffvideo.cpp: Back to using ALSA, but this time I got it right ;)

2007-06-13  Rolf Bjarne Kvinge  <RKvinge@novell.com>

	* media.h: Added MediaAttribute.
	* runtime.h: Added Downloader.
	* value.cpp, value.h, type.cpp: Updated.
	* typegen.cs: Copy Kind.cs to the correct directory.

2007-06-13  Rolf Bjarne Kvinge  <RKvinge@novell.com>

	* brush.cpp, brush.h, geometry.cpp: Fix property registration
	typos.

2007-06-13  Sebastien Pouliot  <sebastien@ximian.com> 

	* brush.cpp|h: Fix Brush::RelativeTransformProperty and 
	Brush::RelativeTransformProperty types.

2007-06-13  Sebastien Pouliot  <sebastien@ximian.com>

	* brush.cpp|h: Complete DependencyProperties for GradientBrush and
	add GradientStopCollection.
	* runtime.cpp|h: Remove code for GradientStopCollection.
	* xaml.cpp: Register new brush classes.

2007-06-13  Miguel de Icaza  <miguel@novell.com>

	* runtime.cpp: Various new events are now sent.

2007-06-13  Jackson Harper  <jackson@ximian.com>

	* xaml.cpp: When using the xaml_create_from_str we automatically
	add the default and x: namespaces.

2007-06-12  Jeffrey Stedfast  <fejj@gnome.org>

	* ffvideo.cpp: Fixed to subclass the new MediaElement class.

	* video.cpp: Removed.

2007-06-12  Sebastien Pouliot  <sebastien@ximian.com>

	* brush.cpp|h: Added DependencyProperty for GradientBrush and 
	GradiantStop. Added new brush-related enums. Add [g|s]etter functions
	for RadialGradient and BrushGradiantStop.

2007-06-12  Jackson Harper  <jackson@ximian.com>

	* xaml.cpp: Repsect namespaces.
	- Clean up code a little

2007-06-12  Sebastien Pouliot  <sebastien@ximian.com>

	* brush.h: New. Brush related stuff.
	* brush.cpp: DependencyProperty for RadialGradientBrush
	* runtime.h: [Re]move brush stuff.
	* shape.h: Add include for brush.h
	* type.cpp, value.h, value.h: Add RadialGradientBrush type.
	* Makefile.am: Add brush.h to the build.

2007-06-12  Jeffrey Stedfast  <fejj@gnome.org>

	* media.cpp|h: Added to the build

2007-06-12  Sebastien Pouliot  <sebastien@ximian.com>

	* transform.cpp|h: Complete MatrixTransform.
	* value.h, value.h.in, runtime.cpp, type.cpp, type.cpp.in: Introduce
	Matrix type.

2007-06-12  Miguel de Icaza  <miguel@novell.com>

	* runtime.h (UIElement::inside_object): new routine that should
	return true if the given absolute x, y is inside the given object
	or not. 

	(UIElement::handle_motion): new routine that is called when a
	motion event happens, it should determine if it can handle the
	given event at x, y.

	(Surface): new callbacks, these are callbacks that will pass the
	notification of the event to managed code. 

	* runtime.cpp (FrameworkElement): provide a default implementation
	for inside object that works for "squares" (things with widths and
	heights) 

2007-06-12  Jeffrey Stedfast  <fejj@novell.com>

	* ffvideo.cpp: Instead of aborting when SDL_OpenAudio() fails,
	simply disable audio for that video. Temporary hack.

2007-06-12  Sebastien Pouliot  <sebastien@ximian.com>

	* transform.cpp: Fix SkewTransform with translations (Center[X|Y])

2007-06-12  Jackson Harper  <jackson@ximian.com>

	* xaml.cpp: Implement enums.  This implementation is very naive,
	but works with the current Silverlight object model.  Basically,
	we just index property names to enum maps.  So a property name
	maps to a single enum type regardless of the type the enum is
	declared in.  This works fine with the current silverlight object
	model, but in the future might need to be changed, if we get
	conflicting property names.

2007-06-12  Jeffrey Stedfast  <fejj@novell.com>

	* ffvideo.cpp: Fixed sound playback to not get that nasty
	reverb-like effect. Also switched to using SDL for audio.

2007-06-12  Sebastien Pouliot  <sebastien@ximian.com>

	* transform.cpp|h: Implement SkewTransform.
	* type.cpp: Register new type SkewTransform.
	* value.cpp|h: Add SkewTransform.
	* xaml.cpp: Register DO for SkewTransform.

2007-06-12  Rolf Bjarne Kvinge  <RKvinge@novell.com>

	* runtime.cpp, runtime.h: Make DependencyObject::ParentProperty
	a normal field.

2007-06-12  Jackson Harper  <jackson@ximian.com>

	* xaml.cpp: Don't try to add properties to the panel.

2007-06-12  Sebastien Pouliot  <sebastien@ximian.com> 

	* geometry.cpp: Implemented ArcSegment::Draw using librsvg code
	* rsvg.cpp|h: New. Code from LGPL librsvg to implement arc_to
	* Makefile.am: Add rsvg.cpp|h to the build.

2007-06-12  Jackson Harper  <jackson@ximian.com>

	* xaml.cpp: Add parser for KeyTime structures.

2007-06-12  Chris Toshok  <toshok@ximian.com>

	* animation.cpp
	(ColorAnimationUsingKeyFrames::GetNaturalDurationCore): implement.
	(PointAnimationUsingKeyFrames::GetNaturalDurationCore): implement.
	(animation_init): make sure to initialize
	ColorKeyFrame::ValueProperty.

	* clock.cpp (Timeline::GetNaturalDuration): comment out some spew.

2007-06-12  Jackson Harper  <jackson@ximian.com>

	* animation.cpp|h: C style constructor for KeyFrameCollection.
	* xaml.cpp: Implement the KeyFrame types
	- Make the base types ghosts, despite what the docs say, they
	can't be used.

2007-06-12  Miguel de Icaza  <miguel@novell.com>

	* runtime.cpp (NotifyParentOfPropertyChange): Stop propagating
	when we have reached someone that handles that property in the way
	up. 

2007-06-12  Jackson Harper  <jackson@ximian.com>

	* xaml.cpp: Register the TriggerCollection so that
	TriggerCollections can be created using the explicit syntax.
	
2007-06-12  Jackson Harper  <jackson@ximian.com>

	* xaml.cpp: No longer need to special case EventTriggers. Remove
	some dead code (yippie!)
	* runtime.cpp: Unregister the target when removing from the
	collection.

2007-06-12  Rolf Bjarne Kvinge  <RKvinge@novell.com>

	* runtime.h: Implement Inlines.
	* value.cpp, value.h, type.cpp: Updated.

2007-06-12  Jackson Harper  <jackson@ximian.com>

	* runtime.cpp|h: Hook up the UIElement::Triggers and
	EventTrigger::Actions/RoutedEvent properly.
	* xaml.cpp: Remove some of the special casing for event triggers
	now that they are proper DependencyProperties.

2007-06-12  Rolf Bjarne Kvinge  <RKvinge@novell.com>

	* typegen.cs: Now checks if classes that inherits DependencyObject
	implement GetObjectType.
	* animation.h, runtime.h, text.h, geometry.h, shape.h: Implement
	missing GetObjectTypes and fix a few that were returning the wrong
	type.

2007-06-12  Rolf Bjarne Kvinge  <RKvinge@novell.com>

	* runtime.cpp: 
	- (DependencyObject::SetValue): Allow assigning an object of a 
	  more derived type than the defined property type. Change the
	  attached_list code to handle NULL dependency_objects.
	- Delete types_init, it's generated now.
	- Delete Value:As[DependencyObjects], its generated now.
	* runtime.h: Added definitions for a few missing collection classes.
	* types.cpp[.in], value.cpp[.in], value.h.in: Added.
	* value.h: Update.
	* Makefile.am: Add types.cpp and value.cpp
	* typegen.cs, typegen.cs: Added, generates types.cpp, value.cpp, 
	value.h and Kind.cs from the headers.

2007-06-12  Rolf Bjarne Kvinge  <RKvinge@novell.com>

	* runtime.cpp, runtime.h: (DO/DP) Make all char*'s const.

2007-06-12  Chris Toshok  <toshok@ximian.com>

	* clock.h, clock.cpp, runtime.cpp, value.h: use a
	TimelineCollection to store child collections in TimelineGroup.

2007-06-12  Chris Toshok  <toshok@ximian.com>

	* animation.h, animation.cpp (animation_init): remove the
	clock.cpp property registration.
	(DoubleAnimationUsingKeyFrames::GetNaturalDurationCore): initial
	attempt, calculate our timespan from our key frames.
	(Animation::GetNaturalDurationCore): return a 1 second duration,
	as doc'ed on msdn.
	(UpdatePropertyValue): plug leak.

	* runtime.cpp (runtime_init): call clock_init.

	* clock.h, clock.cpp: largish pass at implementing support for
	Duration::Automatic in ClockGroups (where they query their child
	timelines to see how long they should make themselves).  Also, add
	clock_init.

	* xaml.cpp (timespan_from_str): correct math.

2007-06-12  Jackson Harper  <jackson@ximian.com>

	* xaml.cpp: Add a couple more of the animation elements.

2007-06-12  Jackson Harper  <jackson@ximian.com>

	* runtime.cpp|h: There is no public Triggers property.

2007-06-12  Miguel de Icaza  <miguel@novell.com>

	* runtime.cpp (DependencyObject::RegisterFull): Allow for
	properties to be flagged as attached, and only propagate the child
	notification to those those that care about it.

2007-06-12  Rolf Bjarne Kvinge  <RKvinge@novell.com>

	* Implement a mechanism to keep track of parents and notify
	parents of changes in attached properties.

2007-06-11  Jackson Harper  <jackson@ximian.com>

	* xaml.cpp: Add content properties, and handle collections that
	are content properties, by implicitly adding items to the
	collections.

2007-06-11  Sebastien Pouliot  <sebastien@ximian.com>

	* runtime.cpp: Remove matrix initialization (to avoid double-inits in 
	most cases).
	* transform.cpp: Add matrix initialization in TransformGroup::
	GetTransform. Makes the API safer :)

2007-06-11  Sebastien Pouliot  <sebastien@ximian.com> 

	* geometry.cpp: Implemented [Ploy]QuadraticBezierSegment::Draw.

2007-06-11  Sebastien Pouliot  <sebastien@ximian.com>

	* geometry.cpp|h: Add drawing of [Poly]LinesSegment and 
	[Poly]BezierSegment. More than half of Sam Ruby's samples can work
	with this.

2007-06-11  Jeffrey Stedfast  <fejj@novell.com>

	* ffvideo.cpp: Attempt to get video to be in sync with audio by
	using the audio pts as the target_pts.

2007-06-11  Jackson Harper  <jackson@ximian.com>

	* runtime.cpp: Register the collection types as derived from
	COLLECTION.

2007-06-11  Chris Toshok  <toshok@ximian.com>

	* xaml.cpp (timespan_from_str): fix reading off the end of digits
	array.

2007-06-11  Jackson Harper  <jackson@ximian.com>

	* xaml.cpp: Implement some more collection loading. A lot of
	duplicate code here, so I should probably refactor things a bit,
	but will wait until I've seen how more collections are laid out.

2007-06-11  Chris Toshok  <toshok@ximian.com>

	* animation.h, animation.cpp: use KeyFrameCollection's for the
	*AnimationUsingKeyFrames key frame stuff, instead of GLists.

	* value.h, runtime.cpp: add Value::AsKeyFrameCollection.

2007-06-11  Jackson Harper  <jackson@ximian.com>

	* xaml.cpp: Make the parents of collections the Collection ghost
	element.  This is a first step in cleaning up collection creation
	a little.

2007-06-11  Sebastien Pouliot  <sebastien@ximian.com> 

	* transform.cpp: remove dead code.
	* xaml.cpp: Partial collection support for geometry.

2007-06-11  Sebastien Pouliot  <sebastien@ximian.com>

	* transform.cpp: Multiply each matrix in a TransformGroup (fix the 
	open-clipart sample, at least the correct parts of the sample).
	* runtime.cpp: Always initialize the matrix in item_get_render_affine
	otherwise we'll end up with bad random results.

2007-06-11  Rolf Bjarne Kvinge  <RKvinge@novell.com>

	* runtime.h, runtime.cpp: (DependencyObject) Add SetValue/GetValue 
	overloads that takes strings as well as DP, GetDependencyProperty where 
	it's possible to specify whether the parent type is searched for the
	property or not, and a HasProperty method

2007-06-10  Sebastien Pouliot  <sebastien@ximian.com>

	* geometry.cpp|h: Fix function names wrt type.
	* shape.cpp: Detect RenderTransform and RenderTransformOrigin changes
	and call update_xform. This fix the "atom" sample :)
	* transform.cpp: Fix Rotate and Scale around a center point.

2007-06-10  Sebastien Pouliot  <sebastien@ximian.com> 

	* geometry.cpp: Add more precision to types.
	* runtime.cpp: Apply Canvas' RenderTransform and RenderTransformOrigin

2007-06-10  Sebastien Pouliot  <sebastien@ximian.com> 

	* brush.cpp: Implement Opacity for SolidColorBrush.
	* runtime.cpp|h: Add an UIElement parameter to SetupBrush so we can 
	access it's properties (e.g. Opacity in this case). Add uielement_
	[g|s]et_opacity functions.
	* shape.cpp: Supply the UIElement when setting up brushes.

2007-06-10  Sebastien Pouliot  <sebastien@ximian.com>

	* shape.cpp: Fix rounded rectangle when radius_[x|y] are larger than 
	half the width|height.

2007-06-10  Miguel de Icaza  <miguel@novell.com>

	* shape.cpp (OnPropertyChanged): Implement this property for most
	shapes: if the property is set, we need to invalidate and
	repaint. 

	* runtime.h (FullInvalidate): A method to perform a queue to
	redraw the underlying region, update the bounds and queue an
	update for the new region.

	* runtime.h (Base): make destructor virtual so that base_unref can
	call delete (Base *) p.   Exposed by the managed code when the
	first base_unref ran for the first time :-)

	I sense a leak!

	* runtime.cpp (surface_attach): invalidate the areas before and
	after, compute the bounds using item_update_bounds, not the
	getbounds method directly.

2007-06-10  Sebastien Pouliot  <sebastien@ximian.com>

	* xaml.cpp: Add PathFigure[Collection]/Segments support.

2007-06-10  Sebastien Pouliot  <sebastien@ximian.com> 

	* brush.cpp: Fix Green definition, like GDI+ MS use a dark (0x80)
	green unlike other basic colors (red/blue at 0xFF).
	* xaml.cpp: Don't assert on an empty collection.

2007-06-10  Miguel de Icaza  <miguel@novell.com>

	* runtime.cpp, runtime.h (BasicArray): New base struct for
	PointArray and double array, puts the count field at the beginning
	and avoids an extra block to be allocated (count and values are
	now on a single contiguous block).

	Introduce a refcount for the arrays, so that we can release those
	properly.  Due to the nature of how we copied values before we
	had to leak the values, when the leak was plugged, we crashed.  

	The refcount is there just because it was easy, we could clone if
	we wanted, but also I would like to keep the refcount there to
	ensure that the array of doubles is aligned on an 8 byte
	boundary. 

	(double_array_new, point_array_new): New methods to create the
	structures. 

	(Value): Now free the arrays.
	

2007-06-09  Sebastien Pouliot  <sebastien@ximian.com>

	* geometry.cpp|h: Add/complete PathFigureCollection and 
	PathSegmentCollection. Doesn't parse from xaml.
	* runtime.cpp, value.h: Add support for new classes.

2007-06-09  Sebastien Pouliot  <sebastien@ximian.com>

	* geometry.cpp|h: Complete GeometryGroup with GeometryCollection.
	But color rending is not yet correct in demo files.
	* runtime.cpp, value.h: Add support for GeometryCollection
	* xaml.cpp: Add support for GeometryGroup

2007-06-09  Chris Toshok  <toshok@ximian.com>

	* animation.h, animation.cpp, value.h, runtime.cpp: add
	ColorKeyFrame and it's linear/discrete subclasses, as well as
	ColorAnimationUsingKeyFrames.

2007-06-09  Chris Toshok  <toshok@ximian.com>

	* animation.h, animation.cpp, value.h, runtime.cpp: add the
	Discrete keyframes for point and double.

2007-06-09  Chris Toshok  <toshok@ximian.com>

	* genkindcs.sh: new file, a script to generate
	olive/class/agclr/Mono/Kind.cs.

	* value.h: add marker comments so that genkindcs.sh works.  Also,
	remove the explicit value assignments to enum elements <
	DEPENDENCY_OBJECT.  there's no need for it.

2007-06-09  Chris Toshok  <toshok@ximian.com>

	* demo.cpp (main): add in another animation, this one using
	keyframes, that moves a square around in a square, while animating
	its background color the same way as the other rectangles.

	* value.h, runtime.cpp: add in the keyframe types.

	* runtime.cpp (DependencyObject::DependenceyObject): fix a
	valgrind error - we shouldn't be "free"ing Values, since they're
	"new"ed.  Add free_value and use that for the hash table value
	dtor, and delete them correctly.

	* animation.h, animation.cpp: add a lot of the keyframe animation
	stuff.  DoubleAnimationUsingKeyFrames + LinearDoubleKeyFrame is
	the only tested configuration, though.

	* clock.cpp (everywhere): guint64->TimeSpan fixing.
	(TimeUpdated): turns out that not only does the progress go from
	1.0 to 0.0 when reversed, but current_time actually goes backward
	as well.  this has the nice effect of actually simplifying this
	method substantially, since we can always compute progress as
	time/duration.

	* clock.h: typedef TimeSpan to gint64 (switching from guint64
	everywhere), and update the api to use this.

2007-06-09  Miguel de Icaza  <miguel@novell.com>

	* runtime.h (value_color_from_argb): Temporary hack until we
	figure out how to marshal Colors properly, we are using the uint32
	constructor, we should figure out if this is what we want, or if
	we should go down the route of using doubles (C++ stores thinks as
	Doubles our managed API as bytes).

2007-06-10  Jackson Harper  <jackson@ximian.com>

	* xaml.cpp: Handle the TransformGroup default collection.
	- Add Value's to the collection

2007-06-09  Jackson Harper  <jackson@ximian.com>

	* transform.cpp|h: C style constructor for TransformGroup
	* xaml.cpp: Implement loading transform groups and transform
	collections

2007-06-09  Jackson Harper  <jackson@ximian.com>

	* value.h:
	* runtime.cpp:
	* transform.cpp|h: Impplement transform groups and transform
	collections.

2007-06-09  Jackson Harper  <jackson@ximian.com>

	* value.h:
	* runtime.cpp|h: Use the new collection classes for triggers and
	actions. These are unsettable, so don't register them as
	DependencyProperties.

2007-06-08  Everaldo Canuto  <ecanuto@novell.com>

	* runtime.cpp: In surface_destroy check for toplevel before unref
	it. 

2007-06-08  Chris Toshok  <toshok@ximian.com>

	* animation.h: remove the huge whitespace gap after KeyTime, and
	remove the ifdef'ed out Nullable<T> template.
	
	* animation.cpp: remove the unused point_animation C api, and use
	the overloaded + operator on Color and Point when initializing
	"end" in GetCurrentValue for those animations.  They're looking
	more and more similar.

2007-06-08  Chris Toshok  <toshok@ximian.com>

	* globally: move away from all uses of Value::u union.  switch
	everything to using Value::As* methods, which do typechecking and
	safe downcasting.
	
	* value.h: make the union private to catch anyone accessing it
	directly.

	* runtime.cpp (IsSubclassOf): return true if type == super.  Not
	strictly "subclass", but it makes this method a little more
	useful/efficient.  Add As* methods for string, point arrays, and
	double arrays, and add nullable As* methods for the types which
	don't return pointers already.

2007-06-09  Jackson Harper  <jackson@ximian.com>

	* xaml.cpp: Parse time spans correctly.

2007-06-08  Miguel de Icaza  <miguel@novell.com>

	* runtime.h (UIElement): Remove user_xform_origin as a field, now
	we pull this from the DependencyObject as it should be. 

	* runtime.cpp (UIElement::OnSubPropertyChanged): Catch a bunch of
	other properties that would trigger an invalidate/bounds
	recomputation. 

	(item_init): initialize the other properties that the managed code
	needs. 
	
	* shape.cpp, ffvideo.cpp: updated to use the
	RenderTransformOriginProperty in the computation of the center for
	the transformation.

2007-06-08  Chris Toshok  <toshok@ximian.com>

	* Makefile.am (libmoon_la_SOURCES): add value.h

	* runtime.h, value.h: move the Value structure to value.h, since
	it (and its required forward decls) have grown huge.
	
	* runtime.cpp: add all the Value::As* methods, yay for CPP.

2007-06-08  Jeffrey Stedfast  <fejj@novell.com>

	* ffvideo.cpp (queue_data): Replaced the sound code with my newest
	implementation, seems to play sound correctly now.

2007-06-08  Chris Toshok  <toshok@ximian.com>

	* clock.h, clock.cpp: move all the TimeManager/Clock/Timeline
	stuff here, to help relieve some of the pressure building up in
	animation.h/animation.cpp.

2007-06-08  Chris Toshok  <toshok@ximian.com>

	* animation.cpp: add some skeleton code for point keyframe
	animations, and reduce all the Double/Point/Color Animation
	GetCurrentValue() methods to much the same, using LERP and the
	operators defined in runtime.h.

	* runtime.cpp (types_init): register the new keyframe types.

	* runtime.h: add some new animation types to Value, and add
	operators for +, -, and * (scalar) for Color and Point to make the
	animation code a little more concise.

	* animation.h: add some new classes/structs for use in keyframe
	animations.

2007-06-08  Miguel de Icaza  <miguel@novell.com>

	* runtime.cpp, runtime.h (Collection): Rework the collection to
	use abstract methods (gulp), 

	(VisualCollection): New collection, derives from Collection, does
	the collection thing.

	(Panel.OnPropertyChanged): If our children collection is updated,
	take care of it here.

	(DependencyObject): use free instead of g_free as we are
	allocating strings with strdup.
	
	(Value): drop constructor that specified type, type is not part of
	Value.
	
	* xaml.cpp, shape.cpp: Remove use of the old destructors now that we keep
	track of types correctly.

2007-06-08  Sebastien Pouliot  <sebastien@ximian.com>

	* brush.cpp: Fix color formats argb and rgb (too dark).

2007-06-08  Rolf Bjarne Kvinge  <RKvinge@novell.com>

	* runtime.h, runtime.cpp: Change Value::Kind to not have any holes
	in the integer ranges, and change Type's type hashtable to an array
	of types, indexed by Value::Kind. Also add Value::COLLECTION and 
	update Collection to use it.

2007-06-08  Sebastien Pouliot  <sebastien@ximian.com>

	* shape.cpp|h: Add Path::CanFill as it depends on the Geometry 
	object(s) being used.
	* geometry.cpp|h: Implemented Poly[Line|Bezier|QuadraticBezier]Segment
	Points properties and some basic draw stuff too.

2007-06-08  Rolf Bjarne Kvinge  <RKvinge@novell.com>

	* runtime.h, runtime.cpp, shape.cpp, xaml.cpp:
	Remove the Value (DependencyObject, Kind) constructor,
	the type of the DependencyObject can be obtained directly 
	from the DependencyObject itself now, and update all uses
	to the Value (DependencyObject) constructor.

2007-06-08  Rolf Bjarne Kvinge  <RKvinge@novell.com>

	* *.h, *.cpp: Remove objectType and SetObjectType from 
	DependencyObject, make DependencyObject::GetObjectType virtual, 
	and update all inheritors of DependencyObject to not use 
	SetObjectType, but override GetObjectType.

2007-06-08  Jackson Harper  <jackson@ximian.com>

	* xaml.cpp: Add some type checks to ensure we are setting child
	properties to legal types.
	- explicitly set properties value types, Value now requires this.
	- fix warning

2007-06-08  Jackson Harper  <jackson@ximian.com>

	* runtime.cpp: Initialize the surface to NULL
	- use UIElement as the type for flags 

2007-06-08  Sebastien Pouliot  <sebastien@ximian.com> 

	* shape.h: Don't waste time trying to fill lines.
	* shape.cpp: Fix dashes support. First reset between shapes and, 
	second, handle cairo dislike of a single dash value of 0.0.

2007-06-08  Sebastien Pouliot  <sebastien@ximian.com>

	* shape.cpp|h: Some shapes, like polylines, don't supports Fill.

2007-06-08  Sebastien Pouliot  <sebastien@ximian.com> 

	* shape.cpp|h: Implement Polygon::Points aad Polyline:Points 
	properties as DependencyProperty. Adjust their Draw methods.
	* runtime.cpp: Implement point_array_from_str.

2007-06-08  Sebastien Pouliot  <sebastien@ximian.com>

	* shape.cpp|h: Add DP support for StrokeDashArray (double*).
	* runtime.cpp|h: Add double* and Point* (array) support to Value.
	* xaml.cpp: Add DOUBLE_ARRAY and POINT_ARRAY support. Supply value 
	kind for brushes to avoid runtime warnings.

2007-06-08  Rolf Bjarne Kvinge  <RKvinge@novell.com>

	* runtime.cpp, runtime.h: Implemented a type system that tracks
	types' name and parent type.

2007-06-08  Miguel de Icaza  <miguel@novell.com>

	* runtime.cpp (Panel): Make children a property of the panel so we
	can access it from the managed world.

	(Value): Add new constructor that takes a full type, need to
	discuss this with the team.

2007-06-08  Jackson Harper  <jackson@ximian.com>

	* animation.cpp|h: Implement BeginStoryboard
	* runtime.cpp|h: Implement event triggers
	- Fire a loaded event when we first render an element
	* xaml.cpp: Implement parsing and loading storyboard and begin
	storyboard as well as event triggers and some of the property
	types that go with these guys.
	
2007-06-08  Miguel de Icaza  <miguel@novell.com>

	* runtime.cpp (runtime_init): Add panel_init

	(panel_init): Register Children property (must still create the
	collections, that will be a new fight).

2007-06-07  Miguel de Icaza  <miguel@novell.com>

	* xaml.cpp (start_element_handler): For the top element, track the
	type that we loaded, so we can return this to our caller (needed
	for the managed interface).

	(XamlParserInfo): track also the Value::Kind of the top_element. 

	(xaml_create_from_file, xaml_create_from_str): Both now can
	optionally return the type of the toplevel element.

	* runtime.cpp (Value): Switch Value to strdup/free.

	Use inited to prevent multiple initializations.

2007-06-07  Chris Toshok  <toshok@ximian.com>

	* demo.cpp (main): track more of the api axing.

	* animation.h, animation.cpp (Storyboard::Begin): return
	immediately if we've already got a root clock.
	(globally) continue axing unused C api.

2007-06-07  Chris Toshok  <toshok@ximian.com>

	* demo.cpp: track all the animation changes away from the C api,
	and also test out the from/by animation combination by making the
	X scaling only go From 1.0 By -0.5 (so it animates in the range of
	[1.0..0.5].
	
	* animation.h, animation.cpp: lots of changes - get rid of many of
	the animation/timeline C api calls, since they're unnecessary for
	the binding.  Implement the nullable property getter/setters as
	#defines since I didn't want to c&p all of them and make the
	obvious mistakes.  While I'm at it, implement the thing I needed
	nullable typed values for - "by" animation support.  Now you can
	specify any of the following combinations and get a usable
	animation: From+By, From+To, By, To.  You can actually just put
	From as well, but it won't animate (since both start end end will
	be the same).  The To property overrides the By property, if both
	are present.

	* runtime.h, runtime.cpp: add an overload of
	DependencyProperty::SetValue which takes a Value*, to enable
	nullable types to be set.  the existing SetValue method calls the
	new one with &value.

2007-06-07  Sebastien Pouliot  <sebastien@ximian.com>

	* brush.cpp: Fix comment.
	* shape.cpp: Reduce duplication.

2007-06-07  Miguel de Icaza  <miguel@novell.com>

	* runtime.h: Store Value.BOOL in an int32, simplifies my life. 

	* runtime.cpp (dependency_object_set_value,
	dependency_object_get_value): Add C# callable method calls to
	control the properties.

	(dependency_property_lookup): Add a way of find dependency
	properties.

2007-06-07  Chris Toshok  <toshok@ximian.com>

	* animation.cpp (TimeUpdated): comment out some spew.

	* runtime.cpp (SetValue): use the copy ctor, and fix != check for
	current_value and value.
	(Value::Value): add a copy ctor, which takes care of the g_strdup
	for us.

	* runtime.h: add copy ctor for Value.

2007-06-07  Sebastien Pouliot  <sebastien@ximian.com>

	* brush.cpp, geometry.cpp, shape.cpp: Protect against NULL properties.

2007-06-07  Sebastien Pouliot  <sebastien@ximian.com> 

	* geometry.cpp: #if-out transforms, it crash the xaml samples
	* runtime.h: Fix hierarchy. Panel inherits from FrameworkElement.

2007-06-07  Chris Toshok  <toshok@ximian.com>

	* animation.cpp: switch all the various linear interpolation
	expressions to using the LERP macro, and add the PointAnimation
	implementation.

	* animation.h: add PointAnimation.

	* runtime.h: add Value::POINTANIMATION.

2007-06-07  Chris Toshok  <toshok@ximian.com>

	* runtime.h (Value): add COLORANIMATION to the list of types.
	Also, add a Kind constructor so we can use that for nullable type
	default values in the ::RegisterProperty calls.  That is,
	initializing the default to Value(Value::COLOR) gives you a null
	default value with the COLOR type.

	* runtime.cpp (Value): new Kind ctor.

	* animation.cpp/.h: add ColorAnimation.

	* demo.cpp (main): add a color animation that interpolates between
	Red and Blue for the SolidColorBrush.

2007-06-07  Sebastien Pouliot  <sebastien@ximian.com>

	* runtime.cpp: Restore alpha support. Don't call cairo_set_operator
	without a cairo_save|restore pair (or without resetting it's original
	value). Anyway right now it works without any of that :)

2007-06-07  Jackson Harper  <jackson@ximian.com>

	* runtime.cpp|h: add event triggers.
	* xaml.cpp: parse event triggers.

2007-06-07  Chris Toshok  <toshok@ximian.com>

	* animation.cpp/.h (Clock): initialize duration here.
	(TimeUpdated): instead of getting it every time through this
	function.

2007-06-07  Chris Toshok  <toshok@ximian.com>

	* animation.h: make Duration::FromSeconds return numbers of the
	same magnitude as get_now().

	* animation.cpp (Clock): fix UMR.

2007-06-07  Jackson Harper  <jackson@ximian.com>

	* xamp.cpp: Oops, not sure how that happened.  Set the property
	name correctly, not to the type name.

2007-06-07  Sebastien Pouliot  <sebastien@ximian.com>

	* geometry.cpp|h: Apply transform. Fix default values.

2007-06-07  Miguel de Icaza  <miguel@novell.com>

	* animation.cpp (get_now): The time computation was wrong, there
	was an extra "10" in there that made all computations go astray
	and in particular cause the large values for ScaleY, which made
	getboundingbox ridiculously slow.

	For debugging purposes: ScaleY was being set to
	131472940552.95215, which came from
	DoubleAnimation:GetCurrentValue which was computing this value
	from a busted clock.

2007-06-07  Sebastien Pouliot  <sebastien@ximian.com>

	* geometry.cpp|h: Add drawing for [Ellipse|Line|Rectangle] geometry.
	Add basic code for the other geometry types.
	* runtime.cpp|h: Add basic implementation for point_from_str and 
	rect_from_str 
	* shape.h: Export some cairo helpers.
	* shape.cpp: Refactor drawing to reuse the code from geometry.
	* xaml.cpp: Add Point and Rect parsing.

2007-06-07  Chris Toshok  <toshok@ximian.com>

	* demo.cpp: make all the animation stuff work declaratively, and
	test some of the different repeatbehavior and autoreverse
	settings.
	
	* animation.cpp: huge block of nasty code to determine our
	progress given the combinations of autoreverse and repeatbehavior.

	* animation.h: Add Duration stucture, add a few C api calls for
	getting/setting timeline properties.

	* runtime.h, runtime.cpp: add DURATION support to Value.
	
2007-06-07  Jackson Harper  <jackson@ximian.com>

	* runtime.cpp|h: Some pieces of the triggers framework.

2007-06-07  Jackson Harper  <jackson@ximian.com>

	* xaml.cpp: Handle repeat behaviors, lookup attached properties.

2007-06-06  Chris Toshok  <toshok@ximian.com>

	* animation.cpp, animation.h: add timeline_set_autoreverse.

2007-06-06  Chris Toshok  <toshok@ximian.com>

	* animation.h: add prototype for timeline_set_repeat_behavior.
	
	* animation.cpp (animation_init): register the RepeatBehavior
	property.
	(timeline_set_repeat_behavior): new function.

	* runtime.h: a better solution to enforcing types in the Value
	ctors - make Value (void*) private.  this gives compilation errors
	at all usage points where you're passing an unrecognized pointer
	type.  Also, add RepeatBehavior support to Value.

	* runtime.cpp: add repeatbehavior support to Value.
	
	* geometry.cpp: change all Value(pointer-to-struct) calls to
	Value(struct) calls.

	* transform.h: we need do define TransformGroup as a subclass of
	Transform, or the functions that SetValue a transformgroup fail to
	compile (since it's not a descendent of DependencyObject.)

2007-06-07  Jackson Harper  <jackson@ximian.com>

	* xaml.cpp: Get object element property setting working.

2007-06-06  Chris Toshok  <toshok@ximian.com>

	* runtime.h, runtime.cpp: add a special void* ctor to value so
	pointers aren't silently converted to bool (bad c++, bad!), and
	have that ctor output a warning message to the console, along with
	the likely cause.

	* brush.cpp: need to deref the Color* in the Value ctor.

2007-06-06  Chris Toshok  <toshok@ximian.com>

	* animation.cpp: new dump of the animation stuff.  this is much
	closer in spirit and implementation to that of WPF's
	timing/animation system.  it's not perfect yet, but it's much,
	much closer.

2007-06-06  Chris Toshok  <toshok@ximian.com>

	* runtime.h: make the point/color/rect copy constructors take a
	ref, not a pointer.  also, make the value contructors for struct
	types by-value.

	* runtime.cpp: make the value constructors for struct types
	by-value.

	* brush.cpp (brush_init): pass the Color by value.

2007-06-06  Chris Toshok  <toshok@ximian.com>

	* runtime.h, runtime.cpp: move the Value implementation (for
	everything but the operators) to the .cpp file.

2007-06-06  Miguel de Icaza  <miguel@novell.com>

	* runtime.h, runtime.cpp: Surface is no longer derived from
	Canvas, it now instead hosts a canvas, should avoid having two
	nested canvases for loading XAML files.

	demo.cpp: update.

	Correct computation of the bounding box for shapes and videos.

	* shape.cpp: Do not pop the cairo state after draw and then call
	extents as the computation on extents is done with the current
	cairo context, not the cairo context that drew the data before
	popping (this would show up with thick brushes).

	* runtime.cpp: Add 2 instead of 1, as double to integer rounding
	can take two values (negative and positive).

	* cutil.cpp: Cut and paste cairo code here, it computes the proper
	bounding box from the extents using the current absolute matrix. 

	* ffvideo.cpp (queue_data): Memory leak gone.

2007-06-06  Jackson Harper  <jackson@ximian.com>

	* xaml.cpp: Set brush attributes.

2007-06-06  Jackson Harper  <jackson@ximian.com>

	* runtime.h:
	* transform.h: Need to register this base DependencyObject for the
	xaml parser.
	* geometry.cpp: use correct value kind for registering properties
	* runtime.cpp: Don't be strict about the type with properties that
	derive from DependencyObject, we can't be too strict here, because
	of inheritance the registered type BRUSH could be set to
	SOLIDCOLORBRUSH
	- register some properties with the correct type
	
2007-06-06  Jackson Harper  <jackson@ximian.com>

	* animation.cpp|h:
	* runtime.h: Staring to add triggers
	* shape.cpp: Use brush as our property kind
	
2007-06-06  Sebastien Pouliot  <sebastien@ximian.com>

	* runtime.h: Add new types and SweepDirection enum.
	* geometry.cpp|h: Add PathFigure, ArcSegment, BezierSegment and 
	LineSegment classes and [g|s]etter functions.

2007-06-06  Miguel de Icaza  <miguel@novell.com>

	* runtime.h: Move all the types into the Value::Kind enumeration
	so that we can have a shared type system.

	* demo.cpp (main): Allow loading a XAML file from the command
	line, for your testing pleasure.

	* ffvideo.cpp (convert_to_rgb): We no longer need the loop to swap
	channels.

	Move to cairo to render to the screen the contents
	of the buffer.   ffmpeg and cairo do have the same RGBA format, it
	was actually the copy from this format to the screen using
	gdk_draw_pixbuf that failed: pixbuf expected the data in another
	format and there is no way to configure it.
	
	* runtime.cpp (surface_clear): use the cairo api as the surface is
	no longer living on the client buffer. 

	(surface_destroy): update

	(create_xlib, realized_callback, unrealized_callback): When the
	widget is realized, create a cairo context

2007-06-06  Sebastien Pouliot  <sebastien@ximian.com>

	* runtime.h: Add Value support for Point and Rect
	* geometry.cpp: Implement [g|s]etters for Point and Rect properties

2007-06-06  Rolf Bjarne Kvinge  <RKvinge@novell.com>

	* runtime.cpp, runtime.h: Added DependencyObject::GetObjectType.

2007-06-06  Sebastien Pouliot  <sebastien@ximian.com>

	* shape.cpp|h, runtime.cpp|h: Remove the (now) useless 
	set_prop_from_str methods since everything they handled is now
	moved into DependencyProperty.

2007-06-06  Sebastien Pouliot  <sebastien@ximian.com> 

	* shape.cpp|h: Use DependencyProperty for Shape Fill and Stroke 
	brushes. Add getter functions for fill and stroke.

2007-06-06  Sebastien Pouliot  <sebastien@ximian.com>

	* runtime.h: Call SetObjectType on Brush and SolidColorBrush

2007-06-06  Rolf Bjarne Kvinge  <RKvinge@novell.com>

	* runtime.cpp, runtime.h: Remove the default_values hashtable
	from DependencyObject, it's redundant since the default value
	is stored inside the DependencyProperty anyway.

2007-06-06  Sebastien Pouliot  <sebastien@ximian.com>

	* demo.cpp: Adapted to API changes.
	* brush.cpp: Add [g|s]etters for Brush and SolidColorBrush using
	DependencyProperty. Add brush initialization code.
	* runtime.cpp|h: Change Brush to inherit from DependencyObject. 
	Add Color support to Value. Call brush initialization.
	* shape.cpp: Add miter, pen join|cap and fill rule drawing support.
	* xaml.cpp: Adapted to API changes since SolidColorBrush now inherits
	from DependencyObject.

2007-06-06  Jeffrey Stedfast  <fejj@gnome.org>

	* ffvideo.cpp (convert_to_rgb): Make sure the frame->data is
	non-NULL before trying to scale.

2007-06-06  Sebastien Pouliot  <sebastien@ximian.com>

	* brush.cpp: Fix compiler warning.

2007-06-06  Jackson Harper  <jackson@ximian.com>

	* runtime.cpp/h: initialize xaml
	- Add canvas C style constructor
	- Make SolidColorBrush's Color public
	* shape.cpp: Comment out the set_prop... stuff, this code won't be
	used anymore, now that the xaml parser is using dependency objects
	to set properties.
	* animation.cpp|h:
	* transform.cpp|h: Add some C style constructors
	* brush.cpp: Create colors from a string instead of solid brushes
	* xaml.cpp: Add in a known element tree, and move property setting
	into the xaml code, also added code for setting properties with
	property element syntax
	
2007-06-05  Miguel de Icaza  <miguel@novell.com>

	Add type checking on SetValue, RegisterProperty to avoid
	mistakes. 
	
	* runtime.cpp (SetValue): Add simple type checking
	(Register): Ensure that no empty values are passed. 

	* runtime.h (DependencyObject): events, remove unused field.

2007-06-05  Chris Toshok  <toshok@ximian.com>

	* runtime.cpp: we need to maintain another hash table for
	DependencyProperties so we can return the actual property, not the
	default value, which is what GetDependencyProperty needs to do.
	(DependencyObject::FindName): implement this by either trying to
	use the namescope on this object or the global_NameScope (rather
	suboptimal, it's supposed to 'walk the logical tree' according to
	msdn).

	partially implement NameScope.

	* runtime.h: add NameScope, and add a uint64 Value.  Also add
	FindName on DependencyObject.

2007-06-05  Sebastien Pouliot  <sebastien@ximian.com>

	* shape.cpp|h: Add Shape's thickness and some dash support. Add more
	[g|s]etters for Shape using DependencyProperty.
	* demo.cpp: Add thickness and dashes to the rectangles.

2007-06-05  Sebastien Pouliot  <sebastien@ximian.com> 

	* shape.cpp|h: Move FrameworkElement stuff into runtime.cpp|h. Use
	functions to retrieve the height and width of shapes (values defined
	in FrameworkElement).
	* runtime.cpp|h: Use DependencyProperty for FrameworkElement Height 
	and Width properties.
	* demo.cpp: Adjust to API changes.

2007-06-05  Sebastien Pouliot  <sebastien@ximian.com>

	* shape.cpp: Remove (now) useless properties in Line.

2007-06-05  Miguel de Icaza  <miguel@novell.com>

	* shape.cpp, ffvideo.cpp, video.cpp: Do not use x, y anymore, we
	now have an absolute affine set for us beforehand.

	* runtim.cpp: on update_xform call the parent ::get_xform_for to
	obtain the base affine transform to use.

2007-06-05  Sebastien Pouliot  <sebastien@ximian.com>

	* geometry.cpp|h: Use DependencyProperty for properties.
	* transform.h: Protect.

2007-06-05  Chris Toshok  <toshok@ximian.com>

	* runtime.h: call SetObjectType where we need it.

	* shape.h: same.
	
	* geometry.h: same.

2007-06-05  Miguel de Icaza  <miguel@novell.com>

	* ffvideo.cpp (VideoFfmpeg): Initialize audio_frames_size, caught
	by valgrind

	* runtime.cpp (item_set_transform): This routine was doing nothing
	but doing an invalidate of the region, updating the transform,
	updating the bounding box and re-invalidating the new area.   Move
	that logic elsewhere (it was also ignoring the affine parameter
	anyways). 

	Unify user_xform with the RenderTransform dependency property, now
	we always have a static absolute transformation in the UIElement. 

2007-06-05  Sebastien Pouliot  <sebastien@ximian.com> 

	* shape.cpp|h: Update shape_init with correct values and implement
	 path_[g|s]et_data.

2007-06-05  Chris Toshok  <toshok@ximian.com>

	* animation.cpp (ClockTimeChanged): use the instance variety of
	GetDependencyProperty.

	* runtime.cpp (GetDependencyProperty): just call the static
	variety with our objectType.
	(SetObjectType): method to enable subclasses to set the object
	type.

	* runtime.h: add DependencyObject::SetObjectType, as well as the
	instance version of DependencyObject::GetDependencyProperty.

	* transform.h: call SetObjectType to identify this object.

2007-06-05  Chris Toshok  <toshok@ximian.com>

	* runtime.cpp (AddHandler): oops, g_list_append requires an assignment.

2007-06-05  Chris Toshok  <toshok@ximian.com>

	* runtime.h (Canvas): declare our dependencyproperties here.

	* runtime.cpp (canvas_init): actually assign the properties.

2007-06-05  Rolf Bjarne Kvinge  <RKvinge@novell.com>
	
	* runtime.cpp, runtime.h: Implement a DependencyProperty::
	GetDependencyProperty.

2007-06-05  Chris Toshok  <toshok@ximian.com>

	* runtime.cpp (OnSubPropertyChanged): remove the event handler for
	the render transform and use OnSubPropertyChange instead.
	(item_set_render_transform): clean this up substantially - the
	property system handles all the "event" stuff now.
	(item_get_render_transform): we need a getter now that this uses
	the depprop stuff.
	(NotifyAttacheesOfPropertyChange): new method, call
	OnSubPropertyChanged with both the attachee's property (the thing
	storing 'this') and the subproperty that changed.
	(SetValue): complicate the attachee stuff a bit, since we need to
	store both the object and the property it's storing the value in.
	(item_init): initialize RenderTransformProperty.

	* runtime.h: make UIElement subclass from DependencyObject. This
	flattens the hierarchy some from SL (which has Visual in between,
	but we have no Visual.)

	* transform.cpp (OnPropertyChanged): call
	NotifyAttacheesOfPropertyChange.  Also, reindent some stuff.

2007-06-05  Sebastien Pouliot  <sebastien@ximian.com> 

	* demo.cpp: Updated to use rectangle_set_radius_[x|y]
	* shape.cpp|h: Add [get|set]ter functions for Line and Rectangle
	* xaml.cpp: Updated for API change.

2007-06-05  Sebastien Pouliot  <sebastien@ximian.com>

	* runtime.h: Add new ctor for Color(uint). Change UIElement to inherit
	from DependencyObject.
	* brush.cpp: Complete named colors (wrt System.Windows.Media.Colors)

2007-06-05  Jeffrey Stedfast  <fejj@gnome.org>

	* ffvideo.cpp (queue_data): If we fail to get an audio codec, then
	we simply cannot play sound (or maybe there is no sound), either
	way, don't try to dereference the audio_codec pointer if it is
	NULL. Also wrapped audio setup in an #ifdef

2007-06-05  Miguel de Icaza  <miguel@novell.com>

	Implement the OnPropertySet stuff, builds on Toshok's first pass.

	Next stage: discuss with Toshok the migration to this awesome
	framework from Events ;-)
	
	* runtime.cpp (SetValue): when adding dependencyobjects track on
	the attached object the ownership.

	Notify all containers of a property change.

	* brush.cpp (Brush): Remove AddListener, RemoveListener, we can
	use the property notification system for these.

	* runtime.h (DependencyObject): Add a "attached_list" gslist to
	keep track of all the objects where this particular
	DependencyObject has been attached to, to provide OnPropertyChange
	notifications (not hooked up yet).

	(Value): Introduce DependencyObject constructor.

2007-06-05  Sebastien Pouliot  <sebastien@ximian.com>

	* shape.cpp|h: Started moving properties to DependencyObject. Added
	Path.
	* geometry.cpp|h: New. System.Windows.Media.Geometry related classes
	* runtime.cpp: Added calls to shape_init and geometry_init
	* runtime.h: Added Rect structure and new DependencyObject types for
	shapes and geometry.
	* Makefile.am: Added geometry.cpp|h to source files.

2007-06-05  Rolf Bjarne Kvinge  <RKvinge@novell.com>

	* runtime.h: initialize Value to zero on construction.

2007-06-05  Chris Toshok  <toshok@ximian.com>

	* demo.cpp: abstract the cairo transformations away by using
	RotateTransforms.. and this is probably going to annoy some
	people, but make the normally stationary elements bounce between
	smaller and larger.

	* animation.h: make Clock subclass from DependencyObject.

	* animation.cpp (animation_init): assign the properties, don't
	just call Register.

	also, track the EventObject method name change.

	* runtime.cpp (item_set_render_transform): new method.  unhook the
	old transform and hook up the new one.  also, explicit set our
	transformation here.
	(SetValue): make this only do the work (and more importantly only
	call OnPropertyChanged) if the value is different.

	* runtime.h: shorten the names of the EventObject methods.  Add
	operator== and operator!= to Value.  Add an EventObject to
	DependencyObject to give us rudimentary event handlers.  Add the
	render_transform "higher-level" transform into to UIElement.

	* transform.h: add the OnPropertyChanged override and rename
	transform_get_value to transform_get_transform.

	* transform.cpp (transform_init): oops.  we need to actually
	assign the properties.
	(transform_get_transform): indent.
	(OnPropertyChanged): override this method to emit
	"TransformChanged".

2007-06-04  Chris Toshok  <toshok@ximian.com>

	* Makefile.am (libmoon_la_SOURCES): add animation and transform to
	the build.

	* runtime.h: flesh out Value some, adding BOOL (has to be C++
	bool, not gboolean, or else it conflicts with int32), INT32,
	INT64, and STRING (char*).

	* runtime.cpp (runtime_init): call animation_init and
	transform_init.

	* animation.cpp, animation.h, transform.h, transform.cpp: get
	these using the new dependency object/value foo, and get them
	compiling.

2007-06-04  Miguel de Icaza  <miguel@novell.com>

	* runtime.h: Make the "Base" refcounting class the base for
	DependencyObject. 

	* ffvideo.cpp: Set audio initialization to zero for now, so we can
	continue debugging.

	* runtime.cpp (Canvas): override render, in preparation for using
	attached properties.   I get the feeling am going to regret not
	keeping the top/left attached properties somewhere else.

	(Value): introduce the discriminating union for values as
	discussed on irc.
	
	(DependencyObject): use lower case name for properties.
	Take Value * instead of void *, this is so we can represent NULL
	values (is this a good idea Chris, or do we want to have a
	Value.Type.NULL enumeration value?

	Update hash table creation to g_free the result on hash table
	update and removal.

	(Event): Update indentation to be Linux-like instead of GNU like.

2007-06-04  Sebastien Pouliot  <sebastien@ximian.com>

	* shape.cpp|h: Add Poly[line|gon] drawing code and C helper functions 
	to create them. Replace the "old" C1 constant in Ellipse::Draw with 
	ARC_TO_BEZIER (now that I know where it comes from ;-)

2007-06-04  Jeffrey Stedfast  <fejj@novell.com>

	* ffvideo.cpp (queue_data): Got sound kinda sorta working...

2007-06-04  Jackson Harper  <jackson@ximian.com>

	* xaml.cpp: Give elements a type

2007-06-05  Rolf Bjarne Kvinge  <RKvinge@novell.com>

	* runtime.cpp, runtime.h: implemented DependencyProperty and DependencyObject.

2007-06-04  Chris Toshok  <toshok@ximian.com>

	* animation.h, animation.cpp: initial pass at some of the
	animation stuff.  doesn't build yet.

2007-06-04  Chris Toshok  <toshok@ximian.com>

	* runtime.cpp, runtime.h: add EventObject, a c++ only base class
	for managing events.

2007-06-04  Sebastien Pouliot  <sebastien@ximian.com>

	* shape.h: Remove Ellipse::set_prop_from_str, it's "virtually" empty
	and added Draw methods to Polygon and Polyline.
	* shape.cpp: Added round-corner rectangle support (RadiusX, RadiusY)
	and match changes in header file.

2007-06-04  Jackson Harper  <jackson@ximian.com>

	* shape.cpp/h: width and height are properties of the
	FrameworkElement.

2007-06-04  Jackson Harper  <jackson@ximian.com>

	* shape.cpp/h: add ellipse_new
	- set width/height on ellipses (ellipsi ?) and draw them.
	* xaml.cpp: create ellipses, get zorder correct

2007-06-04  Jackson Harper  <jackson@ximian.com>

	* xaml.cpp: put in character data functionality, eventually we
	will need to add FrameworkElement methods for setting the default
	content element. See
	http://msdn2.microsoft.com/en-us/library/ms752059.aspx#contentmodels
	for more info on content properties.

2007-06-04  Sebastien Pouliot  <sebastien@ximian.com>

	* demo.cpp: Include shape.h and use a rounded-rectangle
	* runtime.h: Added FillRule and moved out Shapes.
	* shape.h: New. Moved all shapes from runtime.h and added new ones.
	* shape.cpp: Added Polygon and Polyline.
	* xaml.cpp: Include shape.h
	* Makefile.am: Add shape.h

2007-06-04  Chris Toshok  <toshok@ximian.com>

	* transform.cpp, transform.h: initial code for the transform
	objects.  doesn't compile yet.

2007-06-04  Jackson Harper  <jackson@ximian.com>

	* demo.cpp: fix typo

2007-06-04  Sebastien Pouliot  <sebastien@ximian.com> 

	* demo.cpp: Fix for API changes.
	* runtime.h: Add FrameworkElement, other Shape properties and move
	around some properties to match the managed definitions.
	* shape.cpp: Add setters for new Shape properties and move properties
	parsing to match managed definitions.
	* xaml.cpp: Fix for API changes.

2007-06-04  Sebastien Pouliot  <sebastien@ximian.com>

	* shape.cpp: Don't typecast doubles into ints.

2007-06-04  Jackson Harper  <jackson@ximian.com>

	* runtime.h:
	* xaml.cpp: Implement function that allows you to load xaml from a
	chunk of text.
	* demo.cpp: add a very small xaml demo

2007-06-04  Jackson Harper  <jackson@ximian.com>

	* xaml.cpp: remove old no longer used function.
	- track whether or not we are adding to a panel instead of surface
	* shape.cpp: Fix typo, need to set line_* not x1, x2, etc.

2007-06-04  Jackson Harper  <jackson@ximian.com>

	* shape.cpp: Add new methods to allow shapes to have their
	properties filled in from text values.

	* brush.cpp: Start work on allowing solid color brushes to be
	created from strings.

	* runtime.cpp: stub in methods for setting properties on canvas
	and UIElements (these had some meat but I am removing it now that
	some of the names are updated, will put back later).

	* runtime.h: add some methods and functions for XAML parsing.

	* xaml.cpp: Initial implementation of the XAML parser.

2007-06-03  Miguel de Icaza  <miguel@novell.com>

	* runtime.cpp (Collection, Panel): The beginning of an API to
	encapsulate collections that we will expose to the unmanaged
	world.  

	This should be the backend for the base collection class in agclr
	for the strongly typed types.   

	The idea is to have the MS.Internal.Collection<T> be a proxy that
	contains an IntPtr pointer to the C++ Collection instance and map
	the various add/remove methods to it.

	The immediate goal is to be able to do from C#:

	        Rectangle r = new Rectangle ();
		r.Brush = new SolidColorBrush (new Color (1, 0, 0));
		Canvas.Children.Add (r);

2007-06-02  Miguel de Icaza  <miguel@novell.com>

	Implement support for the render origin.
	
	* runtime.cpp (item_invalidate): add one to cope with the rouding
	from floats to ints (fixes some trailing junk).

	Item: redo the affine transformation setup to support both the
	render_transform_origin property and avoid recomputing all of this
	on each repaint request.

	* ffvideo.cpp: Changed the code to do the actual video decoding on
	the main thread so we can put all the video and audio in the
	queues before we start rendering.

	Failed attempts at getting audio to work.

	* Everywhere: renamed Item to UIElement to better match the actual
	class hierarchy that we will be exposing.

2007-06-01  Jackson Harper  <jackson@ximian.com>

	* shape.cpp: Fix typo.

2007-06-01  Miguel de Icaza  <miguel@novell.com>

	* ffvideo.cpp: No longer use CMD_INITED, instead use g_idle_add to
	notify a special function (callback_video_inited).  Makes me
	wonder if I should do the same for the new-frame call

	Initialize the cairo surface on the callback_video_inited routine
	instead of doing this on the decoder thread (that was a mistake).

	This solves the misterious case of the video that randomly did not
	show up.

2007-05-29  Miguel de Icaza  <miguel@novell.com>

	* video.cpp (load_next_frame): reimplement the video play back
	logic so that it will now properly paint the proper frame on the
	screen as needed.

	Add logic to skip frames if video is playing back too slowly, and
	to resume playback when new frames are ready.

	Currently its computing the delay using the n_frame_rate field
	(which no sample uses, but I could not find any other way of
	estimating the frame rate other than this.

	It works at least with some sample streams that I have with 30 fps
	and 15 fps.

	* runtime.cpp: Move the GtkDrawingArea widget into the Surface,
	and handle exposes in the runtime, not in the demo.   Show the
	widget (thats why I was not getting the expose events on the
	widget, duh). 

2007-05-26  Miguel de Icaza  <miguel@novell.com>

	* runtime.cpp (Brush, SolidBrush): Introduce brushes. 

	(Shape): introduce reusable drawing framework for shapes, not
	complete. 
	
	(Line): introduce second user besides rectangles. 

	Remove agg test code.

	(Group::getbounds): implement.
