2009-02-24  Chris Toshok  <toshok@ximian.com>

	* dependencyobject.cpp (EventObject::FinishEmit): if handlers are
	added to the list during emission, we can end up doing the Finish
	decrements when we didn't do the Start increments, leading to a
	negative events->emitting count.  This causes us to spin in
	unref_delayed on shutdown.  Fixes bug #479364.

	r: kangaroo.

2009-02-23  Aaron Bockover  <abockover@novell.com>

	* playlist.cpp:
	* playlist.h: Support relaxed handling of ASX3 and implemented a relaxed
	playlist parser that basically consists of reading URLs on a line; these
	two modes are only supported when GetRelaxedMediaMode is true on surface,
	so it only affects Moonshine, effectively; make the Is* playlist methods
	static so they can be reused; added PlaylistParser::IsValidPlaylist that
	is reused to reduce magic sniffing duplication

	* pipeline.cpp: Reduce ASXDemuxerInfo::Supports to simply calling 
	PlaylistParser::IsValidPlaylist to avoid duplicating magic sniffing

	* mediaelement.cpp:
	* runtime.cpp:
	* runtime.h: Renamed MediaElementEmitEndedOnError to RelaxedMediaMode

	r: kangaroo

2009-02-23  Geoff Norton  <gnorton@novell.com>

	* pipeline-ui.cpp: Don't blow up if we've created the codec installer
	on a zombified surface.

	r: toshok

o2009-02-12  Aaron Bockover  <abockover@novell.com>

	* mediaelement.cpp: if Surface::GetMediaElementEmitEndedOnError is
	set, emit the Ended signal instead of the Failed signal when a playlist
	item is encountered that cannot be demuxed; this allows playlists with
	invalid items to continue playing possible valid items (e.g. Sports
	Illustrated's WM playlists)

	* runtime.cpp:
	* runtime.h: Provide (Get|Set)MediaElementEmitEndedOnError properties as a
	means for the plugin to proxy its desired playlist error handling behavior

	r: kangaroo

2009-02-10  Jeffrey Stedfast  <fejj@novell.com>

	* *.cpp: Fixed to use g_ascii_str[n]casecmp instead of
	g_str[n]casecmp() to prevent possible problems in non-ascii
	locales.

	* color.cpp (read_next_double): Use g_ascii_strtod().

	r: kangaroo

2009-01-25  Jeffrey Stedfast  <fejj@novell.com>

	* utils.h: #include <sys/types.h> for ssize_t

	r: kangaroo

2009-01-13  Rolf Bjarne Kvinge  <RKvinge@novell.com>

	* media.h:
	* media.cpp: MediaElement/MediaBase: when SetSource (dl) is called, we
	need to set the source to the dl's uri. Fixes #464723

	r: kangaroo

2009-01-07  Geoff Norton  <gnorton at novell.com>

	* xaml.cpp, file-downloader.cpp: TextStream::Open has been renamed
	to TextStream::OpenFile
	* utils.h|cpp: Refactor TextStream to read in-memory and file buffers
	* downloader.cpp: GetResponseText needs to ensure it returns data in
	UTF-8, and doesn't handle zip files.

	r: fejj

2009-01-07  Geoff Norton  <gnorton@novell.com>

	* downloader.h|cpp: Work around mozilla bug #444160 by keeping an in
	memory cache of all downloads <= 64KB that are streamed in 1 shot.

	r: toshok

2008-12-24  Aaron Bockover  <abockover@novell.com>

	* downloader.cpp (validate_policy): Allow full rights to download if the 
	target (XAML) URI protocol is chrome; chrome sources (e.g. extensions)
	are fully trusted in the browser

	r: kangaroo

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

	[Backports of r121143, 121228 and 121230]

	* audio-pulse.cpp, audio-pulse.h: Improve locking while waiting for
	  pulseaudio to initialize - keep waiting if we get spurious wakeups.

	  r: kangaroo

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

	* pipeline.cpp: IMediaDemuxer::GetBufferedSize: Only calculate buffered
	  size using video and audio streams. Fixes #456154. 
	  [Backport of r120687]
	  
	  r: kangaroo

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

	* audio-pulse.cpp: PulseAudio sometimes gives us errors sync, 
	and sometimes async.  Lets ensure we can actually connect before
	continuing on.

	r: toshok

2008-12-03  Geoff Norton  <gnorton@novell.com>

	* media.cpp: Ensure we null our reference to the image loader in 
	all the failure cases to avoid a possible double free/unref.

	r: toshok

2008-12-03  Rolf Bjarne Kvinge <RKvinge@novell.com> 
	* pipeline.cpp: IMediaStream::Dispose: delete our queue of frames.
	  Plugs a memory leak. [Backport of r118496]
	* pipeline.cpp, pipeline.h: Plug a memory leak. [Backport of r118491].

	r: kangaroo

2008-12-01  Geoff Norton  <gnorton@novell.com>

	* runtime.cpp:  Remove a comment around a debug guard that should
	have never been here in the first place.  Fixes #449524

	r: lewing

2008-12-01  Geoff Norton  <gnorton@novell.com>

	* audio.cpp: Fix a logic bug making it impossible to use Alsa
	support

	r: toshok

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

	* audio.cpp: Remove a print_stack_trace. Backport of r120211.

	r: sde

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

	* media.cpp (MediaBase::SetSource): only queue a tick if we need
	to, fixes regression on mediaelement downloaders.

	r:toshok
	
2008-11-24  Geoff Norton  <gnorton at novell.com>

	* media.cpp: If we do a SetSource on a image element with a
	completed downloader, short circuit the async call, as the downloader
	theoretically can be immediately reused in javascript after the call.
	Also remove the internal completed event after its been fired, for the
	same reason (downloader reuse).  Fixes halo3

	r: lewing

2008-11-21  Larry Ewing  <lewing@novell.com>
 
 	* brush.cpp (VideoBrush::SetupBrush): make sure we use the fast
 	filter in videobrush when scaling.
 
 	r: kangaroo

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

	* audio.cpp: If we fail to initialize pulseaudio, lets try alsa before
	giving up on media entirely.

	r: toshok

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

	* pipeline-ui.cpp:
	* codec-url.h:  Update to the final URLs for beta 1

	r: miguel

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

	* pipeline-ui.(cpp|h): Rework the pipeline for codec installation to 
	handle the pango markup we're using.

	r: miguel

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

	* runtime.cpp (running_on_nvidia): Fix leak of Display
	r: kangaroo

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

	* pipeline-asp.cpp: Fix case where get_audio_data returns NULL
	r: fer

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

	* Makefile.am: Only build the appropriate pipeline-ui based on wether
	we're building on a os/arch combo that supports the SMP.
	* codec-url.h: Set the appropriate CODEC_URL for our target platform
	* pipline-nocodec-ui.(cpp|h): New UI for unsupported OS/Arch targets
	of the codec install pipeline.

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

	* debug.h: Its unlikely that debug flags will be set.

	r: spouliot

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

	* mediaelement.cpp, mediaplayer.cpp, pipeline.cpp, playlist.cpp,
	  playlist.h: Instead of calling Media::Dispose in MediaElement, move
	  that to Playlist(Entry) and Dispose of the playlist instead. This
	  makes re-playing already played content in playlists work again.
	  Backport of r118391 and r118493.
	
	r: Fernando.

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

	* audio.cpp, mediaplayer.cpp, audio.h, mediaelement.cpp, mediaplayer.h:
	  Implement MediaElement.AudioStreamIndex. Backport of r118367.
	  
	r: kangaroo.

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

	* runtime.cpp (get_flags): output the flags env var (both name and
	value) if it's set.  r: kangaroo.

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

	* runtime.cpp: Do not enable debug features by default, and remove a 
	superflous warning.
	r: toshok

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

	* runtime.cpp: Force NVIDIA binary driver to go to the image backend
	to work around serious performance problems when we use accelerated
	rendering with it.
	r: toshok

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

	* pipeline-ffmpeg.cpp: FfmpegDecoder::DecodeFrame: for audio packets we
	  need to keep decoding until the entire input has been consumed.

	r: Fernando.

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

	* downloader.h: change the signature of downloaderRequestFinishedHandler
	to pass the resulting uri.

	* downloader.cpp: validate the returned uri against redirection policies

	r:gnorton

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

	* pipline(-ui).cpp: Move the codec location on more time.
	r: miguel

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

	Patches by Argiris Kirtzidis to fix bug #441687

	* audio.cpp: Use g_alloca() to create dynamically sized arrays on
	the stack rather than relying on g++ features.

	* clock.cpp: Applied MSVC portability patch which implements
	gettimeofday().

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

	See tests/xaml/test-textblock-actualheight.html and
	test-textblock-hittest.html as compared with Microsoft
	Silverlight.

	* layout.cpp (TextLayout::Layout*): trailing LineBreak elements
	actually do count toward ActualHeight metrics.

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

	* audio-pulse.cpp: OnContextStateChanged: always print an error message
	  if we fail to connect to pa daemon.

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

	* mediaelement.h, mediaelement.cpp: Add a MissingCodecs flag and don't
	  invalidate when that flag is set.

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

	* runtime.cpp: get_flags: take the default flags as an argument, this
	  way the environment variables can disable flags which are enabled
	  by default.

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

	* pipeline-ui.cpp, runtime.h, runtime.cpp, pipeline.cpp: Only enable ms
	  codecs by default for browsers.

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

	* mediaplayer.cpp: FrameCallback: If the frame couldn't be retrieved
	  because of a buffer underflow and we're waiting for the initial
	  frame, enqueue a request for another frame. Fixes #440317.

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

	* rect.h (struct Rect): clamp the intersection w/h to 0 fixes some
	extreme exposure issues in popfly.

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

	* runtime.h: Remove #include <config.h> from headers

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

	* mp3.h, mp3.cpp: Mp3FrameReader::TryReadFrame: if we don't succeed in
	  reading a header, try to sync to one. FindMpegHeader: Return proper
	  error code (MEDIA_NO_MORE_DATA) if we can't read more data. Fixes
	  #426440 (slideshow doesn't go beyond the first slide).

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

	* mediaelement.h, mediaelement.cpp: When a AutoPlay=False media is
	  opened, the final state is Stopped, not Paused. When media finish,
	  the final state is Paused, not Stopped. Fixes #365827.

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

	* audio-alsa.cpp: Add another dlopened symbol, fixes an unresolved
	  external reference.

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

	* audio-alsa.cpp:
	* audio-pulse.cpp:
	* audio.cpp:
	* audio.h:
	* debug.cpp:
	* debug.h:
	* dependencyobject.cpp:
	* downloader.cpp:
	* font.cpp:
	* http-streaming.cpp:
	* layout.cpp:
	* media.cpp:
	* mediaelement.cpp:
	* mediaplayer.cpp:
	* mms-downloader.cpp:
	* pipeline-asf.cpp:
	* pipeline-ffmpeg.cpp:
	* pipeline-ui.cpp:
	* pipeline.cpp:
	* playlist.cpp:
	* runtime.cpp:
	* runtime.h:
	* text.cpp:
	* textbox.cpp:
	* xaml.cpp:
	* yuv-converter.cpp: Change debug macros to runtime conditionals based
	  on MOONLIGHT_DEBUG env variable of compile time. Checks are only
	  enabled if configured with --with-debug=yes option.

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

	* debug.cpp: Don't dlopen mono, just link with it if -with-debug is
	  specified.

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

	* pipeline-ffmpeg.cpp: Revert r117547 and related.

2008-11-02  Chris Toshok  <toshok@ximian.com>

	* text.cpp (TextBlock::InsideObject): textblocks are hit only in
	their ActualWidth/ActualHeight, not in the full bounding
	rectangle.  Fixes bug #434258.

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

	* runtime.h, runtime.cpp: remove transparency from properties of
	the surface
	(Surface::PaintToDrawable): add a @transparent argument to this
	method.

	* window-gtk.cpp (MoonWindowGtk::expose_event): pass the window's
	transparency to Surface::PaintToDrawable.

	* window.h: move the idea of transparency here from Surface.

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

	Portability patch by Argiris Kirtzidis.

	* *.cpp: s/#if false/#if 0/g and s/#if true/#if 1/g

	* xaml.cpp (start_element): strchr() returns const.
	(repeat_behavior_from_str): Same.

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

	* runtime.cpp (Surface::PaintToDrawable): instead of the content
	type check if active_window is fullscreen. This is uglier but the
	mozilla hands us rgb drawables not rgba drawables so until we have
	a better plan this will solve the problem.

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

	* runtime.cpp (Surface::PaintToDrawable): only follow the
	transparent path if our target supports it.

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

	* pipeline-asp.cpp (ASFDemuxer::ReadHeader): Fix logic when skipping
	a bad stream so we dont include NULL holes streams[]

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

	* runtime.cpp: Reverting for now the recent crossing events 
	changes -- causes issues with Ink Journal.

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

	* pipeline.h, pipeline.cpp: Added IMediaStream::GetMediaTypeName.
	* mediaplayer.cpp: Use IMediaStream::GetMediaTypeName instead of
	  complex ifs on the GetType return value.

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

	* debug.cpp: dlopen libmono too for our stack walking methods.

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

	* pipeline-ffmpeg.cpp: Don't use ffmpeg version defines which aren't
	  present in older ffmpeg version (r10885).

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

	* pipeline-ffmpeg.cpp: DecodeFrame: free the frame after error
	  conditions.

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

	* pipeline-ffmpeg.cpp: dlopen ffmpeg.

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

	* pipeline.cpp: Fix warning (variable might be used uninitialized).

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

	Fix for bug #435815.

	* stylus.cpp (StrokeCollection::AddedToCollection): Override so
	that we can avoid aborting if a stroke already has a logical
	parent (not an error for strokes).

	* error.h (MoonError::Clear): New convenience method.

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

	* libmoon.h: Fix build.

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

	* audio.cpp, brush.cpp, cbinding.h, dependencyproperty.g.cpp,
	  Makefile.am, media.cpp, media.h, mediaelement.cpp, mediaelement.h,
	  mediaplayer.cpp, mediaplayer.h, pipeline.cpp, type-generated.cpp,
	  src.mdp, playlist.cpp: Split MediaElement out from media.[cpp|h]
	  into its own mediaelement.[cpp|h].

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

	* type-generated.cpp, Makefile.am, media.h, mediaplayer.cpp,
	  mediaplayer.h, mplayer.cpp, mplayer.h, src.mdp: Rename
	  mplayer.[cpp|h] -> mediaplayer.[cpp|h].

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

	* cbinding.cpp, cbinding.h: Regenerated.

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

	* audio.cpp, audio-pulse.cpp, media.cpp, mms-downloader.h, mp3.cpp,
	  mplayer.h, pipeline.cpp, pipeline.h, pipeline-asf.cpp,
	  pipeline-asf.h, src.mdp, xaml.cpp: Move asf related bits from
	  pipeline.[h|cpp] to pipeline-asf.[h|cpp].

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

	* pipeline.h: IMediaDemuxer: Add Source getter.
	* pipeline.cpp: IMediaDemuxer::GetLastAvailablePts: don't take into
	  account streams which aren't selected. IMediaStream::AppendFrame:
	  update last available pts with the frame's pts.
	* media.cpp: MediaElement::CalculateBufferingProgress: never use last
	  available pts to calculate buffering progress for streams which can
	  seek to directly to the requested pts. Fix math to check for
	  negative values to avoid weird results.

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

	* media.cpp, media.h: MediaElement: fix buffering progress after
	  seeking regression - don't only use the buffer level in the
	  pipeline to report buffering progress, but take into accout the
	  point from where we seek.
	* mp3.h, mp3.cpp: Store the AudioStream in the frame reader and update
	  the stream's LatestAvailablePts field whenever we read a frame.
	  Also rename the previous 'stream' (IMediaSource*) field to 'source'
	  to avoid confusion with AudioStream.
	* pipeline.cpp, pipeline.h: Add a last_available_pts field to
	  IMediaStream and the corresponding GetLastAvailablePts to
	  IMediaDemuxer, enabling the calculation of correct buffering
	  progress after a seek. This also requires a codec abi version bump.

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

	* clock.h: Change MilliSeconds_[From|To]Pts to use the new
	PTS_PER_MILLISECOND define.
	* mplayer.cpp: Rework fix on GetTimeoutInterval to avoid a division
	resulting in zero (and the endless loop of #439631).

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

	* mplayer.cpp: GetTimeoutInterval: Calculate timeout correctly. Fixes
	  #439631.

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

	* downloader.cpp (scheme_is): Check protocol non-null.
	(same_scheme): Same.

	* uri.cpp (Uri::Parse): If no protocol is found, init to NULL
	instead of file. Also make sure to parse the path in all valid
	cases.

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

	* mplayer.cpp: LoadVideoFrame: if target_pts is invalid, set 0 as
	  target_pts.
	* media.cpp: AdvanceFrame: handle cases where position = -1 and don't
	  do anything.

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

	* uri.cpp (Uri::Parse): Do a bit better than just strchr() for ':'
	to parse out the uri scheme.

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

	Performance optimization patch for bug #409793

	* stylus.cpp (Stroke::AddStylusPointToBounds): Modified to take a
	Rect bounds argument so that we can update a bounds of our
	choosing.
	(Stroke::ComputeBounds): Updated.
	(Stroke::OnCollectionChanged): Update our new 'dirty' bounds.
	(Stroke::OnCollectionItemChanged): Same.
	(InkPresenter::PostRender): Reset stroke dirty regions.
	(InkPresenter::OnCollectionItemChanged): Invalidate only the
	stroke's dirty region.

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

	* media.cpp: TryOpen: Don't try to open anything if downloaded_file is
	  null.

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

	* mplayer.cpp: LoadVideoFrame: Don't check if buflen = 0, makes things
	  work with ffmpeg.
	* pipeline-ffmpeg.cpp, pipeline-ffmpeg.h: CleanState: Properly clean
	  up/reset codec. DecodeFrame: ffmpeg might delay output one frame,
	  i.e. the decoder output is the input of the previous time we called
	  avcodec_decode_video, so keep track of pts from previous frame and
	  properly set pts of the decoded frame.

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

	* mplayer.cpp: LoadVideoFrame: show the frame if the end pts of the
	  frame is above the target pts (previously we only showed the frame
	  if the start pts was above the target pts, causing us to show one
	  frame too late). Fixes test-asf-demuxer-shuffled-payloads.html.

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

	* media.cpp: MediaElement::Play: Call Play when in Opening state too.

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

	* mplayer.cpp: AdvanceFrame/GetCurrentPts: if the audio isn't playing
	  we should just work as if there's no audio at all. The video might
	  play after the audio has stopped if the a/v streams have different
	  length.

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

	* pipeline.cpp: Media::ClearQueue: delete the list nodes with the
	  queue_mutex unlocked, since the node dtor may cause unrefs, causing
	  other dtors to be called, and it may all end up in Media::Dispose
	  which will then try to lock the mutex again (and deadlock).

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

	* font.cpp (style_info_parse): Tokenize the style string so that
	the individual sub-parsers can be a bit smarter than than
	strstr().
	(style_width_parse): Made smarter - now handles lwsp between
	multi-word width specifiers (or no lwsp at all).
	(style_weight_parse): Same.

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

	* media.cpp: remove compute bounds since it mirrors
	FrameworkElement now.

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

	* shape.cpp, shape.h: remove origin fixup GetOriginPoint and
	GetSizeForBrush.

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

	* textbox.cpp (TextBox::Paint): Updated.

	* text.cpp (TextBlock::Paint): Updated.

	* layout.cpp (TextLayout::Render): Swapped origin & offset
	arguments which feels more natural to me.

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

	* pipeline.cpp: (ASFDemuxer::ReadHeader): Don't allow video height or
	width over 2048 pixels since this is likely to be corrupted values.
	* pipeline.h: Define MAX_VIDEO_[HEIGHT|WIDTH] to 2048 (I'm sure that
	someday people will laugh at me for proposing such a small value)

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

	* layout.cpp, layout.h: Change the Render api to drop the uielement argument. 

	* textbox.cpp:
	* text.cpp: call layout with the new arguments.
	
2008-10-23  Rolf Bjarne Kvinge <RKvinge@novell.com> 

	* mplayer.cpp: Pause: Don't set the SeekSynched flag. This would cause
	  fast-forwarding video when seeking to a position which hadn't been
	  downloaded (since we automatically pause the video then). Fixes
	  #435908.

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

	* mplayer.h, mplayer.cpp: Implement RenderedFramesPerSecond and
	  DroppedFramesPerSecond. Only in SL 2.0, but very useful for
	  debugging 1.0 too.

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

	* pipeline.h, pipeline.cpp: Increase codec ABI version (IMediaStream
	  changed size). IMediaStream: Remove msec_per_frame, it's already in
	  VideoStream. VideoStream: make msec_per_frame be pts_per_frame to
	  loose less precision.
	* mplayer.cpp: Calculate advance frame timeout based on video fps.

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

	* runtime.cpp (Surface::HandleUICrossing): disable the crossing
	check from r116528 in the case of a windowless plugin (where
	event->window == NULL).  Also, active_window->GetGdkWindow should
	never be trusted to return the actual window - it's use is
	strictly to find the screen/monitor for full-screening.  In the
	windowless case it returns the toplevel netscape window.

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

	* brush.cpp, brush.h: remove the uielement references from the api
	pass the required information as a rect to SetupBrush instead.

	* shape.cpp, shape.h:
	* panel.cpp:
	* layout.cpp:
	* text.cpp:
	* uielement.cpp:
	* control.cpp:
	* broder.cpp: update SetupBrush callers for the new signature.

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

	* audio.h, audio.cpp: AudioSource: Initialize last_write_pts and
	  last_current_pts to their max value, to detect when they haven't
	  been set yet. Properly reinitialize these variables (to their max
	  values) in Stop, and make GetCurrentPts return G_MAXUINT64 for this
	  case.
	* mplayer.cpp: AdvanceFrame: the audio might return G_MAXUINT64 for
	  current pts, handle this. Fixes fast-forwarding issue in #435908.

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

	* mp3.cpp: Mp3Demuxer::SeekInternal: Initialize result so that we don't
	  use random memory if we don't have a reader.

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

	* mms-downloader.cpp: Add logging methods.

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

	* media.cpp: Sprinkle Dispose calls to plug leaks.

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

	* pipeline.cpp (Media::RegisterMSCodecs): free libmscodecs_path
	before reassigning (and reallocating memory for) it.

	* dependencyobject.h, dependencyobject.cpp: add an optional
	argument to all the EventObject::AddHandler* overloads, called
	data_dtor, which is invoked just before the EventClosure is
	destroyed so that the data can be freed.

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

	* window-gtk.h, window-gtk.cpp: move the Surface conversion from
	MouseCursor -> GtkCursor here.

	* runtime.h, runtime.cpp: surface only deals with MouseCursors
	anymore.  the gtk support is in window-gtk now.
	
	* window.h: remove SetCursor (GdkCursor) and add
	SetCursor (MouseCursor), so subclasses of MoonWindow can do their
	own thing.

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

	* media.cpp (MediaElement::MediaOpened): If the stream decoder is
	null, use null for the decoder_name. Fixes a segfault.

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

	* pipeline.cpp (ASFDemuxer::ReadHeader): Don't count invalid streams
	since a lot of loops don't handle NULL values.

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

	* runtime.cpp: More fixes to crossing events: when entering fullscreen
	ignore the crossing events coming from previous window. Otherwise we get
	double enter/leave pair.

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

	* window-gtk.cpp: GetGdkWindow () - handle the fullscreen window case 
	correctly (no parent window).

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

	* debug.h, pipeline.cpp, audio.cpp: #define print_stack_trace to
	  nothing if not DEBUG is set, removing the need for surrounding all
	  print_stack_trace calls with #if DEBUG.

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

	* pipeline.cpp: Remove debugging code.

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

	* animation.cpp:
	* animation.h:
	* applier.h: Fixing one more osbcure case of Storyboard transitions where
	stopping a prev sboard makes the next one starting from bad base value.

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

	* runtime.cpp: Make sure we get the new pointer motion notify when 
	entering/leaving fullscreen. This fixes the fullscreen-enter-leave test 
	but interestingly doesn't fix the original problem of #434267.

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

	* runtime.cpp (Surface::PaintToDrawable): Don't leak cairo context
	when using "backend=image".

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

	* pipeline.cpp: NullDecoder::OpenVideo: Fix comment (logo is centered
	  now, not tiled), and fix inner loop, we were including one pixel
	  too many for width and height.

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

	* pipeline.cpp: RegisterMSCodecs: if there's no codec in
	  ~/.mozilla/plugins, use just the filename of the codec library and
	  make dlopen search for it. This makes it easier to run parallell
	  tests from different revisions without having the codecs from each
	  revision overwrite eachother in user's home.

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

	* pipeline.cpp: Dont tile our logo, it looks like ass.  Lets
	center it in the available window instead.

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

	* pipeline-ui.cpp: Avoid a resize when realizing which causes an
	annoying flicker in the codec window.

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

	* pipeline.cpp: Unbreak the world.

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

	* pipeline(-ui).cpp: Use the updated mscodec name and location.

2008-10-16  Fernando Herrera  <fherrera@novell.com>

	* playlist.cpp: Fix a segfault parsing ASX3 malformed files.

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

	* text.cpp (TextBlock::Layout): Delay allocation of List so that we
	don't leak when TextBlock::TextProperty	is NULL.

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

	* runtime.cpp (Surface::SetCursor): Unref cursors once they are set
	on the window. Fix one more leak.

2008-10-16  Jb Evain  <jbevain@novell.com>

	* collection.cpp: TriggerCollection, UIElementCollection, InlineCollection:
	mark managed constructor internal.

2008-10-16  Jb Evain  <jbevain@novell.com>

	* collection.cpp (RemoveAtWithError): throw an ArgumentOutOfRangeException
	instead of an ArgumentException when providing an out of range index.

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

	* window-gtk.cpp, window.h: Add file header and fix copy-paste error.

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

	* runtime.cpp (Surface::HandleUIKeyPress): check to see if the key
	is already down, and if so, don't emit another event.  (really?
	there's a test for this?  ugh.).  also, let Keyboard know the key
	is down.
	(Surface::HandleUIKeyRelease): let Keyboard know the key is up.

	* eventargs.h, eventargs.cpp (class Keyboard): augment Keyboard
	quite a bit -- it might soon deserve its own file.  It now
	maintains a static hashtable of keys that are pressed/released
	inside the moonlight plugin, and has logic to map a gdk keyval to
	Key, and query if a particular key is pressed.

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

	* uielement.cpp: fix the transform ordering.

	* canvas.cpp, canvas.h: handle the toplevel canvas correctly.

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

	* uielement.cpp, uielement.h: remove UpdatePosition and
	ComputePosition, all transform changes are handled in
	ComputeTransform now.

	* shape.cpp, shape.h: update for the new transform api.
	
	* dirty.cpp, dirty.h: remove DirtyPostion is it no longer needed.
	
	* canvas.cpp: Use UpdateTransform. 

	* point.h: add a (lame) == operator.
	
2008-10-15  Larry Ewing  <lewing@novell.com>

	* geometry.cpp, geometry.h: add shape bounds caching to all
	geometry classes apply the transform when retrieving the bounds.
	Make GetBounds the public bounds interface and make the
	computation interface protected.

	* shape.cpp, uielement.cpp: call use GetBounds not ComputeBounds.

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

	* geometry.cpp, geometry.h: remove unused arguments to
	ComputeBounds remove caching from PathGeometry.

	* uielement.cpp, shape.cpp: call with correct arguments.

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

	* uielement.cpp, uielement.h: make ComputeTransform virtual and
	have it return a bool.

	* shape.cpp, shape.h: override ComputeTransform and optimize the
	bounds computations.  Use a general ComputeShapeBounds for actual
	drawn bounds compuations for now.
	
	* dirty.cpp (Surface::ProcessDownDirtyElements): add a short
	circuit path to DirtyTransform for elements that can recompute
	without updating bounds.

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

	* geometry.cpp, geometry.h: remove unused arguments from function
	prototypes.
	
	* uielement.cpp, shape.cpp: update calls.
	
2008-10-15  Jeffrey Stedfast  <fejj@novell.com>

	Fix for bug #435798

	* text.cpp (TextBlock::TextBlock): Let OnPropertyChanged() know
	that we are setting the default brush/inlines.
	(TextBlock::Layout): If no Text value has yet been set, use 0.0 as
	the actualHeight.

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

	* window-gtk.h, window-gtk.cpp (MoonWindowGtk::GetGdkWindow): ref
	the return value.
	(MoonWindowGtk::InitializeFullScreen): unref the return value of
	GetGdkWindow.

	* cbinding.h, cbinding.cpp: regen so we don't have to use void*
	for the parent parameter to MoonWindowGtk.

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

	* applier.cpp|h: Add a readonly flag to ensure nothing gets added in
	the hashtable while we're flushing it on shutdown. Add a few more
	checks and avoid re-creating the hashtable on flush.

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

	* pipeline-ffmpeg.cpp:  FFMpeg changed the API with version #52, no
	longer requiring the bits_per_pixel.

2008-10-14  Stephane Delcroix  <sdelcroix@novell.com>

	* window.h: GetGdkWindow () method

	* window-gtk.h|.cpp: implement GetGdkWindow, new ctor signature
	taking the parent window reference. Only go fullscreen on the monitor
	moonlight is running on.

	* runtime.cpp: call the new MoonWindowGtk ctor

2008-10-14  Fernando Herrera  <fherrera@novell.com>

	* pipeline-ui.cpp: Override codecs download URL with
	MOONLIGHT_CODEC_URL env variable if present.

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

	* xaml.cpp (XamlLoader::CreateFromFile): Since we use the nread
	variable expecting it to be the value returned from read(), don't
	modify it inside the loop, use another variable for that. Before
	eating leading whitespace, make sure we have data.

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

	* audio.cpp: Fix AudioSources::GetNext iteration for next playing
	source logic. Fixes bug #433267

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

	* media.cpp (MediaElement::Play): Don't add a TickCall to start
	playing if we haven't even opened the media yet. Fixes bug
	#434462.

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

	* dependencyproperty.cpp: Fixing a mem leak.

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

	* animation.cpp: Reverting the whole attaching-to-prev storage in Begin. 
	This fixes some recent problems in PopFly.

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

	* downloader.cpp (validate_policy): Made static so we don't export
	this symbol.

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

	* dependencyproperty.cpp (detach_target_func): Fix bad function 
	signature for GHFunc.
	* dependencyobject.cpp (unref_object): Fix bad function signature
	for GFunc.

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

	* pipeline.h, pipeline.cpp: Media: Add a BufferingEnabled flag, don't
	  start buffering until this is set to true (starts out as false).
	* media.cpp: Only enable buffering on the media after reading the
	  markers, otherwise we may loose markers in the beginning of the
	  media. Fixes test-asf-demuxer-big-markers.html. Also don't add a
	  tick call to notify the MediaElement that a marker has been added,
	  always check in AdvanceFrame.
	* mplayer.cpp: Add a null check in a printf.

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

	* media.cpp (Image::DownloaderComplete): handle the case where the
	sureface uri and the new uri are the same.

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

	* pipeline-logo.cpp: New logo.

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

	* media.cpp: MediaElement::Reinitialize: Dispose the media to break
	  cyclic refs.
	* mplayer.cpp: AdvanceFrame: don't decode here anymore, we shouldn't
	  get non-decoded frames anymore. Open: Handle null demuxers,
	  shouldn't happen, but at least we won't crash if it happens.
	* pipeline.cpp, pipeline.h: Media::~Media: move cleanup to Dispose.
	  Media::Open: unref the decoder after giving it to the stream, the
	  stream now take a ref on the decoder. Media::EnqueueWork:
	  queued_requests might be nothing if we're disposed. IMediaStream:
	  move cleanup to dispose and take a ref on the decoder. Add decoder
	  getter/setters, and update code to use them.

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

	* applier.cpp: Fix another bad function signatures for GFunc.

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

	* audio.cpp, pipeline-ffmpeg.cpp, pipeline.h, mplayer.cpp: Remove
	  FRAME_COPY_DECODED_DATA and always copy decoded data. Fixes video
	  stuttering when using ffmpeg.

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

	* runtime.cpp: The resize event is only emitted when switching
	from fullscreen to non fullscreen.

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

	* pipeline.cpp, pipeline.h: Properly ref/unref MediaMarkers instead of
	  deleting them.

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

	* runtime.cpp: When we change to/from fullscreen there should be a
	resize event.

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

	* media.cpp (Image::CreateSurface): Protect against a NULL
	filename (valid value). This will avoid crash like bug #433810
	even if, in this case, the problem lies elsewhere (bad downloader
	which looks related to #433814).

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

	* font.cpp (FontFace::LoadDefaultFace): Pass the families to
	LoadDefaultFont() for font name comparison, we need to match the
	font names exactly or fall back to the next font.

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

	* audio.cpp: Add a nullcheck.

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

	* media.cpp (Image::IsSurfaceCached): Don't leak (actually 
	don't dupe) uri.

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

	* font.cpp: Add fallback for Liberation fonts.

	* pipeline.cpp (Media::Warning): Replacement for both
	Media::AddMessage() methods.

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

	* applier.cpp: Fix function signatures for GFunc and GHFunc.
	Fix random crash when closing silverlight world #433461

2008-10-08  Larry Ewing  <lewing@novell.com>
	* window-gtk.cpp (MoonWindowGtk::realized): make sure we remove
	any existing render_cb attachments before adding new ones in case
	our realize wordering is out of sync.

	Fixes the rest of b.n.c #432975

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

	* mp3.cpp: Fix boolean->MediaResult logic.

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

	* playlist.cpp|h: When we encounter invalid characters in an
	attribute try to patch them and reparse the document.

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

	* mp3.h, mp3.cpp: Fix mpeg_frame_duration to use the static array of
	  block sizes instead of hard-coded almost-matching values. Make
	  mpeg_frame_length return a floating point value, and in ReadHeader
	  calculate total duration using floating point. Fixes
	  test-mp3-media-properties.html

2008-10-08  Stephane Delcroix  <stephane@delcroix.org>

	* runtime.cpp: CAIRO_VERSION_XXX symbols no longer available in cairo
	1.8.0, changing the error msg.

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

	* xaml.cpp (XamlElementInstanceNative::SetProperty): Avoid SIGSEGV
	on bad XAML input when no (NULL) dependecy property is returned.

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

	* pipeline.h, pipeline.cpp: Add a marker field to MediaFrame and make
	  MediaMarker refcounted. Fix a couple of crashing leakfixes, and
	  simplify cleanup code a tiny bit.

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

	* audio-pulse.h: Remove unused method definition.

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

	* animation.cpp (AnimationStorage::AttachToPrevStorage): Delete
	the old baseValue before allocating a new one.

	* mms-downloader.cpp (MmsDownloader::ProcessHeaderPacket): Need to
	delete dx_info when we're done with it. Also get rid of the
	unneeded parser pointer since we're just using this->parser
	anyway.

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

	* runtime.cpp (Surface::SetCursor): Don't create the GdkPixmap and
	GdkColor unless we need them. Unref the pixmap after the call to
	gdk_cursor_new_from_pixmap.

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

	* pipeline.h (IMediaStream::dtor): Delete the frame. This prevents
	a MediaFrame leak-per-node whenever the queue is cleared.

	* pipeline.cpp (ASFMarkerDecoder::DecodeFrame): Free the
	frame->bufefr before updating it to point to a new malloc'd
	buffer.
	(ASFDemuxer::TryReadFrame): Delete the frame on error.
	(IMediaStream::PopFrame): After getting the node's frame, set the
	node->frame to NULL.

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

	* media.cpp, media.h: rework image code to skip using a downloader
	when a cached image surface is available.  Fix a crash where
	multiple loading errors occur for a single image.  Rewrite
	existing SetSourceAsync ticks when the source changes again before
	the initial tick was processed.  

	The goal here is to greatly reduce the work we do in cases where
	existing sources are moved between images. Future work should
	consist of moving things to the ImageSource model internally.

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

	* text.cpp (Glyphs::Layout): Handle NULL values coming from 
	GetGlyphInfo. Avoid crash in DRT #177 (not sure why it did 
	not come up before today or why it now fails anyway).

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

	* brush.cpp (ImageBrush::TargetLoaded): Don't bother with g_atomic
	stuff, it's too expensive for what we need.
	(ImageBrush::TargetUnloaded): Same.

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

	* dependencyobject.h, dependencyobject.cpp: Fix SLED10.

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

	* pipeline.cpp: Reorganize some code.

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

	* audio.cpp, audio.h: Access the Media directly to enqueue frames,
	  avoiding the need for a tick call on the main thread. If audio
	  underflowed and we don't have more data available, set buffer
	  underflow flag on the media player.
	* playlist.cpp, playlist.h: Playlist::Parse: until the source has all
	  the data available, return MEDIA_NOT_ENOUGH_DATA.
	* downloader.cpp, downloader.h: Remove RequestPosition methods, no
	  longer needed.
	* mms-downloader.h, mms-downloader.cpp: Added Set|GetRequestedPts, and
	  use that value to determine if we should seek or not.
	* mplayer.cpp, mplayer.h: Add a BufferUnderflow flag, set when
	  audio/video needs more data, but the buffer is empty.
	* pipeline.cpp, pipeline.h: Media: Change how buffering works: we now
	  have an in-memory buffer of demuxed frames (one queue for frames
	  for each stream), and calculate buffer size from that.
	  ProgressiveSource: open an additional file descriptor for writing,
	  makes locking unnecessary. Change al io to return failure if there
	  is not enough data, this allows us to remove all the
	  blocking/waiting logic. MemoryQueueSource: push seeks to
	  MmsDownloader, instead of waiting for MmsDownloader to check for
	  pending seeks. FileSource: don't reinvent the wheel and use stdio
	  to get buffered io instead of having buffering logic ourselves.
	* mp3.h, mp3.cpp: Implemented non-blocking reading to support buffer
	  underruns correctly.
	* media.cpp: MediaElement: Retrieve buffer size from the demuxer
	  instead of calculating it. Handle MEDIA_NOT_ENOUGH_DATA errors when
	  trying to open media and retry later on.

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

	* src.mdp: Updated.

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

	* dependencyobject.cpp: Use atomic operations with
	  objects_created|destroyed.

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

	* resources.cpp (glib_is_stupid): we need to cast value in order
	to delete it.

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

	* media.cpp,pipeline-ffmpeg.cpp,yuv-converter.cpp,mplayer.cpp:
	Add some headers needed to compile when #undef DEBUG

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

	* xaml.cpp:  Fix mixup between delete and g_free

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

	* value.cpp: Fix == for KeyTime (padding too). Add comments and
	indent method correctly.

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

	* xaml.cpp: Move the definition of XamlElementInfo to the top so
	that g++ doesn't complain about deleting an incomplete type inside
	the XamlElementInstance dtor. Also gets rid of other g++ compiler
	warnings.

	* list.cpp (List::InsertAfter): New convenience function to sort
	of balance the API.

	* font.cpp (FontFace::Load): Don't ref the default face, it is
	returned to us with a ref already.

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

	* xaml.cpp: Now that Info's aren't shared, Instance's can free
	them.  Also properties need to free their name.

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

	* geometry.cpp (Geometry::OnSubPropertyChanged): move
	OnSubPropertChanged to Geometry to pick up transform changes until
	a better solution is devised.  Fixes updated
	test-clip-invalid-update.htm.

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

	* value.cpp: Fix == for Duration and RepeatBehavior. We can't
	use memcmp to compare them since they include (unassigned)
	padding. Both structs overrides their == operator so we use that.

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

	* resources.cpp: Free the values (not only their content) when
	the hash table is destroyed. Correctly (delete) free the value
	when compiled against glib < 2.12 (e.g. SLED10).

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

	* geometry.cpp: Remove last patch to GeometryGroup::Draw as this
	mess clipping. Add similar fill rule setting code in Geometry::Draw
	because Shape::Fill is not called for clipping (but the fill rule
	still applies). Comment both so I don't mess with them again :)

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

	* font.cpp (FontFace::LoadGlyph): We need to force the font size
	if we don't own it, since we don't know what the current size is
	set to.
	(FontFace::Kerning): Same.
	(FontFace::GetExtents): Here too.

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

	Attempt #2 at fixing bug #430766.

	* font.cpp (FontFace::LoadFontFace): Don't load non-scalable fonts
	- this helps us do better fallback for bug #430766.
	(FontFace::LoadDefaultFace): Do manual fallback of fonts. First
	try to use the Microsoft Lucida Sans font if available. If not,
	fall back to GNOME's Bitstream Vera Sans font. Then fallback to
	DejaVu Sans and finally to X.Org's Luxi Sans font (which doesn't
	render many of the glyphs in bug #430766, hence why it is last
	choice). If the user doesn't have the X.Org fonts, he's SOL.

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

	* value.h[.in],value.cpp: Fix operator == to work for non-DO and
	non-string values. This fix the issue of removing stuff from a
	ResourceDictionary (while a copy still exists in the underlying
	Collection).

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

	Attempt #1 at fixing bug #430766.

	* font.cpp (FontFace::LoadDefaultFace): Pass NULL as the families
	argument to LoadFontFace() so that we don't fail when matching the
	loaded family name.

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

	* font.cpp (FontFace::OpenFontDirectory): Now a static class
	method.
	(FontFace::LoadFontFace): New static method which tries to load an
	FT_Face given an FcPattern and a list of families.
	(FontFace::FontFace): No longer tries to load an FT_Face, instead
	we have it passed to us as an argument.
	(FontFace::LoadDefaultFace): New static method to load a global
	FT_Face representing the default system font.
	(FontFace::GetDefault): Instantiates a new FontFace using the
	global system default FT_Face.
	(FontFace::Load): Now takes only a TextFontDescription (much
	cleaner/simpler). If we are loading the default system font or if
	loading the requested font fails, simply return a new FontFace
	based on the global system default FT_Face.
	(TextFont::TextFont): Now takes fewer arguments (cleaner API,
	yay!).
	(TextFont::Load): Now only takes a TextFontDescription argument to
	make the API simpler/cleaner.
	(TextFontDescription::CreatePattern): Now public and takes a
	'sized' argument specifying whether or not the created pattern
	should include the size field. This is needed because TextFont
	caches based on all attributes while FontFace caches on everything
	but size. Also, don't include weight, width, or slant if our font
	family is the default (Portable User Interface is not allowed to
	have any of those attributes).
	(TextFontDescription::IsDefault): New method to decide if our
	family is the default or not.
	(TextFontDescription::GetFamilies): New convenience method to
	strsplit the family string into an array.
	(TextFontDescription::SetFamily): If the value "Portable User
	Interface" is set, set our family to NULL instead.

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

	* geometry.cpp (GeometryGroup::Draw): Make sure the original
	fill rule is still in effect at the end of drawing the group.

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

	* geometry.cpp (GeometryGroup::Draw): reinstate the call to
	cairo_set_fill_rule removed in r105643.  This fixes
	http://mapul.com/Tutorials.html.

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

	* shape.cpp: (Shape::InsideObject) Move cairo_save after the 
	extents.PointInside check since there was no cairo_restore
	if false was returned. Looks likely that false was not much
	returned (if ever).

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

	* stylus.cpp (Stroke::OnCollectionItemChanged): we need to
	recompute our bounds when an item (can only be a stylus point)
	changes its properties.  Fixes stroke bounds in the face of
	dragging text in inkjournal.

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

	* audio-pulse.cpp, audio-pulse.h: Don't use callbacks with
	  pa_stream_[cork|trigger|flush|drain] since the audio source might
	  have gotten deleted by the time the callback is called.

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

	* dirty.cpp (Surface::ProcessDownDirtyElements): use
	AddDirtyElement instead of |= to set flags, since it might require
	dirty list manipulation.

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

	* xaml.cpp: Fix (again) the leaks in dependency_object_add_child, 
	this time with new/delete to make it work with non-DO.

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

	* xaml.cpp: Better fix for the leaks in dependency_object_add_child.

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

	* xaml.cpp: Fix leak in dependency_object_add_child when AddWithError
	returns false.

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

	* downloader.cpp: fix the leak in validate_policy.

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

	* debug.cpp: Make sure allocated 'binary' is freed in every case
	inside addr2line_offset.

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

	* audio-alsa.cpp: Close the pcm in the dtor, not in Close. Refcounting
	  ensures that the dtor won't be called while playing or that we'll
	  be playing destructed sources, but Close might be called at any
	  time.

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

	* pipeline.cpp: NullDecoder::DecodeAudioFrame: protected against int
	  underflows and /0 errors.

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

	* dependencyobject.cpp (DependencyObject::RegisterAllNamesRootedAt):
	if during the course of traversing the tree, we come across a temp
	namescope, merge that up instead of recursing down even further.
	(DependencyObject::SetLogicalParent): only clear the namescope if
	we're merging ourselves into a parent namescope.

	* canvas.cpp (Canvas::Canvas): remove the temp namescope creation
	here.  the parser does it for us if we're parsing an element, and
	programmatically created objects don't seem to have them.

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

	* media.cpp (MediaBase::GetDownloaderPolicy): New virtual method
	to get the download policy based on the uri. By default, returns
	MediaPolicy.
	(MediaElement::GetDownloaderPolicy): Return StreamingPolicy if
	mms://
	(MediaBase::SetAllowDownloads): Use GetDownloaderPolicy() instead
	of hardcoding mms:// check.
	(MediaBase::OnPropertyChanged): Same.

	* brush.cpp (ImageBrush::SetSurface): Remove previous hack.
	(ImageBrush::TargetLoaded): Call SetAllowDOwnloads(true) on our
	image once we have at least 1 target which is loaded in the visual
	tree.
	(ImageBrush::TargetUnloaded): Disallow image downloads once our
	loaded_count falls back to 0.
	(ImageBrush::AddTarget): Listen to the target's Loaded/Unloaded
	events.
	(ImageBrush::RemoveTarget): Remove our listeners for the Loaded
	and Unloaded events placed on the target object.

	* uielement.cpp (UIElement::ClearLoaded): Emit an UnloadedEvent.

	* dependencyobject.cpp (DependencyObject::SetValueWithError): Call
	AddTarget()/RemoveTarget() on DO property values as they are
	set/unset.
	(DependencyObject::AddTarget): New virtual method which gets
	called on DependencyObject property values when they are set on a
	target.
	(DependencyObject::RemoveTarget): Same but when unset.

	* media.cpp (MediaBase::SetAllowDownloads): New method to handle a
	state-change of allowing new downloads vs not.
	(MediaBase::OnLoaded): Call SetAllowDownloads(true).

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

	* brush.cpp (ImageBrush::SetSurface): Update the image's Loaded
	state. Fixes some regressions introduced by moving the async
	downloading logic from MediaBase::SetSurface() into
	ImageBase::OnLoaded().

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

	* pipeline-ffmpeg.cpp: Free extradata, if allocated, on failure.

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

	* xaml.cpp (XNamespace::SetAttribute): don't both RegisterName and
	SetValue (NameProperty) - just set the NameProperty, it'll update
	the proper namescope automatically.
	(get_parent): remove.
	(set_parent): remove.  we no longer need to maintain a temporary
	chain while parsing.  there's also no need for set_parent(NULL)
	anywhere.
	(XamlElementInstance::TrySetContentProperty): if there was an
	error in DependencyObject::SetValueWithError or
	Collection::AddWithError, raise a parser error.
	(dependency_object_add_child): call
	Collection/ResourceDictionary::AddWithError, and raise a
	parser_error if it fails.  also, remove set_parent (NULL) calls.

	* dependencyobject.h,
	dependencyobject.cpp (DependencyObject::MergeNameScopes): remove.
	(DependencyObject::RegisterAllNamesRootedAt): this now takes a
	MoonError argument so we can signal when there's been a conflict.
	(DependencyObject::SetLogicalParent): this also now takes a
	MoonError argument, and this is where ALL the namescope merging
	code lives.  It's been removed from everywhere else.  Also, this
	change means we can no longer be setting/clearing the parent in
	xaml.cpp, as it destroys temp namescopes.

	* namescope.h, namescope.cpp (NameScope::MergeTemporaryScope): add
	a MoonError parameter, so we can communicate back an
	error (conflicting names) properly.
	(NameScope::Dump): new method.
	
	* collection.h, collection.cpp (Collection::AddWithError): new
	method, generate a binding for this instead of Add.  This allows
	us to check for name conflicts when a DOCollection is updated.
	(Collection::InsertWithError): same.  Also, this method has
	something quirky about it - it calls AddedToCollection *before*
	the collection is modified.  suck, but the logic in that code
	needs to be run before the change occurs.
	(Collection::AddedToCollection): add a MoonError arg so we can
	properly pass errors back up.
	(DependencyObjectCollection::RegisterAllNamesRootedAt): add the
	MoonError arg.
	(DependencyObjectCollection::AddedToCollection,
	DependencyObjectCollection::RemovedFromCollection): remove
	namescope handling from here.
	
	* animation.h,
	animation.cpp (KeyFrameCollection::AddedToCollection): track api
	change to Collection::AddedToCollection.

	* resources.h, resources.cpp: track changes to AddedToCollection,
	RegisterAllNamesRootedAt, and AddWithError.  Also, remove
	namescope handling code from here.

	* cbinding.cpp, cbinding.h, type-generated.cpp: regen.
	
2008-09-28  Chris Toshok  <toshok@ximian.com>

	* geometry.cpp (Geometry::OnPropertyChanged): this method was
	never chaining up to DependencObject::OnPropertyChanged, which it
	must do for properties whose ownerType != Geometry.

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

	* media.cpp (TimelineMarkerCollection::Add): no need to check the
	element type of the value, by the time it makes it here it should
	already be the right type.

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

	* media.cpp (MediaBase::OnLoaded): Logic moved here from
	SetSurface().
	(MediaBase::OnPropertyChanged): Check IsLoaded() to see if we
	should start the downloader yet.

	* xaml.cpp: Revert the hydrating check for SetSurface() from the
	previous commit. This is causing a bunch of failures :(

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

	* xaml.cpp (XamlLoader::HydrateFromString): Properly initialize
	parser_info->hydrating and parser_info->hydrate_expecting based on
	whether or not we are really doing a HydrateFromString() vs
	CreateFromString().
	(create_element_info_from_imported_managed_type): Only
	SetSurface() if we are hydrating.
	(XamlElementInstanceNative::CreateItem): Same.
	(XamlElementInfoManaged::CreateElementInstance): Here too.
	(XamlElementInfoManaged::CreateWrappedElementInstance): And here.
	(XamlElementInfoManaged::CreatePropertyElementInstance): And here...
	(XamlElementInfoImportedManaged::CreateElementInstance): Same.
	(XamlElementInfoImportedManaged::CreateWrappedElementInstance): And here.
	(XamlElementInfoImportedManaged::CreatePropertyElementInstance): Here too.

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

	* dependencyobject.cpp, dependencyobject.h: Make objects_created and
	  objects_destroyed thread-safe. Added MOONLIGHT_OBJECT_TRACK_TYPE to
	  track a specific type, might be useful when the id varies from run
	  to run. Make Dispose public.
	* media.cpp: Reinitialize: Dispose the downloaded_file if we're being
	  destructed.
	* pipeline.cpp, pipeline.h: Implement MemoryQueueSource::Dispose, and
	  cleanup properly there instead of in the dtor. This breaks a
	  circular reference between ASFPacket/ASFDemuxer/MemoryQueueSource.

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

	* downloader.cpp: use StreamingPolicy for streaming

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

	* runtime.cpp (Surface::ShowFullScreenMessage): Don't use
	g_str_has_prefix() on NULL strings.

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

	* pipeline.cpp: RegisterMSCodecs: Don't duplicate that much code, and
	  only print messages to stdout if MOONLIGHT_OVERRIDES=codecs=debug.

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

	* downloader.cpp: validate_policy: Fix boolean logic according to
	  comment, fixes crash.

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

	* media.cpp: Plug one more leak.

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

	* downloader.cpp: neforce security policies on Open ()

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

	* pipeline.cpp, pipeline.h: Added Media::IsMSCodecsInstalled, and look
	  for the mp3 codecs in libmscodecs.so, libmscodecs-mp3.so doesn't
	  exist anymore.

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

	* pipeline-ui.cpp: AdaptToParentWindow: free the toplevels list.

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

	* downloader.cpp: Fix a potential leak.

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

	* dependencyobject.cpp: DependencyObject::RemoveListener: We need to
	  delete the listener link, not only remove it. Plugs a leak.

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

	* audio-pulse.h, clock.h, layout.h, pipeline.h, template.h,
	  yuv-converter.h: Sprinkle virtual on some destructors.

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

	* internal-downloader.h, file-downloader.h, mms-downloader.h: Fix
	  another leak.

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

	* audio-pulse.cpp: Another leak plugged.

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

	* debug.cpp: Fix stack traces.

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

	* audio-pulse.cpp: Add a missing unref.

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

	* pipeline-ui.cpp: Store libmscodecs.so in ~/.mozilla/plugins.

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

	* pipeline-ui.cpp: Hush.

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

	* pipeline.cpp, pipeline.h: Added an abi_version to codec registration
	  functions.

2008-09-24  Aaron Bockover  <abockover@novell.com>

	* pipeline-ui.cpp: 
	* pipeline-ui.h: Redesigned the dialog to conform to the GNOME HIG 
	in regards to header messages, detail messages, spacing, padding, and
	button layout; use a GtkDialog instead of a GtkWindow, and take all
	input through the dialog's response signal; require the user to explicitly
	tell us that they never want to see the installer again instead of 
	assuming on cancel; fix crash when cancelling while downloading

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

	* dependencyproperty.cpp (resolve_property_path): Fixicated.

2008-09-24  Sebastien Pouliot  <sebastien@ximian.com>

	* pipeline.cpp: Fix a valgrind complaint when a NULL parameter is 
	given to g_file_test 

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

	* dependencyproperty.cpp (resolve_property_path): Cleaned up the
	code, robustified, and fixed bug #429396.

2008-09-24  Sebastien Pouliot  <sebastien@ximian.com>

	* dependencyproperty.cpp: Fix SIGSEGV when parsing something that
	does not exists.
	[Fix bug #429396]

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

	* pipeline-ui.cpp, pipeline-ui.h: UI to download and install codecs.
	* pipeline-logo.cpp, pipeline-logo.inc: Renamed pipeline-logo.inc to
	  pipeline-logo.cpp and made it an extern variable to avoid
	  duplicating the entire image in the binary for every time we want
	  to use it.
	* pipeline.cpp, pipeline.h: RegisterMSCodecs: Read the path to ms
	  codecs from our configuration, and always register ms codecs first
	  in the list. NullDecoder: fix a buffer overrun and update according
	  to pipeline-logo changes.
	* moonlightconfiguration.cpp, moonlightconfiguration.h: Added: a class
	  to store our configuration.
	* media.cpp: MediaElement::MediaOpened: if any of the streams is
	  handled by a nulldecoder, it means we don't have ms codecs
	  installed. If so, show the codec downloader UI.
	* Makefile.am, src.mdp: Updated.

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

	* dependencyobject.cpp (DependencyObject::MergeTemporaryNameScopes):
	back out (#if false) this change for now.

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

	* runtime.h|cpp: Surface::GetSourceLocation()

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

	* uielement.cpp: Delete the temporary region before returning on an
	invisible element (common in defiwind).

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

	* dependencyobject.cpp (DependencyObject::MergeTemporaryNameScopes):
	another case we hadn't addressed - if the object we're merging
	*from* doesn't have a namescope, we iterate over the entire tree,
	registering names into our (possibly temporary, if it didn't exist
	before) namescope.  Fixes firstfloorsoftware.com (bug #425268).

	* xaml.cpp (XamlElementInstanceNative::CreateItem): fix memory
	leak.

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

	* dependencyobject.cpp (merge_namescope): Return the parent_ns so
	that our caller doesn't have to call FindNameScope() in case it
	was created.
	(DependencyObject::MergeTemporaryNameScopes): Adjust for above API
	change.

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

	* geometry.cpp (Geometry::Draw): fix the transform brokeness that
	crept in.  Fixes test-geometry-transform.xaml

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

	* animation.cpp:
	* clock.cpp:
	* clock.h: 0-time animations are valid (as in: passing the timeline
	validation test) but do nothing. Fixes the clock11 test.

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

	* animation.cpp:
	* animation.h: Attach storage only once. Fixes a crash in clock21.html.

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

	Fix for bug #427560

	* dependencyobject.cpp (DependencyObject::MergeTemporaryNameScopes):
	Use FindNameScope() to get the scope to merge into, and only call
	this once - don't re-get it ever loop.

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

	* dependencyobject.cpp (EventObject::AddXamlHandler): New method
	to add a handler from XAML so that we can force the listener token
	to be 0, like Silverlight does.

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

	* animation.cpp:
	* animation.h: Attach the storage to the prev storage on the
	partuclar AnimationClock/Storage Begin, not when the parent
	storyboard begins. That fixes: #412074 .

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

	* src/downloader.cpp:
	* src/downloader.h: DownloadAccessPolicy enum, used as dl.Open
	argument. Drop downloder_open method.
	* src/media.cpp:
	* src/playlist.cpp:
	* src/deepzoomimagetilesource.cpp:
	* src/text.cpp: use the new Open with the corresponding policy.

2008-09-19  Sebastien Pouliot  <sebastien@ximian.com>

	* media.cpp: Reduce the pixbuffer leaks on popfly.com. The biggest
	offenders are gone now but it's still leaking in a few cases.

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

	* pipeline.cpp: MediaFrame::~MediaFrame: Free the buffer before calling
	  any custom Cleanup methods (allowing the Cleanup method to free
	  buffer if g_free isn't the way to do it).

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

	Fixes bug #410619.

	* dependencyobject.cpp (class EventLists): Init current_token to
	1. Popfly uses a token of 0 to mean no-listener (sorta like gtk
	apps use 0 to mean that a g_signal is not connected).

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

	* media.cpp: Stop leaking pixbuf loaders.

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

	* mp3.cpp: Need to g_strdup the "mp3" string or we could crash when
	g_free-ing it later.

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

	* pipeline.cpp: Check for register_mswmv in libmscodecs.so, and honor
	  RUNTIME_INIT_CODECS_DEBUG.
	* runtime.h, runtime.cpp: Add a runtime init flag to print codec debug
	  info.

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

	* src.mdp: Updated.
	* pipeline.cpp, pipeline.h: Add a generic null decoder, shows a
	  moonlight logo for video and plays silence for audio.
	* mp3.cpp, mp3.h: Remove NullMp3Decoder, no longer needed.
	* mplayer.cpp: RenderFrame: take stride into account when blitting rgb
	  data.
	* pipeline-logo.inc: Added.

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

	* border.cpp:
	* control.cpp:
	* grid.cpp:
	* frameworkelement.cpp: start filling in InvalidateArrange and
	InvalidateMeasure calls.

	* panel.cpp:
	* panel.h:
	* canvas.h:
	* canvas.cpp (Canvas::OnCollectionItemChanged): move the ZIndex
	change handling here from panel since it is a Canvas property.

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

	* pipeline.h: Remove some dead code.

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

	* runtime.h, runtime.cpp: Instead of having a flag to enable ms codecs,
	  add flags to disable both ffmpeg and ms codecs and include them by
	  default.
	* pipeline.cpp: register_mscodecs: look for libmscodecsmp3.so too
	  (until it gets integrated in libmscodecs.so), and register the mp3
	  codec. Media::Initialize: Update according to runtime init flag
	  changes, and always register null encoders.

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

	* pipeline.cpp, runtime.cpp, runtime.h: Add a runtime override to not
	  delete downloaded media files.

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

	* dependencyobject.cpp: Add TODO.

2008-09-17  Jackson Harper  <jackson@ximian.com>

	* xaml.cpp: Don't try setting the content prop in managed if there
	is no cdata content (we're just dealing with spaces).

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

	* grid.cpp (Grid::MeasureOverride): fix the span accumulators to
	use the right index value.

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

	* frameworkelement.cpp: Fix moon-unit SIGSEGV when unreferencing
	SizeChangedEventArgs.

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

	* clock.cpp:
	* clock.h: Separate raising events from raising completed events. 
	In certain clock hierarchies this would cause us to emit completed event
	before raising animation setter events.

	* applier.cpp: Enabling the applier again.
	* applier.h: Animation resets don't have INSTANT precedence. The just 
	have higher precedence than normal animation setters.

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

	* audio-pulse.cpp: Remove stray characters.

2008-09-16  Chris Toshok  <toshok@ximian.com>
	
	* dirty.h, dirty.cpp: add DirtyMeasure/DirtyArrange.

	* frameworkelement.h, frameworkelement.cpp
	(FrameworkElement::UpdateLayout): override
	UIElement::UpdateLayout, and if that base class method returns
	true, emit LayoutUpdatedEvent.

	* uielement.h, uielement.cpp (UIElement::InvalidateMeasure): add
	DirtyMeasure.
	(UIElement::InvalidateArrange): add DirtyArrange.
	(UIElement::DoMeasure): this should drive the measure process -
	needs filling in, though.
	(UIElement::DoArrange): this should drive the arrange
	process. same.
	(UIElement::UpdateLayout): change return type to bool.  call
	DoMeasure and DoArrange synchronously, and return true if we
	arrange.

	* runtime.cpp (Surface::Attach): call InvalidateMeasure on the new
	toplevel.

	* cbinding.h, cbinding.cpp: regen.

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

	* clock.cpp: make AddTimeout take a priority. Make the render
	timeout slightly lower than default so that we process gdk events
	before rendering.

	* media.cpp: raise the priority of the media timeout so that it
	doesn't drop below default or the render tick.

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

	* dirty.h, dirty.cpp: add a priority queue-like setup for the
	dirty lists, where priority == level in the visual hierarchy.
	Processing the down dirty list proceeds from lower "priority" to
	higher, and the up dirty list proceeds from higher to lower.
	* runtime.h, runtime.cpp: use the new dirty lists.

	* uielement.h, uielement.cpp: add a visual_level field, which is
	updated when the element is added to the
	hierarchy (this->visual_level = parent->visual_level + 1).

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

	* xaml.cpp: keys should be a property of the instance.

2008-09-16  Fernando Herrera  <fherrera@novell.com>

	* pipeline.cpp: Register MS codecs if MOONLIGHT_OVERRIDES
	  has codecs=microsoft.
	* runtime.h: Do not default to RUNTIME_INIT_MICROSOFT_CODECS
	  in RUNTIME_INIT_BROWSER.

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

	* xaml.cpp: Move cdata handling code into the content property
	setters, allow managed content property setters to set values from
	strings.

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

	* audio-pulse.cpp: dlsym another method previously forgotten.

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

	* multiscaleimage.h, textbox.h: Use quotes to include our headers.

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

	* audio-alsa.cpp: Use dlopen/dlsym to access all alsa methods, and
	  don't link with alsa anymore

2008-09-16  Jb Evain  <jbevain@novell.com>

	* template.h (TemplateBinding): decorate with a SLVersion=2.

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

	* audio-pulse.cpp: Use dlopen/dlsym to access all pa methods, and don't
	  link with pulseaudio anymore. Hopefully fixes #425560.

2008-09-16  Fernando Herrera  <fherrera@novell.com>

	* asf/asf-structures.h:
	* asf/asf.cpp:
	* asf/asf.h:
	* mplayer.h:
	* pipeline.h: Don't use relative paths in #includes.
	* Makefile.am: Add -Iasf

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

	* src/applier.cpp: Disabling the applier for now, it seems there are still
	some tiny 'issues' with it.

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

	* dependencyobject.h, dependencyobject.cpp: add real
	PropertyChange callbacks (so we can implement listeners without
	the listener being a dependencyobject - which is nice for
	TemplateBindings, which don't need all that overhead.)
	
	* template.h, template.cpp: switch over to using this new listener
	interface.

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

	* xaml.cpp (dependency_object_set_attributes): add the
	TemplateBinding to the item, not the containing template.

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

	* applier.h: really disable the applier to make changes instant,
	fixes page turn and the test regressions.

	* applier.cpp: ref and unref the object to avoid crashes on
	popfly.

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

	* src.mdp: Updated with new files.

2008-09-12  Larry Ewing  <lewing@novell.com>

	* grid.cpp (Grid::Measure): accumulate colspan width and pass
	pixel size restrictions on to the children.

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

	* animation.cpp:
	* applier.cpp:
	* applier.h: Adding some defines for applier precedences + a way
	to instant apply with precedence == 0.

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

	* clock.cpp: Properly emit the Completed event after the properties have
	been applied.

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

	* animation.cpp:
	* applier.cpp: Removing debug messages, adding proper free code.

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

	* animation.cpp:
	* animation.h:
	* applier.cpp: Do not set the values, instead move them to applier. 

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

	* applier.cpp:
	* clock.cpp:
	* clock.h:
	* runtime.cpp:
	* runtime.h: Moving the Applier instance to TimeManager.

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

	* runtime.cpp:
	* runtime.h: Adding Applier to Surface.

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

	* applier.cpp:
	* applier.h: Adding a basic Flush method, totally bad for now.

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

	* applier.cpp:
	* applier.h: Adding basic Apply function that applies all the changes
	to objects.

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

	* applier.cpp:
	* applier.h: Adding basic method to add property to apply on object.

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

	* Makefile.am:
	* applier.cpp:
	* applier.h: Introducing the applier helper class. Will be used 
	to apply property changes in order.

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

	* xaml.cpp: Move some of the content property setting logic into
	the XamlElementInstance's.

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

	* multiscaleimage.cpp: draw a pattern that should look like
	a MSI (currently still wrong)

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

	* text.h (class Run): Apparently Run's TextProperty is internal in
	managed-land.

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

	* border.cpp:
	* frameworkelement.cpp:
	* shape.cpp, shape.h:
	* canvas.cpp: update to pass the new more extensive tests.

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

	* size.h:  Tweak to match updated tests.

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

	* style.h (class Setter): make ValueProperty's PropertyType
	'object' instead of 'Managed'.

	* template.cpp (FrameworkTemplate::AddXamlBinding): make this a
	little more bulletproof.
	(ControlTemplate::DuplicateObject): XamlTemplateBinding can return
	NULL, don't create a TemplateBindingNode (and add it to the list)
	in that case.

	* type.h.in (class Type): remove OBJECT - it gets autogenerated
	now.

	* xaml.cpp (start_element): we need to set inst->parent before
	setting the attributes, as the attributes might include a
	StaticResource (or TemplateBinding) that requires us to walk back
	up the tree.
	(XamlElementInfoNative::CreateElementInstance): create a
	XamlElementInstanceTemplate if the type is a subclass of
	FRAMEWORKTEMPLATE.
	(dependency_object_set_attributes): return out of this after
	adding the templatebinding (so we don't end up in the managed xaml
	loader code trying to set properties to "{TemplateBinding ...}"
	Also, if the property type is OBJECT, call into the loader (like
	we do with MANAGED), and fix the logic check on
	p->loader->SetAttribute in that case.

	* type.h, type-generated.cpp: regen.

2008-09-09  Sebastien Pouliot  <sebastien@ximian.com>

	* xaml.cpp: Don't unref NULL collections. Fix regression when
	parsing invalid points (or doubles).

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

	* xaml.h, xaml.cpp: stopgap before jackson gets the completely
	managed approach to managed object parsing going.  a few key
	changes:

	1) xaml_load_managed_object takes an out bool
	parameter (is_dependency_object) so the managed code can create
	non-DO subclasses, and then the parser will pass that GCHandle
	back to managed code in set_attribute.

	2) added an add_child callback to the loader so that managed DO
	subclasses (and non-subclasses) can deal with collection
	properties.  theres no ContentProperty handled in managed code,
	yet.

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

	* audio-*.(cpp|h): The Alsa code requires us to join the play
	thread before we remove the audio sources otherwise we can 
	end up in a race accessing closed pcm's when shutting down.

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

	* audio.cpp: Ensure that we dont enter an infinite loop before
	we actually start playing a source.

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

	* frameworkelement.cpp: make things 1.0 safe.

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

	* frameworkelement.cpp (FrameworkElement::Arrange): rework to
	match some of the Measure logic

	* border.cpp:
	* canvas.cpp, canvas.h:
	* control.cpp, control.h: rework arrange implementation to match
	the measure logic and the current thinking on arrange.

	* uielement.cpp, uielement.h: expose render_size accessor.

2009-09-08  Stephane Delcroix  <sdelcroix@novell.com>

	* tilesource.h|cpp: keep the source and tiles info on the c++ side

	* multiscaleimage.cpp: draw a cairo pattern instead of nothing

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

	* grid.cpp: Chain collection changed up properly.

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

	* thickness.h (struct Thickness): add +/-/- to thickness to clean
	up some of the other code.

	* rect.h: remove ShrinkBy now that we can negate thickness

	* size.h: clean things and make GrowBy stop at 0 now that we can
	deal with thickness addition outside of things.

	* canvas.cpp:
	* frameworkelement.cpp: 
	* control.cpp:
	* border.cpp: subtract the padding and border thickness from
	available size before passing it to children.  Handle some corner
	cases in measure with ugly hacks.
	
2008-09-07  Larry Ewing  <lewing@novell.com>

	* canvas.cpp, canvas.h: 	
	* control.cpp, control.h:
	* border.cpp:
	* grid.cpp:
	* panel.cpp, panel.h: refactor MeasureOverride to return the size of the
	actual contents.

	* frameworkelement.cpp: Make measure pre and post condition the
	output rather than doing it in the overrides themselves.

	* size.h: make sure min/max will never set a known size to NAN.

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

	* type.h.in: add OBJECT kind.

	* type.h, cbinding.h, cbinding.cpp, type-generated.cpp: regen.

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

	* value.cpp (Value::CreateUnref): don't use 'Foo foo = Foo(args);'
	- instead use 'Foo foo(args)'.  the former creates 2 objects to
	the latter's 1.

	* media.cpp (MediaElement::GetValue): same.

	* uielement.cpp: same.

	* error.h, error.cpp (class MoonError): make this a class instead
	of a struct, add a default ctor, remove Dispose and use ~MoonError
	instead, add FillIn methods that take a "code" as well as an
	ErrorType to support the parser.

	* dependencyobject.h, dependencyobject.cpp: some api cleanup - get
	rid of GError and use MonoError exclusively, move the internal
	EventLists/EventList types to the .cpp file.  Also, remove a few
	redundant methods on DependencyObject.  The hit at call sites is
	negligable (one additional line, perhaps), and the call sites are
	few and far between.

	* xaml.cpp (dependency_object_set_attributes)
	(dependency_object_set_property): call
	DependencyObject::SetValueWithError.

	* animation.cpp (KeyFrameCollection::GetKeyFrameForTime): look up
	the property here.  the DO api is gone.

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

	* grid.h, grid.cpp: flesh out some of the
	OnPropertyChanged/OnSubPropertyChanged/OnCollectionChanged stuff.
	Also add in a completely broken and unfinished MeasureOverride
	implementation.  It passes some of the tests, but not for the
	right reasons :) Lastly, move the GridUnitType enum to enums.h

	* enums.h: move GridUnitType here, and rename its elements to have
	a "GridUnitType" prefix.

	* xaml.cpp: track GridUnitType enum references.

	* dependencyproperty.g.cpp: fix up attached properties getters to
	return default values if there is one.

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

	* text.cpp (TextBlock::OnPropertyChanged): TextAlignment doesn't
	actually change the lauout, so no need to set the dirty flag when
	it changes.
	(TextBlock::Layout): Updated to handle Silverlight 2.0 TextBlock's
	Padding property.
	(TextBlock::Paint): Same.

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

	* uielement.cpp: use render bounds rather than bounds to determine
	if we have something to draw.

	* stylus.h, stylus.cpp: remove the EmptyBackground method.

	Fixes the annotation regression in page turn (again).
	
2008-09-04  Larry Ewing  <lewing@novell.com>

	* uielement.h (class UIElement): generate managed accessors for
	the subtree hack.

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

	* xaml.cpp (dependency_object_add_child): add code here for
	FrameworkTemplate, call SetVisualTree with the child.

	* control.cpp (Control::Control): init bindings.
	(Control::~Control): unref applied_template and delete bindings.
	(Control::ApplyTemplate): make sure we return false here from a
	few error places (NULL template, a template with a NULL
	visual_tree.)

	* template.cpp (FrameworkTemplate::FrameworkTemplate): init
	visual_tree to NULL.
	(FrameworkTemplate::~FrameworkTemplate): unref visual_tree.
	(FrameworkTemplate::SetVisualTree): new method, set visual_tree
	and ref it.
	(ControlTemplate::DuplicateObject): we need to special case a
	couple of classes (collections, templates) in order to traverse
	them.. ugh.
	(ControlTemplate::Apply): if the visual_tree is null, don't try to
	copy it.

	* template.h (class FrameworkTemplate): add SetVisualTree method
	for the parser.

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

	* uielement.cpp, uielement.h: new methods GetSubtreeObject and
	ElementAdded ElementRemoved.

	* dependencyobject.h: remove ContentAdded, ContentRemoved.
	
	* collection.cpp, collection.h: rename ContentWalker to
	VisualTreeWalker use GetSubtreeObject () rather than content for walking.

	* template.cpp, template.h: make Apply return the newly created
	tree.

	* panel.cpp, panel.h:
	* control.cpp, control.h: add template_root child that isn't
	hooked into the normal tree.  Start implementing ApplyTemplate and
	GetTemplateChild.

	* usercontrol.cpp: mess around with Content a little in making it
	use the ElementAdded ElementRemoved logic since UserControl
	doesn't really support template changes.
	
	* border.h: implement GetSubtreeObject. 

	* stylus.cpp:
	* dirty.cpp:
	* frameworkelement.cpp:
	* canvas.cpp, canvas.h: update for new treewalker.

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

	* layout.cpp (TextLayout::Render): Added some new arguments which
	aren't actually used yet but will be eventually (assuming I
	continue with this approach).

	* textbox.cpp (TextBox::Paint): Don't bother painting the
	background, control does this for us.

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

	* tilesource.h, deepzoomimagetilesource.h|.cpp: move the dzits in its
	own file, implement the downloader.

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

	* dependencyobject.h: as much as i hate this, add
	GetCurrentValues() for the template stuff.

	* xaml.cpp: add XamlElementInstanceTemplate and initial support
	for TemplateBindings.

	* template.h, template.cpp: add a bunch of stuff for templates.

	* control.h, control.cpp: add OnLoaded and OnPropertyChanged to
	watch for template property changes, and apply the template in
	OnLoaded (or if we're already loaded).  Also, add accessors for
	TemplateProperty.

	* dependencyproperty.g.cpp: regen.

2008-09-03  Larry Ewing  <lewing@novell.com>

	* frameworkelement.cpp (FrameworkElement::MeasureOverride): use
	the new Size methods.

	* border.cpp, border.h: add some initial (broken) rendering
	support, rework measure to use some of the new rect and size
	methods.

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

	* textbox.cpp (TextBox::OnPropertyChanged): When the AcceptsReturn
	property chanegs, no need to re-layout or invalidate - according
	to my little test program, Silverlight 2 Beta 2 does not change
	the rendered text when this property changes - any newlines in the
	input text stay there.

2008-09-03  Sebastien Pouliot  <sebastien@ximian.com> 

	* resources.cpp: (ContainsKey) Don't crash if a null key is
	supplied. (Remove) same. (Add) same.

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

	* enums.cpp (initialize_enums): Map Horizontal and
	VerticalScrollBarVisibility properly.

	* textbox.cpp (TextBox::CalcActualWidthHeight): Removed, I don't
	think we need this for TextBox controls since their
	ActualWidth/Height aren't based on the text extents afaik.
	(TextBox::Paint): Implemented, sorta.

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

	* resources.cpp (ResourceDictionary::Clear): add pre-glib 2.12
	code.

2008-09-03  Larry Ewing  <lewing@novell.com>

	* uielement.cpp, uielement.h: 
	(UIElement::FrontToBack): Make FrontToBack non-virtual and move
	the generic logic here.

	* control.cpp, control.h:
	* panel.cpp, panel.h: Remove ftb logic, everything is handled in
	uielement now.

2008-09-03  Larry Ewing  <lewing@novell.com>

	* uielement.cpp, uielement.h: 
	* media.cpp, media.h:
	* panel.cpp, panel.h:
	* shape.cpp, shape.h: Add GetCoverageBounds virtual method
	to let elements compute their own opaque coverage.

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

	* multiscaleimage.h|.cpp: new MultiScaleImage type

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

	* resources.h, resources.cpp: constify this.
	(ResourceDictionary::Remove): fix g_hash_table_lookup_extended
	logic.

	* xaml.cpp (XamlElementInstance::LookupNamedResource): implement
	resource lookups.
	(dependency_object_set_attributes): add support for StaticResource
	lookups.  going to refactor all this to add support for
	TemplateBinding.

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

	* eventargs.h (class CollectionChangedEventArgs): Implemented
	accessor methods to get/set the event arg values.

	* trigger.cpp (EventTrigger::SetTarget): Fixed to not need to
	strdup the event_name string and also updated to use an accessor
	method to prevent a possible NULL dereference.

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

	* animation.cpp:
	* animation2.h: Reworking the animation hookup storage fix. Checking for
	subclass is plain dumb. Just make an exception for ObjectAnimation.

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

	* animation.cpp: Fixing a problem in animation hookup 
	storage -- the type/kind that the animation generates has to be the subclass
	of the type/kind the target property is ready to accept.

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

	* multiscalesubimage.h: fixing code generation decorators

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

	* multiscalesubimage.h: new type

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

	* layout.cpp (TextLayout::LayoutWrap): Keep track of when 'words'
	end so that we can fall back to that position as the line
	width (we don't want to include trailing spaces unless
	underlined).
	(TextLayout::Render): If the line width is greater than the
	allowable width, keep the line left-aligned like Silverlight does.

2008-08-29  Chris Toshok  <toshok@ximian.com>

	* resources.cpp (ResourceDictionary::Clear): call
	Collection::Clear after we've cleared the hash so the hash will be
	empty in event handlers.

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

	* layout.cpp (TextLayout::Layout): Do a slightly better job of
	keeping track of line->width - still not 100% correct.

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

	* Makefile.am: add resources.h and resources.cpp

	* xaml.cpp (class XamlElementInfo): add x:Key field (since this
	can't set a field on the object -- it might be a value type).
	(class XamlElementInstanceValueType): remove the empty
	implementation of SetAttributes.  we'll define it later.
	(XNamespace::SetAttribute): handle name/key behavior here.  Only
	allow one of them to be set on an object. Also, only attempt to
	set DependencyObject::NameProperty on an item if it's not a value
	type.
	(start_element): don't add value type children to their parent in
	start_element (as we haven't read the data that will allow us to
	create the value typed object.)  we need to push this off to the
	end_element handler.  also return early if there are problems
	setting attributes.
	(end_element_handler): if we're creating a value typed ELEMENT,
	add the child to the parent here.
	(dependency_object_add_child): add some ResourceDictionary
	validation here (if there's no key, etc), and actually call
	dict->Add(key, child).
	(XamlElementInstanceNative::CreateItem): don't crash if we failed
	to create an item.  (fixes one of the crashes caused by the
	ResourceDictionaryTests - ParseDouble)
	(XamlElementInstanceValueType::SetAttributes): call
	value_type_set_attributes.
	(value_type_set_attributes): stripped down version of
	dependency_object_set_attributes, as there are only a handful (is
	it really only x:Name and x:Key?) attributes we handle on value
	types.
	(globally): always call set_parent as opposed to
	->SetLogicalParent.  we might not be dealing with a DO-subclass.

	* xaml.h (class XamlLoader): remove the explicit C api calls
	xaml_create_from_file, xaml_create_from_str, and
	xaml_hydrate_from_str.  Replace them with instance methods on
	XamlLoader (CreateFromFile, CreateFromString, and
	HydrateFromString, respectively) Add WithError variants of the
	these, and have the generator generate bindings for them so we can
	throw parse exceptions into managed code.

	* error.h (struct MoonError): add XAML_PARSE_EXCEPTION.

	* value.h.in (struct Value): add Is overload with
	additional_types.

	* uielement.h: include resources.h.

	* collection.h, collection.cpp: change the api in a few ways to
	make ResourceDictionary easier to write - make Count virtual,
	remove all the type checks for element type from methods, and add
	that check to Collection::CanAdd.  ResourceDictionary overrides
	that and always returns true.  Make Clear return a bool.

	* animation.h, animation.cpp: track collection changes.

	* stylus.h, stylus.cpp: track Collection::CanAdd change, and move
	implementations to the .cpp file.

	* resources.h, resources.cpp: split out the code for
	ResourceDictionary here.  ResourceDictionary is an odd fish.  In
	1.0 land, it provides the same api as a collection, and things can
	be looked up by name via findName.  In 2.0 land, items in
	ResourceDictionaries have to have either an x:Key or x:Name
	attribute.  If both are lacking it's an error.  If the former is
	specified you can only get at it through Resources["name"].  If
	the latter is specified, you can use both Resources["name"] or
	findName("name").

	* dependencyobject.cpp, dependencyobject.h: add Is and GetType
	overloads that take additional_types.  Make IsValueValid take an
	additional_types parameter too.  Expose ClearValue to managed code
	so we can actually clear the Value* to null without using
	the (unsupported from the generator) old method of passing
	IntPtr.Zero (Value* now maps to "ref Value" in generated
	pinvokes.)  Lastly add a SetValueWithError method so we can throw
	exceptions in managed code.

	* border.h: add defaults for Padding and BorderThickness.

	* border.cpp: simplify things a bit since we don't have to worry
	about padding/border thickness being NULL.

	* depenencyproperty.g.cpp, value.h, type-generated.cpp: regen.

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

	* layout.cpp (TextLayout::Render): Respect TextAlignment.

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

	* dependencyobject.cpp (DependencyObject::SetLogicalParent): get
	rid of this g_assert, it's crashing the moon-unit tests.  just
	warn and bail.
	(DependencyObject::SetSurface): don't do anything if the surface
	is already set to the same value.

	* animation.cpp (Storyboard::SetSurface): don't do anything if
	GetSurface() == surface.

	* text.cpp (Glyphs::SetSurface): same.

	* uielement.cpp (UIElement::SetSurface): same.

	* brush.cpp (ImageBrush::SetSurface): same.

	* media.cpp: same.

	* collection.cpp (DependencyObjectCollection::SetSurface): same.
	(Collection::RemoveAtWithError): this (against logic) raises
	ArgumentException, not ArgumentOutOfRangeException.

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

	* rect.h, rect.cpp: rename the w/h fields to width/height, since
	every other instance of similar fields are named that.

	* value.cpp, border.cpp, window-gtk.cpp, control.cpp, runtime.cpp,
	uielement.cpp, geometry.cpp, shape.cpp, frameworkelement.cpp,
	brush.cpp: track rect change.

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

	* border.h, border.cpp: implement ArrangeOverride, and fix up some
	test failures in MeasureOverride.

	* frameworkelement.cpp (FrameworkElement::Arrange): it seems we
	also set the desired size here (to the final size we get from
	ArrangeOverride.)

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

	* animation2.h: Advertise self (ObjectAnimationUsingKeyFrames) as providing
	proper kinds of values (TYPE::DEPENDENCY_OBJECT).

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

	* animation.cpp:
	* animation2.h: Properly guard 2.0 stuff with if SL_2_0 .
	Also adding validation methods.

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

	* animation.cpp:
	* animation2.h: Base work for ObjectAnimationUsingKeyFrames 
	implementation.

2008-08-24  Geoff Norton <gnorton@novell.com>
	
	* media.h: Add a new overload to set the SourceProperty from managed land.
	* media.cpp: Support async source changing downloader creation for ImageSource
	* cbinding.(cpp|h): Regen

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

	* mplayer.cpp: Only ref the audio if we have it as well.

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

	* bitmapimage.h: Add to the build

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

	* cbinding.cpp|h, dependencyproperty.g.cpp, type-generated.cpp,
	  type.h, value.h: Regenerated
	* downloader.cpp|h: Return failure state for downloader->GetResponse
	* runtime.h: Generate C bindings for IsMainThread.

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

	* animation.cpp, animation.h: make ControlPoint1 and ControlPoint2
	properties.  Move the quadratic generation into
	GenerateQuadratics.

	Regenrate and remove the managed wrappers.
	
2008-08-23  Larry Ewing  <lewing@novell.com>
	
	* xaml.cpp (value_from_str): fixed crossed commits with Auto
	parsing.

	* collection.cpp (ContentWalker::Step): add some debug logic to
	protect against an error case for now.

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

	* Makefile.am (libmoon_la_SOURCES): add cornerradius.cpp

	* thickness.h, thickness.cpp: rename thickness_from_str to
	Thickness::FromStr, and make it return a bool instead of a
	pointer, as Point and Rect do.

	* cornerradius.h, cornerradius.cpp: add CornerRadius::FromStr.

	* xaml.cpp (value_from_str): use the CornerRadius parsing method,
	and track the change to the Thickness one.

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

	* xaml.cpp (value_from_str): quick auto hack so we can test
	controls more.

	* runtime.cpp (RenderNode::Render): fix typo in merge

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

	* uielement.cpp, uielement.h: move basic ftb logic here from
	panel.  Start storing extents allong with bounds.

	* panel.cpp, panel.h: move most ftb logic to uielement.cpp.  Use
	content walker.

	* stylus.cpp, stylus.h: rework the PostRender hack by chaining up
	to uielement in front_to_back mode unconditionaly.

	* runtime.cpp, runtime.h: make RenderNode members private and move
	the ftb override logic here and out of the PostRender call.
	
	* shape.cpp|h, frameworkelement.cpp|h, media.cpp, text.cpp: store
	extents.

	* control.cpp, control.h: implement basic functionality.

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

	* color.h, rect.h, point.h: remove the copy ctors.  we don't need
	them, and they were causing crashes (!)

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

	* frameworkelement.cpp (FrameworkElement::MeasureOverride): always
	take the margins into account, even when we're childless.

	* panel.h, panel.cpp: add MeasureOverride which always returns
	0,0.

	* border.h (class Border): add property accessors for everything.

	* border.cpp (Border::MeasureOverride): new implementation.

	* value.h.in, value.cpp: add CornerRadius support, and remove the
	unnecessary casts (and in the Rect/Point cases, calls to the copy
	ctor)

	* value.h, dependencyproperty.g.cpp: regenerate.
	
2008-08-22  Jeffrey Stedfast  <fejj@novell.com>

	* textbox.h (class SelectionChangedEventArgs): Added
	Text/SelectionChangedEventArgs.

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

	* frameworkelement.cpp (FrameworkElement::Measure): instead of
	always calling MeasureOverride here, we call the registered manage
	callback if there is one.  So, we proxy into managed code here,
	invoke the virtual method FWE.MeasureOverride, and if there's no
	subclass override (or if it chains up for some reason), we end up
	in MeasureOverride by virtue of the pinvoke in
	FrameworkElement.cs.
	(FrameworkElement::MeasureOverride): move all the logic for the
	default MeasureOverride implementation here.  it's pretty
	braindead - takes margins into account, measures our child, makes
	sure our size is between Min/Max.  That's about it.
	(FrameworkElement::Arrange): same drill as ::Measure.
	(FrameworkElement::ArrangeOverride): still (incorrectly) return
	finalSize.

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

	* textbox.h: Made ArrangeOverride() virtual and added
	SelectionChangedEvent.

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

	* dependencyobject.cpp (DependencyObject::GetContent): guard
	against the value being NULL.

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

	* collection.cpp (ContentWalker::ContentWalker): make
	ContentWalker understand directions (Logical, ZForward, ZReverse).

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

	* runtime.cpp (Surface::PaintToDrawable): restore the x/y offsets
	when drawing in the image backend.

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

	* frameworkelement.h, frameworkelement.cpp: add in the layout foo
	- provide implementations of Measure and Arrange that just call
	MeasureOverride and ArrangeOverride.  These are virtual and meant
	to be overridden either in unmanaged code (by simply overriding
	them), or in managed code (RegisterManagedOverrides is called in
	FWE.Initialize.)  Decorate the class with @CallInitialize so the
	managed ctor calls it.

	* uielement.h, uielement.cpp: remove the PInvoke/CBinding for the
	ctor, and add the layout methods.  Measure and Arrange are pure
	virtual.

	* cbinding.h, cbinding.cpp, type-generated.cpp: regen.
	
2008-08-22  Jeffrey Stedfast  <fejj@novell.com>

	* textbox.cpp (TextBox::Layout): Implemented rough layout.

	* layout.cpp (TextRun::TextRun): New ctor for use with TextBox.

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

	* textbox.cpp (TextBox::ArrangeOverride): Added.

	* frameworkelement.h (class FrameworkElement): Changed default
	Width/Height values to NAN.

	* textbox.cpp: Initial implementation of TextBox, Layout and
	Rendering logic still missing.

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

	* usercontrol.cpp (UserControl::OnPropertyChanged): make sure the
	values are there.

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

	* audio-alsa.cpp: Call Underflowed () when we run out of data.

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

	* mplayer.h, mplayer.cpp: Remove the Eof state and add two separate
	  VideoEnded and AudioEnded states. Implement handling of VideoEnded
	  state, and call MediaElement::MediaEnded when both states have been
	  reached.
	* media.h, media.cpp: Rename AudioFinished to MediaFinished and handle
	  all media finished (both video and audio) logic there.

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

	* uielement.cpp (UIElement::ComputeLocalTransform): clean up
	accumulated transform logic.  Keep the parent TransformFor out of
	the local_transform.

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

	* uielement.cpp (UIElement::Dispose): add logic removed from
	panel.

	* dirty.cpp (Surface::PropagateDirtyFlagToChildren): use
	ContentWalker.

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

	[ fixes annotations not showing up in pageturn due to a NULL
	background on the ink presenter ]

	* stylus.h, stylus.cpp (class InkPresenter): add an override of
	EmptyBackground().  If we have a non-empty stroke bounding
	rectangle, return false.  Otherwise fall back to
	Panel::EmptyBackground.

	* panel.h, panel.cpp (class Panel): add EmptyBackground() virtual
	method.  the panel implementation returns true if GetBackground()
	returns NULL.  Use this virtual method instead of an explicit
	GetBackground() call in Panel::FrontToBack.

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

	* enums.cpp: Added ScrollBarVisibility enum

	* text.cpp (TextBlock::OnPropertyChanged): Er... we need to
	invalidate if the TextWrappingProperty changes too.

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

	* border.h, border.cpp, cornerradius.h: add new
	types.

	* Makefile.am: add border/cornerradius to the file list.

	* type.h, value.h, cbinding.cpp, cbinding.h, type-generated.cpp,
	dependencyproperty.g.cpp: regen.

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

	* textbox.h (class TextBox): The TextBox namespace should be
	System.Windows.Controls

	* stackpanel.h (class StackPanel): #include panel.h

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

	* textbox.h: Initial implementation of the TextBox class (just
	stubs atm).

	* value.h.in (struct Value): Don't use int32_t or uint64_t,
	etc. Be consistent and use the glib types.

	* layout.cpp (TextLayout::Layout): Fixed
	LineStackingStrategy/LineHeight issues. If we are using
	BlockLineHeight & the specified LineHeight is not Auto, then we
	need to use 0.0 as the descender.

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

	* animation.h: make KeyFrame::Get/SetKeyTime pure virtual, and add
	accessors to all the subclasses.  They're autogenerated from the
	respective class's DP's.

	* animation2.h: same.

	* animation.cpp: remove KeyFrame::Get/SetKeyTime implementations.

	* control.h (class Control): add some more GenerateAccessors.

	* control.cpp: and remove the manual implementations here.

	* dependencyproperty.g.cpp: regen.

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

	* animation.cpp (KeyFrameCollection::OnSubPropertyChanged): remove
	debug spew.

	* xaml.cpp (value_from_str): unref the collections we create after
	setting them.

2008-08-21  Jackson Harper  <jackson@ximian.com>

	* xaml.cpp: Can't rely on the type for getting a managed element's
	name, we have to pull it from the element name provided to the
	XamlElementInfo.

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

	* dependencyobject.cpp (DependencyObject::HasProperty): pass
	additional_types to IsSubclassOf.

	* type.h, type.cpp: add IsSubclassOf variants that take
	additional_types.  Fixes lookup problems of non-custom DP's on
	managed subclasses.

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

	* value.h.in (struct Value): make all single arg primitive value
	typed ctors "explicit" so c++ won't do any magic implicit
	conversion from value type to Value.

	* value.h: regen

	* runtime.cpp (Surface::ShowFullScreenMessage): need to create the
	Value()'s explicitly.

	* collection.cpp (DoubleCollection::FromStr): same.

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

	* dependencyobject.cpp (create_temp_namescope): don't leak the
	temporary namescope we create.  Also don't create it over and over
	again.

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

	* dependencyobject.cpp|h: Add ContenAdded and ContentRemoved
	virtual methods so that we can begin to simplify content rules.

	* dirty.cpp (Surface::PropagateDirtyFlagToChildren): use
	GetContent to handle the children in a generic way.

	* uielement.cpp|h: start moving generic uielement content logic
	here.  Implement OnLoaded and deal with content directly.
	
	* canvas.cpp|h: remove obsolete methods. Move most of zindex
	property logic from panel to here.

	* panel.cpp|h: move ZIndex logic to canvas and move OnLoaded logic
	to uielement.

	* control.cpp|h: generate accessors, start remove OnLoaded and
	SetSurface.

	* dependencyproperty.g.cpp: regen.
	
2008-08-20  Chris Toshok  <toshok@ximian.com>

	* text.cpp, text.h: generate accessors for Glyph properties.

	* geometry.cpp, grid.cpp, media.cpp, panel.cpp, runtime.cpp,
	shape.cpp, stylus.cpp, transform.cpp, trigger.cpp, uielement.cpp,
	xaml.cpp: make another pass through files switching to C++
	accessors from GetValue(FooClass::FooProperty)->AsFoo().

	* dependencyproperty.g.cpp: regen.

2008-08-20  Chris Toshok  <toshok@ximian.com>

	* animation.cpp, animation.h, brush.cpp, brush.h, canvas.cpp,
	  canvas.h, clock.cpp, clock.h, collection.cpp, collection.h,
	  frameworkelement.cpp, frameworkelement.h, geometry.cpp,
	  geometry.h, grid.h, media.cpp, media.h, namescope.cpp,
	  namescope.h, panel.cpp, panel.h, playlist.cpp, shape.cpp,
	  shape.h, stackpanel.h, style.h, stylus.cpp, stylus.h, text.cpp,
	  text.h, transform.cpp, transform.h, trigger.h, uielement.cpp,
	  uielement.h, xap.cpp, xap.h:

	  mostly, decorate almost all DependencyProperties with
	  @GenerateAccessors, add in lots of new ones that weren't present
	  before (to the .h), and remove all those implementations from
	  the .cpp files.

	  Also, don't use #if SL_2_0 in the headers.  we can't depend on
	  that being defined (especially once we install).  Any
	  2.0-specific behavior needs to be done in the .cpp files.  There
	  are still a few things that are wrong wrt
	  this (dependencyproperty.g.cpp needs to define the DP's
	  regardless of version, they can just be NULL in the 1.0 case for
	  2.0 properties, for instance.)

	* cbinding.cpp, cbinding.h, dependencyproperty.g.cpp: regen

2008-08-20  Chris Toshok  <toshok@ximian.com>

	* uielement.h (ClearLoaded): use &=, not |=, here.  fixes tests.

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

	* layout.cpp (TextLayout::Layout): Updated to take a
	TextLayoutHints argument for providing hints like text alignment
	and line stacking/height.

	* text.cpp (class TextBlock): Updated a bit for Silverlight
	2.0. All of the properties added in 2.0 are now there, although
	only 2 of them are respected at the moment (line stacking strategy
	& line height).

	* enums.cpp|h: Added LineStackingStrategy and TextAlignment enums.

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

	* audio.cpp: NULL out the player instance after deleting it.

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

	* audio-pulse.cpp, audio-pulse.h: Close: Detect if Close has been
	  called and if so, do nothing.

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

	* audio.cpp: We only support 1 or 2 channels for the moment.

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

	* media.cpp, media.h: Fix buffering progress to take into account that
	  the first pts isn't necessarily 0 (happens for live media).

2008-08-20  Chris Toshok  <toshok@ximian.com>

	* runtime.cpp (Surface::HandleMouseEvent): make sure not to emit
	Focus events on click in a 1.0 context.

2008-08-20  Jackson Harper  <jackson@ximian.com>

	* xaml.cpp|h: Setting properties requires the xaml namespace so it
	can lookup managed types. TODO: It also needs the default
	assembly, but I am thinking of moving that to the loader.

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

	* mplayer.cpp: Properly ref/unref the AudioSource.

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

	* media.h: Remove G_BEGIN/END_DECLS and two unnecessary #includes.

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

	* media.cpp, media.h, runtime.cpp: Remove media_init, just make
	  runtime_init call Media::Initialize directly.

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

	* media.h, media.cpp: Remove media_element_advance_frame from header,
	  no need to make it public.

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

	* mplayer.cpp: AdvanceFrame: only return true if we actually processed
	  any frames. SeekCallback: clear the queue of audio frames as well.
	* media.h, media.cpp: Removed SetPreviousPosition, no longer needed.
	  Don't change previous_position while we're seeking, and don't make
	  it go backwards.
	* audio.cpp, audio.h: Added AudioSource::ClearFrames.

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

	* runtime.cpp: Fix 1.0 build. No idea if the fix is correct.

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

	* cbinding.cpp, cbinding.h, xap.h: Mark Xap as 2.0 only for the
	  generator.

2008-08-20  Stephane Delcroix  <sdelcroix@novell.com>

	* canvas.h, canvas.cpp:
	* uielement.h, uielement.cpp: move the ZIndexProperty and Get/Set-ers
	from uielement to Canvas. Drop the non-static Get/Set-Top/Left ()

	* panel.cpp, collection.cpp: related changes.

2008-08-20  Stephane Delcroix  <sdelcroix@novell.com>

	* uielement.h: change the generator instructions so the 
	NameProperty is generated in FrameworkElement.

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

	* dependencyobject.h,
	dependencyobject.cpp (DependencyObject::GetContent): ripped this
	out of a hack, should prove useful for the work coming up.

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

	* runtime.cpp (Surface::FocusElement): fix the IsTabStop check.

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

	* control.h, control.cpp (class Control): generate a binding for
	Control::InitializeFromXaml and drop the 2 manual C bindings.

	* cbinding.h, cbinding.cpp: regen.

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

	* xap.h, xap.cpp (class Xap): rename xap_unpack to Xap::Unpack.
	autogenerate our binding for it.

	* cbinding.h, cbinding.cpp: regen.

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

	* eventargs.h, eventargs.cpp (class Keyboard): make this more of a
	real class, and remove the implementation of
	keyboard_get_modifiers.  instead, provide a c++ method (both a
	getter and setter) and annotate the Getter with
	GenerateCBinding/GeneratePInvoke.

	* collection.h, collection.cpp: reorder the class decls (why do
	people put private first?) and make CollectionIterator a real
	class, with annotated methods.  Also, move
	double_collection_from_str and point_collection_from_str to
	DoubleCollection::FromStr and PointCollection::FromStr
	respectively.  move double_garray_from_str out of here (to
	utils.h/utils.cpp)

	* utils.h, utils.cpp: new (hopefully last) home for
	double_garray_from_str.

	* point.h, point.cpp (struct Point): rename point_from_str to
	Point::FromStr.  no reason to have a C method for that.

	* rect.h, rect.cpp (struct Rect): same thing with Rect::FromStr.

	* window-gtk.h (class MoonWindowGtk): mark the ctor and
	GetWidget() with GenerateCBinding/GeneratePInvoke.

	* window-gtk.cpp: and remove their implementations.

	* xaml.cpp: convert over to all the new ::FromStr methods.

	* thickness.cpp: track new home of double_garray_from_str.

	* cbinding.h, cbinding.cpp: regen.

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

	* uielement.h, uielement.cpp: make almost all data
	private/protected.  Add a couple of methods to aid in
	this (IsLoaded, ClearLoaded, TransformPoint).  Get rid of the
	cbinding for transform_point - it's never used.  Also, re-order
	the header to put public things first, then protected then
	private.

	* runtime.cpp: use IsLoaded.

	* panel.cpp: use ClearLoaded.

	* text.cpp, shape.cpp, eventargs.cpp, frameworkelement.cpp: use
	TransformPoint.

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

	* runtime.cpp (Surface::HandleMouseEvent): don't compare the input
	lists, as we will almost always have identical lists.  compare the
	head of the new list to focused_element to determine if focus
	changes.

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

	* pipeline.cpp: Beautify error messages.

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

	* media.cpp: test-inexistent-media(s) were failing due to ISP's
	  tendency to return search pages for failed dns lookups. Fixed tests
	  after testing with sane DNS settings and did the appropiate change
	  in code (raise correct error message/number).

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

	* runtime.h: Make RUNTIME_INIT values sequential.

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

	* xaml.cpp (xaml_hydrate_from_str): make sure to set the surface
	of the object before parsing so that objects don't switch from the
	loader's surface to NULL as they're added to the hierarchy while
	being parsed.

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

	* shape.cpp (Shape::InsideObject): check the extents first, then
	reorder the stroke/fill tests to test for the most likely first.

	Helps speed up sliverlight.net/world a bit.

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

	* mplayer.h, pipeline.h: No need to surround GetTypeName with
	  OBJECT_TRACKING anymore.

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

	* audio.cpp, audio.h, audio-alsa.cpp, audio-alsa.h, audio-pulse.cpp,
	  audio-pulse.h: Added, our new audio abstraction/implementation.
	* Makefile.am, src.mdp, type-generated.cpp: Updated.
	* mplayer.cpp, mplayer.h: Moved audio code into its own file(s).
	* runtime.cpp, runtime.h: Add runtime overrides for audio.

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

	* xap.cpp (xap_unpack): Fixed compiler warning.

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

	* media.cpp: Include headers mplayer.h doesn't include anymore.
	  MediaElement::SetMedia: only set audio data on the MediaPlayer if
	  the media has audio. TImelineMarkerCollection::Add: don't call the
	  base class' Add, call base's Insert instead. Fixes a stack overflow
	  since base class' Add calls Insert, which TimelineMarkerCollection
	  overrides to call Add.

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

	* enums.cpp: Wrap 2.0-only code in SL_2_0.

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

	* zip/unzip.c: Get rid of unused variable.

	* value.cpp (Value::ToString): Get rid of unused variable.

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

	* dependencyobject.h: EventObject::ref: print a stack trace before the
	  abort if we can, and fix typo in the abort message.

2008-08-19  Geoff Norton  <gnorton@novell.com>

	* xap.cpp: Ensure we can actually enter the directory we're creating.

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

	* mplayer.cpp: Silence the compile warning.

	* color.cpp (color_from_str): Got rid of unused variable.

	* xaml.cpp (dependency_object_set_attributes): Don't need to use
	strlen(str) == 0 to figure out if the string is empty, just check
	the first char.
	(wrap_type): Removed. Doesn't seem to be used any longer.
	(get_type_for_property_name): Same.
	(panel_add_child): Same.
	(dependency_object_set_property): Made static.
	(dependency_object_set_attributes): Same.
	(dependency_object_hookup_event): Same.
	(dependency_object_missed_property): Same.

	* dependencyproperty.cpp (resolve_property_path): Use proper
	integer types and avoid calling strlen if all we care to know is
	if the string is empty.

	* runtime.cpp (Surface::Paint): Get rid of an annoying debug
	printf.
	(Surface::HandleMouseEvent): Removed unused variable.

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

	* trigger.cpp (EventTrigger::SetTarget): make the 2.0 case more
	robust - handle Type.Event notation, making sure that the type is
	valid for the target.

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

	* runtime.cpp|h: add override to use sofware fallbacks for
	rendering.

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

	* trigger.cpp (EventTrigger::SetTarget): do the AddHandler in both
	1.0 and 2.0 cases.  big oops.

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

	* dependencyobject.cpp (DependencyObject::GetObjectType): Get rid
	of a warning that is no longer valid.

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

	* downloader.h, downloader.cpp: Add a request field to
	  DownloaderResponse, and a response field to DownloaderRequest. When
	  a request is aborted, also abort the response. This fixes a crash
	  when we aborted the request before receiving a response, the
	  response had no idea the request had been aborted (since the
	  request didn't store the response after creating it, it couldn't
	  notify the response of the abort), and happily accessed deleted
	  objects.

2008-08-18  Chris Toshok  <toshok@ximian.com>

	* runtime.cpp (Surface::CreateArgsForEvent): new method, create
	the right kind of args for a given event.  we should probably
	autogenerate this.
	(Surface::EmitEventOnList): use CreateArgsForEvent.  Only create
	one instance of the event args that we use to bubble along the
	element list.  If it's a RoutedEventArgs subclass, set the source
	to be the first element in the list, and check the "Handled"
	attribute after every emit to see if we should finish early (this
	provides for 2.0 semantics).
	(Surface::FocusElement): unfortunately the event generation is
	async, so add a tick call if we need to.  if we already have a
	tick call (meaning >= 1 focus change has happened already in this
	tick), we drop the intervening change(s).  This is likely wrong.
	(Surface::GenerateFocusChangeEvents): emit GotFocus/LostFocus on
	the proper element lists.
	(Surface::HandleUIKeyPress, Surface::HandleUIKeyRelease): if we're
	silverlight2 (and we have a focused element), emit the event on
	the list of elements from the focused element back up to the root.
	Otherwise just emit it on the toplevel.

	* runtime.h (class Surface): add GetFocusedElement/FocusElement
	methods, which are used to implement
	FocusManager.GetFocusElement() and Control.Focus().

	* uielement.h, uielement.cpp (class UIElement): remove a bunch of
	Emit$Event() methods that were never used.

	* trigger.cpp: in 2.0, you can put other events in RoutedEvent,
	not just "Loaded".  there are parsing rules that we can't make use
	of here, so more work will likely have to happen in the parser.

	* trigger.h (class EventTrigger): add registered_event_id.

	* cbinding.h, cbinding.cpp: regenerate.

2008-08-18  Geoff Norton  <gnorton@novell.com>
	
	* type-generated.cpp, cbinding.cpp|h: Rengerated
	* dependencyobject.h: Bind DependencyObject .ctor

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

	* deployment.h: Move CrossDomainAccess to
	* enums.h|cpp: Register CrossDomainAccess so that AppMainfest
	can specify values from the enum.

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

	* cbinding.cpp, cbinding.h, uielement.h: Mark
	  UIElement::GetTransformToUIElement as 2.0, fixes 1.0 build.

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

	* panel.cpp|h: remove SetSurface override, the
	DependencyObjectCollection::SetSurface does the work already.

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

	* uielement.cpp: Autogenerate more of the bindings, make
	desired_size private, etc.

2008-08-18  Geoff Norton  <gnorton@novell.com>
	
	* eventargs.cpp|h: Change the return type to int, fix the build.

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

	* uielement.cpp (uielement_get_surface): Removed.
	(uielement_invalidate): Removed.
	(uielement_set_transform_origin): Removed.

	* transform.cpp: Removed manual c-bindings.

	* text.cpp: Removed manual c-bindings for property accessors.

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

	* type-generated.cpp, cbinding.cpp|h: Rengerated
	* uielement.cpp|h, type.h, value.h: Keyboard->Key
	* runtime.cpp|h: Move key translation to eventargs, and pass the
	raw GdkEventKey to KeyEventArgs.
	* eventargs.cpp|h: Implement KeyEventArgs bound to the managed stuff
	and remove the old KeyboardEventArgs.

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

	* stylus.h: Moved required manual c-bindings into G_*_DECLS block.

	* size.cpp: Removed manual ctor c-binding.

	* shape.cpp: Removed manual c-bindings for property accessors.

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

	* media.cpp|h, cbinding.cpp|h: Implement support for generating Image's
	from managed Streams.

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

	* runtime.cpp: Removed manual c-bindings for Surface and renamed
	Get/SetTrans() to Get/SetTransparent().

	* panel.cpp: Removed manual c-bindings for property accessors.

	* media.cpp: Removed manual c-bindings for property accessors and
	other methods that are now autogenerated.

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

	* dependencyobject.h: Make the generator happy.

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

	* geometry.cpp: Removed manual c-bindings for property accessors.

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

	* runtime.h: Caller is "in main thread" also when the main_thread
	pointer equals NULL (no surface has been created).

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

	* debug.cpp: Fix a leak found by valgrind.

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

	* dependencyobject.h: Make GetTypeName virtual if we're tracking
	  objects, enables better output of lost objects.

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

	* dependencyobject.cpp: DrainUnrefs: since unreffing objects may cause
	  more objects to be enqueued for unref, loop until there are none
	  left.

2008-08-17  Geoff Norton  <gnorton@novell.com>

	* downloader.cpp|h: Add a method for DownloaderResponse to 
	support a Header Visitor.

2008-08-17  Geoff Norton  <gnorton@novell.com>

	* uielement.h: Expose desired_size as public to fix the build.

2008-08-17  Chris Toshok  <toshok@ximian.com>

	* uielement.h, frameworkelement.h: can't use SL_2_0 in headers.

2008-08-17  Chris Toshok  <toshok@ximian.com>

	* Makefile.am (libmoon_include_HEADERS): INCLUDE_MONO_RUNTIME ->
	INCLUDE_MANAGED_CODE.

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

	* clock.cpp|h: add methods Jeff removed back. 

2008-08-15  Chris Toshok  <toshok@ximian.com>

	* stylus.h (class DrawingAttributes): all managed DP fields are
	private.
	(class Stroke): DrawingAttributesProperty and StylusPointsProperty
	are private in managed-land.

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

	* grid.h: Autogenerate bindings for GetActualWidth/Height

	* grid.cpp: Removed manual c-bindings.

	* frameworkelement.cpp: Removed manual c-bindings.

2008-08-15  Chris Toshok  <toshok@ximian.com>

	* eventargs.h (enum CollectionChangedAction): change Reset to
	Cleared, and add Clearing to handle the old functionality in
	DependencyObject::OnCollectionClear.

	* dependencyobject.h (class DependencyObject): remove
	OnCollectionClear.  we handle that case in OnCollectionChanged
	now.

	* panel.h, panel.cpp (Panel::OnCollectionChanged): move
	OnCollectionClear code to here.

	* uielement.cpp (UIElement::OnCollectionChanged): add
	ActionClearing code here.

	* stylus.cpp, text.cpp: track CollectionChangedAction enum change.

	* collection.cpp (Collection::Clear): use
	EmitChanged (CollectionChangedActionClearing,...) instead of
	OnCollectionClear.

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

	* eventargs.cpp|h: Same.

	* control.cpp: Same.

	* contentcontrol.cpp: Removed manual property accessor c-bindings.

	* clock.cpp: Removed manual c-bindings for things that can be
	autogenerated.

	* brush.cpp|h: Removed manual c-bindings for property accessors.

	* animation.cpp|h: Added some convenience c++ property accessors and
	got rid of all of the manual c-bindings. Fixed them to be
	auto-generated.

	* stylus.cpp: Added c++ property accessors and updated the code to
	use them (cleans up some code) and also got rid of the c binding
	accessors. We'll autogenerate these.

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

	* layout.cpp: Don't add kerning before a dot (.). This match SL
	behavior (i.e. it's not a "sliding dot" algorithm like I expected)
	and the effect is visible in a few DRT (like #184).

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

	* uielement.cpp (UIElement::GetTriggers): Added for convenience.
	(UIElement::Dispose): Use the new convenience method.

2008-08-15  Chris Toshok  <toshok@ximian.com>

	* panel.cpp (Panel::ChildRemoved): queue a ZIndex re-sort here.
	(Panel::ChildAdded): call item->OnLoaded if we're loaded, and
	queue a re-sort.
	(Panel::OnCollectionChanged): simplify this since the code moved
	to ChildAdded/ChildRemoved.

	* panel.h, panel.cpp (Panel::Dispose): loop over our children
	setting their visual parent to NULL.

	* uielement.h, uielement.cpp (UIElement::Dispose): loop over the
	trigger collection removing ourselves as the target.
	(UIElement::OnPropertyChanged): handle TriggersProperty here -
	remove target from the old triggers and set target on the new
	ones.
	(UIElement::OnCollectionChanged): new method, handle
	TriggersCollection.

	* dependencyobject.cpp: be consistent in our treatment of
	LogicalParent - clear it in every place we're removing a DO.  Warn
	if we're setting it again on the same DO.

	* collection.h, collection.cpp: remove triggercollection's
	added/removedfromcollection, adn remove uielementcollection's
	removedfromcollection.  Also, stop using a separate closure.  The
	collection's LogicalParent always has the same value - use that.

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

	* clock.cpp (TimeManager::SourceTick): Instead of always using up
	to 1/30 of a second for flushing the async queue, use only the
	time remaining in our render pass to flush it.

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

	* animation.h: KeyTimeProperty isn't nullable in managed code.

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

	* cbinding.cpp, cbinding.h: Regenerated.
	* media.cpp, media.h: Add a MediaElement::SetStreamSource, and hack it
	  to at least open the source.
	* pipeline.cpp, pipeline.h: Added ManagedStreamSource.

2008-08-15  Jackson Harper  <jackson@ximian.com>

	* xaml.cpp: Need to advance after F.

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

	* animation.h, dependencyproperty.g.cpp: KeyTime is nullable. Fixes MS
	  DRT#114.

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

	* dependencyproperty.g.cpp: Regenerated.

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

	* animation.h (class KeyFrame): remove the KeyTime DP and make
	the ctor private this is an abstract class.

	* animation.cpp: retrieve the property via name.

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

	* clock.cpp (TimeManager::SourceTick): Call InvokeTickCall() as
	many times as we can in 1/30th of a second. Major visual
	performance improvement for bug #395160.

2008-08-14  Jackson Harper  <jackson@ximian.com>

	* xaml.cpp|h: We need to pass a pointer to the top level control
	when hooking up a managed event, the managed code uses this to
	find the method to invoke.

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

	* uielement.cpp: Implemented property accessors for ZIndex

	* collection.cpp (UIElementZIndexComparer): Use
	UIElement::GetZIndex(). If, in the future, we make GetZIndex()
	return a cached value, now we'll automagically benefit from it.

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

	ZIndex sorting optimization for bug #395160

	* panel.cpp (Panel::UpdateTotalHitTestVisibility): Don't iterate
	over the z_sorted list, it might not yet be
	populated (e.g. ResortZIndex() may not have been called yet).
	(Panel::OnPropertyChanged): Set a DirtyChildrenZIndices bit if the
	new collection is non-null.
	(Panel::OnCollectionChanged): Queue ZIndex resorts as appropriate.
	(Panel::OnLoaded): Queue a resort here too.

	* collection.cpp (UIElementCollection::AddedToCollection):
	Removed. We don't want to do the zindex sortign here anymore. Too
	slow. Instead, we'll have Panel::OnCollectionChanged() set the
	DirtyChildrenZIndices dirty flag so that the renderer forces a
	resort.
	(UIElementCollection::Insert): Removed, no need to override
	anymore since we won't be resorting by zindex here anymore.
	(UIElementCollection::ResortByZIndex): Now that z_sorted isn't
	maintained as items are added/inserted, we need to always init the
	z_sorted array here even if we only have 1 item.

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

	* xaml.cpp, pipeline.cpp: Don't use base_unref, call unref on the
	  instance.
	* playlist.cpp: Use DependencyObject::SetName instead of the C method.
	* dependencyobject.h, dependencyobject.cpp: Generate all c methods, as
	  well as Name accessors.
	* cbinding.h, dependencyproperty.g.cpp, cbinding.cpp: Regenerated.
	* runtime.cpp: Updated according to new method names.

2008-08-14  Jackson Harper  <jackson@ximian.com>

	* xaml.cpp: We now create property instances from the property's
	type info not the property's parent type. This will allow us to
	have a managed attached property on a native object.

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

	* Makefile.am (libmoon_la_SOURCES): add thickness.cpp

	* thickness.h, thickness.cpp: add thickness_from_str.

	* xaml.cpp: add thickness parsing.

2008-08-14  Jackson Harper  <jackson@ximian.com>

	* xaml.cpp: Need to lookup property element name's in their
	namespace so that managed attached properties can be set.

2008-08-14  Jackson Harper  <jackson@ximian.com>

	* xaml.cpp: If there is a dot in the element name we can assume
	it's a property (or at least not an element).  This should prevent
	some extra calls into managed code to try to create types from
	property names.

2008-08-13  Geoff Norton  <gnorton@novell.com>

	* runtime.cpp|h, clock.cpp|h: Move the g_idle_idd and g_timeout
	calls into the time manager.

2008-08-13  Geoff Norton  <gnorton@novell.com>

	* runtime.cpp|h: Add a binding for g_idle_add.

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

	* cbinding.cpp, cbinding.h, eventargs.cpp, eventargs.h: Generate two
	  MouseEventArgs methods.

2008-08-14  Jackson Harper  <jackson@ximian.com>

	* type-generated.cpp: Value types.

2008-08-13  Jackson Harper  <jackson@ximian.com>

	* xaml.cpp: Make sure we set content properties.

2008-08-13  Jackson Harper  <jackson@ximian.com>

	* xaml.cpp: Add support for parsing value types.

2008-08-13  Chris Toshok  <toshok@ximian.com>

	* panel.cpp (Panel::OnCollectionChanged): we only need to call
	OnLoaded on the new child.

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

	* stylus.h: StylusInfo doesn't have a managed equivalent.

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

	* dependencyproperty.h: Generate CBinding and PInvoke for IsAttached.
	* cbinding.cpp, cbinding.h: Regenerated.

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

	* type.cpp: Remove spew.
	* dependencyobject.cpp: GetValue*WithError: Fix error messages to say
	  we're trying to get values, not set them.

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

	* dependencyproperty.g.cpp: Regenerated.
	* geometry.h: Added IsFilled property.

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

	* brush.h: Set correct managed DP access and property types.

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

	* *.h: Added GeneratePInvoke attribute to each ctor

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

	* text.cpp: s/Inlines/InlineCollection/g

	* xaml.cpp: s/Inlines/InlineCollection/g

	* collection.h (class InlineCollection): Renamed from Inlines.

	* trigger.h (class TriggerAction): Generate C Binding for ::Fire()
	and also the ctor. Needed to prevent a crash in test-props.html

2008-08-13  Geoff Norton  <gnorton@novell.com>

	* runtime.cpp|h: Reuse the old html_timer infrastructure for the
	intial DispatcherTimer implementation.

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

	* media.h (class MediaElement): Make MarkersProperty internal for
	managed-side.

	* grid.h (class Grid): Make Column/RowDefinitionsProperties
	internal for managed-side.

	* text.h (class TextBlock): Make InlinesProperty internal for
	managed-side.

	* panel.h (class Panel): Update ChildrenProperty managed property
	access.

	Also added newlines to the end of some files to silence compile
	warnings.

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

	* dependencyproperty.g.cpp, type.h, type-generated.cpp, value.h,
	  cbinding.cpp, cbinding.h: Regenerated.
	* geometry.h: Annotation fix.
	* Makefile.am, src.mdp: Added tilesource.h
	* tilesource.h: Added.

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

	* src.mdp, Makefile.am: Added animation2.h
	* type.h, type-generated.cpp, value.h, cbinding.cpp, cbinding.h,
	  dependencyproperty.g.cpp: Regenerated.
	* animation.h: Added missing 2.0 DPs and more annotations.
	* animation2.h: Added, contains 2.0 animation classes.
	* clock.h: There are no managed equivalent of TimelineGroup and
	  ParallelTimeline, remove their Namespace annotation.

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

	* shape.h: Fix warning.

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

	* shape.h: The managed Shape class must be constructable, so make all
	  pure virtual methods from the native Shape class just virtual.
	* cbinding.cpp, cbinding.h, type-generated.cpp: Regenerated.

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

	* animation.h, brush.h, cbinding.cpp, cbinding.h, clock.h,
	  dependencyproperty.g.cpp, frameworkelement.h, geometry.h, panel.h,
	  text.h, transform.h, type-generated.cpp, usercontrol.h: Added more
	  annotations to make gui-compare happier.

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

	* control.h, dependencyobject.h, deployment.h, frameworkelement.h,
	  style.h, template.h, trigger.h, uielement.h: Gui-compare annotation
	  tweaking.

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

	* stackpanel.h, src.mdp, Makefile.am, cbinding.cpp, cbinding.h,
	  dependencyproperty.g.cpp, enums.cpp, enums.h, type.h,
	  type-generated.cpp, value.h: Added a native StackPanel class and
	  generate the managed StackPanel.

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

	* brush.h, contentcontrol.h, deployment.h, downloader.h, media.h,
	  namescope.h, stylus.h, transform.h: Tweak some annotations.

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

	* style.h (class Style): make the "Setters DP" field private.

	* template.h (class ControlTemplate): add TargetType DP

	* dependencyproperty.g.cpp: regen.

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

	* style.h (class Setter): hack for the DependencyProperty valued
	property.  we need to parse a string DP name in a context where we
	don't know the type to apply to it, so we need to have a string
	backed property.

	* dependencyproperty.g.cpp: regen.

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

	* collection.h: Annotate Collection.

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

	* animation.h, clock.h, collection.h, error.h, eventargs.h, media.h,
	  size.h, style.h, template.h, trigger.h: Add @Namespace annotations.

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

	* src.mdp: Updated.

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

	* collection.cpp (Collection::Clear): make a temporary copy of the
	array so we can zero out the ptrarray before calling
	RemovedFromCollection.

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

	* xaml.h:
	* xaml.cpp: Hydrate now passes in the default assembly name and
	path (we can probably do away with path's I think that's just a
	holdover from 1.1).  If no assembly name is specified in the
	custom xmlns, the default's are used.

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

	* trigger.h, control.h, deployment.h, text.h, dependencyproperty.g.cpp,
	  style.h, uielement.h, grid.h, media.h: Tweaked annotations to
	  support managed DP accessor generation.

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

	* collection.cpp (Collection::SetCount): Convenience function.
	(Collection::Clear): Use SetCount().
	(Collection::Insert): Same.
	(Collection::RemoveAt): Same.

	* media.cpp (TimelineMarkerCollection::Add): Chain up to direct
	parent class rather than base class - while the
	DependencyObjectCollection might not currently override Add/Insert
	methods, if at some later point overrides are added, then we need
	to do no work here.

	* collection.cpp (DependencyObjectCollection::SetValueAt):
	Removed (not used anywhere).
	(Collection::SetValueAtWithError): This needs to call
	SetValueAt(), not GetValueAt().
	(Collection::SetValueAt): Delete the removed Value after emitting
	the event so we don't leak it.

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

	* animation.h, brush.h, clock.h, control.h, dependencyobject.h,
	  deployment.h, downloader.h, frameworkelement.h, media.h, text.h,
	  trigger.h, uielement.h: Use string instead of char* as
	  @PropertyType.

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

	* animation.h, brush.h, canvas.h, clock.h, collection.h,
	  contentcontrol.h, control.h, dependencyobject.h, deployment.h,
	  downloader.h, frameworkelement.h, geometry.h, grid.h, media.h,
	  namescope.h, panel.h, shape.h, style.h, stylus.h, text.h,
	  transform.h, trigger.h, uielement.h, usercontrol.h: Added
	  @Namespace annotations, and changed @PropertyType which were
	  declared as gint32 (and are enums) to use the actual enum type.
	* dependencyproperty.g.cpp: Updated.

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

	* src.mdp: Updated.

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

	* dependencyproperty.h, type.h, type-generated.cpp, value.h: Added
	  DependencyProperty to the Kind enum.

2008-08-11  Chris Toshok  <toshok@ximian.com>

	* deployment.h (class Application): add ResourceProperty.

	* style.h: add ValueProperty.

	* cbinding.h, cbinding.cpp: hm, looks like I forgot to regen these
	after adding the Version=2.0 stuff to the collection api.

	* dependencyproperty.g.cpp: regen.

2008-08-11  Chris Toshok  <toshok@ximian.com>

	* error.h, error.cpp: add an enum to MoonError that lets us
	specify which exception to raise.
	
	* collection.h, collection.cpp: a few changes:

	1. make most methods take Value* now instead of Value, to ease the
	autogenerated bindings.  Leave in Add/Remove taking (Value v) so
	we can let c++ do some implicit conversion lifting for us.  Leave
	the (Value) variants as non-virtual, and make the Value* ones
	virtual.

	2. Make ::Add call ::Insert, instead of duplicating all the code.

	3. Move all calls of AddedToCollection and RemovedFromCollection
	to *after* the work has been done (they're past-tense, so do what
	their name implies.)  This means subclasses can assume the item is
	already in the array (or removed from it) when those methods are
	called.  The one holdout to this utopian ideal is Clear().  we
	need to fix that.

	4. Switch from overriding GetValue to handle CountProperty (and
	leaking a Value* every time we get it) to setting the
	CountProperty whenever we need to (in Insert/RemoveAt).

	5. Add special GetValueAtWithError, SetValueAtWithError, and
	RemoveAtWithError methods, that allow us to effectively raise
	exceptions from the unmanaged code.  Use the new
	MoonError::ErrorKind enum to specify which exception.

	6. remove a bunch of C api, which is now autogenerated.
	
	* dependencyproperty.g.cpp (dependency_property_g_init): regen to
	pick up Collection::CountProperty's default value.

	* cbinding.h, cbinding.cpp: autogen'ed collection api.

	* stylus.h, media.h, media.cpp: track collection changes.

	* dependencyobject.cpp: track MoonError enum change.

2008-08-11  Chris Toshok  <toshok@ximian.com>

	* dependencyproperty.g.cpp: regen.

	* control.h (class Control): add StyleProperty.

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

	* layout.cpp: Compute line's height with more precision. This 
	removes the cumulative difference (over multiple lines) with
	Silverlight implementation. Fix DRT#209 (enough to PASS) and 
	improve several	other ones (already passing but imperfect).

2008-08-11  Chris Toshok  <toshok@ximian.com>

	* style.h: comment out 2 problematic DP's for now.

	* dependencyproperty.g.cpp: regen

2008-08-11  Chris Toshok  <toshok@ximian.com>

	* style.h, style.cpp: add Style, SetterBase, Setter, and
	SetterBaseCollection unmanaged types.

	* Makefile.am: add them to the 2.0 build.

	* type.h, type-generated.cpp, value.h, cbinding.h, cbinding.cpp,
	dependencyproperty.g.cpp: regenerate from style.h/style.cpp.
	
2008-08-11  Jeffrey Stedfast  <fejj@novell.com>

	* shape.cpp (Polyline::OnCollectionChanged): Invalidate the path
	cache.
	(Polygon::OnCollectionChanged): Same.

	* text.cpp (TextBlock::OnPropertyChanged): Set dirty to true when
	the TextDecorationsProperty changes too. Fixes the "underline
	hyperlinks" portion of bug #412986.

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

	* xaml.cpp: Remove debug spew.

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

	* array.cpp, array.h: Removed, no longer needed.
	* collection.cpp, collection.h: Moved double_garray_from_str to
	  collection.cpp|h.
	* geometry.cpp, libmoon.h, Makefile.am, point.cpp, point.h, rect.cpp,
	  shape.cpp, src.mdp, type.h, value.cpp, value.h, value.h.in,
	  xaml.cpp: Remove the double and point arrays, no longer needed.
	* type-generated.cpp: Remove the double and point arrays, no longer
	  needed. Implement support for 2.0 events.

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

	* runtime.cpp: Fix a crash (xaml parser tries to access the NULL loader
	  during parsing).

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

	* dependencyproperty.g.cpp: Surround 2.0 DP declarations in #if SL_2_0.

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

	* *.h: Removed *_new() prototypes which are autogenerated in
	cbinding.h

2008-08-08  Chris Toshok  <toshok@ximian.com>

	* template.h, template.cpp: new file, stub implementations for
	FrameworkTemplate and ControlTemplate.

	* Makefile.am: add template.h/cpp.

	* control.h: add Template property.

	* frameworkelement.h: add some 2.0 events.

	* cbinding.h, cbinding.cpp, type.h, dependencyproperty.g.cpp,
	value.h, type-generated.cpp: regenerate.
	
2008-08-08  Chris Toshok  <toshok@ximian.com>

	* xaml.h, xaml.cpp: we need to propagate the 2.0-ness of the
	parser around in various methods (starting from the public
	xaml_set_property_from_str and value_from_str*) in order to get it
	down to where it's needed for the enum_* calls.

	* enums.h, enums.cpp: add a "sl2" argument so we can resolve
	sl1/sl2 specific enum values, and add the 2.0 specific
	Horizontal/VerticalAlignment mappings.

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

	* runtime.cpp: Remove comments to self :)

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

	* panel.cpp, stylus.cpp, trigger.h, usercontrol.cpp, canvas.h,
	  control.h, deployment.h, text.h, trigger.cpp, dependencyobject.h,
	  canvas.cpp, transform.h, downloader.cpp, transform.cpp,
	  animation.h, grid.cpp, shape.h, animation.cpp, deployment.cpp,
	  control.cpp, runtime.cpp, text.cpp, clock.h, contentcontrol.h,
	  clock.cpp, uielement.h, collection.h, geometry.h,
	  contentcontrol.cpp, frameworkelement.h, uielement.cpp, grid.h,
	  collection.cpp, geometry.cpp, shape.cpp, dependencyobject.cpp,
	  frameworkelement.cpp, namescope.cpp, brush.h, panel.h, stylus.h,
	  namescope.h, media.cpp, brush.cpp, usercontrol.h: Remove DP
	  registration from *_init methods, and remove *_init methods which
	  turned out to be empty after that.

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

	* panel.cpp, stylus.cpp, trigger.h, usercontrol.cpp, canvas.h,
	  control.h, deployment.h, text.h, trigger.cpp, dependencyobject.h,
	  canvas.cpp, transform.h, downloader.cpp, transform.cpp,
	  animation.h, grid.cpp, downloader.h, shape.h,
	  dependencyproperty.g.cpp, animation.cpp, deployment.cpp,
	  control.cpp, runtime.cpp, text.cpp, dependencyproperty.h,
	  Makefile.am, clock.h, contentcontrol.h, dependencyproperty.cpp,
	  clock.cpp, uielement.h, collection.h, geometry.h,
	  contentcontrol.cpp, frameworkelement.h, src.mdp, uielement.cpp,
	  grid.h, collection.cpp, geometry.cpp, shape.cpp,
	  dependencyobject.cpp, frameworkelement.cpp, namescope.cpp, media.h,
	  brush.h, panel.h, stylus.h, namescope.h, media.cpp, brush.cpp,
	  usercontrol.h: Generate dependency property registration.

2008-08-07  Chris Toshok  <toshok@ximian.com>

	* collection.h, collection.cpp (double_collection_from_str): new
	method.
	(point_collection_from_str): new method.

	* xaml.cpp (value_from_str): add support for
	DoubleCollection/PointCollection properties.  leave
	DoubleArray/PointArray in for now, although nothing should use it.

	* shape.h, shape.cpp, geometry.h, geometry.cpp: switch all
	PointArray/DoubleArray properties to using
	PointCollection/DoubleCollection.  This is unfortunately a
	necessity due to the 2.0 changes, but it should be transparent for
	everything else.

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

	* shape.cpp (Shape::ShiftPosition): add an unfortunate restriction
	on ShiftPosition interaction with the shape cache to fix the
	droppings we were seeing in AnimationMatrix and
	StoryBoard_ModifyProperty.htm.

2008-08-07  Geoff Norton  <gnorton@novell.com>

	* media.cpp: When the MediaElement source changes set the
	BufferingProgress back to 0 otherwise we may never emit a 
	BufferingProgressChangedEvent for the new source.

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

	* layout.cpp: Handle negative horiBearingX correctly. This gives
	better visual results in DRT #47 (same width value, up to 2 
	decimal) and #209 (not enough to make it PASS but I doubt the 
	master is ok, since I can't duplicate its output).

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

	* dependencyobject.cpp: HasProperty: accept attached properties for
	  now.

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

	* panel.cpp, stylus.cpp, trigger.h, usercontrol.cpp, canvas.h,
	  control.h, deployment.h, text.h, thickness.h, trigger.cpp,
	  canvas.cpp, transform.h, color.h, downloader.cpp, eventargs.cpp,
	  transform.cpp, animation.h, grid.cpp, downloader.h, eventargs.h,
	  shape.h, animation.cpp, size.h, deployment.cpp, control.cpp,
	  text.cpp, clock.h, contentcontrol.h, clock.cpp, uielement.h,
	  point.h, collection.h, geometry.h, contentcontrol.cpp,
	  frameworkelement.h, uielement.cpp, grid.h, collection.cpp,
	  geometry.cpp, shape.cpp, frameworkelement.cpp, media.h, brush.h,
	  rect.h, panel.h, stylus.h, media.cpp, brush.cpp, usercontrol.h: Add
	  instructions to generate c constructors in headers and remove *_new
	  implementations from cpp files.
	* dependencyobject.h: Typedef function pointer to avoid making the
	  generator understand function pointer syntax. Update comments to
	  new syntax.
	* cbinding.h, value.h, src.mdp, cbinding.cpp: Updated.
	* type.h, type.h.in: Updated comments to new syntax.
	* mms-downloader.h: Use C++ syntax.
	* dependencyproperty.h, dependencyproperty.cpp: Make
	  dependency_property_register_managed_property a method on the type
	  and update comments to new syntax.
	* type-generated.cpp: Updated by new generator, which did actually
	  catch a few errors.

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

	* dependencyproperty.cpp: DP: Comment out the duplicate DP warning
	  until it's fixed.

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

	* dependencyproperty.cpp: When registering a clashing DP
	return the original so that the code can act on it as it
	expects.  Fixes about 18 DRT regressions.

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

	* uielement.h, uielement.cpp: add GetTransformToUIElement, the
	unmanaged equivalent to the managed UIElement.TransformToVisual.

	Also change the signature of HitTest to take a Point, not two
	doubles.  Add a HitTest overload that takes a Rect in
	preparation for 2.0.

	* panel.h, panel.cpp: track HitTest signature change.

	* control.h, control.cpp: track HitTest signature change.

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

	* transform.h, transform.cpp: add a convenience ctor for Matrix
	that takes a cairo_matrix_t*.

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

	* type-generated.cpp (type_infos): fix ctors for UIElement and
	UIElementCollection.

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

	* frameworkelement.h, frameworkelement.cpp: add
	DataContextProperty.

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

	* type.cpp: Fix for old glib in sled.

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

	* dependencyproperty.cpp, type.cpp, type.h, type.h.in,
	  type-generated.cpp: Add custom properties to a GSList instead of
	  the hash table given that several custom properties can be
	  registered on the same type with the same name.

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

	* src.mdp: Make src and plugin projects build.

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

	* src.mdp: Updated.

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

	* transform.h, transform.cpp, brush.cpp: Add GeneralTransform as a
	superclass of Transform, and move all the current Transform stuff
	there.

	* type.h, type-generated.cpp, value.h: resync

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

	* uielement.h, uielement.cpp, frameworkelement.h,
	frameworkelement.cpp: move the UIElement DPs back - the move to
	FrameworkElement breaks tests.

	* collection.cpp (TriggerCollection::AddedToCollection): quiet
	this down.
	(TriggerCollection::RemovedFromCollection): same.

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

	* frameworkelement.h, frameworkelement.cpp: add in the 2.0-only
	DependencyProperties.  we need a way to limit access to these to
	only the 2.0 case.

	* uielement.h, uielement.cpp: CursorProperty, ResourcesProperty,
	TagProperty, TriggersProperty are moved to
	frameworkelement.h/.cpp.
	
	* runtime.cpp (Surface::UpdateCursorFromInputList): CursorProperty
	moved from UIElement to FrameworkElement.

	* size.h, size.cpp: add SizeChangedEventArgs.

	* thickness.h: move this type here

	* control.h: #include thickness.h

	* type.h, value.h, type-generated.cpp: regenerate for
	SIZECHANGEDEVENTARGS.
	
2008-08-05  Chris Toshok  <toshok@ximian.com>

	* Makefile.am (libmoon_la_SOURCES): enums.c => enums.cpp

	* enums.h: add comment about keeping MouseCursors enum in sync
	with Cursor.cs.

	* enums.cpp: make all the mappings use symbols instead of integer
	constants.  Also, rename enums.c to enums.cpp so it can include
	the .h files for enums not in enums.h.

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

	* src.mdp: Remove visual.cpp|h from here too.

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

	* brush.cpp, brush.h, dirty.cpp, panel.cpp, panel.h, type.h,
	  type-generated.cpp, uielement.cpp, uielement.h, value.h,
	  visual.cpp, visual.h, collection.h, collection.cpp, Makefile.am,
	  libmoon.h: Deleted Visual (moved content into UIElement), and
	  renamed VisualCollection to UIElementCollection.

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

	* cbinding.cpp, cbinding.h, dependencyobject.cpp, dependencyobject.h:
	  GetValueWithError: Add a parameter to specify the exact type
	  (including managed subclassing) of the object. HasProperty: use
	  that parameter to determine if the type has the specified property
	  or not.
	* dependencyproperty.cpp, dependencyproperty.h: DependencyProperty: Add
	  a is_custom field to determine if the property is our own or not.

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

	* cbinding.cpp, cbinding.h: Updated.
	* dependencyobject.h, dependencyobject.cpp, dependencyproperty.cpp,
	  dependencyproperty.h, runtime.cpp, runtime.h, type.cpp, type.h,
	  type.h.in, type-generated.cpp: Create a Types class which may
	  contain additional types. Change the DP/DO/Type overloads
	  containing a Surface to take a Types argument instead.

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

	* dependencyobject.cpp: Implement Get[No[Default]]ValueWithError.

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

	* animation.cpp:
	* clock.cpp:
	* clock.h: Adding method to store a manual target (instead of a named target)
	for a timeline. This will be used to bind a Storyboard.SetTarget 2.0 method.

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

	* animation.cpp:
	* animation.h: A little bit of C API for KeySpline.

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

	* runtime.cpp: _get_surface can only be called from the main thread.

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

	* src.mdp, cbinding.h, cbinding.cpp: Updated.
	* Makefile.am: Include error.cpp.
	* error.h, error.cpp: Added MoonError.
	* dependencyproperty.h: Make RegisterFull 2.0 only.
	* dependencyobject.h, dependencyobject.cpp: Added and implemented
	  Get[[No]Default]ValueWithError and a HasProperty method which takes
	  into account properties registered on a surface.

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

	* canvas.cpp, grid.cpp: Use C++ binding instead of C binding.
	* media.cpp: Use property accessors instead of GetValue.

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

	* cbinding.cpp, cbinding.h: Update.
	* dependencyproperty.cpp: RegisterFull: Only wrap method code in
	  SL_2_0, fixed 1.0 build.

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

	* dependencyproperty.h: Make GetName return a const char*, and rename
	  parameters from readonly to read_only (to not conflict with C#
	  keywords).

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

	* src.mdp: Updated.
	* dependencyproperty.cpp, dependencyproperty.h, Makefile.am: Generate
	  DependencyProperty's C methods.
	* cbinding.cpp, cbinding.h: Added.
	* typegen, typegen/typegen.cs, typegen/typegen.sh: Moved typegen to
	  moon/generators, and add methodgen to generate pinvokes, and cgen
	  to generate c bindings.

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

	* dependencyobject.cpp, dependencyproperty.cpp, dependencyproperty.h:
	  Implement property changed callbacks.

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

	* contentcontrol.h, control.h: Fix includes.

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

	* pipeline-ffmpeg.cpp: Fix warning.

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

	* dependencyobject.cpp (EventObject::Dispose): Call
	SetSurface (NULL)
	(EventObject::unref): Don't call SetSurface() here anymore.

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

	* runtime.cpp|h: Adding few utility functions to modify the flags
	at runtime -- provided that there are no surfaces currently
	present. Would be nice to be able to somehow do it before calling
	runtime_init ().

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

	* runtime.cpp|h: Adding an expose handoff custom
	function that can be set on surface.  It's called just after
	render_cb when something has been updated on the screen.

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

	* runtime.cpp|h: Adding a global surface list and an
	ability to access it.  I have a bad feeling we need some locking
	in the _get_surface_list function.

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

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

	This is the proper fix for bug #412443

	* visual.cpp (VisualCollection::Dispose): Implement Dispose()
	method.
	(VisualCollection::RemovedFromCollection): Now that we know we are
	disposing, we can unset VisualParent here instead of in our
	dtor/Dispose() method, saving us from having to interate over our
	children twice.

	* collection.cpp (Collection::Dispose): Implement a Dispose()
	method which does what the dtor used to do.

	* dependencyobject.cpp (EventObject::unref): Call Dispose() just
	before deleting the object.

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

	* dependencyobject.cpp (struct Listener): Comment out the listener
	reffing from previous commit. I don't think this is correct.

	* visual.cpp (VisualCollection): Set z_sorted to NULL after
	freeing it so that parent class dtor calling
	RemovedFromCollection() will not poke at free'd memory.

2008-07-31  Geoff Norton  <gnorton@novell.com>

	* Makefile.am: Undo part of the recent Makefile changes as they broke 
	the 1.0 build.

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

	Fixes bug #412443

	* dependencyobject.cpp (DependencyObject::AddPropertyChangeListener):
	Ref the listener.
	(DependencyObject::RemovePropertyChangeListener): Unref the listener.

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

	* animation.cpp (KeyFrameCollection::RemovedFromCollection): Oops,
	this needs to chain up to
	DependencyObjectCollection::RemovedFromCollection() rather than
	AddedToCollection(). Duh.

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

	* contentcontrol.cpp|h: Added.

	* enums.h: Moved some font/text enums here from font.h

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

	* dependencyproperty.cpp: Fix build.

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

	* runtime.cpp: Fix 1.0 build.

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

	* dependencyproperty.cpp, dependencyproperty.h, runtime.cpp, runtime.h,
	  type.cpp, type.h, type.h.in, typegen/typegen.cs,
	  type-generated.cpp: Store DependencyProperties in the Type* instead
	  of a hashtable keyed on the kind.

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

	* dependencyobject.cpp: IsValueValid: treat all MANAGED types as valid,
	  given that since we might not have access to the surface where the
	  type was registered, it's not possible to do any type checking 
	* dependencyproperty.cpp, dependencyproperty.h, runtime.cpp, runtime.h:
	  Implement registration of managed properties on a surface.
	* type.cpp, type.h, type.h.in: Implement a Type::Find which can look in
	  types registered on a surface, added a Type::MANAGED enum value.
	* typegen/typegen.cs, type-generated.cpp, value.h, value.h.in: Add a
	  MANAGED type.

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

	* text.cpp (inline_new): Added.

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

	* xaml.cpp: Add a set_parent call, I need to do some fanagling
	there so collection items don't have their parents set.
	- Managed items that are being hydrated or created using x:Class
	need to get content properties from the managed world.
	
2008-07-28  Chris Toshok  <toshok@ximian.com>

	* value.cpp, value.h.in, value.h, type.h, typegen/typegen.cs,
	type-generated.cpp: Add Size foo.

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

	* value.cpp (Value::FreeValue): Oops, free Thickness.

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

	* control.h (struct Thickness): reorder fields to match managed
	struct.

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

	* typegen/typegen.cs: Added Thickness.

	* value.h.in, type.h.in: Added Thickness.

	* value.cpp: Implemented Thickness value ctor/etc.

	* enums.h: Added more 2.0-specific enums.

	* control.cpp|h: Implemented property accessors/bindings and
	Thickness struct.

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

	* animation.cpp: When starting an SB that has been started already make sure to
	remove the Completed handler before the teardown. Fixes #405518.

2008-07-28  Chris Toshok  <toshok@ximian.com>
	
	* collection.cpp (collection_iterator_next): move the check for
	index-in-range to after the increment of it.  that way managed
	code doesn't step off the end of the list.

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

	* eventargs.h, eventargs.cpp: some 2.0 event stuff.  Make the
	MouseEventArgs and KeyboardEventArgs classes subclasses of a new
	class - RoutedEventArgs.  Also, add a "Handled" field to both
	MouseEventArgs and KeyboardEventArgs.  Lastly add a "Keyboard"
	class to map to the 2.0 static Keyboard class.  it exposes nothing
	but a Modifiers property, which isn't updated at present, but will
	be by the Surface code (in the key event handler).

	* type.h, value.h, type-generated.cpp: sync - new ROUTEDEVENTARGS
	type/value.

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

	* enums.h (enum ModifierKey): 2.0 specific enum for use by the
	Keyboard class.

2008-07-26  Jackson Harper  <jackson@ximian.com>

	* xaml.cpp: If there isn't a managed content property, try looking
	for an unmanaged one.

2008-07-26  Jackson Harper  <jackson@ximian.com>

	* xaml.h|cpp: Create elements for imported managed namespaces.
	
2008-07-25  Chris Toshok  <toshok@ximian.com>

	* runtime.h, runtime.cpp: reformat the class decl to put public:
	stuff first.  add "bool silverlight2" to the surface ctor so we
	can start to use it for behavioral differences (routed event
	handlers, key events, focus, etc).

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

	* stylus.h (StrokeCollection::CanAdd): Strokes can exist in
	multiple StrokeCollections at a time but they cannot be added to
	the same collection multiple times. Do not default to
	DependencyObjectCollection::CanAdd()'s behavior because it checks
	that the logical parent is unset (which will not be accurate for
	strokes).
	(StylusPointCollection): Same as StrokeCollection.

	* xaml.cpp (dependency_object_add_child): Set the logical parent
	of items to NULL before adding them to a collection.

	* collection.h (class Collection): Removed 'unique' field, it's
	not necessary afterall.
	(Collection::CanAdd): New virtual method to check if the value can
	be added to the collection (by default always returns true).
	(DependencyObjectCollection::CanAdd): Override CanAdd() by
	checking if the object being added has a logical parent. If it
	already has a parent, it cannot be added (this is how Silverlight
	behaves).

	* collection.cpp (Collection::Add): There's no such thing as
	'unique' anymore. Don't check if the value is already contained
	within our collection like the old code used to do, instead call
	our new virtual method CanAdd() to see if we can add it.
	(Collection::Insert): Check CanAdd().
	(Collection::SetValueAt): Check CanAdd().

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

	* collection.cpp (collection_add): Fixed.

	* collection.h: Get rid of convenience wrappers that aren't even
	used. Also removes the need for previous commit.

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

	* collection.h (class DependencyObjectCollection): Add virtual
	Add(), Clear() and Insert(). This makes it possible for subclasses
	to chain up if they need to override any of these.
	(class DoubleCollection): Same.
	(class PointCollection): Here too.

	* visual.cpp (VisualCollection::Clear): Chain up to
	DependencyObjectCollection::Clear() rather than
	Collection::Clear().
	(VisualCollection::Insert): Don't bother resizing the z_sorted
	array here, it will be done inside ResortByZIndex() anyway.
	(VisualCollection::Insert): Chain up to
	DependencyObjectCollection::Insert() rather than
	Collection::Insert()

2008-07-24  Geoff Norton  <gnorton@novell.com>

	* downloader.cpp: When a downloader is reused reset the completed
	state when we get the new Open call.

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

	* text.cpp (inlines_simple_text_equal): Fixed a stupid typo.

	* collection.cpp (DependencyObjectCollection::RemovedFromCollection):
	Unregister the NameScope the same way the old Collection::Remove()
	way did it. This way seems the most correct (RemoveAt() was
	totally broken and SetVal() doesn't seem right afterall).

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

	* collection.cpp: Added c-wrappers for creating new
	collections. Also changed the c-bindings for
	setting/adding/inserting/etc items to the collection to take
	Value* instead of Value. Should make it simpler for the managed
	code to pass that.

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

	* collection.cpp (DependencyObjectCollection::RemovedFromCollection):
	Unregister the NameScope the same way it was done in the more
	common case in the old code (why were there different ways?).

	* text.cpp (TextBlock::OnCollectionChanged): Chain up.
	(TextBlock::OnCollectionItemChanged): Same.

	* brush.cpp (GradientBrush::OnCollectionChanged): Chain up.
	(GradientBrush::OnCollectionItemChanged): Chain up and notify
	listeners.

	* geometry.cpp (GeometryGroup::OnCollectionChanged): Chain up.
	(GeometryGroup::OnCollectionItemChanged): Chain up and notify
	listeners.
	(PathGeometry::OnCollectionChanged): Chain up.
	(PathGeometry::OnCollectionItemChanged): Chain up and notify
	listeners.
	(PathFigure::OnCollectionChanged): Chain up.
	(PathFigure::OnCollectionItemChanged): Chain up and notify
	listeners.

	* shape.cpp (Polygon::OnCollectionChanged): Chain up.
	(Polygon::OnCollectionItemChanged): Same.
	(Polyline::OnCollectionChanged): Same.
	(Polyline::OnCollectionItemChanged): Same.

	* stylus.cpp (Stroke::OnCollectionItemChanged): Need to
	call NotifyListersOfPropertyChange().

	* transform.cpp (TransformGroup::OnCollectionItemChanged): Need to
	call NotifyListersOfPropertyChange().

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

	* collection.cp|h: Reworked Collections a lot. Collection is now a
	generic collection of Values. Added 3 new collections:
	DependencyObjectCollection (which holds DO's like the old
	Collection class did), DoubleCollection and PointCollection.

	* dependencyobject.h (DependencyObject::OnCollectionChanged):
	Changed the way this works to reflect the managed API.

	*.cpp|h: Updated to reflect above changes.

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

	* utils.cpp (g_ptr_array_insert): New utility function.
	(g_ptr_array_insert_sorted): Call g_ptr_array_insert() once we
	find the index where we want to add the item.

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

	* panel.cpp, xaml.cpp, stylus.cpp, usercontrol.cpp, canvas.cpp,
	transform.cpp, grid.cpp, animation.cpp, text.cpp,
	dependencyproperty.h, dependencyproperty.cpp, uielement.cpp,
	geometry.cpp, shape.cpp, dependencyobject.cpp,
	frameworkelement.cpp, media.cpp, brush.cpp: a couple of
	DependencyPropertyChanges:

	1. switch to the Silverlight/WPF naming of the two Types.
	type/value_type change to owner_type/property_type.

	2. go all gtk-3.0, and make things private with accessors.

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

	* animation.cpp, brush.cpp, canvas.cpp, clock.cpp, collection.cpp,
	  dependencyobject.cpp, dependencyobject.h, dependencyproperty.cpp,
	  dependencyproperty.h, deployment.cpp, downloader.cpp,
	  frameworkelement.cpp, geometry.cpp, grid.cpp, media.cpp,
	  namescope.cpp, panel.cpp, runtime.cpp, shape.cpp, stylus.cpp,
	  text.cpp, transform.cpp, trigger.cpp, uielement.cpp,
	  usercontrol.cpp, xaml.cpp: Move Register(Full|Nullable) and
	  GetDependencyObject from DependencyObject to DependencyProperty.

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

	* dependencyobject.h, dependencyproperty.h, Makefile.am,
	  dependencyproperty.cpp, src.mdp, dependencyobject.cpp: Move
	  DependencyProperty to its own file before it grows bigger.

2008-07-21  Jackson Harper  <jackson@ximian.com>

	* xaml.cpp: Add back in the ability to create elements from
	managed elements using the x:Class syntax.

2008-07-21  Jackson Harper  <jackson@ximian.com>

	* user-control.h:
	* type-generated.cpp: The UserControl's Content Property name is
	Content not ContentProperty.

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

	* collection.cpp (collection_add): Fixed to return int.

2008-07-21  Jackson Harper  <jackson@ximian.com>

	* xaml.cpp: Add support for parsing GridLength attribute values.

2008-07-19  Geoff Norton  <gnorton@novell.com>

	* mms-downloader.(cpp|h):  Ensure that we always stream-select a marker
	stream when there is one available.  Fixes drt #2.
	Refactor some code duplication into a utility method.

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

	* xaml.cpp: We can't blindly assume an object has a content
	property.

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

	* type-generated.cpp: UserControl has a content property.
	* value.h|.h.in|.cpp: Add GridLength to Value.

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

	* media.cpp: Revert InitialBuffer work around as it has some unexpected
	consequences. :(

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

	* media.cpp: Clear the InitialBuffer state when we seek as well, as that will
	get a new burst from the mms server with AccelBW.

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

	* media.cpp: If we're using a mms source we can attempt to start playing the 
	first time before the entire 5s buffer is full due to AccelBW/AccelDuration.
	Fixes c9 stream start lag.

2008-07-18  Geoff Norton  <gnorton@novell.com>
	
	* mms-downloader.cpp: Set LinkBW, AccelBW and AccelDuration so we can fill
	our initial buffer quickly.

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

	* pipeline.(cpp|h), mp3.(cpp|h): Break mp3 out into its own files.
	* Makefile.am: Add mp3.(cpp|h) to the build.
	* pipeline-ffmpeg.cpp: MP3 streamed over asf will bunch multiple frames
	together, so we need to split them up and pass them to avcodec_decode_audio2
	one at a time.  Its also possible that we could get a partial frame, so we need
	to buffer that data. Fixes mms+mp3.

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

	Fix for bug #410206

	* text.h (TextBlock::GetBoundingHeight): Return the larger of the
	2 values.
	(TextBlock::GetBoundingWidth): Same.

2008-07-18  Chris Toshok  <toshok@ximian.com>

	* Makefile.am (libmoon_include_HEADERS): add window.h and
	window-gtk.h
	(libmoon_la_SOURCES): add window-gtk.cpp

	* window.h: abstract class for windows, that surface will use to
	deal with window/widget level operations.

	* window-gtk.h, window-gtk.cpp: MoonWindow implementation using
	gtk widgets.

	* runtime.h, runtime.cpp: factor out all the widget stuff from
	this file, along with all "width" and "height" fields.  now
	Surface knows nothing about widgets or windowless.  It speaks to
	MoonWindow implementations instead.  Add several public methods
	that the window implementations can call (anything HandleUI*) to
	communicate events back to the surface.

	* canvas.cpp: surface->Get{Width,Height} ==>
	surface->GetWindow()->Get{Width,Height}.
	
2008-07-18  Michael Dominic K.  <mdk@mdk.am>

	* clock.cpp:
	* media.cpp: Reverting prev change, different solution: process the tick calls
	before processing the render.

2008-07-18  Michael Dominic K.  <mdk@mdk.am>

	* media.cpp: If the downloader is already completed, don't do an extra async 
	call when setting source. Fixes the downloader-set-source... testcase.

2008-07-18  Michael Dominic K.  <mdk@mdk.am>

	* media.cpp: Fixing a crasher in case bad parameters passed from js.

2008-07-18  Jackson Harper  <jackson@ximian.com>

	* xaml.h: New delegates and functions for the loader.  We need to
	call back into managed code when we import a xaml namespace so
	that it knows which objects are available and we need a new
	function for creating those objects.

2008-07-18  Jackson Harper  <jackson@ximian.com>

	* usercontrol.cpp|h: Add C functions for accessing the Content
	element.

2008-07-17  Jackson Harper  <jackson@ximian.com>

	* type.h:
	* value.h:
	* type-generated.cpp:
	* deployment.cpp|h: Add an Application type.  This doesnt directly
	map to the managed Application because it inherits from
	DependencyObject, but it allows us to parse Application XAML files
	and then we can pull the values we need.

2008-07-17  Jackson Harper  <jackson@ximian.com>

	* libmoon.h: Add usercontrol.h, I want access to this in the
	plugin debug code.

2008-07-17  Jackson Harper  <jackson@ximian.com>

	* xaml.cpp: Had a backwards IsSubclassOf here causing
	UserControl's content property to not get set (and I imagine many
	other content properties).
	* usercontrol.h: Add the ContentProperty metadata.

2008-07-17  Stephane Delcroix  <sdelcroix@novell.com>

	* downloader.h|cpp: provide hooks for DownloadeRequest

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

	* pipeline.cpp (FileSource::ReadInternal): EOF isn't an error.

	* runtime.cpp (surface_create_downloader): We need to actually
	return the downloader here or our caller will just get garbage ;-)

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

	* clock.cpp: When _USE_IDLE_HINT is not sent, don't do idle hinting.

	* runtime.h: On desktop and browser by default use idle hinting.

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

	* runtime.cpp: Adding "idlehint" to moonlight overrides that will 
	control the use of idle hint in the clocks.

2008-07-17  Stephane Delcroix  <sdelcroix@novell.com>
	
	* runtime.h|cpp: add surface_get_downloader

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

	* runtime.cpp: try to get the resize logic correct for all cases,
	including popfly, ControlState.htm and fullscreen tests.

	Fixes the (non)rendering issues in the popfly game creator.

2008-07-16  Geoff Norton  <gnorton@novell.com>

	* mplayer.cpp: Its possible that extremely small audio files will
	never fill the sound buffer enough causing us to never call snd_pcm_open.
	Ensure that we open the buffer to play the sound before shutting down
	the player.

2008-07-16  Geoff Norton  <gnorton@novell.com>

	* pipeline.cpp: Update to be able to build with LOG_PIPELINE still

2008-07-16  Sebastien Pouliot  <sebastien@ximian.com>

	* layout.cpp: (TextLayout::LayoutWrap) Don't let actualWidth be 
	greater than Width. Fix MS DRT#184 and #208. ALso makes #206 
	looks better (but it already passed)

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

	* pipeline.cpp, pipeline.h: ProgressiveSource: clean up a bit, this
	  class doesn't do anything live/mms anymore. LiveSource: removed
	  completely, never used. Added MemoryNestedSource to wrap another
	  MemorySource without messing with its current position pointer.
	  MemoryQueueSource: store already parsed packets instead of
	  MemorySources in the queue, saves a memory allocation and prevents
	  parsing each packet twice when buffering (once for the code which
	  determines the last available pts, and again for the normal
	  demuxing code path).
	* mms-downloader.cpp: Updated to not delete asf parser, unref it
	  instead.
	* mplayer.cpp: Enqueue 3 audio frames instead of 10, makes the pipeline
	  wait a bit longer before ending up waiting for more data (which
	  causes the MediaElement to go into buffering mode).
	* media.cpp: ProgressiveSource ctor doesn't take any bool arguments
	  anymore.

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

	* dirty.cpp (Surface::AddDirtyElement): quick patch from toshok to
	fix a regression in the fullscreen message code.

2008-07-15  Jb Evain  <jbevain@novell.com>

	* deployment.cpp|h: start updating Deployment to sl2b2.

2008-07-15  Jb Evain  <jbevain@novell.com>

	* deployment.h: remove SupportedCulture and SupportedCultureCollection
	as they no longer exist.
	* value.h, type.h, type-generated.cpp: regenerate.

2008-07-15  Jb Evain  <jbevain@novell.com>

	* deployment.cpp|h: rename RuntimeVersion DP to RuntimeVersionProperty.

2008-07-15  Jb Evain  <jbevain@novell.com>

	* list.cpp: set pointers to NULL instead of 0.

2008-07-14  Geoff Norton  <gnorton@novell.com>

	* mplayer.cpp: If we've already reached the EOF in the audio stream
	don't keep processing GetNextBuffer.  This was causing us to emit
	MediaEnded more than once, causing failures in the test suite.
 
2008-07-14  Geoff Norton  <gnorton@novell.com>

	* downloader.cpp:  Change completed to check a bool instead of 
	filename, as filename can now be set before the downloader is in fact
	completed.

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

	* media.cpp: Initialize Media with our downloader.
	* pipeline.cpp: Media::Open: Check if the source has ended while
	  waiting for an asfparser. Remove print_stack_traces.

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

	* internal-downloader.h: Add InternalDownloader::GetType to allow the
	  derived internal downloader to tell what kind of internal
	  downloader it is.
	* file-downloader.h: Implement InternalDownloader::GetType.
	* downloader.h: Make the internal downloader publicly accessible. Add a
	  Downloader::IsAborted method.
	* mms-downloader.h, mms-downloader.cpp: Implement
	  InternalDownloader::GetType. Store the ASFParser we create in the
	  class instance, so that the pipeline can get it. No need to write
	  the header packet to the stream anymore.
	* media.cpp: Don't unref in AddTickCall callbacks anymore. Fix
	  calculation of buffering progress to take into account that the
	  currently available pts might be before the last played pts.
	* mplayer.cpp, mplayer.h, downloader.cpp: Don't unref in AddTickCall
	  callbacks anymore.
	* pipeline.cpp, pipeline.h: Make the Media ctor take a Downloader
	  argument and access the internal mms downloader on that Downloader
	  to get the asf parser. Remove Read/Seek support from
	  MemoryQueueSource, and just add a Pop method which returns a
	  MemorySource for the next packet in the queue. Also add support to
	  return all the packets in the queue as an array so that the
	  ASFParser can easily determine the last pts available.
	* clock.cpp, clock.h: Use our own thread-safe Queue instead of GList +
	  g_mutex. Also make TickCall take a ref to the data parameter until
	  the tick call has been made. This also ensures that the data
	  parameter gets unreffed correctly when the tick call is never made
	  (such as when we skip calls due to the TimeManager getting shut
	  down).
	* dependencyobject.cpp: Don't ref in AddTickCall anymore.

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

	* playlist.cpp: Fix warning.

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

	* font.cpp: (FontFace::LoadGlyph) Use linearHoriAdvance instead 
	of horiAdvance since the later is rounded to an integer. FixMS
	DRT#45 and get better results (less differences) on many font
	related tests.

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

	* http-streaming.cpp, playlist.cpp: Add missing #include <config.h>

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

	* font.cpp: (font_conic_to) Directly use moon_quad_curve_to 
	instead of doing it's own second to third order calculation.

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

	* mplayer.cpp: Don't store target pts from audio thread if we're paused
	  (audio thread might not have gotten the pause request yet).

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

	* pipeline.cpp: Don't Signal more than once. I have no idea why the
	  waiting thread doesn't wake up though.
	* mplayer.cpp: Comment out a printf, and always break the play loop
	  when we're doing rw access.

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

	* geometry.cpp|h: Remove useless code for computing bounds on
	PathFigure (now all handled at PathGeometry level).

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

	* mplayer.cpp: Fix a couple of leaks.

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

	* pipeline.cpp: There's no need to call AudioPlayer::Initialize
	  anymore.
	* runtime.cpp, runtime.h: Added
	  RUNTIME_INIT_AUDIO_NO_MMAP/audio=mmap|rw to runtime flags.
	* mplayer.cpp, mplayer.h: Implement support for using RW access mode in
	  addition to the already supported MMAP access mode for alsa. This
	  also required a major refactoring to only call alsa on the audio
	  thread due to buggy pulseaudio hanging us (and the rest of the
	  machine) otherwise.

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

	* shape.cpp|h: (ComputeStretchBounds) Move shape-specific code
	inside each type (and out of the general case).

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

	* dependencyobject.cpp: Fix leak.

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

	* debug.cpp: Make valgrind happy.

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

	* media.cpp: Ensure that we clear our old loader when we set
	a new source.

2008-07-09  Fernando Herrera  <fherrera@novell.com>

	* pipeline.cpp: Always set MemoryQueueSource element's size
	based to offset+n even for live sources.

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

	Fixes for bug #406934

	* text.cpp (Glyphs::SetSurface): Override so that we can start
	downloading the font as soon as the element gets (re)attached.
	(Glyphs::OnPropertyChanged): If we aren't attached, set
	uri_changed to true so that when we are (re)attached, we can start
	the download.

	* media.cpp (MediaBase::MediaBase): Init new state variable
	'source_changed' to false.
	(MediaBase::SetSurface): If source_changed and we are being
	attached to a surface, initiate a download.
	(MediaBase::SetSource): Set source_changed to false.
	(MediaBase::OnPropertyChanged): Handle SourceProperty changes for
	our subclasses.
	(MediaElement::OnPropertyChanged): Don't handle SourceProperty
	changes anymore, let MediaBase do that for us.
	(Image::OnPropertyChanged): Same.

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

	* mms-downloader.cpp: Remove the guard we had against copying
	random memory and provide the correct amount of data to the 
	pipeline from each packet.

2008-07-09  Geoff Norton  <gnorton@novell.com>
	
	* downloader.(cpp|h): NotifyFinished is now the finished
	event.  The filename will be set (if available) in SetFilename.
	* media.(cpp|h): Change to progressivly loading the image
	where available (fixes popfly).  We still fallback to file loading
	for the JS downloader case for now.

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

	* runtime.cpp (Surface::motion_notify_callback): don't call
	get_pointer when in windowless mode, I don't think we can trust
	the results.

	* runtime.h (class Surface): make widget public so that we can
	peek at it in windowless mode.

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

	* xaml.cpp: Always do a move after closing a path. Fix DRT test
	#138 (even if it was passing too!) for a bad (extra) arc.

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

	* runtime.cpp, runtime.h: remove a bunch of code rot relating to
	temporary cairo surfaces that is no longer used.

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

	* shape.cpp: Consider PenLineCap when computing bounds using
	cairo. Fix (even if it was passing) some corners in DRT test #7

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

	* xaml.h: Reorganized a bit.

2008-07-07  Chris Toshok  <toshok@ximian.com>

	* dirty.cpp (Surface::AddDirtyElement): don't add elements to the
	list if they lack a visual parent (and aren't the toplevel.)
	Fixes bug #406935.

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

	* shape.cpp (Rectangle::BuildPath): handle some special case
	degenerates slightly differently.

	Fixes most of test-shape-rectangle-matrix.xaml.

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

	* shape.cpp (Ellipse::BuildPath): a thickness equal to a width
	degenerates in drawing, use the workaround there too.

	Fixes shape #5 in test/xaml/assorted/stroke-thickness-test.html

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

	* geometry.cpp (RectangleGeometry::ComputeBounds): simplify the
	rectangle geometry computation.  It matches in the sl
	implementation now.

	* shape.cpp: simplify rectangle and ellipse drawing and bounds so
	that they match the sl implementation and deal with degenerate
	cases better.  Try to avoid setting up a clip rectangle when it
	isn't needed.

2008-07-07  Chris Toshok  <toshok@ximian.com>

	[ fixes the media element not showing up in flowers-for-you, bug
	#382490. ]
	* media.h, media.cpp: move Image::use_img_{width,height} and
	Image::updating into MediaBase and rename then
	use_media_{width,height} and updating_size_from_media.
	(MediaElement::OnPropertyChanged) duplicate the
	WidthProperty/HeightProperty stuff here (c&p from
	Image::OnPropertyChanged - this should probably just be refactored
	to MediaBase.  will do this later).
	(MediaBase::ComputeBounds): we don't need the subclass
	ComputeBounds methods.  Just put it here, as they share the same
	behavior.
	(MediaElement::SetMedia): remove the call to ComputeBounds here,
	since the new block of use_media_{width,height} checks will call
	UpdateBounds if they need to.
	
2008-07-07  Fernando Herrera  <fherrera@novell.com>

	* media.cpp:
	* pipeline.cpp:
	* pipeline.h: Implement MemoryQueueSource::NotifyFinished so
	we don't wait for new packets when the downloader has finished.
	Also calculate size based on offset + n for mms streams, so the
	ASFReader can check Eof based on positions.

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

	* dirty.cpp: remove the down_dirty_node_succ and
	up_dirty_node_pred code from here.  it arguably helped speed up
	insertions into the dirty lists, but at the cost of lots of
	dangling pointers.  we always walk up the tree looking for a
	down/up node.  works, and is much simpler.  and fixes bug #362561.

	* uielement.h, uielement.cpp: remove the down_dirty_node_succ and
	up_dirty_node_pred code.
	
2008-07-04  Sebastien Pouliot  <sebastien@ximian.com>

	* xaml.cpp: Avoid a SIGSEGV in dependency_object_set_attributes
	when the atchname is invalid.

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

	* runtime.cpp (Surface::EmitEventOnList): don't leak the event
	args here.

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

	* animation.h, animation.cpp: the *KeyFrame KeySplineProperty
	values need to be initialized in the ctors, not in animation_init.

2008-07-03  Sebastien Pouliot  <sebastien@ximian.com>

	* shape.cpp: Add back the cairo_[save|restore] in ::Draw methods
	since they are needed for stretching.

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

	* text.cpp (TextBlock::Render): Check to see if we need to
	calculate layout before painting.

2008-07-03  Sebastien Pouliot  <sebastien@ximian.com>

	* moon-path.c|h: Draw ellipse clockwise to match Silverlight.
	Also remove the closing point since it's not needed (but that was
	not the problem, just a small memory saving).
	[Re-fix bug #391684]

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

	* text.h (TextBlock::GetBoundingWidth/Height): Use
	GetValueNoDefault() so we don't get 0.0 for the width/height if
	unset.

	Fixes for bug #404858

	* runtime.cpp: Added SHOW_TEXTBOXES bit flag.

	* layout.cpp: Don't keep track of bbox_width and height anymore,
	it was never actually set to anything other than
	actual_width/height anyway.

	* text.cpp (TextBlock::Paint): If SHOW_TEXTBOXES, render a green
	bounding box around the text (this is to aid in debugging text
	which may have a transform applied to it).

	* text.h (class TextBlock): Removed bbox_width and
	bbox_height. These were never anything other than
	actual_width/height respectively anyway.
	(TextBlock::GetBoundingWidth): Return the FrameworkElement::Width
	if set, else the ActualWidth.
	(TextBlock::GetBoundingHeight): Same.

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

	* shape.cpp: Remove cairo_save|restore from [Shape|Path]::Draw
	since their callers already do this. Simplify a bit Shape::
	InsideObject to check ret only if a Clip is present (instead of
	always checking it).

2008-07-02  Chris Toshok  <toshok@ximian.com>

	* runtime.h, runtime.cpp: get rid of the cursor_func,
	invalidate_func, render_func stuff.  Instead use 3 virtual
	methods: SetCursor(GdkCursor*), Invalidate(Rect), and
	ProcessUpdates().  That way the plugin can instantiate a
	WindowlessSurface which overrides those methods instead of having
	the stupid callback mechanism we had.

2008-07-02  Chris Toshok  <toshok@ximian.com>

	* runtime.h, runtime.cpp: virtualize SetCursor so the plugin can
	override the behavior.

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

	* moon-path.c: Revert ordering change I made in r105586 to fix
	a clipping issue (fillrule bug) as this breaks stroke dash (which
	confirm the original behaviour was the correct one).
	[Fix most of #404858]

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

	Fixes for bug #405514.

	* text.cpp (TextBlock::Layout): If the Text property is empty,
	default the actualHeight to the font's height.
	(TextBlock::OnPropertyChanged): If the FrameworkElement::Width
	property changes, we need to set dirty to true (in most cases) so
	that the actual width/height values are recalculated.

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

	* shape.cpp|h: Use Cairo by default to ComputeBounds. In effect 
	this change Polyline and Polygon to use Cairo instead of (faster
	but less acurate) custom code. In reality PathGeometry (PML) is 
	much more used than those Poly[line|gon] and (upcoming) caching 
	negate much of the impact.
	* geometry.cpp: Use the more precise (and surviving) 
	calc_line_bounds function that accept PenLineCap.

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

	* shape.cpp (Shape::OnPropertyChanged): If the Stroke property
	chanegs between null and an actual brush (in either direction),
	invalidate the cached path because the shape may need to
	recalculate the stroke offsets.

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

	* xaml.cpp: Move reading the first point of C|Q beziers into the 
	loop. Fix quite a few misrendering for http://xmldocs.net/ball
	[Partial fix for #404858]

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

	* dirty.cpp: add all the ordering smarts to keep the two dirty
	lists partially sorted.  hopefully this won't be a huge
	performance hit.

	* uielement.h, uielement.cpp: add 2 new dirty pointers.  a "succ"
	pointer for the down dirty list, and a "pred" for the up dirty
	list.

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

	* list.cpp (List::InsertBefore): Handle a NULL @before.

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

	* mms-downloader.cpp: Rework Fernando's incomplete packet guard to be a little
	more sane while we determine how to fix this properly.

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

	* shape.cpp (Shape::ComputeShapeBounds): Reverted my previous fix,
	it's not correct.
	(Ellipse::ComputeShapeBounds): Same.

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

	* animation.cpp: Make sure our default KeySplines parameters are correct
	to generate a linear dynamics curve as Silverlight. Fixes #404850.

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

	* pipeline.cpp: don't use g_queue_clear as is present only in glib >= 2.14

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

	* pipeline.h:
	* pipeline.cpp: Implement the packet writer MemoryQueueSource.
	* asf/asf.h:
	* asf/asf.cpp: 
	* media.h:
	* media.cpp: Use MemoryQueueSource for all mms streams
	* mms-downloader.cpp: Don't try to parse/write incomplete data packets.

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

	* panel.cpp (Panel::OnCollectionChanged): when the ZIndex of a
	child changes, invalidate them here.

	* dirty.cpp (Surface::ProcessDownDirtyElements): and remove the
	subtree invalidate from the zindex processing here.

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

	* pipeline-ffmpeg.cpp: Add debug spew.
	* media.cpp: Remove debug spew.

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

	* media.cpp, media.h: Add streamed markers to the media element on the
	  main thread.

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

	* downloader.h: The finished event raises a success condition now
	so that we can notify failure on unsuccessful downloads.

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

	* mplayer.h: Add AudioPlayer::Drain to drain whatever data the audio
	  has stored, now called by the MediaPlayer when seeking. Execute the
	  'seeking complete' logic on the main thread (marshalling
	  SeekCallback to the main thread). Always use the thread-safe
	  AddTickCallSafe instead of AddTickCall, and override
	  EventSurface::SetSurface to lock/unlock the required locks.
	* mplayer.cpp: Add AudioPlayer::Drain to drain whatever data the audio
	  has stored, now called by the MediaPlayer when seeking. Execute the
	  'seeking complete' logic on the main thread (marshalling
	  SeekCallback to the main thread), and set the previous_position on
	  the MediaElement to the seeked-to position when the seek is
	  finished. Always use the thread-safe AddTickCallSafe instead of
	  AddTickCall, and override EventSurface::SetSurface to lock/unlock
	  the required locks.
	* dependencyobject.cpp, dependencyobject.h: Split AddTickCall into a
	  thread-safe version (AddTickCallSafe) and don't do any locking in
	  AddTickCall. Add SetSurfaceLock/Unlock so that types overriding
	  SetSurface can do the proper locking.
	* media.cpp, media.h: CheckMarkers: Don't try to detect seeking by
	  comparing to/from pts, MediaPlayer will now set previous_position
	  correctly when seeking. AdvanceFrame: only check markers if we
	  advanced or if we're not seeking. SetSurface: add proper locking,
	  and use AddTickCallSafe where appropiate.

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

	* uielement.cpp (UIElement::OnPropertyChanged): opcacity mask
	affects the subtree as well.

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

	* uielement.cpp (UIElement::OnPropertyChanged): on things that can
	potentially be trapped by the Invalidate visibility check we need
	to invalidate the whole subtree before we start processing the
	dirty lists to avoid ordering issues.

	Fixes test/xaml/assorted/rendering-glitches2.html.

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

	* panel.cpp (Panel::FrontToBack): add a special case for
	non-translucent (but NULL background) panels - we don't render
	them at all.

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

	* panel.cpp (Panel::FrontToBack): treat opacity specially for
	panel since we need the right subtree render region in PreRender.

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

	* downloader.cpp (dummy_downloader_create_web_request): Return
	NULL to fix a compile warning about control reaching the end of a
	non-void function.

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

	* downloader.[h|cpp]: move browserrequest/response from the plugin
	as downloaderrequest/response.

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

	* runtime.h (RUNTIME_INIT_DESKTOP, RUNTIME_INIT_BROWSER): enable
	the shape cache.

	* shape.h, shape.cpp (Shape::IsCandidateForCaching): remove the
	condition that was keeping small surfaces from being cached, so
	bubblemark gets a win from this (from ~38 to 70+ fps on my
	laptop).
	(Shape::ShiftPosition): if we have a cached surface, set the
	device offset to mirror the new bounds x/y.

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

	* clock.h, clock.cpp, dependencyobject.h, downloader.cpp,
	  dependencyobject.cpp, mplayer.h, media.h, mplayer.cpp, media.cpp:
	  Change AddTickCall to take a TickCallHandler (EventObject*)
	  function pointer and a EventObject * tick_data instead of untyped
	  function pointer/tick_data.

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

	* dependencyobject.h,
	dependencyobject.cpp (DependencyProperty::DependencyProperty):
	convert the name to downcase prior to registering and prior to
	calling g_hash_table_lookup to remove the casecmp overhead from
	our key comparisons.  store the converted name in DP::hash_key.

	* runtime.h, runtime.cpp: remove strcase_equal (use g_strcasecmp)
	and strcase_hash.

	* type.cpp: strcase_equal -> g_strcasecmp.

	* playlist.cpp (PlaylistParser::OnStartElement): same.

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

	* pipeline.cpp (ASXDemuxerInfo::Supports): Fix broken boolean
	logic/compiler warning and at the same time simplified.

	* shape.cpp (Shape::ComputeShapeBounds): Need to take stroke
	thickness into consideration. Fixes bug #400657.
	(Ellipse::ComputeShapeBounds): Same.

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.
