2000-06-01  Larry Ewing  <lewing@helixcode.com>

	* htmlclue.c (destroy): rework that last commit to do things
	slightly differently, html_clue_remove had unintended side
	effects.

2000-06-01  Larry Ewing  <lewing@helixcode.com>

	* htmlclue.c (destroy): remove the objects before we destroy them
	to make sure the clue is in a sane state.

2000-06-01  Ettore Perazzoli  <ettore@helixcode.com>

	* htmlengine-edit-delete.c (html_engine_delete): Save the parent
	of the start object so that we don't segfault when the object gets
	unparented.

2000-06-01  Christopher James Lahey  <clahey@helixcode.com>

	* htmlengine.c (html_engine_destroy): Check that engine->clue
	isn't NULL so that we don't crash.

2000-06-01  Larry Ewing  <lewing@helixcode.com>

	* htmlengine-edit-delete.c (html_engine_delete): queue a redraw
	when we text_len == 0 since we have now lost all text slaves and
	they cannot queue a redraw in the area they have exposed (FIXME).

2000-06-01  Ettore Perazzoli  <ettore@helixcode.com>

	* htmltype.c: #include "htmliframe.h".

	* htmlengine.c (parse_object): Added missing `HTML_OBJECT()' cast.

	* gtkhtml.c (gtk_html_export): Return FALSE if the type is not
	either `text/html" or "text/plain".

	* htmlengine-edit-delete.c (html_engine_delete): Added a nasty
	workaround to make deletion of an end-of-paragraph correctly
	undoable.  The deletion undo code should be changed to use
	`html_engine_copy()' somehow instead.

2000-05-31  Larry Ewing  <lewing@helixcode.com>

	* htmlengine.c (parse_object): make sure we don't leak the object
	if the handler returns false.
	(parse_iframe): display the body of the iframe if there is no url
	to load discard it otherwise.  This should eventually be extended
	to allow errors in the stream to cause the body to be displayed.
	(parse_i): remove the closing ifrmae tag check it is now handled
	in parse_iframe.

	* htmlengine.h (RIGHT_BORDER): changd to 10, 20 was an odd
	choice.
	
2000-05-31  Larry Ewing  <lewing@helixcode.com>

	* htmliframe.c (set_max_width): a huge hack to trick the clueflow
	into doing the right thing for the time being.

	* htmlembedded.c (html_embedded_size_recalc): fix assumption that
	em->widget is a gtk_html_embedded.

2000-05-30  Larry Ewing  <lewing@helixcode.com>

	* htmlengine.c (html_engine_destroy): destroy the clue as well
	fixes http://bugzilla.helixcode.com/show_bug.cgi?id=200
	
2000-05-30  Larry Ewing  <lewing@helixcode.com>

	* htmlengine.c (parse_object): call gtk_html_embedded_new with
	content type argment.

	* gtkhtml-embedded.h: add type to object definition.

	* gtkhtml-embedded.c (gtk_html_embedded_new): add type argument.
	(gtk_html_embedded_finalize): free type member.

2000-05-30  Larry Ewing  <lewing@helixcode.com>

	* gtkhtml.c (html_engine_object_requested_cb): check and return
	the return value.
	(class_init): change the object_requested signal to have a return value.

	* gtkhtml.h: change the object_requested signal prototype.

	* htmlengine.c (discard_body): new helper function to discard
	tokens before end tag.
	(parse_object): added function to handle the elements inside an
	object tag.
	(parse_o): call parse_object.
	(html_engine_class_init): change the object_requested signal to have a boolean
	return value.

	* htmlengine.h: change the object_requested signal prototype.

	* testgtkhtml.c (object_requested_cmd): add a testcase for
	object_request to return FALSE.

2000-05-30  Larry Ewing  <lewing@helixcode.com>

	* htmliframe.c (calc_size): preliminary code to try to get a
	proper size when width and height are not set.
	(html_iframe_init): initialize the new variables and properly set
	width and height.
	(calc_min_width): add the start of a new implementation, this
	should fix dan's problem with resizing in the short term. needs
	more work though.

	* htmliframe.h: add variables for the scroll widget and the html
	widget for now.
	
	* htmlengine.c (parse_iframe): change default size.

2000-05-29  Dan Winship  <danw@helixcode.com>

	* htmlclueflow.c (html_clueflow_class_init): Fix typo. (Don't use
	save_plain to implement HTMLObject:save.)

	* htmlengine-save.c (html_engine_save_plain): Call
	html_object_save_plain rather than html_object_save.

2000-05-29  Larry Ewing  <lewing@helixcode.com>

	* htmlembedded.c (draw): try to be smarted about when we queue a
	redraw.

	* htmlengine-save.c (html_engine_save_plain): add new save
	function for text/plain support.
	(write_header): actually use the gtkhtml VERSION string when
	printing out the header.

	* htmlengine-save.h: expose the new save function.
	
	* htmlengine.c (html_engine_calc_size): rename p to e.
	(parse_iframe): start of iframe support.
	(parse_i): call parse_iframe.

	* Makefile.am (libgtkhtml_HEADERS): add htmliframe.h

	* htmlimage.c (draw): use calc_intersect instead of the old
	check to make sure we are within the bounds.

	* htmltextslave.c (draw): use calc_intersect instead of the old
	check to make sure we are within the bounds.

	* htmltype.h: add iframe type.

	* htmltype.c (html_types_init): call html_iframe_type_init.
	(html_type_name): add IFrame type.

	* htmlclue.c (save_plain): add method.
	(html_clue_class_init): use save_plain.

	* htmlclueflow.c (save_plain): add method.
	(html_clueflow_class_init): use save_plain.

	* gtkhtml.c (gtk_html_export): new export interface, all this
	new export/save stuff needs renaming but I want to get an
	implementation done immediately.

	* gtkhtml.h: add gtk_html_export.
	
	* htmlobject.h: add save_plain method.

	* htmlobject.c (save_plain): add default implementation.
	(html_object_class_init): use save_plain.
	(html_object_save_plain): add entry point.

	* htmltext.c (get_tags): fix the order so our tags are not assured
	to be nested.
	(save_plain): add save_plain to write out plaintext.
	(html_text_class_init): add save_plain.

2000-05-21  Ettore Perazzoli  <ettore@helixcode.com>

	* htmlengine-edit-paste.c: New members `orig_clueflow_style',
	`orig_halignment' and `orig_indentation' in `ActionData'.
	(action_data_from_cut_buffer): New args @orig_clueflow_style,
	@orig_halignment, @orig_indentation.  Assign their values to the
	corresponding member in `ActionData'.
	(html_engine_paste): Retrieve the style parameters of the current
	clueflow and pass them to `action_data_from_cut_buffer()'.
	(do_undo): Reset the original clueflow style according to the values
	in the ActionData.  [Fixes #13]

	* htmlengine-edit-clueflowstyle.c
	(free_prop_list): New helper function.
	(undo_or_redo_destroy_closure): Use it.
	(set_clueflow_style_at_cursor): New arg @do_undo.  If false,
	don't save undo information.
	(html_engine_set_clueflow_style): New arg @do_undo.  If false,
	don't save undo information.
	(set_clueflow_style_in_region): New arg @do_undo.  If false,
	don't save undo information.

	* testgtkhtml.c (goto_url): Updated to the new `gtk_html_begin()'
	API.  Call the `url_requested' callback directly, in a yucky way,
	to reflect the fact that GtkHTML does no longer emit the
	"url_requested" signal for the initial URL.

	* htmlengine-edit-delete.c (delete_different_parent): Get rid of
	unused variables.

	* htmlclueflow.c (save): Added a couple casts to placate the
	whiny compiler.

	* htmlengine.c (html_engine_begin): Removed arg @url and
	corresponding [broken] reference handling.  Also, don't emit
	"url_requested".
	(html_engine_update_event): Removed reference handling.

	* htmlengine.h: Removed member `reference' in `struct
	_HTMLEngine'.

	* gtkhtml.c (gtk_html_begin): Removed arg @url.

	* gtkhtml.h: Removed of GtkHTMLStreamHandle.  Instead, use
	`GtkHTMLStream *'s throughout.

	* gtkhtml-stream.h: Don't define `GtkHTMLStream' anymore.

	* htmlengine.c: `select', `queue_draw' and `active_selection'
	bitfields changed from gbooleans to guints in `SelectRegionData'.

	* htmltext.h: `color_allocated' bitfield changed from gboolean to
	guint.

	* htmltablecell.h: `have_bg' and `bg_allocated' bitfields
	changed from gbooleans to guints.

	* htmlsettings.h: `underlineLinks' and `forceDefaults' bitfields
	changed from gbooleans to guints.

	* htmlobject.h: `redraw_pending' and `selected' bitfields
	changed from gbooleans to guints.

	* htmlimage.h: `color_allocated' and `have_color' bitfields
	changed from gbooleans to guints.

	* htmlengine.h: `have_focus' bitfield changed from gboolean to
	guint.

	* htmlengine-save.h: `error' bitfield changed from gboolean to
	guint.

	* htmlcursor.h: `have_target_x' bitfield changed from gboolean to
	guint.

	* gtkhtml.h: Replaced gboolean bitfields into guints.  [Gboolean
	is signed so compilers might complain.]

2000-05-21  Ettore Perazzoli  <ettore@helixcode.com>

	* htmlengine-edit-paste.c (html_engine_paste_object): Eeek!  Free
	the temporary cut buffer, not the real cut buffer.

	* htmlengine-edit-insert.c (insert_para): Create the empty
	HTMLTextMaster when splitting at offset == 0 even when the
	cursor's object is not text.

	* htmlengine-edit-delete.c (delete_in_object): Destroy a non-text
	object only if the starting offset is zero and the end offset is
	greater than zero.
	(delete_different_parent): Rewritten to make more sense.

	* htmltextmaster.c (merge): If this object is empty, copy font
	style and color from the other one.

	* htmltext.c (check_merge): If either of the two text elements is
	empty, return TRUE.

	* htmlengine-edit-insert.c (insert_para): Use
	`html_text_master_destroy_slaves' instead of destroying slaves
	manually.
	(split_object): New helper function, that splits a text object
	into two text objects or a non-text object into itself and an
	empty text object.

	* gtkhtml-keybinding.c (handle_none): Use
	`gtk_html_debug_dump_tree_simple' instead of
	`gtk_html_debug_dump_tree'.  The latter is too unreadable to be
	useful.  [Maybe we should actually get rid of it at some point.]
	(handle_alt): Removed stale debugging message.

	* htmlengine-edit-paste.c (remove_element_if_empty_text): New
	helper function to destroy an object if it is an empty text
	element.
	(move_cursor_to_safe_object): Helper function for
	`remove_element_if_empty_text'.
	(do_paste): Call `remove_element_if_empty_text' on the first and
	last inserted elements, so that we eat resulting stale empty text
	elements.

	* htmlengine-edit-images.c (html_engine_insert_image): Removed
	debugging message.

2000-05-21  Ettore Perazzoli  <ettore@helixcode.com>

	* gtkhtml-keybinding.c (handle_ctrl): Make `C-d' delete forwards
	instead of backwards.

2000-05-18  Ettore Perazzoli  <ettore@helixcode.com>

	* htmlengine-edit-paste.c (prepare_clueflows): Make sure `first'
	is made false after the first round in all cases.
	(do_paste): Fix pasting of consecutive HTMLClueFlows.

2000-05-18  Ettore Perazzoli  <ettore@helixcode.com>

	* htmlengine-edit-fontstyle.c (set_font_style): Added
	slow-but-working relayout-and-redraw machinery.
	(move_to_next_text_segment_forwards): Use
	`html_object_next_not_slave()' instead of just `->next' for
	correct behavior.
	(move_to_next_text_segment_backwards): Likewise, with
	`html_object_prev_not_slave()' instead of `->prev'.

	* htmltextmaster.c (get_cursor_base): Spit a warning message if we
	have no slaves.

	* htmltext.c (set_font_style): Set `HTML_CHANGE_ALL' as the change
	flag.

	* htmlengine-edit-fontstyle.c (merge_safely): Destroy the slaves
	of @text and @other by calling `html_text_master_destroy_slaves()'.

	* htmltextmaster.c (html_text_master_destroy_slaves): New function.

	* htmlengine-edit-paste.c (html_engine_paste_object): Eeek!  Don't
	set the cut buffer.

	* htmlengine-edit.c (html_engine_undo): Don't freeze/thaw anymore.
	(html_engine_redo): Likewise.

	* htmlengine-edit-insert.c (do_insert): Skip the inserted text
	too.
	(do_redo): Don't move the cursor after inserting anymore.
	(html_engine_insert): Likewise.
	(do_undo): Delete backwards instead of forwards.

2000-05-18  Ettore Perazzoli  <ettore@helixcode.com>

	* htmltextmaster.c (merge): Call `html_object_change_set()' with
	`HTML_CHANGE_ALL' to trigger a complete layout recalculation for
	the object.

	* htmlengine-edit-delete.c: Redone in a cleaner way.

	* htmlengine-edit-fontstyle.c (set_font_style): Normalize the
	cursor before returning.

	* htmlcursor.c (html_cursor_jump_to): Normalize the cursor before
	moving.

	* htmlengine-edit-fontstyle.c (set_font_style_in_selection):
	@do_undo renamed to @want_undo to avoid conflicts with the
	`do_undo()' function.
	(set_font_style): Likewise.
	(move_to_next_text_segment_forwards): New helper function that
	moves the cursor to the right until there is a non-empty text
	segment on the right of the cursor.
	(move_to_next_text_segment_backwards): Similiar helper function,
	but checking and moving to the left.
	(do_undo): Use them after moving the cursor by the size of the
	changed segment.  This makes sure we correctly handle the case
	with end-of-paragraphs within the selection.

2000-05-17  Ettore Perazzoli  <ettore@helixcode.com>

	* htmlengine-edit-clueflowstyle.c (set_clueflow_style_in_region):
	Prevent segfault by stopping at the last element.

	* htmlengine-edit-fontstyle.c (set_font_style): Update `p' when
	splitting at start.

2000-05-17  Larry Ewing  <lewing@helixcode.com>

	* htmlclueflow.c (save): fixup the save code for lists a little,
	now the clueflow save code is scattered with is_item checks
	we need to rework how lists are done, I'll probably do
	it shortly.
	(get_tag_for_item_group): another hack for lists.

	* htmlclueflow.c (is_similar): remove the special case for lists.

2000-05-16  Larry Ewing  <lewing@helixcode.com>

	* htmlrule.c (save): add shade option and and FIXME comment for
	all the possible missing parameters. 

	* htmlengine-save.c (html_engine_save_output_string): change to
	use va_list... the old interface was just too tedious.

	* htmlengine-save.h: change to match new va_list interface.

	* htmlclueflow.c (write_indentation_tags_helper): change to use
	new output string interface.
	(save) the same.

	* htmlimage.c (save): add a save function.
	(html_image_set_url): rename from html_image_set_filename.

	* htmlimage.h: rename html_image_set_filename to html_image_set_url.

2000-05-11  Larry Ewing  <lewing@helixcode.com>

	* htmlclueflow.c (is_similar): don't merge list items.
	(calc_size): rework to make sure we don't include the height of
	the first item in a new line in the previous lines ascent
	calculation, we now assume whenever a run ends there is an
	implicit newline.2000-05-16  Larry Ewing  <lewing@helixcode.com>

	* htmlrule.c (save): add shade option and and FIXME comment for
	all the possible missing parameters. 


	* htmlgdkpainter.c (draw_background): optimize this greatly for a couple
	of special cases.

2000-05-09  Ettore Perazzoli  <ettore@helixcode.com>

	* Version 0.2.

2000-05-09  Ettore Perazzoli  <ettore@helixcode.com>

	* htmlprinter.c (draw_background): Param @color made const.

	* htmlgdkpainter.c (draw_pixmap): Removed unused variable.
	(draw_background): Param @color made const.

	* htmlengine-edit-paste.c (do_paste): Cast to HTMLClueFlow to
	prevent a warning.

	* gtkhtml.c (selection_received): Removed unused variable.

	* htmlpainter.h: Arg @color in virtual method `draw_background'
	made const.

2000-05-09  Ettore Perazzoli  <ettore@helixcode.com>

	* htmlengine-edit.c (html_engine_undo): Freeze/thaw.
	Unfortunately something bad is going on in the relayout code.
	(html_engine_redo): Likewise.

2000-05-09  Ettore Perazzoli  <ettore@helixcode.com>

	* htmlengine-edit-fontstyle.c (set_font_style): Don't do stupid
	merging.  Decrease count when splitting and setting the font.
	Don't make your life harder when merging.  Overall fixup.
	(merge_backward): Return value changed from `void' to `gboolean'.
	Return true if a merge happened.
	(merge_forward): Likewise.

	* htmltextmaster.c (calculate_new_selection): New helper function.
	(merge): Use it.

2000-05-09  Ettore Perazzoli  <ettore@helixcode.com>

	* htmlengine-edit-fontstyle.c (do_redo): Reverse the direction for redo.

2000-05-08  Ettore Perazzoli  <ettore@helixcode.com>

	* htmlengine-edit-fontstyle.c (figure_interval): Get rid of unused
	variables.

	* htmltextmaster.c (merge): Fix broken merging in the case in
	which the select length of self is zero.

2000-05-08  Larry Ewing  <lewing@helixcode.com>

	* gtkhtml.c (button_press_event): let button 2 request a paste.
	(selection_get): add TEXT and COMPOUND_TEXT types.
	(selection_received): add preliminary handler for receiving
	seletions.
	(class_init): add select_received handler to the class.
	(init): add the extra targets.

	* gtkhtml.h: expose gtk_html_request_paste to the world.

	* htmlengine.c (html_engine_begin): add the url_requested signal
	back it was accidentally removed.

2000-05-07  Radek Doulik  <rodo@helixcode.com>

	* htmlimage.c (html_image_set_size): changed percent changing
	behavior to hopefully correct one

	* htmlengine.c (html_engine_parse): reset indent_level to 0

	* htmlengine-edit-paste.c (do_undo): removed delete bug workaround
	as it seems to work now

	* htmlengine-edit-delete.c (merge_text_at_cursor): updated it to
	merge both directions (need ie. after delete of non-text object)
	(delete_different_parent): don't destroy objects going to save_buffer
	(delete_same_parent): likewise
	(delete_different_parent): also append objects from deleted
	paragraphs to save_buffer
	(append_to_buffer): added debug msg + don't insert "" to save buffer

	* htmlimage.c (html_image_init): removed assertion on *filename
	(html_image_factory_register): likewise
	(html_image_factory_register): load image only if != ""

	* htmlengine-edit-paste.c (do_paste): possibly add "" to clueflow
	if bailing out (this fixes pasting parbreak and undo after delete of parbreak)

2000-05-07  Ettore Perazzoli  <ettore@helixcode.com>

	* htmlengine-edit-delete.c (html_engine_delete): Avoid looking for
	the end point beyond the end of the text.

	* htmlengine-edit.c
	(html_engine_undo): Unselect all.
	(html_engine_redo): Don't freeze/thaw.
	(html_engine_undo): Don't freeze/thaw here either.

2000-05-07  Ettore Perazzoli  <ettore@helixcode.com>

	* htmlengine-edit-delete.c
	(html_engine_delete): Avoid looking for the end point beyond the
	end of the text.
	(merge_text_at_cursor): If merging is not possible, return the
	current offset unmodified.

2000-05-07  Larry Ewing  <lewing@helixcode.com>

	* htmlengine.c (html_engine_end): if editable call
	html_cursor_home to make sure that even if the the whole buffer is
	loaded in one pass we don't end up with a cursor at an incorrect
	location.

2000-05-06  Radek Doulik  <rodo@helixcode.com>

	* htmlengine.c (parse_table): don't create bg ptr if background=""
	(parse_b): likewise

	* htmlimage.c (html_image_factory_register): added test for ""
	filename - now it is forbidden
	(html_image_init): likewise
	(html_image_set_filename): likewise

	* htmlundo.c (html_undo_do_undo): do undo only if stack is
	non-empty and don't complain when called with empty stack
	(html_undo_do_redo): likewise

	* htmltext.c (insert_text): partialy rewritten, inserts whole text
	now and calls new convert_nbsp hack
	(convert_nbsp): new function, converts sequence of [<space>&nbsp']
	to sequence with starting space and &nbsp; chars
	(remove_text): use convert_nbsp
	(html_text_init): likewise

	* gtkhtml-keybinding.c (handle_ctrl): added C-z for UNDO and C-r
	for REDO (it is not Emacs like, but helps a lot for testing)

2000-05-05  Radek Doulik  <rodo@helixcode.com>

	* htmlengine-edit-delete.c (html_engine_delete): restore cursor
	position before do_undo
	(html_engine_delete): if remove text from last object, save it
	also in save_buffer
	(html_engine_delete): destroy_orig only if it is on object begin,
	when offset ==0, if destroy_orig for nontext increase count,
	so we move one more point forward, later move one point backward
	if destroy_orig

	* htmlengine-edit-insert.c (insert_chars_at_not_text): set cursor
	to beggining of inserted text

2000-05-05  Larry Ewing  <lewing@helixcode.com>

	* htmlembedded.c (draw): queue a draw on the widget when we get a
	draw event, should fix the disappearing embedded widgets.

2000-05-04  Radek Doulik  <rodo@helixcode.com>

	* htmlcursor.c (forward): move cursor also behind non-text
	objects

2000-05-03  Radek Doulik  <rodo@helixcode.com>

	* htmlengine.c (replace): use html_engine_edit_selection_update_now
	(html_engine_replace_do): disable selection on end of replace
	(parse_a): added missing gdk_color_copy

	* htmlengine-edit-selection-updater.c
	(html_engine_edit_selection_update_now): new function, removes
	idle callback and does update immediately.

	* htmlengine.c (display_search_results): use mark/cursor when
	editable

	* htmltext.c (html_text_set_text): set change flags

	* htmlengine.c (html_engine_parse): reset search & replace engine

2000-05-02  Larry Ewing  <lewing@helixcode.com>

	* htmlimage.c (cleanup_images): if there are no interestes don't try to
	to free them.

2000-05-01  Larry Ewing  <lewing@helixcode.com>

	* htmlclueflow.c (save): rework the saving code so that we merge
	paragraphs of similiar types.
	(is_similar): compare the two flows to see if they can be merged.

2000-04-30  Radek Doulik  <rodo@helixcode.com>

	* htmlsettings.c (html_settings_free_colors): free colors only
	when they've been allocated

	* gtkhtml.c (gtk_html_set_default_background_color): set bgcolor
	in default settings

	* htmlpainter.c (html_painter_draw_background): added const to
	color arg

	* htmlengine.h: removed bgColor and bgColor_allocated

	* gtkhtml.c (gtk_html_set_default_background_color): use new settings

	* htmlengine-edit-insert.c (html_engine_insert_link): use new settings

	* htmlsettings.c (html_settings_reset): new function used to reset
	values (now only collors) from orig settings

	* htmlengine.c (parse_b): update to new settings
	(parse_b): added alink color parsing
	(html_engine_parse): updated for new settings
	(html_engine_draw_background): likewise
	(html_engine_queue_clear): likewise

	* htmlsettings.c (html_settings_set_color): new function for color setting
	(html_settings_get_color): get color (possibly unallocated)
	(html_settings_get_color_allocated): get allocated color
	(html_settings_free_colors): free colors scheduled to be freed and
	possibly also other colors

	* htmlsettings.h: added alink and text color

2000-04-29  Ettore Perazzoli  <ettore@helixcode.com>

	* htmlengine-edit-insert.c
	(do_undo): Undelete `num_chars' character, not just one, you
	doofus.

2000-04-29  Radek Doulik  <rodo@helixcode.com>

	* htmllinktextmaster.c (html_link_text_master_set_url): new setting function 

	* htmltext.c (html_text_set_text): new setting function

2000-04-28  Ettore Perazzoli  <ettore@helixcode.com>

	* htmlengine-edit-delete.c
	(delete_different_parent): `html_object_dup()' before adding to
	the buffer.

	* htmlengine-edit-fontstyle.c: Redone, with undo/redo support.

2000-04-28  Radek Doulik  <rodo@helixcode.com>

	* htmlimage.c (html_image_set_spacing): set hspace, vspace,
	updated to schedule update
	(html_image_set_filename): set filename, if changed, uregister
	current image_ptr and register new one
	(html_image_set_valign): set valign, if needed shedules update
	(html_image_set_border): set border, if needed shedules update
	(html_image_set_size): set specified_width, specified_height,
	percent, if needed shedules update

2000-04-27  Radek Doulik  <rodo@helixcode.com>

	* testgtkhtml.c (main): test gtk_html_set_default_background_color
	- set light blue background

	* htmlengine.c (html_engine_parse): free allocated bgColor

	* gtkhtml.c (gtk_html_set_default_background_color): new function
	for Dan :)
	(realize): removed setting of bgcolor to gtk bg[NORMAL] color,
	when needed use gtk_html_set_default_background_color instead

2000-04-26  Radek Doulik  <rodo@helixcode.com>

	* htmlengine-edit-paste.c (skip): removed
	(obj_len): new function, returns 1 for non-text, text_len else
	(append_object): don't use skip, keep cursor consistent
	(prepend_object): likewise
	(do_paste): keep cursor consistent, don't use skip, also merge
	objects copied from ClueFlows
	(do_undo): use backward arg of html_engine_delete instead of
	calling html_engine_move_cursor
	hack around html_engine_delete bug - loop buffer_count times and
	remove one char each time - hopefully I correct it

2000-04-25  Radek Doulik  <rodo@helixcode.com>

	* htmlengine-edit-insert.c (html_engine_insert_link): new function
	for link insertion

2000-04-24  Dan Winship  <danw@helixcode.com>

	* htmlengine.c (html_engine_destroy): remove the updateTimer, if
	it's active.
	(html_engine_timer_event): if calling html_engine_update_event,
	remove the updateTimer first, since update_event will clear it.
	(html_engine_end): before calling html_engine_timer_event,
	remove the timerId, since timer_event will clear it.

	Fixes problems with timers being called after the object is
	destroyed.

2000-04-24  Radek Doulik  <rodo@helixcode.com>

	* htmlengine.c (html_engine_replace_do): updated to use ask
	function with data

	* htmlreplace.c (html_replace_new): added data arg to ask function

	* Makefile.am (libgtkhtml_la_SOURCES): removed gtkhtml-search.[ch]
	gtkhtml-replace.[ch], gtkhtml-edit-image.[ch]

	* htmlengine-edit-images.c (html_engine_insert_image): removed
	g_return_if_fail (halign != HTML_HALIGN_NONE); as we don't use
	halignment at all

	* gtkhtml.c: removed dialogs deps

	* testgtkhtml.c: removed menus/callbacks using dialogs

	* gtkhtml.h (gtk_html_redo): removed image/search/replace dialog
	functions

2000-04-24  Ettore Perazzoli  <ettore@helixcode.com>

	* htmlengine-edit-paste.c
	(skip): Fixed so that it does not skip more than needed when at
	the end of a paragraph.

2000-04-24  Ettore Perazzoli  <ettore@helixcode.com>

	* htmlengine-edit-images.c
	(html_engine_insert_image): We cannot support editing of haligned
	images, so avoid doing that.

2000-04-24  Radek Doulik  <rodo@helixcode.com>

	* gtkhtml-edit-image.c (gtk_html_image_dialog_new): lifted dialog
	design up
	(checked_value): creates check/spin button pair
	(check_toggled): checkbuttons callback
	(percent_toggled): percent toggle callback
	(width_toggled): width toggle callback for percent checkbutton
	(menu_activate): align menuitems callback
	(insert): callback which calls image insertion

	* htmlengine-edit-images.c (html_engine_insert_image): updated to
	use valign/halign

2000-04-23  Radek Doulik  <rodo@helixcode.com>

	* htmlengine-edit-images.c (html_engine_insert_image): added
	halign, hspace, vspace args

2000-04-23  Ettore Perazzoli  <ettore@helixcode.com>

	* htmlengine-edit-delete.c: Implemented undo/redo.
	(append_to_buffer): New function.
	(delete_same_parent): Return a cut buffer with the stuff that we
	have deleted in it.
	(delete_different_parent): Likewise.
	(html_engine_delete): Updated to setup the undo information too.
	New params @do_undo and @backwards.  @do_undo specifies if we want
	undo information or not, @backwards if we want to delete forwards
	or backwards.

	* htmltextmaster.c
	(copy_text_master_members): New helper function.
	(copy): Use it.
	(extract_text): New function, implementation of
	`HTMLText::extract_text()'.
	(html_text_master_class_init): Install it.

	* htmltext.c
	(copy_helper): New helper function.
	(copy): Use it.
	(extract_text): New function, implementation of
	`HTMLText::extract_text()'.
	(html_text_extract_text): New function.
	(html_text_class_init): Install it.

	* htmltext.h: New virtual method `extract_text'.

2000-04-23  Radek Doulik  <rodo@helixcode.com>

	* htmlengine-edit-paste.c (html_engine_paste_object): call
	html_engine_paste - this does also cut before insert and fixes
	undo/redo

2000-04-23  Ettore Perazzoli  <ettore@helixcode.com>

	* htmlimage.c
	(html_image_new): @filename made const-safe.
	(html_image_init): Likewise.

	* htmlengine-edit-images.c: New file.
	(html_engine_insert_image): Moved here from `htmlengine-edit.c'.
	New params for all the properties of the image object.

2000-04-22  Ettore Perazzoli  <ettore@helixcode.com>

	* htmlengine.c
	(replace): Use `html_engine_paste_object()' instead of overriding
	the engine's cut buffer and using `html_engine_paste()'.

	* htmlengine-edit.c
	(html_engine_insert_image): Use `html_engine_paste_object()'.

	* htmlengine-edit-paste.c
	(html_engine_paste_object): New function.

	* htmlengine-edit-cut.c
	(html_engine_cut): New param @do_undo.  If false, don't save undo
	information.

	* htmlengine-edit-paste.c
	(html_engine_paste): New param @do_undo.  If false, don't save
	undo information.

2000-04-22  Ettore Perazzoli  <ettore@helixcode.com>

	* testgtkhtml.c
	(main): We definitely don't want this test program to let users
	edit pages.

	* htmlbutton.c
	(html_button_init): Added an assertion for the case in which
	`type' is unknown.

	* htmlengine.c: Don't care if we have already parsed a `<body>'
	tag; the new `<body>' will just override the existing params.
	Don't initialize `leftBorder', `rightBorder', `topBorder' and
	`bottomBorder' either.
	(html_engine_parse): Do it here instead.  Don't init `bodyParsed'
	anymore.

	* htmlengine.h: Removed member `bodyParsed'.

2000-04-22  Radek Doulik  <rodo@helixcode.com>

	* htmlengine-edit-paste.c (html_engine_paste):  use undo levels

	* htmlengine.c (move_to_found): if editable jump with cursor to
	end of founded text
	(html_engine_replace_do): use undo levels

	* htmlundo.h (HTML_UNDO_LIMIT): raised from 10 to 1024

	* htmlundo.c (level_new): new ctor
	(level_destroy): new dtor
	(html_undo_level_begin): begins new undo level - stores current
	level on levels stack and starts new one
	(redo_level_begin): likewise for redo
	(redo_step_action): redo step action function
	(redo_level_end): end of redo level
	(undo_step_action): undo step action function
	(html_undo_level_end): end of undo level - closes current undo
	level and pops another one from levels stack
	(html_undo_add_undo_action): use undo LIMIT only for first/base undo level

	* htmlundo.h: added undo_levels, redo_levels lists for
	level-stacks

2000-04-22  Ettore Perazzoli  <ettore@helixcode.com>

	* htmlcursor.c
	(html_cursor_jump_to_position): Fix precondition: a zero position
	is valid!

	* gtkhtml-keybinding.c
	(insert_para): Updated to use `html_engine_insert()' instead of
	`html_engine_insert_para()'.

	* htmlengine-edit-insert.c: Extensively reorganized.  Implemented
	complete undo/redo support.
	(html_engine_insert_para): Removed.

2000-04-21  Ettore Perazzoli  <ettore@helixcode.com>

	* htmlclueflow.c
	(calc_size): Update the y coordinate correctly for
	`HTML_VALIGN_TOP' objects.

2000-04-21  Ettore Perazzoli  <ettore@helixcode.com>

	* htmlengine.c
	(ensure_last_clueflow): New function.  If the last
	HTMLClueFlow is empty, fill it with a zero-length text element.
	(html_engine_end): Call it.

2000-04-21  Ettore Perazzoli  <ettore@helixcode.com>

	* gtkhtmldebug.c
	(gtk_html_debug_dump_tree_simple): Removed unused variable `i'.

	* htmltable.c
	(draw): Removed unused variable `cellpaint'.

	* htmlengine-save.c: #include "gtkhtmldebug.h".

	* htmlimage.c
	(html_image_new): Constify `color'.
	(html_image_init): Likewise.

2000-04-21  Radek Doulik  <rodo@helixcode.com>

	* testgtkhtml.c (image_cb): added insert image to menu + callback

	* gtkhtml-edit-image.h: new file, ImageDialog definition

	* gtkhtml-edit-image.c: new file, implements image insert dialog
	(gtk_html_image_dialog_new): new ctor

	* Makefile.am: added gtkhtml-edit-image.[hc]

	* htmlengine-edit.c (html_engine_insert_image): new function,
	inserts image to document

	* htmlimage.c (copy): added valign, hspace and vspace copying,
	also add dest image to image_ptr interests
	(html_image_animation_timeout): removed some unused
	variables to make compiler happy

2000-04-21  Ettore Perazzoli  <ettore@helixcode.com>

	* gtkhtml-keybinding.c
	(paste): Don't disable the selection anymore, as
	`html_engine_paste()' now does the right thing.

	* htmlengine-edit-selection-updater.c
	(updater_idle_callback): Get rid of ugly, useless `goto'.
	(update_selection): When unselecting everything if the mark and
	the cursor are at the same position, re-set `active_selection' to
	be true.

	* htmlengine-edit.c
	(html_engine_set_mark): Set `active_selection' true.

	* htmlengine-edit-paste.c
	(html_engine_paste): Destroy the cut buffer before re-assigning
	it.
	(update_cursor_position): Removed.

2000-04-20  Radek Doulik  <rodo@helixcode.com>

	* htmlengine.c (close_flow): eat trailing spaces in ClueFlow

	* testgtkhtml.c (main): commented out gtk_html_set_editable as it
	could break things, so uncomment it yourself if you want to test
	replacing

	* gtkhtml-replace.c (gtk_html_replace_dialog_new): replace dialog ctor
	(ask_dialog_new): ask dialog ctor
	(replace_do): calls html_engine_replace_do, it is used from button
	callbacks

	* gtkhtml-replace.h: replace and replace ask dialogs iface

	* htmlreplace.c (html_replace_new): new ctor
	(html_replace_destroy): new dtor

	* htmlreplace.h: replace info struct iface

	* testgtkhtml.c: new menu "Edit" for search/replace testing
	(main): make widget editable, so we could test some of editing
	stuff here instead of fiddling with components all the time
	(load_done): new replace callback

	* htmltable.c (search): hopefully fixed backward search

	* htmlengine.c (move_to_found): new function, implements jump to
	resulty of search. It nows focuses to whole text slaves, so maybe
	I could enhance it by Slave offset precission
	(html_engine_search_next): fixed, now it returns right retval
	instead of FALSE
	(html_engine_replace): text replacing, does search and ask caller
	then what to do
	(html_engine_replace_do): this one is called from
	html_engine_replace's caller with approriate answer, so it could
	do Replace, ReplaceAll, Next(aka skip) and Cancel.
	(replace): this one does the work, yes replaces text. it prepares
	cut_buffer and then calls html_edit_paste. after paste it updates
	search_info

	* htmlengine-edit-paste.c (html_engine_paste): do this: if there
	is selection, cut first this selection and then do paste. I mean
	this is the right behaviour we want, comments? It needs check, if
	it is oook with undo stuff

	* htmlclueflow.c (search_set_info): updated to use stop_pos and tail

	* htmlsearch.h: added fields stop_pos and last to remember tail of
	founded selection

	* gtkhtml.c (gtk_html_replace): new function, launches/shows
	replace dialog

	* gtkhtml.h: added fields for Replace and Replace Ask dialogs

	* Makefile.am: added new files htmlreplace.[hc], gtkhtml-replace.[hc]

	* htmlengine.c (display_search_results): now it correctly jumps to
	founded text

	* htmlembedded.c (calc_size): set width and height to minimize updates
	(calc_min_width): likewise

2000-04-19  Larry Ewing  <lewing@helixcode.com>

	* htmltablecell.c (draw_background_helper): use the new super cool
	html_painter_draw_background to draw the background of the cell
	and change the arguments to use an ArtIRect.  No longer deal with
	the padding outside of the cluev, the fact that we were meant that
	the cell needed to draw outside it's bounding box.  Now we need to
	fix cluev to do the right thing all the time with padding.
	(draw_background)
	(draw): check the interection before drawing.
	(html_table_cell_init): set the cluev padding rather than the
	table cell padding.  The padding should be handled by the cluev
	completely. but the cluev isn't perfect in how it does this right
	now (see http://www.helixcode.com/ and look at the monkey image.	

	* htmltable.c (calc_row_heights): 
	(calc_size): 
	(calc_size): remove padding, this isn't completely done but I want
	to get the current code in the repository.
	(draw): use the new object intersection test.

	* htmlpainter.c (class_init): 
	(draw_background): replace draw_background_pixmap with draw_background.

	* htmlpainter.h: the same.

	* htmlprinter.c: the same.
	
	* htmlobject.c (html_object_calc_intersection): convenience
	function for calculating the intersection of the drawing region
	and an object.

	* htmlobject.h: make html_object_calc_intersection public.

	* htmlgdkpainter.c (draw_background): change
	draw_background_pixmap to draw_background and add an argument for
	color so that we can optimize drawing later. Also add offset
	arguments since we are now correctly only drawing part of the
	backround and must know where starting offset is.
	(class_init): initialize draw_background.

	* htmlengine.c (html_engine_draw_background): change
	draw_backround to a public function and use the new
	html_painter_draw_background function.

	* htmlengine.h: add html_engine_draw_background.

	* htmldrawqueue.c (draw_obj): use the new
	html_engine_draw_background function.

2000-04-18  Larry Ewing  <lewing@helixcode.com>

	* htmlengine.c (html_engine_draw): fix the region we choose to
	draw on the toplevel clue.

2000-04-18  Radek Doulik  <rodo@helixcode.com>

	* htmltextarea.c (html_textarea_init): like bellow

	* htmlselect.c (html_select_init): like bellow

	* htmlcheckbox.c (html_checkbox_init): like bellow

	* htmlradio.c (html_radio_new): like bellow

	* htmlbutton.c (html_button_init): like bellow

	* htmltextinput.c (html_text_input_init): use
	html_embedded_set_widget and simplifed

2000-04-17  Radek Doulik  <rodo@helixcode.com>

	* htmlembedded.h: caching of width and height of widget to
	minimize updates

	* htmlembedded.c (html_embedded_set_widget): new function, used to
	set widget for embedded object
	(request): new gignal handler
	(allocate): new gignal handler
	(calc_min_width): use allocation only if widget is already
	allocated
	(calc_size): likewise

2000-04-17  Ettore Perazzoli  <ettore@helixcode.com>

	* htmlclueflow.c
	(save): Changed <br> output policy: we now output them only if the
	paragraph is of style HTML_CLUEFLOW_STYLE_NORMAL and it's the
	first in its parent clue.

	* htmllinktextmaster.c
	(html_link_text_master_new_with_size): New function.
	(html_link_text_master_new): Rewritten by means of it.
	(get_selection): New function, implementing the
	`HTMLObject::get_selection()' method for `HTMLLinkTextMaster's.
	(html_link_text_master_class_init): Install it.
	(html_link_text_master_init): New arg @len.

	* htmlobject.c
	(copy): Added missing instructions to copy certain struct members.

	* htmlengine-edit-paste.c
	(update_cursor_position): Removed.
	(do_paste): Use `html_engine_cut_buffer_count()' instead.  Also,
	fix updating the cursor while pasting empty paragraphs, by calling
	`skip()' whenever we encounter two consecutive HTMLClueFlows in
	the buffer.

	* htmlengine-cutbuffer.c
	(html_engine_cut_buffer_count): New function.

	* htmlengine-edit-cut.c
	(html_engine_cut): Disable the selection with
	`html_engine_disable_selection()'.

	* htmlengine-cutbuffer.c
	(html_engine_cut_buffer_dup): Make it work.

2000-04-17  Radek Doulik  <rodo@helixcode.com>

	* htmlengine.c (display_search_results): use html_engine_jump_to_object

	* htmlclueflow.c (search_text): implemented backward substring
	search, also search backwards thru childern
	(search_text): fixed ClueFlow traversing, fixed backward substring
	and updated regex search for backward search

2000-04-16  Radek Doulik  <rodo@helixcode.com>

	* gtkhtml.c (search): set regular when showing dialog again

2000-04-16  Larry Ewing  <lewing@helixcode.com>

	* testgtkhtml.c (stop_cb): the stream handler takes care of
	killing the stream.

	* htmlengine.c (html_engine_select_region): remove small leak.
	
2000-04-17  Ettore Perazzoli  <ettore@helixcode.com>

	* gtkhtml.c
	(search): Added missing `GTK_WIDGET()' cast.

	* htmlengine-edit-cut.c: Rewritten to use the new cursor/region
	handling code.  Also implemented support for undo and redo.

	* htmlengine-edit-paste.c
	(closure_destroy): Use `html_cut_buffer_destroy ()'.
	(html_engine_paste_buffer): New function.

	* htmlengine-edit-paste.c
	(action_data_from_cut_buffer): Use the new function
	`html_engine_cut_buffer_dup()'.

	* htmlengine-cutbuffer.c
	(html_engine_cut_buffer_destroy): Removed arg @engine.
	(html_engine_cut_buffer_dup): New function.

2000-04-17  Ettore Perazzoli  <ettore@helixcode.com>

	* htmlengine.c (html_engine_destroy): Remove the timeout
	associated with `timerId', if any.

2000-04-15  Ettore Perazzoli  <ettore@helixcode.com>

	* htmlclue.c
	(destroy): Made the code readable.

	* htmlengine-edit-delete.c
	(delete_different_parent): Make the style of the second paragraph
	"win" over that of the first one, so that inserting a paragraph
	break is specular to removing it.

	* htmlengine-edit-paste.c
	(update_cursor_position): Changed to return the number added to
	the cursor's position counter.
	(do_paste): New function, doing all of the pasting work previously
	done by `html_engine_paste()'.  Also return the number of
	character elements pasted.
	(do_undo): New function, implementing the "undo" action.
	(do_redo): New function, implementing the "redo" action.
	(setup_undo): New function, to set up the "undo" action.
	(setup_undo): New function, to set up the "redo" action.
	(html_engine_paste): Rewritten to use these new function, and
	support undo properly.

2000-04-15  Radek Doulik  <rodo@helixcode.com>

	* htmlsearch.c (html_search_new): updated to use GNU regex when
	possible

	* htmlclueflow.c (search_text): likewise

	* htmltextslave.c (fit_line): removed eating of spaces at the
	beggining of line. Lewing please could you take a look at it?
	Is it ok to remove?

2000-04-15  Ettore Perazzoli  <ettore@helixcode.com>

	* htmlengine-edit-delete.c
	(html_engine_delete): Restore the original `position' value in the
	cursor after deleting.

	* htmlengine-edit-paste.c
	(skip): If this is the last HTMLClueFlow (`next' is NULL), put the
	cursor at the end of the current object.

	* htmlengine-edit-paste.c
	(html_engine_paste): Handle correct pasting of empty
	HTMLClueFlows.  Also, removed unused variable.

	* htmlobject.c
	(get_selection): Unselect the copy obtained through
	`html_object_dup()'.

2000-04-14  Ettore Perazzoli  <ettore@helixcode.com>

	* htmlengine-edit-paste.c
	(split_first_clueflow_at_cursor): Trigger a recalculation of
	everything in the dupped HTMLClueFlow with
	`html_object_change_set()'.
	(add_new_clueflow): Likewise.
	(html_engine_paste): Likewise.

2000-04-15  Radek Doulik  <rodo@helixcode.com>

	* htmlsearch.c (html_search_new): use POSIX calls instead of GNU
	for better portability

	* htmlclueflow.c (search): use cur = HTML_OBJECT
	(info->found->data) instead of g_list_last (found) as we don't
	want miss something :)
	(search_text): use POSIX calls instead of GNU for better portability

2000-04-14  Ettore Perazzoli  <ettore@helixcode.com>

	* htmlengine-edit-paste.c: Cleaned up and made robust.  I also
	added a few g_assert()s around in the process, just to make sure
	things are really working.
	(skip): Don't touch the cursor's position counter.
	(html_engine_paste): Likewise.
	(update_cursor_position): New helper function, for updating the
	position counter correctly.
	(prepare_clueflows): New param `append'.  If true, handle creation
	of clueflows for the case in which append to the current object
	instead of prepending to it.
	(html_engine_paste): Pass the appropriate `append' value to
	`prepare_clueflows()'.
	(add_empty_text_master_to_clueflow): New helper function.
	(split_first_clueflow_at_cursor): Use it.
	(prepare_clueflows): If the last HTMLClueFlow is not followed by
	anything, add an empty HTMLTextMaster to it using
	`add_empty_text_master_to_clueflow()'.

	* htmlengine-edit-insert.c
	(html_engine_insert_para): Increment cursor's position counter.

	* htmlengine-edit-paste.c
	(split_at_cursor): In the case of a non-text object, return
	`FALSE' if the offset is zero; otherwise, return `TRUE'.
	(skip): If the following object is NULL, go at the beginning of
	the following HTMLClueFlow.
	(prepare_clueflows): Add the clueflows in the right position.

	* htmlengine-edit-paste.c: Use `gtk_html_debug_dump_tree_simple()'
	instead of `gtk_html_debug_dump_tree()' which is way too verbose.

	* gtkhtmldebug.c
	(gtk_html_debug_dump_tree_simple): New function.
	(gtk_html_debug_dump_list_simple): New function.

	* gtkhtml-keybinding.c
	(paste): New function.
	(handle_ctrl): Bind it to `C-y'.
	(cut): New function.
	(handle_ctrl): Bind it to `C-w'.
	(copy): New function.
	(handle_alt): Bind it to `M-w'.

	* htmlundo-action.h: Changed `description' not to be const
	anymore.

	* htmlengine-edit-selection-updater.c
	(reduce_selection): Unset the selection for HTMLClueFlows
	correctly.

2000-04-14  Radek Doulik  <rodo@helixcode.com>

	* gtkhtml-search.c (gtk_html_search_dialog_new): updated to
	support regex

	* gtkhtml.c (gtk_html_search_regex): new function to invoke regex
	search dialog

	* htmlclueflow.c (search_text): use regex for search_regex

	* htmlsearch.c (html_search_new): use ENTITY_NBSP in translation
	table, so &nbsp;'s will be correctly translated to spaces when
	searching
	(html_search_new): updated to support regex

	* htmlentity.h (ENTITY_NBSP): ENTITY_NBSP moved here as it is used
	in htmlsearch

	* htmlsearch.c (html_search_new): added translation table for
	non-case-sensitive searches
	(html_search_destroy): destroy trans table

	* htmlclueflow.c (search): added test for search_next as clueflow
	could also act as any other clue, so may contain non-text childern

	* htmlengine.c (html_engine_search): search for text and selects
	found text
	(html_engine_search_next): continue search

	* gtkhtml.c (gtk_html_search): activate search dialog
	(gtk_html_search_next): search_next or activate search dialog,
	when no previous search was done

	* gtkhtml-search.c (gtk_html_search_dialog_new): new ctor
	(gtk_html_search_dialog_destroy): new dtor
	(gtk_html_search_dialog_run): run search dialog

	* gtkhtml-search.h: new file - interface for Search dialog

	* htmlsearch.c (html_search_new): new ctor
	(html_search_destroy): new dtor
	(html_search_push): push for stack of callers - this stack is
	for search_next to continue Object tree traversing
	(html_search_pop): pop for stack of callers
	(html_search_child_on_stack): test if on top of stack is child of obj

	* htmlsearch.h: new file, contains definition of HTMLSearch helper
	structure and its interface func's

	* Makefile.am (libgtkhtml_HEADERS): replaced gtkhtml-search.c with
	gtkhtml-search.h added htmlsearch.[ch], gtkhtml-search.[ch]

2000-04-13  Larry Ewing  <lewing@helixcode.com>

	* htmlgdkpainter.c (draw_pixmap): do full alpha-blending on
	images.  This is just testing code right now, and everything is
	the same as it used to be if you turn off gdk_painter->alpha.  It
	is dog slow for animations, but that is easy enough to fix.
	(draw_background_pixmap): fix the optimized draw_background_pixmap
	to work for transparent images in table cells again (check
	http://www.helicode.com/ for the rendering problems this fixes).

	* htmlimage.c (html_image_factory_frame_done): make the signature
	of the signal that is now being emitted for frame done.  This
	looks like a recent bug fix in gdk-pixbuf, you will need to update
	it again.

2000-04-12  Ettore Perazzoli  <ettore@helixcode.com>

	* htmlengine-edit-clueflowstyle.c: Rewritten in a better, cleaner
	way, taking advantage of the changes in cursor and selection
	handling.

	* htmlengine-edit-selection-updater.c: Use `HTMLCursor''s member
	`position' instead of `relative_position', which is now gone.

	* htmlengine-edit-paste.c
	(skip): Update `position' in the cursor, instead of
	`relative_position', which is now gone.
	(html_engine_paste): Likewise.

	* htmlengine-edit-insert.c
	(html_engine_insert): Use `html_cursor_get_position()' instead of
	using the relative position.  Also, don't reset the relative
	position.

	* htmlundo.c
	(do_action): Don't call `html_cursor_set_relative()'.  Instead,
	use `html_cursor_jump_to_position()' to restore the cursor
	position.
	(html_undo_discard_redo): Set `redo_stack' to NULL.

	* htmlundo-action.c
	(html_undo_action_new): Strdup the description before storing it
	into the struct.
	(html_undo_action_destroy): Free the description.

	* htmlundo-action.h: Member `relative_position' replaced by member
	`position'.

	* htmlcursor.c: Updated to use `position' instead of
	`relative_position' throughout.
	(html_cursor_home): Do not call `html_cursor_reset_relative()'
	anymore.
	(html_cursor_get_relative): Removed.
	(html_cursor_set_relative): Removed.
	(html_cursor_reset_relative): Removed.
	(html_cursor_goto_zero): Removed.
	(html_cursor_set_position): Removed.
	(html_cursor_get_position): New function.
	(html_cursor_jump_to_position): New function.

	* htmlcursor.h: Member `relative_position' removed.  New member
	`position'.

	* htmlundo.c
	(html_undo_add_undo_action): Don't destroy the redo list.

	* htmlengine-edit-selection-updater.c
	(extend_selection): Use `html_cursor_precedes()'.
	(reduce_selection): Use `html_cursor_precedes()' and
	`html_cursor_follows()'.

	* htmlcursor.c
	(html_cursor_precedes): New function.
	(html_cursor_follows): New function.
	(html_cursor_get_current_char): Made const-safe.

	* htmlengine-edit-selection-updater.c
	(extend_selection): Updated to use `html_object_next_for_cursor()'
	and `html_object_prev_for_cursor()' instead of
	`html_cursor_forward_object()' and
	`html_cursor_backward_object()'.
	(reduce_selection): Likewise.

	* htmlcursor.c
	(forward_object): Rewritten to only take and return an `HTMLObject
	*'.
	(forward): Updated accordingly.
	(html_cursor_forward_object): Removed.
	(html_next_object_for_cursor): New function.
	(backward_object): Rewritten to only take and return an
	`HTMLObject *'.
	(backward): Updated accordingly.
	(html_cursor_backward_object): Removed.
	(html_prev_object_for_cursor): New function.

	* htmlclueflow.c
	(html_clueflow_indent): Added preconditions for @engine.
	(html_clueflow_set_halignment): Likewise.
	(html_clueflow_set_style): Likewise.
	(html_clueflow_set_properties): Likewise.
	(html_clueflow_get_style): New function.
	(html_clueflow_get_halignment): New function.
	(html_clueflow_set_indentation): New function.
	(html_clueflow_get_indentation): New function.

2000-04-12  Radek Doulik  <rodo@helixcode.com>

	* htmltablecell.c (draw_background_helper): as below

	* htmlengine.c (draw_background): update to use modified
	draw_background_pixmap

	* htmlgdkpainter.c (draw_background_pixmap): changed
	functionality, instead of width and height it has tile_width and
	tile_height args and do bgPixmap tiling

2000-04-11  Radek Doulik  <rodo@helixcode.com>

	* htmltable.c (calc_size): do calc_col_info only when min_width
	change flag is set
	(calc_preferred_width): likewise

2000-04-11  Ettore Perazzoli  <ettore@helixcode.com>

	* htmlengine.c
	(html_engine_disable_selection): Handle the mark only if the
	engine is editable.
	(html_engine_set_editable): Disable the selection before changing
	the editable state.

	* gtkhtml.c
	(motion_notify_event): Do not set the mark if not editable.

2000-04-11  Ettore Perazzoli  <ettore@helixcode.com>

	* htmlengine-edit-cut.c
	(html_engine_cut): Use `html_engine_disable_selection()' instead
	of `html_engine_unselect_all()'.

	* gtkhtml.c
	(button_press_event): Use `html_engine_disable_selection()'
	instead of `html_engine_unselect_all()'.
	(selection_clear_event): Likewise.

	* gtkhtml-keybinding.c
	(forward): Don't unselect the region.
	(backward): Likewise.
	(up): Likewise.
	(down): Likewise.
	(beginning_of_line): Likewise.
	(end_of_line): Likewise.
	(page_up): Likewise.
	(page_down): Likewise.
	(forward_word): Likewise.
	(backward_word): Likewise.
	(beginning_of_document): Likewise.
	(end_of_document): Likewise.
	(delete): Use `html_engine_disable_selection()' instead of
	`html_engine_unselect_all()'.
	(insert_para): Likewise.
	(handle_none): Likewise.
	(unselect_all): Removed.
	(disable_selection): New function.
	(handle_ctrl): Map it to `C-g'.

	* htmlengine.c
	(html_engine_disable_selection): New function.

	* htmlcursor.c
	(forward): After going to the next object, increment the offset by
	one if it is the first child.

	* htmlengine-edit-movement.c
	(update_selection_if_necessary): New helper function.
	(html_engine_move_cursor): Call it to update the selection when
	moving the cursor.
	(html_engine_end_of_document): Likewise.

	* htmlengine.c
	(html_engine_init): Initialize `selection_updater'
	(html_engine_destroy): Destroy it.

	* htmlengine.h: New member `selection_updater' in `HTMLEngine'.

	* htmlengine-edit-selection-updater.h: New file.
	* htmlengine-edit-selection-updater.c: New file.

	* htmlcursor.c
	(html_cursor_equal): Made params const-safe.

	* htmlengine.c
	(html_engine_unselect_all): Do not destroy the mark if it is NULL.

	* htmlengine.c (parse_h): Center `<hr>'s by default.

2000-04-11  Larry Ewing  <lewing@helixcode.com>

	* htmlimage.c (get_actual_height): 
	(get_actual_width): copy netscapes method of scaling the image in
	both dimensions even in only one dimension is specified.  This
	should fix the flag problems on http://www.suse.com/

	* htmlengine.c (parse_table): fix typo in alignment parsing.

2000-04-11  Darin Adler  <darin@eazel.com>

	* htmlgdkpainter.c: (create_temporary_pixbuf), (drawpixmap):
	Updated for new GdkPixbuf.

	* htmlimage.c: (html_image_animation_new),
	(html_image_animation_start), (html_image_animation_timeout),
	(render_cur_frame), (animation_actual_width),
	(animation_actual_height): Updated for new GdkPixbuf.

2000-04-11  Radek Doulik  <rodo@helixcode.com>

	* htmlengine.c (html_engine_update_event): removed if (e->parsing)
	around scrollbars updating - does anybody know why it was here?
	(html_object_changed): removed definition of
	html_engine_update_event and html_engine_schedule_update as it was
	already defined above

	* htmltokenizer.c: rewritten tokenizer blocking - I have removed
	Blocking token struct as it is no more needed
	added tokens_num and blocking_tokens_num counters to tokenizer struct
	(html_tokenizer_blocking_push): new function, blocking now works
	as simple stack implemented with GList containing HTMLTokenType's
	(html_tokenizer_blocking_pop): pop from blocking stack
	(html_tokenizer_blocking_get_name): get name of TokenType on top
	of blocking stack
	(html_tokenizer_has_more_tokens): it is now so simple :)
	(html_tokenizer_write): updated to use new blocking

2000-04-11  Ettore Perazzoli  <ettore@helixcode.com>

	* htmlrule.c
	(draw): Fixed bogus brace placement that caused aligned rules not
	to be laid out correctly.

	* htmlengine.c
	(parse_table): Do not override horizontal alignment if no
	alignment is specified.  Also removed some bogus code.
	(parse_h): Removed bogus horizontal alignment assignment.

2000-04-11  Ettore Perazzoli  <ettore@helixcode.com>

	* htmlengine.c
	(parse_table): No longer make tables centered when they have a
	percent or absolute width.  This is not correct as far as I know.

2000-04-11  Ettore Perazzoli  <ettore@helixcode.com>

	* htmlcursor.c
	(forward_object): New helper function.
	(forward): Use it.
	(html_cursor_forward_object): New function.
	(backward_object): New helper function.
	(backward): Use it.
	(html_cursor_backward_object): New function.
	(html_cursor_home): Changed so that it does not need
	`html_cursor_forward()' anymore.

	* gtkhtml-keybinding.c
	(set_mark): New helper function.
	(handle_ctrl): Bind it to the `C-SPC'.
	(unselect_all): New function.
	(handle_ctrl): Bind it to `C-g'.

	* htmlengine-edit.c
	(html_engine_set_mark): New function.
	(html_engine_redo): Added precondition: @e must be editable.
	(html_engine_undo): Likewise.

	* htmlengine.c
	(html_engine_init): Initialize `mark' to NULL.
	(html_engine_destroy): Destroy `mark' if not NULL.
	(html_engine_unselect_all): Destroy `mark' and set it to NULL.

	* htmlengine.h: New member `mark' in `HTMLEngine'.

2000-04-10  Larry Ewing  <lewing@helixcode.com>

	* htmlpainter.h: added new GtkHTMLEtchStyle enum and change the
	draw_panel argument types to match.

	* htmlgdkpainter.c (draw_panel): change inset type to
	GtkHTMLEtchStyle enum.  For GTK_HTML_ETCH_NONE draw in the current
	pen color.
	(create_temporary_pixbuf): remove unused variables and function
	calls.

	* htmlpainter.c (html_painter_draw_panel): change inset type.

	* htmlprinter.c (draw_panel): change inset type.
	(do_rectangle): remove color set to black.
	
	* htmlrule.c (draw): call html_painter_draw_panel with proper
	style.

	* htmltable.c (draw): call html_painter_draw_panel with proper
	style.
	
	* htmlimage.h: added color variables to image structure.

	* htmlimage.c (reset): clear color_allocated flag.
	(copy): copy the new color information.
	(draw): pass the new panel type flag.  Draw the image border if we
	have one, and pass the hightlight color to the animation.
	(html_image_class_init): use the new reset.
	(html_image_init): added color argument and initialized the color
	variables.
	(html_image_new): added color argument.
	(render_cur_frame): added highlight color argument, and used it.

	* htmlimageinput.c (html_imageinput_init): call html_image_new
	with proper arguments.

	* htmlengine.c (parse_i): pass the current color to html_image_new
	for drawing borders.

2000-04-10  Radek Doulik  <rodo@helixcode.com>

	* htmltokenizer.c (html_token_buffer_new): constructor of new
	structure HTMLTokenBuffer
	(html_token_buffer_destroy): new destructor
	(html_token_buffer_append_token): append token to token buffer
	(html_tokenizer_new): use HTMLTokenBuffer's
	(html_tokenizer_next_token): rewritten to use HTMLTokenBuffer's
	(html_tokenizer_has_more_tokens): likewise
	(html_tokenizer_reset): updated to HTMLTokenBuffer's
	(html_tokenizer_begin): updated to HTMLTokenBuffer's
	(html_tokenizer_append_token): rewritten
	(html_tokenizer_append_token_buffer): rewritten

	* htmltokenizer.h: cleaned interface - most of tokenizer functions
	are now static, whole tokenizer structure is private

	* htmltokenizer.c: rewritte of token buffers

2000-04-09  Radek Doulik  <rodo@helixcode.com>

	* htmlengine.c (parse_table): save e->noWrap in noWrap_save and
	restore it on return (this fixes case when there are nested table
	cells with nowrap option set)

	* gtkhtmldebug.c (gtk_html_debug_dump_tree): dump also min_width

	* htmltext.c (insert_text): set change flags
	(remove_text): likewise

	* htmlclueflow.c (html_clueflow_split): set change flags for
	original clue

	* htmltext.c (split): set min_width change flag for original Text

	* htmlimage.c (html_image_factory_area_prepared): set change flags on images using this image_ptr

	* htmltextslave.c (html_text_slave_init): clear min_width change
	bit as textslaves have min_width always 0

	* htmlclue.c (html_clue_append_after): added call to html_object_change_set
	(html_clue_append): likewise
	(html_clue_prepend): likewise
	(html_clue_append_right_aligned): likewise
	(html_clue_append_left_aligned): likewise

	* htmlobject.c (html_object_change_set): new function - set change
	flags of object and of all its parents

	* htmlobject.h: new enum for change flag bits
	flag for info about cached info added to HTMLObject
	added min_width to cache calc_min_width

	* htmlengine.c (draw_background): fill with bgColor also when it
	has background pixmap, because it could contain transparent
	pixels as www.post.cz

2000-04-09  Ettore Perazzoli  <ettore@helixcode.com>

	* htmlimage.c
	(html_image_factory_end_pixbuf): Changed param types to match new
	GtkHTMLStream stuff.
	(html_image_factory_write_pixbuf): Likewise.

	* htmlengine.c
	(html_engine_write): Get a `GtkHTMLStream *' instead of a
	`GtkHTMLStreamHandle' as the @handle param.
	(html_engine_end): Likewise.

	* gtkhtml-private.h
	(gtk_html_private_calc_scrollbars): Prototype moved here.

	* gtkhtml-private.h: Removed GtkHTMLStream functions and typedefs.

	* gtkhtmlstream.h: New file, header for `gtkhtmlstream.c'.

	* gtkhtml-stream.c: Renamed from `htmlstream.c'.  Cleaned up a
	little, and added preconditions.  Use `GtkHTMLStream *' instead of
	`GtkHTMLStreamHandle' all over the place.
	(gtk_html_stream_ref): Removed.
	(gtk_html_stream_unref): Removed.
	(gtk_html_stream_destroy): New function.
	(gtk_html_stream_close): Renamed from `gtk_html_stream_end'.
	(gtk_html_stream_new): Removed param @url.

	* htmlprinter.c
	(set_color): New helper function.
	(draw_line): Set the line width to `PIXEL_SIZE' before drawing.
	(draw_rect): Likewise.
	(do_request_delete): Helper function.
	(draw_rect): Use it.
	(draw_panel): Use it.

2000-04-08  Larry Ewing  <lewing@helixcode.com>

	* htmlengine.c (parse_table): change the default alignment for
	percent and fixed width tables to HTML_HALIGN_CENTER.

	* htmlimage.c (html_image_animation_stop): change argument to
	HTMLImageAnimation.
	(html_image_animation_destroy): call html_image_animation_stop
	before we destroy the animation so we don't get a stray timeout.

2000-04-08  Larry Ewing  <lewing@helixcode.com>

	* htmltablecell.c (draw_background_helper): account for pixel_size
	when drawing background color and pixmaps.
	(draw): account for pixel_size when checking bounds.

	* htmlengine.c (parse_h): set the default size of rules to 2 pixels.
	(html_engine_update_event): Jump to the anchor after adjusting the
	document bounds and Keep jumping to the position of the
	anchor.  This corrects some problems when the layout changes but
	is still a bit of a hack.
	(html_engine_begin): remember to strip the leading # from the
	value we look up so that we look for the same thing we store.
	Always free the reference before setting it now that we don't
	constantly remove it.

	* htmlrule.c (calc_size): mimic the netscape behaviour by having a
	minimum hr size then padding every larger size with one pixel on
	top and bottom.
	(draw): use html_painter_draw_panel/rect to properly support the
	size arguments and set the pen color for noshade.  Also make sure
	that we always put the extra padding at the bottom of the rule.
	
2000-04-07  Radek Doulik  <rodo@helixcode.com>

	* htmlimage.c (draw): use 1st frame when printing

2000-04-06  Radek Doulik  <rodo@helixcode.com>

	* htmltokenizer.c (html_tokenizer_end): destroy blocking tokens to
	be sure

	* htmlengine.c (parse_a): moved target = g_strdup (p + 7); behind
	#if 0 to not leak memory

	* htmltokenizer.c (html_tokenizer_write): g_free blocking token

	* htmlembedded.c (destroy): if widget has parent then destroy else
	unref

	* htmltable.c (destroy): loop thru allocRows and not thru
	totalRows
	removed add_row_info one line function as it has been used only
	once, from HTMLTable removed rowInfo as it has ben used only in
	calc_col_info
	(calc_col_info): g_free rowInfo

2000-04-06  Ettore Perazzoli  <ettore@helixcode.com>

	* htmlengine-edit-clueflowstyle.c: Added members `mask',
	`alignment' to `SetClueFlowStyleForallData'.
	(set_clueflow_style_in_region_forall): Change the attributes
	associated with the bits set in `mask'.

	* htmlengine-edit-clueflowstyle.h: Fix typo in
	`HTMLEngineSetClueFlowStyleMast': `ENGNIE' -> `ENGINE'.

	* htmlrule.c
	(html_rule_new): @max_width renamed to @length.
	(html_rule_init): Likewise.  Set `rule->lenght' and update the
	`FIXEDWIDTH' flag appropriately.  Do not set ascent/descent here.
	But do set the new member `size'.
	(calc_min_width): Do the Right Thing.
	(draw): Display the correct width, using `max_width' instead of
	`width' as appropriate.
	(calc_size): New function, implementation of
	`HTMLObject::calc_size()'.
	(html_rule_class_init): Install it.

	* htmlrule.h: New members `length' and `size' in `HTMLRule'.

	* htmltext.c
	(html_text_init): Respect the passed length param @len properly.

	* gtkhtmldebug.c
	(gtk_html_debug_dump_tree): Print `text_len' for text objects too.

	* htmlengine-edit-delete.c
	(delete_same_parent): Prevent NULL crash.

2000-04-06  Radek Doulik  <rodo@helixcode.com>

	* htmlimage.c (html_image_factory_area_prepared): ref pixbuf
	(html_image_factory_frame_done): ref animation
	(html_image_factory_end_pixbuf): unref loader instead of only
	closing it
	(html_image_factory_area_prepared): catch only first pixbuf
	(copy): use g_strdup for url and target
	(destroy): g_free url and target

	* htmlcluev.c (html_cluev_class_init): removed FIXME as it don't
	need destroy

	* htmltablecell.c (html_table_cell_unlink): removed FIXME, use
	html_object_destroy instead of g_free
	(html_table_cell_class_init): removed FIXME for destroy as cell
	has no allocated mem and so don't need it (clue destroy is called
	instead by html_object_destroy)

	* htmlform.c (html_form_destroy): destroy elements

	* htmlimage.c (html_image_animation_destroy): g_free HTMLImageAnimation

	* testgtkhtml.c (parse_href): added 3x html_url_destroy (tmpurl);

	* htmltable.c (destroy): free table->cells
	(destroy): free table->rowInfo
	(add_columns): use g_new instead of g_malloc
	(destroy): added g_array_free
	
	* htmlimage.c (html_image_pointer_destroy): unref animation

2000-04-06  Ettore Perazzoli  <ettore@helixcode.com>

	* htmlobject.c
	(relayout): Use `prev_ascent' and `prev_descent' instead of the
	values in yourself as they are set to zero after the call to
	`html_object_reset()'.

2000-04-06  Ettore Perazzoli  <ettore@helixcode.com>

	* htmlimageinput.c
	(draw): Do not set `width', `ascent'.
	(calc_min_width): New function, implementation of
	`HTMLObject::calc_min_width()'.
	(calc_size): New function, implementation of
	`HTMLObject::calc_size()'.

	* htmlembedded.c
	(calc_size): New function, implementation of
	`HTMLObject::calc_size()'.
	(calc_min_width): New function, implementation of
	`HTMLObject::calc_min_width()'.
	(html_embedded_class_init): Install them.

2000-04-06  Ettore Perazzoli  <ettore@helixcode.com>

	* htmlimage.c
	(animation_actual_width): Return `w'.  Made static.
	(animation_actual_height): Return `h'.  Made static.

	* htmltable.c
	(draw): Don't paint anything unless we have at least
	one row.

2000-04-06  Ettore Perazzoli  <ettore@helixcode.com>

	* htmltablecell.c
	(reset): New function, implementation of `HTMLObject::reset()'.
	Set `bg_allocated' to `FALSE'.

	* htmltext.c
	(reset): New function, implementation of `HTMLObject::reset()'.
	Set `color_allocated' to `FALSE' so that we don't get fooled if
	the painter changes.
	(html_text_class_init): Install the method.

	* htmltable.c
	(calc_size): Use the pixel size, dammit!

2000-04-06  Ettore Perazzoli  <ettore@helixcode.com>

	* htmlcluev.c
	(set_max_width): Set the maximum width from `max_width', not
	`o->width'!

	* htmlimage.c (get_actual_width): Calculate width based on the
	percent value using double arithmetic to avoid overflow.
	* htmlrule.c (draw): Likewise.
	* htmltable.c (calc_col_info): Likewise.
	* htmltable.c (scale_columns): Likewise.
	* htmltable.c (calc_column_widths): Likewise.
	* htmltable.c (calc_size): Likewise.

	* htmltable.c
	(scale_columns): Calculate proportions through doubles to avoid
	overflow.

2000-04-05  Radek Doulik  <rodo@helixcode.com>

	* htmlengine-edit-paste.c (split_first_clueflow_at_cursor): removed strdup

	* htmllinktext.c (split): removed strdup, set text_len to new value

	* htmltextmaster.c (get_selection): removed strdup

	* htmlengine-edit-insert.c (html_engine_insert_para): removed strdup
	(do_insert_different_style): removed strdup
	(do_insert_not_text): removed strdup

	* htmlengine.c (insert_text): removed strdup
	(create_empty_text): removed strdup
	(ensure_editable): removed strdup

	* htmltextmaster.c (html_text_master_init): new arg len
	(html_text_master_new_with_len): new constructor

	* htmltext.c (html_text_init): now uses g_str(n)dup, new arg len
	(destroy): new destructor
	(html_text_new_with_len): new constructor

2000-04-05  Larry Ewing  <lewing@helixcode.com>

	* htmltable.c (calc_size): set the table width after we have
	calculated the optimal size.  Fixes rendering of tables with
	borders (tests/test6.html).

2000-04-05  Ettore Perazzoli  <ettore@helixcode.com>

	* htmltable.c
	(calc_col_info): If the size is specified as a percent value, then
	we *don't* want to set the minimum size as the percentage of the
	maximum width!

	* htmltablecell.c
	(set_max_width): Don't set the width.

	* htmltable.c
	(set_max_width): Don't set the width.

	* htmlrule.c
	(set_max_width): Don't set the width.

	* htmlcluev.c
	(set_max_width): Don't set the width.

	* htmlcluealigned.c
	(html_cluealigned_init): Don't set the width.  Broken!

	* htmlclue.c
	(calc_min_width): Don't be stupid and don't set the minimum width
	to the current width when you are a fixed width object.
	(calc_preferred_width): Likewise for the preferred width.

	* htmlcluev.c
	(get_right_margin): Use the maximum width instead of the max
	between the maximum width and the effective one for calculating
	the margin.
	(set_max_width): Always set `max_width', even if we are a
	fixed-width object.

	* htmlengine.c
	(parse_h): Set `divAlign' according to the value of the "align="
	attribute, and save the old value through the first arg in
	`push_block'.
	(block_end_clueflow_style): Set `divAlign' from `miscData1'.
	(parse_p): Pass the current `divAlign' as the first misc arg in
	`push_block'.
	(parse_a): Likewise.
	(parse_h): Likewise.
	(draw_background): Made static.

2000-04-05  Ettore Perazzoli  <ettore@helixcode.com>

	* testgtkhtml.c
	(parse_href): Make sure `tmpurl' is always destroyed.

	* htmlcluev.c
	(do_layout): If we are doing the layout from scratch, initially
	set the width to zero.

	* htmlclue.c
	(reset): Invoke the parent class' reset implementation too.

	* htmlobject.c
	(reset): Set width, descent and ascent to zero.

	* htmltablecell.c
	(calc_min_width): Do not set the object's width.
	This is BROKEN.

	* htmltable.c
	(a_colinfo): Removed.
	(COLUMN_INFO): New, saner macro replacing it.
	(a_coltype): Removed.
	(COLUMN_TYPE): New, saner macro replacing it.
	(a_columnpos): Removed.
	(COLUMN_TYPE): New, saner macro replacing it.
	(a_columnprefpos): Removed.
	(COLUMN_PREF_POS): New, saner macro replacing it.
	(a_colspan): Removed.
	(COLUMN_SPAN): New, saner macro replacing it.
	(a_columnopt): Removed.
	(COLUMN_OPT): New, saner macro replacing it.
	(a_rowheights): Removed.
	(ROW_HEIGHT): New, saner macro replacing it.
	(calc_col_info): Consider pixel size throughout.
	(optimize_cell_width): Likewise.
	(scale_columns): Likewise.
	(calc_column_widths): Likewise.
	(calc_row_heights): Likewise.
	(calc_size): Likewise.
	(draw): Likewise.
	(html_table_new): Removed params @x, @y, @max_width.
	(html_table_init): Likewise.  Initialize `specified_width'.
	Removed broken percent handling.
	(calc_size): Use `html_object_set_max_width' instead of
	`html_table_cell_set_width()'.
	(calc_col_info): Use `specified_width' for the size.
	(calc_size): If the object has a fixed width or has a
	percent-specified size, set the width accordingly and then call
	`optimize_cell_width()'.  Otherwise, just set the width and avoid
	calling `optimize_cell_width()'.

	* htmltable.h: Renamed `ColType' to `ColumnType' and changed the
	value names so that they make more sense.  `ColInfo_t' renamed to
	`ColumnInfo'.  `RowInfo_t' renamed to `RowInfo'.  New member
	`specified_width' in `HTMLTable'.

	* htmlimage.c
	(calc_min_width): Use the pixel size when dealing with `hspace'
	and `vspace'.
	(calc_preferred_width): Likewise.
	(calc_size): Likewise.

	* htmltablecell.c
	(html_table_cell_init): Remove parameter `max_width'.  Initialize
	`fixed_width' to be zero.  Also, do not set the object's `width'
	field here.  This is BROKEN!
	(html_table_cell_new): Remove parameter `max_width'.
	(html_table_cell_set_width): Removed.
	(html_table_cell_set_fixed_width): New function.
	(calc_min_width): Use `fixed_width' instead of `maxWidth'.  Also,
	consider the pixel size as retrieved through
	`html_painter_get_pixel_size()'.

	* htmltablecell.h: New member `fixed_width' in `HTMLTableCell'.

	* htmlcluev.c
	(html_cluev_new): Removed parameter `max_width'.
	(html_cluev_init): Likewise.

	* htmlengine.c
	(parse_t): Do not suppress paragraphs after the table.

	* htmltextslave.c
	(html_text_slave_trail_space_width): Always return zero for a
	zero-length slave.

2000-04-05  Larry Ewing  <lewing@helixcode.com>

	* htmlimage.c (html_image_animation_timeout): use html_engine_draw
	instead of trying to start the painter by hand.  Make a
	delay_time == 0 behave the same as delay_time == 1 to make sure we
	have some idle time (this seems to be what netscape does too).
	(render_cur_frame): do less work now that we are only being called
	from the draw method.
	(animation_actual_height):
	(animation_actual_width): quick hacks to work around bugs in
	gdk-pixbuf, will be removed shortly.

2000-04-05  Radek Doulik  <rodo@helixcode.com>

	* htmlclueflow.c (should_break): fixed to break between text and
	non-text objects, return if it shold break after obj instead as
	before before object (this makes http://www.stjerneskolan.com more
	happy, but there remains some ?table? problems)

	* htmlengine.c (parse_b): reset to default border size

	* htmltable.c (html_table_class_init): set parent_class

2000-04-04  Radek Doulik  <rodo@helixcode.com>

	* htmlimage.c (render_cur_frame): implement
	GDK_PIXBUF_FRAME_DISPOSE, fix: fill background rectangle first

	* htmlstringtokenizer.c (html_string_tokenizer_destroy): make sure
	that buffer exists before g_free it

	* htmltextarea.c (destroy): replaced html_embedded_class with parent_class

	* htmltable.c (destroy): replaced html_object_class with parent_class

	* htmlselect.c (destroy): replaced html_embedded_class with parent_class

	* htmlimageinput.c (destroy): replaced html_embedded_class with parent_class

	* htmlembedded.c (destroy): replaced html_object_class with parent_class

	* htmlelement.c (destroy): replaced html_object_class with parent_class

	* htmlclue.c (destroy): replaced html_object_class with parent_class

	* htmlanchor.c (destroy): added call to parent_class destroy

	* htmlimage.c: don't use members of GdkPixbufAnimation directly
	and use gdk_pixbuf functions instead, so code is cleaner now
	(destroy): destroy animation structure, call parent_class destroy
	(html_image_animation_destroy): new HTMLImageAnimation destructor
	(html_image_pointer_new): new constructor
	(html_image_pointer_destroy): new detructor

2000-04-04  Larry Ewing  <lewing@helixcode.com>

	* htmlimage.c (html_image_animation_timeout): increment the
	current frame after the timeout has expired so that if there is an
	expose event before the time is out we have the proper current image.
	(render_cur_frame): fix the rendering for frame->action ==
	GDK_PIXBUF_FRAME_DISPOSE.	

2000-04-04  Ettore Perazzoli  <ettore@helixcode.com>

	* htmlengine.c
	(parse_h): Close the current flow before adding the object.

2000-04-03  Ettore Perazzoli  <ettore@helixcode.com>

	* gtkhtml.c
	(init): Initialize `scroll_timeout_id' to zero.
	(destroy): If `scroll_timeout_id' is nonzero, remove timeout of
	which it is the ID.
	(scroll_timeout_cb): New function, handling the scroll timeout.
	(setup_scroll_timeout): New function to set up the scroll timeout.
	(remove_scroll_timeout): New function to remove the scroll
	timeout.
	(motion_notify_event): If we are selecting and the mouse gets
	outside the window, set up the scroll timeout so that we allow
	scrolling during selection.
	(button_release_event): Remove the scroll timeout.
	(gtk_html_private_calc_scrollbars): Set upper limits for the
	adjustments as well.

	* gtkhtml.h: New member `scroll_timeout_id'.

2000-04-03  Radek Doulik  <rodo@helixcode.com>

	* htmltextmaster.c (calc_min_width): rewritten calculating of
	min_width, instead of calling html_painter_calc_text_width for
	each char call it for whole words

2000-04-03  Ettore Perazzoli  <ettore@helixcode.com>

	* gtkhtml.c
	(button_press_event): Clean up and re-indent a bit.

	* htmlengine.c
	(parse_i): Fix braino: make sure `valign' is set to
	`HTML_ALIGN_BOTTOM' if initially `HTML_VALIGN_NONE".

2000-04-03  Ettore Perazzoli  <ettore@helixcode.com>

	* htmltextmaster.c
	(select_range): Make sure we don't select beyond the end of the
	text.

	* gtkhtml.c
	(button_release_event): Become owner of the X11 selection if we
	were doing a mouse selection.
	(selection_get): New function.
	(selection_clear_event): New function.
	(class_init): Install them as implementation of the corresponding
	GtkWidget virtual methods.
	(init): Add "STRING" selection targets to the widget.

	* htmlengine.c
	(html_engine_goto_anchor): New param @anchor.  Made non-static,
	cleaned up a bit.
	(html_engine_get_selection_string): New function.
	
	* gtkhtml.c
	(gtk_html_jump_to_anchor): New function.

	* htmlclueflow.c
	(append_selection_string): New function,
	implementation of `HTMLObject::append_selection_string()'.
	(html_clueflow_class_init): Install it.

	* htmltextmaster.c
	(append_selection_string): New function, implementation of
	`HTMLObject::append_selection_string()'.
	(html_text_master_class_init): Install it.

	* htmlobject.c
	(append_selection_string): New function, default implementation of
	`HTMLObject::append_selection_string'
	(html_object_class_init): Install it.
	(html_object_append_selection_string): New function.

	* htmlobject.h: New virtual method `HTMLObject::append_selection_string'.

2000-04-03  Radek Doulik  <rodo@helixcode.com>

	* htmlimage.c (get_actual_width): updated to use
	GdkPixbufAnimation width
	(get_actual_height): the same
	(draw): remember image offset in HTMLImageAnimation, draw right
	frame of animation

	* htmlengine.c (html_engine_begin): stop animations from last run
	(html_engine_end): also stop animations
	(html_engine_update_event): deactivate animations before completely
	redraw

	* htmlimage.c (html_image_animation_new): contructor of
	HTMLImageAnimation
	(html_image_factory_stop_animations): removes animation timeout
	handler to stop animation
	(html_image_factory_deactivate_animations): sets
	HTMLImageAnimation::active flag to FALSE to all animations
	(html_image_animation_timeout): timeout handler - draws animation
	only if active && visible - animation drawing is now done not much
	efficiently as there is probably bug in gdk_pixbuf_composite which
	will be more efficient to use
	(render_cur_frame): workaround gdk_pixbuf_composite

	* htmlimage.h: HTMLImageAnimation structure to store some info
	about animation - it is used in HTMLImage, but only if there are
	>1 frames

	* htmlimage.c (html_image_factory_register): connect to signals
	frame_done and animation_done
	(html_image_factory_frame_done): frame_done signal handler, if
	image has >1 frames => start animation
	(html_image_factory_animation_done): animation_done - does nothing
	for now

2000-04-03  Jacob Berkman  <jacob@helixcode.com>

	* gtkhtml.c (gtk_html_get_title): return NULL if title is NULL (should
	this be a g_return_val_if_fail()?)

	* gtkhtml.[ch] (gtk_html_construct): new function so that the gtkhtml
	widget can be subclassed and used with language bindings

2000-04-02  Jonas Borgstrm  <jonas_b@bitsmart.com>

	* gtkhtml.c and testgtkhtml.c (on_button_press_event): Moved mouse wheel
	scrolling from testgtkhtml.c to gtkhtml.c.

2000-04-02  Ettore Perazzoli  <ettore@helixcode.com>

	* htmlengine.c: New value `ID_STRONG' for enum `ID'.
	(parse_s): Use `GTK_HTML_FONT_STYLE_SIZE_2' instead of just `2'.
	Implement `<strong>' and `</strong>'.
	(parse_b): Make `<big>' use `GTK_HTML_FONT_STYLE_SIZE_4' instead
	of `GTK_HTML_FONT_STYLE_SIZE_3'.

2000-04-01  Radek Doulik  <rodo@helixcode.com>

	* htmlengine.c (parse_b): add support for marginwidth and
	marginheight in the <BODY> tag

2000-04-01  Ettore Perazzoli  <ettore@helixcode.com>

	* gtkhtml.c
	(gtk_html_parse): Removed deprecated function.
	(gtk_html_private_calc_scrollbars): Renamed from
	`gtk_html_calc_scrollbars'.  

2000-04-01  Ettore Perazzoli  <ettore@helixcode.com>

	* htmlengine.c
	(current_color): Removed unused variable.

2000-04-01  Ettore Perazzoli  <ettore@helixcode.com>

	* htmlengine.c: Use `HTMLStringTokenizer' instead of
	`StringTokenizer'.

	* htmlengine.h: Use `HTMLStringTokenizer' instead of
	`StringTokenizer'.

	* htmlstringtokenizer.c: New file.
	* htmlstringtokenizer.h: New file.

	* stringtokenizer.c: Removed.
	* stringtokenizer.h: Removed.

2000-04-01  Ettore Perazzoli  <ettore@helixcode.com>

	* htmlengine.c
	(parse_p): Close the current flow on `<pre>'.

2000-03-31  Ettore Perazzoli  <ettore@helixcode.com>

	* htmlengine.c
	(parse_a): Push link color into the color stack when encountering
	a `<a>' tag.
	(close_anchor): If there is a `url' and/or a `target', pop a color
	from the color stack.

2000-04-01  Radek Doulik  <rodo@helixcode.com>

	* htmlengine.c (TIMER_INTERVAL): set TIMER_INTERVAL to 300

2000-03-31  Ettore Perazzoli  <ettore@helixcode.com>

	* htmlengine.c
	(parse_f): `</form>' opens a new paragraph too.

2000-03-31  Ettore Perazzoli  <ettore@helixcode.com>

	* htmlengine.c
	(parse_f): `<form>' also opens a new paragraph.

2000-03-31  Ettore Perazzoli  <ettore@helixcode.com>

	* htmlengine.c
	(parse_i): Handle attribute `align=center' for the `<img>' tag.

	* htmlclueflow.c
	(calc_size): Handle vertical alignment of objects properly.  Also,
	I cleaned up the code a little bit.  (But it's still painfully
	ugly.)

	* htmlimage.c
	(get_valign): New private function, implementation of
	`HTMLObject::get_valign'.  Return the value of the `valign' member
	in the `HTMLImage'.
	(html_image_class_init): Install it.
	(calc_size): Set the descent to zero.  Both horizontal borders go
	into the ascent instead.

	* htmlobject.c
	(get_valign): New private function, default implementation for
	`HTMLObject::get_valign'.  Always return `HTML_VALIGN_BOTTOM'.
	(html_object_class_init): Install it.
	(html_object_get_valign): New function.

	* htmlobject.h: New virtual method `HTMLObject::get_valign'.

	* htmlimageinput.c
	(html_imageinput_init): Create the new image with
	`HTML_VALIGN_BOTTOM' vertical alignment.

	* htmlengine.c
	(parse_i): Use the vertical alignment value as a parameter for the
	new image.  Do not put the image into an HTMLClueAligned anymore
	to make vertical alignment work.

	* htmlimage.c
	(html_image_init): New param `valign'.  Initialize the `valign'
	member from it.
	(html_image_new): New param `valign'.  Pass it to
	`html_image_init()'.

	* htmlimage.h: New member `valign' in `HTMLImage'.

2000-03-30  Ettore Perazzoli  <ettore@helixcode.com>

	* htmlimage.c
	(html_image_init): @width and @height changed to be `gint16's.
	@percent and @border changed to be `gint8's.
	(html_image_new): Likewise.

	* htmlimage.h: Changed `vspace', `hspace' and `border' to be
	`gint8's instead of `gint's.  `specified_width',
	`specified_height' changed to be `gshort's instead of `gint's.

2000-03-30  Matt Wilson  <msw@redhat.com>

	* htmlclueflow.c (should_break): protect from accessing
	master->text[-1] by checking to make sure text->text_len > 0

	* htmltextmaster.c (html_text_master_trail_space_width): protect
	from accessing text->text[-1] by checking to make sure
	text->text_len > 0

2000-03-30  Radek Doulik  <rodo@helixcode.com>

	* htmlengine.c (parse_b): added leftmargin, rightmargin, topmargin
	and bottommargin to <body ...> to make fresheat & co. happy :)

	* htmlimage.c (calc_preferred_width): added hspace
	(calc_preferred_width):  added hspace
	(calc_size): added hspace and vspace

	* htmlimage.h: added hspace, vspace image attributes - these are
	already deprecated, but for example Slashdot uses it

	* htmlengine.c: added html_image_set_spacing for HTMLImage

2000-03-29  Radek Doulik  <rodo@helixcode.com>

	* htmlimage.c (get_actual_width): updated to use
	GdkPixbufAnimation width
	(get_actual_height): the same
	(draw): remember image offset in HTMLImageAnimation, draw right
	frame of animation

	* htmlengine.c (html_engine_begin): stop animations from last run
	(html_engine_end): also stop animations
	(html_engine_update_event): deactivate animations before completely
	redraw

	* htmlimage.c (html_image_animation_new): contructor of HTMLImageAnimation
	(html_image_factory_stop_animations): removes animation timeout
	handler to stop animation
	(html_image_factory_deactivate_animations): sets
	HTMLImageAnimation::active flag to FALSE to all animations
	(html_image_animation_timeout): timeout handler - draws animation
	only if active && visible - animation drawing is now done not much
	efficiently as there is probably bug in gdk_pixbuf_composite which
	will be more efficient to use
	(render_cur_frame): workaround gdk_pixbuf_composite

	* htmlimage.h: HTMLImageAnimation structure to store some info
	about animation - it is used in HTMLImage, but only if there are
	>1 frames

	* htmlimage.c (html_image_factory_register): connect to signals
	frame_done and animation_done
	(html_image_factory_frame_done): frame_done signal handler, if
	image has >1 frames => start animation
	(html_image_factory_animation_done): animation_done - does nothing
	for now

2000-03-28  Ettore Perazzoli  <ettore@helixcode.com>

	* htmltablecell.c
	(draw_background_helper): Use `gdk_pixbuf_get_width()' and
	`gdk_pixbuf_get_height()' instead of accessing the GdkPixbuf
	fields directly.

	* htmlgdkpainter.c
	(draw_background_pixmap): Use `gdk_pixbuf_get_width()' and
	`gdk_pixbuf_get_height()' instead of accessing the GdkPixbuf
	fields directly.

	* htmlengine.c
	(draw_background): Use `gdk_pixbuf_get_width()' and
	`gdk_pixbuf_get_height()' instead of accessing the GdkPixbuf
	fields directly.

2000-03-27  Ettore Perazzoli  <ettore@helixcode.com>

	* testgtkhtml.c: Removed unused (global) variables.

	* htmltextarea.c
	(html_textarea_init): Removed unused variable.

	* htmlentity.c
	(html_entity_prepare): Made const-safe.

	* htmlentity.h
	(html_entity_prepare): Make prototype const-safe.

	* htmlgdkpainter.c: #include "htmlentity.h".

2000-03-27  Ettore Perazzoli  <ettore@helixcode.com>

	* htmlclueh.c
	(calc_size): Set the ascent even for `HTML_VALIGN_TOP'.  This is
	*not* the correct fix, but it looks better, at least on Slashdot.
	Anyway, we should not be putting images into HTMLClueH's when they
	are aligned; this simply makes it impossible to align them
	properly, because we don't know where the baseline is!  Instead,
	we should probably have an `alignment' attribute in `HTMLObject'
	`and HTMLClueFlow's flowing code should respect it.

2000-03-26  Ettore Perazzoli  <ettore@helixcode.com>

	* htmlcluev.c
	(check_point): Check that the point expressed by the @x, @y
	coordinates is actually in the object.

2000-03-26  Ettore Perazzoli  <ettore@helixcode.com>

	* htmldrawqueue.c
	(draw_obj): If the object is transparent, draw the background too.

	* htmltablecell.c
	(draw_background_helper): New helper function.
	(draw): Use it.
	(draw_background): New function, implementation of
	`HTMLObject::draw_background()'.
	(html_table_cell_class_init): Install the `draw_background'
	implementation.

	* htmlobject.c
	(is_transparent): New function, default implementation for
	`HTMLObject::is_transparent()'.
	(draw_background): New function, default implementation for
	`HTMLObject::draw_background'.
	(html_object_class_init): Install them.
	(html_object_is_transparent): New function.
	(html_object_draw_background): New function.

	* htmlobject.h: New virtual methods `is_transparent',
	`draw_background'.

2000-03-36  Jonas Borgstrm  <jonas_b@bitsmart.com>

	* htmltextarea.c (on_button_press_event): New function.
	It returns TRUE, so the events don't get passed to the parent widget.
	This makes it possible to enter text in textareas.

	* gtkhtml.c (motion_notify_event): Check if the cursor is over a form element.
	If so, don't try to select it.
	This makes the engine not selecting text when you scroll a listbox.

2000-03-26  Radek Doulik  <rodo@helixcode.com>

	* htmlclueflow.c (calc_preferred_width): remove trailing space
	width at end of line(s)
	(calc_size): same as above

	* htmltextslave.c (html_text_slave_trail_space_width): like bellow

	* htmltextmaster.c (html_text_master_trail_space_width): new
	function, returns trailing space width if it is here, otherwise 0

	* gtkhtmldebug.c (gtk_html_debug_dump_tree): also print TextSlave
	text

2000-03-26  Ettore Perazzoli  <ettore@helixcode.com>

	* htmlengine.c (insert_text): Reverted previous change, as it
	breaks spaces between normal text and links, among other things.

2000-03-26  Radek Doulik  <rodo@helixcode.com>

	* htmlcluev.c (find_free_area): choose rmargin as MAX(max_width,
	width) so centering works happily now - like on helixcode page
	(get_right_margin): the same

	* htmlobject.c (get_right_margin): same as above

	* htmlengine.c (insert_text): added trailing space eating, so we
	have no problems with longer texts later (there was problem, when
	sometimes we count them and sometimes not (Master::min_width and
	others)) */

2000-03-25  Radek Doulik  <rodo@helixcode.com>

	* gtkhtmldebug.c (gtk_html_debug_dump_tree): added width,
	max_width to HTMLObject dump and HAlign, VAlign to HTMLClue
	descendants

2000-03-25  Ettore Perazzoli  <ettore@helixcode.com>

	* htmlcluev.c
	(do_layout): Use `html_object_get_left_margin()' instead of
	`html_clue_get_left_margin()'.
	(get_left_margin): Get an `HTMLObject *' instead of an `HTMLClue
	*'.
	(get_right_margin): Likewise.

	* htmlclueh.c
	(calc_size): Use `html_object_get_left_margin()' instead of
	`html_clue_get_left_margin()'.

	* htmlclueflow.c
	(calc_size): Use `html_object_get_left_margin()' and
	`html_object_get_right_margin()' instead of
	`html_clue_get_left_margin()' and `html_clue_get_right_margin()'.

	* gtkhtml-keybinding.c: #include "gtkhtmldebug.h".

	* htmlobject.c
	(get_left_margin): New function.
	(get_right_margin): New function.
	(html_object_class_init): Install them as the default
	implementations of `get_left_margin' and `get_right_margin'.

	* htmlobject.h: Moved here.  This is not very nice, but we need to
	make it work.

	* htmlclue.c
	(get_left_margin): Removed.
	(get_right_margin): Removed.
	(html_clue_class_init): Do not install them anymore.
	(html_clue_get_left_margin): Removed.
	(html_clue_get_right_margin): Removed.

	* htmlclue.h: Removed `get_left_margin', `get_right_margin'
	methods.

	* htmltable.c
	(check_point): Do not reset `offset_return'.  (Why would you ever
	want to do that!?!?!?)
	(forall): New function, implementation of `HTMLObject::forall()'.
	(html_table_class_init): Install it.
	(set_cells): Set the cell's parent pointer.

2000-03-24  Ettore Perazzoli  <ettore@helixcode.com>

	* Makefile.am [! LIBWWW]: Do not build `testgtkhtml'.

2000-03-24  Radek Doulik  <rodo@helixcode.com>

	* htmlimage.c (html_image_factory_frame_done): I have started work
	on gif animations using gdk-pixbuf, but it seems to me, that
	progressive loading of animated gifs is still unimplemented

	* htmlcluev.c (do_layout): change width, if o->width <
	o->max_width instead of o->width > o->max_width - this made cells
	shorter than they actually was - this one fixes also moved bg
	pixmap on www.helixcode.com page and surely another ones

2000-03-23  Radek Doulik  <rodo@helixcode.com>

	* htmlclueflow.c (should_break): fixed case, when obj is on the
	beginning of clue list (it returned TRUE before, which was bad)

2000-03-23  Radek Doulik  <rodo@ucw.cz>

	* htmlclueflow.c (calc_min_width): fill HTMLObject::nb_width
	(calc_size): use HTMLObject::nb_width

	* htmlobject.h: added nb_width - width of following non-breaking
	list of objects

	* htmltextmaster.c (calc_min_width): removed run_width +=
	space_width as we don't want add spaces to minimal width

	* htmlclueflow.c (should_break): new function, decides if line
	should be broken before obj
	(calc_min_width): uses should_break function
	(calc_size):  uses should_break function

	* htmlgdkpainter.c (draw_text): uses html_entity_prepare
	(calc_text_width):  uses html_entity_prepare

	* htmlentity.c (html_entity_prepare): prepares text to
	draw/get_width - now it only replaces &nbsp; with ' '

2000-03-22  Ettore Perazzoli  <ettore@helixcode.com>

	* htmlclueflow.c (add_pre_padding): Also increment the `y' value
	if we add padding.
	(add_post_padding): Likewise.

	* htmlobject.c (relayout): Subtract `ascent + descent' from the y
	position to make the HTMLClueFlow::calc_size() code happy.  Sigh.
	This code is so ugly.

2000-03-20  Ettore Perazzoli  <ettore@helixcode.com>

	* htmlengine.c (parse_m): When parsing `content=', spaces are
	valid separators.

2000-03-20  Ettore Perazzoli  <ettore@helixcode.com>

	* gtkhtml.c (focus_out_event): Removed annoying debugging message.
	(focus_in_event): Likewise.

2000-03-18  Jonas Borgstrm  <jonas_b@bitsmart.com>

	* testgtkhtml.c (url_requested): Only use redirect filters on the
	first file requested on each page load (the main html file).

2000-03-18  Jonas Borgstrm  <jonas_b@bitsmart.com>

	This is quite a big change to htmlclueflow. Hope I didn't break anything.
	I have tested it quite some time now and I think it works great.
	And the text reflows great around the aligned topic images on slashdot.

	But don't hesitate to back out my changes if it breaks something.
	
	* htmlclueflow.c (calc_size): Use lmargin and rmargin correct. And some other
	changes to make right aligned items to reflow correctly.

	* htmlcluev.c (get_right_margin): Corrected the margin calculation.
	(find_free_area): Corrected the boundary checking.
	(append_right_aligned): Made it behave more like append_left_aligned ().
	
	* tests/bugs.html: Removed www.slashdot.org entry, it looks great now.

2000-03-17  Jonas Borgstrm  <jonas_b@bitsmart.com>

	Second attempt of fixing <br> sorry about this.
	
	* htmlengine.c (add_line_break): Only insert create_empty_text (); when
	the clue is empty.
	(new_flow): Only do html_clue_append if firstobject is non NULL.

	* tests/bugs.html: Removed www.gimp.org entry, it looks great now.

2000-03-17  Jonas Borgstrm  <jonas_b@bitsmart.com>

	* htmltextslave.c (calc_size): Backed out my previous checkin.
	It didn't handle multiple <br> after each other very well

	* tests/bugs.html: Added www.gimp.org again. With better bug desciption.

2000-03-17  Ettore Perazzoli  <ettore@helixcode.com>

	* gtkhtml.c: s/char/gchar/.
	* gtkhtml.h: Likewise.

2000-03-17  Ettore Perazzoli  <ettore@helixcode.com>

	* gtkhtml.c
	(gtk_html_get_title): New function.

2000-03-17  Ettore Perazzoli  <ettore@helixcode.com>

	* testgtkhtml.c
	(title_changed_cb): New param `title'.  Use `g_strconcat()'
	instead of `g_strdup_printf()'.

	* gtkhtml.c
	(html_engine_title_changed_cb): Updated to set the new `new_title'
	parameter in "title_changed".
	(class_init): Set up "title_changed" with a new `GTK_TYPE_STRING'
	param.

	* gtkhtml.h: Parameter `new_title' added to signal "title_changed".

2000-03-17  Jonas Borgstrm  <jonas_b@bitsmart.com>

	* htmltextslave.c (calc_size): Set ascent and descent
	to zero if the width also is zero. This helps <br> not make to much space.

	* tests/bugs.html: Removed www.gimp.org entry, it looks great now.

2000-03-17  Jonas Borgstrm  <jonas_b@bitsmart.com>

	* htmlengine.c (parse_p): Handle <p align=xxx>.
	
	* tests/bugs.html: Removed gtk.themes.org entry, it looks great now.
	  Removed www.gnome.org entry, it looks ok now.

2000-03-13  Dan Winship  <danw@helixcode.com>

	* htmlengine.c (html_engine_end): don't call gtk_timeout_remove if
	no timer is set.

2000-03-13  Ettore Perazzoli  <ettore@helixcode.com>

	* htmlengine-edit-paste.c
	(remove_slaves_at_cursor): New helper function.
	(html_engine_paste): Call it before manipulating the text.

	* htmlclueflow.c
	(html_clueflow_remove_text_slaves): New function.

	* htmlengine-edit-paste.c
	(merge_possibly): New helper function.
	(html_engine_paste): Use it to merge the first and last pasted
	objects with their neighbours.

	* gtkhtml-keybinding.c
	(handle_none): Cause `GDK_F12' to dump the tree.

	* htmlengine-edit-cut.c
	(cursor_at_end_of_region): New function to detect if the cursor is
	at the end or the beginning of the selected region.
	(html_engine_cut): Use `cursor_at_end_of_region' to find out if we
	actually need to move the cursor back; if not, don't move the
	cursor.

	* htmlengine.c
	(add_line_break): Just create a new flow.  I hope this won't break
	anything.

	* htmlclueflow.c
	(halign_to_string): New helper function.
	(save): Use it to write a `DIV' tag to align the paragraph
	properly.

2000-03-13  Ettore Perazzoli  <ettore@helixcode.com>

	* htmlengine-save.c
	(write_header): Do not write a `<title>' tag
	if there is no title.  This also prevents a segfault.

2000-03-12  Ettore Perazzoli  <ettore@helixcode.com>

	* htmltextmaster.c
	(get_selection): Use the `size_return' parameter properly.

	* htmlobject.c
	(get_selection): New parameter `size_return'.  Set `*size_return'
	to 1 before returning.
	(html_object_get_selection): New parameter `size_return'.

	* htmlobject.h: New parameter `size_return' in
	`HTMLObject::get_selection'.

	* htmlengine-edit-cut.c
	(html_engine_cut): Implemented, by means of
	`html_engine_move_cursor()' and `html_engine_delete()'.

	* htmlengine-edit-copy.c
	(copy): New helper function.
	(html_engine_copy): Return value changed to `guint': return the
	length of the cut buffer.  Rewritten to use the `copy' helper
	function.
	(html_engine_copy_to_buffer): New function.

2000-03-12  Ettore Perazzoli  <ettore@helixcode.com>

	* htmlengine-edit-delete.c
	(html_engine_delete): Prevent bogus deletion of `destroy_orig'
	caused by using `->next' instead of `html_object_next_not_slave()'.

	* htmlengine-edit-insert.c
	(do_insert_different_style): Use `html_object_prev_not_slave()'.

	* htmlengine-edit-delete.c
	(delete_same_parent): Use `html_object_next_not_slave()'.
	(delete_different_parent): Likewise.
	(merge_text_at_cursor): Likewise.
	(html_engine_delete): Likewise.

	* htmlcursor.c
	(forward): Use `html_object_next_not_slave()' instead of
	`next_not_slave'.
	(next_not_slave): Removed.
	(html_cursor_get_current_char): Likewise.

	* htmlobject.c
	(html_object_is_text): Added precondition (@object != NULL).
	(html_object_next_not_slave): New function.
	(html_object_prev_not_slave): New function.

	* htmlcursor.c
	(normalize): New helper function.
	(html_cursor_normalize): Rewritten by means of it.
	(html_cursor_jump_to): Use it to normalize @object and @offset.
	(html_cursor_get_current_char): Get the next non-`HTMLTextSlave'
	element instead of just the next element.

	* gtkhtml.c
	(init): Initialize `ibeam_cursor'.
	(destroy): Destroy `ibeam_cursor'.
	(motion_notify_event): Change the cursor to the ibeam on text
	elements, or if we are on a link text element and editing is
	enabled.

	* gtkhtml.h: New member `ibeam_cursor' in `GtkHTML'.

2000-03-12  Ettore Perazzoli  <ettore@helixcode.com>

	* gtkhtml.c
	(size_allocate): Recalculate size and toolbars only if the size
	has changed.

	* htmlclueflow.c
	(check_point): Fix clicking in the blank area on top/left of the
	HTMLClueFlow.

2000-03-12  Ettore Perazzoli  <ettore@helixcode.com>

	* htmlengine-edit-cursor.c
	(html_engine_hide_cursor): Draw the cursor only if the engine is
	editable.
	(html_engine_show_cursor): Likewise.

	* htmldrawqueue.c
	(draw_obj): Draw the cursor only if the engine is editable.
	(clear): Likewise.

2000-03-12  Ettore Perazzoli  <ettore@helixcode.com>

	* htmltextmaster.c
	(check_point): Do not make the offset be greater than the string's
	length.

	* htmlclueflow.c
	(check_point): New function, implementation of
	`HTMLObject::check_point'.
	(html_clueflow_class_init): Install it.

	* htmltextmaster.c
	(check_point): Consider an object to be on a new line by comparing
	the y coordinate too.

	* htmlengine.c
	(html_engine_get_object_at): If `for_cursor', clip the coordinates
	to the cluev's area.

2000-03-09  Ettore Perazzoli  <ettore@helixcode.com>

	* gtkhtml.c
	(focus_in_event): Give the engine the focus with
	`html_engine_set_focus()'.
	(focus_out_event): Remove the focus from the engine with
	`html_engine_set_focus()'.

	* htmlengine.c
	(html_engine_set_focus): New function.

	* htmlengine.h: New member `have_focus' in `HTMLEngine'.

	* gtkhtml.c
	(destroy): Argh!  Destroy the `HTMLEngine'!

	* gtkhtml-keybinding.c
	(gtk_html_handle_key_event): If the key event is handled, reset
	the blinking cursor with `html_engine_reset_blinking_cursor()'.

	* htmlengine.c
	(html_engine_init): Initialize `blinking_timer_id'.
	(html_engine_destroy): If `blinking_timer_id' is nonzero, remove
	the corresponding timeout.
	(html_engine_set_editable): If the engine becomes editable, call
	`html_engine_setup_blinking_cursor()'.  If it beomes non editable,
	call `html_engine_stop_blinking_cursor()'.

	* htmlengine-edit-cursor.c
	(html_engine_setup_blinking_cursor): New function.
	(html_engine_stop_blinking_cursor): New function.
	(html_engine_reset_blinking_cursor): New function.
	(blink_timeout_cb): New static function that implements cursor
	blinking.

	* htmlengine.h: New members `blinking_timer_id', `blinking_status'
	in `HTMLEngine'.

	* htmldrawqueue.c
	(draw_obj): Don't draw objects whose width and/or height is zero.

	* htmlengine.c
	(html_engine_draw_cursor): Removed.
	(html_engine_flush_draw_queue): Don't call it anymore.  Added
	precondition: `e' must be an HTMLEngine.
	(html_engine_queue_draw): Added precondition: `e' must be an
	HTMLEngine.

	* htmlengine-edit-movement.c
	(html_engine_move_cursor): Use `html_engine_{hide,show}_cursor()'
	instead of `html_engine_draw_cursor()'.
	(html_engine_jump_to_object): Likewise.
	(html_engine_beginning_of_document): Likewise.
	(html_engine_end_of_document): Likewise.
	(html_engine_beginning_of_line): Likewise.
	(html_engine_end_of_line): Likewise.
	(html_engine_scroll_down): Likewise.
	(html_engine_scroll_up): Likewise.
	(html_engine_forward_word): Likewise.
	(html_engine_backward_word): Likewise.

	* htmlengine-edit-delete.c
	(html_engine_delete): Use `html_engine_{hide,show}_cursor()'
	instead of `html_engine_draw_cursor()'.

	* htmlengine-edit-insert.c
	(html_engine_insert_para): Use `html_engine_{hide,show}_cursor()'
	instead of `html_engine_draw_cursor()'.

	* htmlengine-edit-inster.c
	(html_engine_insert): Use `html_engine_{hide,show}_cursor()'
	instead of `html_engine_draw_cursor()'.

	* htmlengine-edit-cursor.c
	(html_engine_draw_cursor_in_area): Moved here from `htmlengine.c'.
	Do not draw anything if `cursor_hide_count' is greater than zero.
	(html_engine_show_cursor): New function.
	(html_engine_hide_cursor): New function.

	* htmlengine-edit-cursor.h: New file.
	* htmlengine-edit-cursor.c: New file.

	* htmlengine.c
	(html_engine_draw_cursor_in_area): Removed.
	(html_engine_init): Initialize `cursor_hide_count' to zero.

	* htmlengine.h: New member `cursor_hide_count' in `HTMLEngine'.

	* htmldrawqueue.c
	(clear): Draw the cursor in the cleared area.
	(draw_obj): Likewise.

2000-03-08  Ettore Perazzoli  <ettore@helixcode.com>

	* htmldrawqueue.c
	(html_draw_queue_flush): Flush the clearing queue before the
	drawing one.

	* htmlclueflow.c
	(relayout_and_draw): Removed.
	(relayout_for_level_change): New helper function.
	(html_clueflow_indent): Just return if `indentation' is zero.
	Avoid doing a relayout if indentation does not change.  Use
	`relayout_for_level_change'.
	(html_clueflow_set_style): Use `html_object_relayout ()' instead
	of `relayout_and_draw()'.
	(html_clueflow_set_halignment): Likewise.
	(html_clueflow_set_properties): Likewise.

	* htmlcluev.c
	(do_layout): New parameter `engine'.  New parameter `relayout'.  If
	true, use `html_object_relayout()' instead of
	`html_object_calc_size()'.
	(relayout): If `child' is NULL, use `head'.

2000-03-08  Ettore Perazzoli  <ettore@helixcode.com>

	* htmlengine.c
	(block_end_quote): Use `HTMLEngine' member `indent_level' instead
	of `list_level', `quote_level'.
	(block_end_list): Likewise.
	(parse_table): Likewise.
	(parse_b): Likewise.
	(parse_d): Likewise.
	(parse_l): Likewise.
	(parse_o): Likewise.
	(parse_u): Likewise.
	(html_engine_init): Likewise.
	(ensure_editable): Updated for `html_clueflow_new()'.

	* htmlengine-edit-clueflowstyle.c: Removed members `quote_level',
	`list_level' in `OriginalClueFlowProps'; replaced them with a
	single `level' member.
	(get_props): Updated accordingly.
	(set_props): Likewise.
	(html_engine_get_current_clueflow_indentation): Just use the
	`level' member in `HTMLClueFlow' instead of the old `list_level'
	and `quote_level'.

	* gtkhtmldebug.c
	(gtk_html_debug_dump_tree): Print `level' instead of `quote_level'
	and `list_level' that do not exist anymore.

	* htmlclueflow.c
	(copy): Copy `level'.  Don't copy `list_level' and `quote_level'
	anymore as they are gone.
	(add_pre_padding): Updated to use `level' instead of
	`list_level'/`quote_level'.
	(add_post_padding): Likewise.
	(draw): Use `level' instead of `list_level'.
	(write_indentation_tags): Use `last_level' in
	`HTMLEngineSaveState' instead of `last_quote_level',
	`last_list_level'.
	(html_clueflow_init): Removed parameters `quote_level',
	`indent_level'.  Only get a generic `level' parameter instead.
	(html_clueflow_new): Likewise.
	(html_clueflow_set_properties): Likewise.
	(html_clueflow_get_properties): Likewise for `list_level_return'
	and `quote_level_return'.
	(html_clueflow_split): Updated accordingly.
	(html_clueflow_indent): Simply increase/decrease `level'.

	* htmlengine-save.c
	(html_engine_save): Initialize `last_level' instead of
	`last_quote_level' and `last_list_level', that don't exist
	anymore.

	* htmlengine-save.h: Members `last_quote_level',
	`last_list_level' in `HTMLEngineSaveState' removed.  New member
	`last_level'.

	* htmlclueflow.h: Members `quote_level' and `list_level' removed
	from `HTMLClueFlow'.  New member `level' which is used for both
	lists and blockquotes.

	* gtkhtml.c
	(update_styles): Use `html_engine_get_editable' instead of the
	`editable' member that does not exist anymore.
	(key_press_event): Likewise.
	(motion_notify_event): Likewise.
	(button_press_event): Likewise.
	(gtk_html_get_editable): Likewise.
	(init): Do not init `editable' anymore.
	(gtk_html_end): Do not call `html_engine_set_editable()' anymore.
	(gtk_html_set_editable): Inconditionally call
	`html_engine_set_editable()'.
	(gtk_html_begin): Do not make the engine non-editable anymore.

	* gtkhtml.h: Removed member `editable'.

	* htmlengine.c
	(html_engine_set_editable): Added preconditions.
	(html_engine_get_editable): New function.
	(html_engine_end): Make sure the thing is editable if `editable'
	is true, by calling `ensure_editable()'.

	* htmlengine.c
	(html_engine_end): Just before emitting the "load_done" signal,
	call `html_engine_timer_event()' repeatedly, until it returns
	FALSE: this way, we make sure all the pending text is parsed.
	Then remove the timeout, as it is not necessary anymore.
	(html_engine_stop_parser): Reset `timerId'.

	* htmlengine-edit-movement.c
	(html_engine_jump_to_object): Normalize cursor after changing it.

	* htmlengine.c
	(html_engine_unselect_all): Do not traverse the whole tree if we
	are sure there is no current selection [`active_selection' is
	FALSE].

2000-03-07  Elliot Lee  <sopwith@redhat.com>
	
	* htmlbutton.c, htmlcheckbox.c, htmlengine-save.c,
	 htmlgdkfontmanager.c, htmlgdkpainter.c htmlhidden.c,
	 htmlprintfontmanager.c, htmlradio.c, htmltext.c, htmltextinput.c,
	 htmltextmaster.c: #include <string.h>

2000-03-07  Ettore Perazzoli  <ettore@helixcode.com>

	* gtkhtml.c
	(gtk_html_calc_scrollbars): Do not set lower/upper limits for the
	toolbars explicitly anymore. Also, do not use
	`gtk_layout_set_size()' if the size has not actually changed.

	* gtkhtml-keybinding.c
	(page_up): Unselect all.
	(page_down): Likewise.
	(forward_word): Likewise.
	(backward_word): Likewise.
	(beginning_of_document): New function.
	(end_of_document): New function.
	(gtk_html_handle_key_event): Do not care about the shift status
	when dispatching to `handle_ctrl()' or `handle_alt()'.
	(handle_ctrl): Map `GDK_Home' to `beginning_of_document()',
	`GDK_End' to `end_of_document()'.
	(handle_alt): Map `<' to `beginning_of_document()' and `>' to
	`end_of_document()'.

	* htmlcursor.c
	(html_cursor_beginning_of_document): New function.
	(html_cursor_end_of_document): New function.

	* htmlengine-edit-movement.c
	(html_engine_beginning_of_document): New function.
	(html_engine_end_of_document): New function.

	* htmlengine-edit-insert.c
	(do_insert_different_style): Don't crash if there is no previous
	non-HTMLTextSlave element.

	* htmlengine.c
	(ensure_editable): New helper function.
	(html_engine_load_empty): Use it.  Basically, we now start/stop
	the parser and call `ensure_editable()' to make sure the resulting
	thing is editable correctly.
	(html_engine_set_editable): If the engine is now editable, make
	sure it can actually be edited with `ensure_editable()'.
	(html_engine_set_base_url): Removed.
	(parse_b): Emit signal directly, instead of using
	`html_engine_set_base_url()'.

	* htmlcluev.c
	(relayout): Always queue a clear when needed, even if we have no
	parents.

	* htmlobject.c
	(relayout): Always queue a clear when needed, even if we have no
	parents, as the new relayout logic requires this.

2000-03-06  Ettore Perazzoli  <ettore@helixcode.com>

	* htmlengine-edit-delete.c (html_engine_delete): Call
	`html_cursor_normalize()' on exit.

	* htmlcursor.c (html_cursor_normalize): New function.  If the
	cursor points to an object's zero offset and there is an object
	before this one, we change the pointer to point to the object
	before it, and the offset to the size of the object.

	* htmlengine-edit-delete.c (html_engine_delete): Argh.  Initialize
	`orig_object' and `orig_offset' at the right time.

2000-03-03  Ettore Perazzoli  <ettore@helixcode.com>

	* htmlengine-edit-delete.c (html_engine_delete): Move to the next
	object without changing the actual position if we are at the very
	end of a text object, and this is not the last object.

	* htmlcursor.c (forward): When choosing between an object and the
	next one, choose the first one.
	(backward): Likewise.

	* htmlengine-edit-insert.c (do_insert): Play with the cursor
	pointer so that it points to an adiacent text object if possible.
	Otherwise, just call `do_insert_not_text()'.
	(do_insert_not_text): Implemented.

	* gtkhtml.c (update_styles): Do nothing if the widget is not
	editable.

	* htmlengine.c (html_engine_init): Initialize `editable' to be
	FALSE.

	* testgtkhtml.c (main): After creating the HTMLwidget, invoke
	`gtk_html_load_empty' on it.

	* gtkhtml.c (gtk_html_load_empty): New function.

	* htmlengine.c (html_engine_load_empty): New function.

2000-03-01  Ettore Perazzoli  <ettore@helixcode.com>

	* gtkhtml-keybinding.c
	(forward_word): New private function.
	(backward_word): New private function.
	(handle_alt): Map `M-f' and `M-b' to `forward_word' and
	`backward_word', respectively.
	(handle_ctrl): Map `C-Right' and `C-Left' to `forward_word' and
	`backward_word', respectively.

	* htmlengine-edit-movement.c
	(html_engine_forward_word): New function.
	(html_engine_backward_word): New function.

	* htmlcursor.c
	(html_cursor_goto_zero): More preconditions.
	(html_cursor_get_current_char): New function.

	* htmlengine-edit-fontstyle.c (merge_safely): Update the cursor
	offset if the cursor is in the object we are merging and we are
	prepending.

	* htmltextmaster.c (merge): Ooops.

	* htmlengine-edit-movement.c
	(html_engine_scroll_down): New function.
	(html_engine_scroll_up): New function.

2000-02-28  Paolo Molaro  <lupus@linuxcare.com>

	* gtkhtml.c: use GTK_TYPE_OBJECT instead of GTK_TYPE_POINTER
	  in signal creation for args that are objects.

2000-02-28  Larry Ewing  <lewing@helixcode.com>

	* htmlengine.c (parse_table): parse <th> correctly so that we
	don't end up with spurious blocks which cause cells to grow.

2000-02-27  Larry Ewing  <lewing@helixcode.com>

	* htmlimage.c (calc_preferred_width): return the width we calculate not
	the pixel_size.

	* htmltextslave.c (fit_line): eat up space we find at the start of lines.

2000-02-27  Ettore Perazzoli  <ettore@helixcode.com>

	* gtkhtml-keybinding.c (beginning_of_line): New function.
	(end_of_line): New function.
	(handle_ctrl): `C-a' moves to the beginning of the current line;
	`C-e' to the end.
	(handle_none): `GDK_Home' moves to the beginning of the current line;
	`GDK_End' to the end.

	* htmlengine-edit-movement.c (html_engine_end_of_line): New function.
	(html_engine_beginning_of_line): New function.

	* htmlengine-edit-movement.c: New file.
	* htmlengine-edit-movement.h: New file.

	* htmlcursor.c (html_cursor_end_of_line): New function.
	(html_cursor_beginning_of_line): New function.

	* htmlengine-edit.c (html_engine_jump_to_object): Removed.
	(html_engine_move_cursor): Removed.
	(html_engine_jump_at): Removed.

	* gtkhtml.c (key_press_event): Use `gtk_html_handle_key_event()'
	from `gtkhtml-keybinding.c'.

	* gtkhtml-keybinding.c: New file.
	* gtkhtml-keybinding.h: New file.

	* htmlengine-edit-delete.c: New file.
	* htmlengine-edit-delete.h: New file.

	* htmlengine-edit.c (html_engine_delete): Removed.

	* htmlengine-edit-fontstyle.c (split_safely): New helper function.
	This splits text and makes sure that the cursor's object pointer
	and offset are still valid after the split.
	(set_font_style_in_selection_forall): Use it.
	(set_font_style_in_selection_forall): Likewise.

	* htmlengine-edit-insert.c (html_engine_insert_para): Calc size on
	the two halves of the paragraph that gets splitted.

	* htmlcluev.c (do_layout): New helper function.
	(calc_size): Use it.
	(relayout): New function, implementation of
	`HTMLObject::relayout'.  It uses `do_layout', and relayouts
	objects in the clue without recalculating the size for each of
	them.
	(html_cluev_class_init): Install the new `relayout'
	implementation.

2000-02-26  Larry Ewing  <lewing@helixcode.com>

	* htmlclueh.c (calc_size): for HTML_VALIGN_TOP the clue->descent
	should be incremented rather than the clue->ascent to get the
	correct flow in the the remaining items.

2000-02-26  Ettore Perazzoli  <ettore@helixcode.com>

	* htmlengine-edit-paste.c (html_engine_paste) [! PARANOID_DEBUG]:
	Removed ultra-verbose debugging messages.

	* gtkhtml.c (class_init): Setup
	"current_paragraph_alignment_changed".
	(update_styles): Emit it if the current paragraph alignment is
	changed.
	(init): Initialize `paragraph_alignment' to
	`GTK_HTML_PARAGRAPH_ALIGNMENT_LEFT'.
	(gtk_html_align_paragraph): New function.
	(paragraph_alignment_to_html): New helper function.
	(html_alignment_to_paragraph): New helper function.
	(gtk_html_cut): New function.
	(gtk_html_copy): New function.
	(gtk_html_paste): New function.
	(gtk_html_undo): New function.
	(gtk_html_redo): New function.
	(key_press_event): Use `gtk_html_{cut,copy,paste,undo,redo}'
	instead of `html_engine_{cut,copy,paste,undo,redo}'.

	* gtkhtml.h: New enum `GtkHTMLParagraphAlignment'. New signal
	"current_paragraph_alignment_changed".  New member
	`paragraph_alignment' in `GtkHTML'.

	* htmlengine-edit-clueflowstyle.c
	(html_engine_get_current_clueflow_alignment): New function.

	* gtkhtml.h: New enum `GtkHTMLParagraphAlignment'.

	* gtkhtml.c (update_styles): Emit "paragraph_indentation_changed"
	if the indentation changes.
	(class_init): Setup "paragraph_indentation_changed".
	(init): Initialize `paragraph_indentation' to 0.
	(gtk_html_indent): New functon.

	* gtkhtml.h: New signal "paragraph_indentation_changed".  New
	member `paragraph_indentation' in `GtkHTML'.

	* htmlengine-edit-clueflowstyle.c
	(html_engine_set_clueflow_style): New parameters `indentation',
	`alignment', `mask'.
	(set_clueflow_style_in_region_redo): Likewise.
	(set_clueflow_style): Likewise.  Handle indentation.
	(html_engine_get_current_clueflow_indentation): New function.

	* htmlclueflow.c (html_clueflow_indent): New function.
	(html_clueflow_set_halignment): New function.
	(html_clueflow_set_properties): New function.
	(html_clueflow_get_properties): New function.

	* htmlclueflow.c (write_indentation_tags_helper): New helper
	function.
	(write_indentation_tags): New helper function.
	(save): Use it to write the proper indentation tags.  Also, output
	a BR for everything except headers and paragraphs containting
	rulers.

	* htmlengine-save.c (html_engine_save): Initialize
	`last_quote_level' and `last_list_level' in the
	`HTMLEngineSaveState' struct to zero.

	* htmlengine-save.h: New members `last_quote_level' and
	`last_list_level' in `HTMLEngineSaveState'.

	* htmltextmaster.c (split): Set `select_length' and `select_start'
	to zero in the new element.

2000-02-25  Ettore Perazzoli  <ettore@helixcode.com>

	* htmlengine-edit-insert (html_engine_insert_para): Removed some
	bogocode.

	* htmltext.c (split): Do return empty text elements if cutting at
	the very beginning or the very end of the object.
	* htmltextmaster.c (split): Likewise.

	* htmlengine-edit-fontstyle.c (set_font_style_in_selection) [!
	PARANOID_DEBUG]: Disabled debugging messages.

	* htmlobject.c (relayout): Do not relayout everything if the size
	did not change.

	* gtkhtml.c (update_styles): Use
	`html_engine_update_insertion_font_style()'.
	(key_press_event): Don't update the style when inserting text.

	* htmlengine-edit-fontstyle.c
	(html_engine_get_current_insertion_font_style): Removed.
	(html_engine_update_insertion_font_style): New function.

2000-02-24  Ettore Perazzoli  <ettore@helixcode.com>

	* gtkhtml.c (cleanup_selection_and_style): New helper function.
	(key_press_event): Use it when moving the cursor around.

	* htmlengine-edit-insert.c (do_insert_different_style): Handle the
	`offset == 0' case correctly.

	* htmlvspace.c (calc_size): Updated to return the boolean value.

	* htmltextmaster.c (calc_size): Always return FALSE.

	* htmltext.c (calc_size): Updated to return the boolean value.

	* htmltable.c (calc_size): Updated to return the boolean value.

	* htmlcluev.c (calc_size): Updated to return the boolean value.

	* htmlclueh.c (calc_size): Updated to return the boolean value.

	* htmlclueflow.c (calc_size): Updated to return the boolean value.

	* htmlcluealigned.c (calc_size): Updated to return the boolean
	value.

	* htmlclue.c (calc_size): Updated to return the boolean value.

	* htmlobject.c (relayout): Use the return value from
	`html_object_calc_size()' to decide if the element needs to be
	redrawn.
	(calc_size): Updated to return the boolean value.

	* htmlobject.h: Make `HTMLObject::calc_size' return a gboolean.
	If true, it means that the object has changed and needs to be re
	laid out and redrawn for interactive editing.

2000-02-24  Larry Ewing  <lewing@helixcode.com>

	* htmltable.c (calc_column_widths): fix a typo by replacing
	cell->padding with cell->spacing in the original calculation.
	
	* htmlgdkpainter.c (draw_pixmap): rewrite the clipping code to use
	irect_intersect.
	(draw_background_pixmap): use gdk_pixbuf_render_to_drawable_alpha
	to get proper alpha clipping.
	(create_temporary_pixbuf): remove x and y args and the associated
	checking because they are no longer needed.
	
	* htmltablecell.c (draw): properly discount cell->padding for the
	background color and pixmap.  If a background color is set paint
	it even if a background pixmap is set so that we have the correct
	background for the transparent regions.

2000-02-24  Ettore Perazzoli  <ettore@helixcode.com>

	* htmlclue.c (html_clue_append_after): Added preconditions.

	* htmltext.c (insert_text): Do not relayout the parent if it's
	NULL.

	* htmlengine-edit.c (html_engine_insert_para): Removed.
	(html_engine_insert): Removed.
	* htmlengine-edit-insert.c: Moved here, with the related helper
	functions.

	* htmlengine-edit-insert.h: New file.
	* htmlengine-edit-insert.c: New file.

	* gtkhtml.c (button_release_event): If ending a selection, update
	the style status.

	* htmlengine-edit-fontstyle.c
	(get_font_style_from_selection_forall): New helper function.
	(get_font_style_from_selection): New helper function; it
	calculates the attributes to display in the editor when a region
	is selected.
	(html_engine_get_current_insertion_font_style): Use it when we
	have an active selection.

	* gtkhtml.c (key_press_event): Unselect all when moving, inserting
	or deleting stuff.
	(motion_notify_event): Move the insertion cursor where the pointer
	is if the engine is editable.

	* htmlengine-edit-fontstyle.c (merge_safely): New function to
	merge, destroy and update the cursor if necessary.
	(merge_backward): Use it.
	(merge_forward): Likewise.

	* htmlengine-edit-fontstyle.c (merge_backward): Merge with
	`prepend' set to TRUE so that we don't destroy the current object.

	* htmltextmaster.c (merge): Match the new `HTMLText::merge'.

	* htmltext.c (html_text_merge): Match the new `HTMLText::merge'.
	(merge): Likewise.  Added precondition: the two objects must have
	the same type.

	* htmltext.h: New arg `prepend' to `HTMLText::merge'.  Take a
	single object instead of a list as a parameter.

2000-02-23  Ettore Perazzoli  <ettore@helixcode.com>

	* htmllinktextmaster.c (split): Rewritten to use
	`html_text_split()'.

	* htmltextmaster.c (split): Rewritten to use `html_text_split()'.

	* htmltext.c (split): Instead of creating the new item with
	`html_text_master_new()', use `g_malloc()' and the `size' member
	in the class description struct; then initialize with
	`html_text_master_init()'.  This way, it's easier to derive the
	method in the subclass.

2000-02-22  Ettore Perazzoli  <ettore@helixcode.com>

	* htmlengine-edit-fontstyle.c (merge_forward): Do not to attempt
	to merge with elements that are not of the same type.
	(merge_backward): Likewise.

2000-02-22 Elliot Lee  <sopwith@redhat.com>

	* htmlimageinput.c, htmllinktext.c, htmlselect.c, htmlsettings.c,
	  htmltable.c, htmltextarea.c: #include <string.h>

2000-02-22  Ettore Perazzoli  <ettore@helixcode.com>

	* gtkhtml.c (key_press_event): Do not update styles if the
	keypress was not handled.
	(update_styles): Kick me.

	* htmlengine-edit-fontstyle.c
	(html_engine_get_current_insertion_font_style): A
	`GTK_HTML_FONT_STYLE_DEFAULT' is always overridden by the
	element's font style.

	* gtkhtml.c (class_init): Set up signal
	"insertion_font_style_changed".
	(update_styles): Deal with the font style too.

	* gtkhtml.h: New signal "insertion_font_style_changed".  New
	member `insertion_font_style'.

2000-02-21  Ettore Perazzoli  <ettore@helixcode.com>

	* htmlengine.c (html_engine_update_event): Do not draw if the
	painter is not realized.  This is a quick and dirty fix, I am not
	sure what is going on in here.

	* htmlgdkpainter.c (html_gdk_painter_realized): New function.

	* htmltext.c (check_merge): New function, implementation of
	`HTMLText::check_merge'.
	(html_text_class_init): Install it.

	* htmltext.h: New virtual method `HTMLText::check_merge'.

	* htmlengine-edit-fontstyle.c (html_engine_set_font_style):
	Changed parameters: get an AND mask and an OR mask for modifying
	the style.
	(set_font_style_in_selection_forall): Use a SetFontStyleForallData
	closure, so that we can store both masks.
	(set_font_style_in_selection): Likewise.
	* gtkhtml.c (gtk_html_set_font_style): Likewise.

	* htmltextmaster.c (merge): Completed code to preserve selection
	when merging.
	(split): Preserve selection here too.

	* htmlengine-edit-fontstyle.c
	(set_font_style_in_selection_forall): Make it work.

	* htmlembedded.c (html_embedded_grab_cursor): Removed spurious
	debugging message.

	* gtkhtml.c (gtk_html_allow_selection): New function.
	(init): Initialize `allow_selection' to TRUE.
	(button_press_event): Do not grab the pointer if `allow_selection'
	is FALSE.
	(realize): Removed spurious `g_message()'.

	* gtkhtml.h: New member `allow_selection'.

	* htmllinktext.c (html_link_text_new): Get rid of some
	ultra-verbose debugging messages.

	* All files: use the new `gtk_html_debug_log()' call instead of
	plain `g_print()'.

	* htmlcursor.c (debug_location): Always compile this in,
	unconditionally.  At least for now.  Also, new parameter `html':
	use `gtk_html_debug_log()'.

2000-02-20  Ettore Perazzoli  <ettore@helixcode.com>

	* debug.h: Renamed to `gtkhtmldebug.h'.
	* debug.c: Renamed to `gtkhtmldebug.c'.

	* gtkhtml.c (gtk_html_enable_debug): New function.

	* gtkhtml.h: New member `debug' in `GtkHTML'.

2000-02-19  Ettore Perazzoli  <ettore@helixcode.com>

	* htmlfontstyle.h, htmlfontstyle.c: Removed.
	* gtkhtmlfontstyle.h, gtkhtmlfontstyle.c: New replacements.  We
	now use `GtkHTMLFontStyle' instead of `HTMLFontStyle' throughout,
	so that the values can be exposed to the API.

	* gtkhtml.c (font_style_to_internal): New helper function.
	(gtk_html_set_font_style): New function.

	* gtkhtml.h: New enum `GtkHTMLFontStyle'.

	* htmlengine-edit-fontstyle.c: New file.
	* htmlengine-edit-fontstyle.h: New file.

	* htmlengine-edit-paste.c: #include "debug.h".

2000-02-20  Jonas Borgstrm  <jonas_b@bitsmart.com>

	* htmlclueflow.c (calc_min_width): Don't do any wrapping with the 
	HTML_CLUEFLOW_STYLE_NOWRAP style.

	* htmlclueflow.h: Added new style HTML_CLUEFLOW_STYLE_NOWRAP.

	* htmlengine.c (parse_table): Use style HTML_CLUEFLOW_STYLE_NOWRAP on
	tablecells with the "nowrap" keyword.

	* htmltextmaster.c (calc_min_width): Don't do any wrapping with the 
	HTML_CLUEFLOW_STYLE_NOWRAP style.

	* testgtkhtml.c: Added tests/test11.html.

	* tests/test1.html: New testcase for tables with the "nowrap" keyword.	
	
2000-02-20  Jonas Borgstrm  <jonas_b@bitsmart.com>
	
	* htmlcheckbox.c (encode): New function.
	(html_checkbox_init): Set value to "on" if it's NULL.
	Use ftk_check_button instead of gtk_toggle_button.
	
	* htmlengine.c (parse_input): Pass &e->form->radio_group to html_radio_new ().
	
	* htmlform.c (html_form_new): Initialize form->radio_group to ZERO.
	
	* htmlform.h: (GSList *radio_group) new member, it is used by the radio 
	buttons on the form.

	* htmlradio.c (encode): New function.
	(html_radio_new, html_radio_init): New argument: GSList **radio_group.
	(html_checkbox_init): Set value to "on" if it's NULL.

	* htmlradio.h: Changed the arguments for html_radio_new and html_radio_init.

	* tests/test9.html: Added <imput type=radio> Testcase.


2000-02-19  Ettore Perazzoli  <ettore@helixcode.com>

	* htmltext.c (html_text_set_font_style): New function.
	(html_text_set_color): New function.
	(set_font_style): New function, implementation of
	`HTMLText::set_font_style'.
	(set_color): New function, implementation of
	`HTMLText::set_color'.
	(html_text_class_init): Install implementations.

	* htmltext.h: New virtual methods `HTMLText::set_color' and
	`HTMLText::set_font_style'.

	* htmltextmaster.c (merge): New function, implementation of
	`HTMLText::merge'.

	* htmltext.c (merge): New function, default (non) implementation
	of `HTMLText::merge()'.
	(html_text_class_init): Install it.

	* htmltext.h: New virtual method `HTMLText::merge'.

	* htmlengine.h: New member `insertion_font_style'.

	* htmlengine-edit-styles.c: Renamed to `htmlengine-edit-styles.c'.
	* htmlengine-edit-styles.h: Renamed to `htmlengine-edit-styles.h'.

2000-02-16  Ettore Perazzoli  <ettore@helixcode.com>

	* gtkhtml.c (key_press_event): Temporarily bind `GDK_F3' to
	"cut", `GDK_F4' to "copy" and `GDK_F5' to "paste".

	* htmlengine-edit-paste.c: New file.
	* htmlengine-edit-paste.h: New file.

	* htmltextmaster.c (get_selection): New function, implementation
	of `HTMLObject::get_selection'.
	(html_text_master_class_init): Install the implementation.

	* htmlclue.c (forall): Call the function on self after calling
	it on all the objects, instead of doing it before.

	* htmltextslave.c (select_range): New function, implementation of
	`HTMLObject::select_range'.  Do nothing and always return FALSE,
	so that the object can never be selected in any way.
	(html_text_slave_class_init): Install implementation.

	* htmlengine-edit-copy.c (html_engine_copy): New function.

	* htmltextslave.c (calc_size): Removed newline stuff.
	(draw_newline_highlight): Removed.
	(draw_highlighted): Removed newline stuff.
	(draw): Removed newline stuff.
	(check_newline): Removed.

	* htmltextmaster.c (select_range): Removed newline stuff.

	* htmltext.c (calc_size): Removed newline stuff.
	(have_newline): Removed.
	(html_text_have_newline): Removed.

	* htmltext.h: Removed virtual method `have_newline'.

2000-02-15  Ettore Perazzoli  <ettore@helixcode.com>

	* htmltextinput.c: `parent_class' should be `HTMLEmbeddedClass *',
	not `HTMLEmbedded *'.

	* htmlobject.c (html_object_get_selection): New function.
	(get_selection): New function, default implementation of
	`HTMLObject::get_selection'.
	(html_object_class_init): Install it.

	* htmlobject.h: New virtual method `HTMLObject::get_selection'.

	* All object implementations: implement `HTMLObject::copy'.  Also,
	keep track of the parent's class where not done already.

	* htmlobject.c (copy): New function, default implementation of
	`HTMLObject::copy'.
	(html_object_class_init): Install it.
	(html_object_copy): New function.
	(html_object_dup): New function.

	* htmlobject.h: New virtual method `HTMLObject::copy'.

	* htmlembedded.c (html_embedded_type_init): Use
	`HTML_TYPE_EMBEDDED', not `HTML_TYPE_ELEMENT'.

	* htmltype.h: s/HTML_TYPE_ELEMENT/HTML_TYPE_EMBEDDED/.
	* htmltype.c (html_type_name): Updated accordingly.

	* All object implementations: Use the `object_size' parameter.

	* htmlobject.c (html_object_class_init): New parameter
	`object_size'.

	* htmlobject.h: New member `object_size' in `HTMLObjectClass'.

	* htmlobject.h: New virtual methods `HTMLObject::copy',
	`HTMLObject::get_selection'.

	* htmlengine-edit-cut.c: New file.
	* htmlengine-edit-cut.h: New file.

	* htmlengine-edit-copy.c: New file.
	* htmlengine-edit-copy.h: New file.

2000-02-14  Ettore Perazzoli  <ettore@helixcode.com>

	* htmlengine.c (html_engine_init): Initialize `cut_buffer' as
	NULL.
	(html_engine_destroy): Destroy the cut buffer, if any.

	* htmlengine.h: New member `cut_buffer'.

	* htmlengine-edit.c (html_engine_undo): Freeze before undoing,
	thaw afterwards.
	(html_engine_redo): Freeze before redoing, thaw afterwards.

	* htmlobject.c (relayout): Do nothing if the engine is frozen.

	* htmlengine.c (html_engine_init): Initialize `freeze_count'.
	(html_engine_freeze): New function.
	(html_engine_thaw): New function.
	(html_engine_frozen): New function.
	(html_engine_queue_draw): Actually queue only if the engine is not
	frozen.
	(html_engine_queue_clear): Likewise.

	* htmlengine.h: New member `freeze_count' in `HTMLEngine'.

	* htmlengine-cutbuffer.c: New file.
	* htmlengine-cutbuffer.h: New file.

	* htmlengine-edit-styles.c: Implemented paragraph style selection
	in a region, with undo/redo support.

	* htmlengine.c: New member `active_selection' in
	`SelectRegionData'.
	(html_engine_init): Initialize `active_selection' to FALSE.
	(html_engine_unselect_all): Set `active_selection' to FALSE.
	(select_region_forall): Set `active_selection' in the selection
	data to TRUE as soon as at least an item is selected.
	(html_engine_select_region): Copy `active_selection' from the
	selection data to the engine.

	* htmlengine.h: New member `active_selection' in `HTMLEngine'.

2000-02-13  Miguel de Icaza  <miguel@gnu.org>

	* htmlengine.c (html_engine_draw): Do not paint if the width or
	the height are zero.  Fixes crash (as this case is also window == NULL).

2000-02-12  Joe Shaw <joe@helixcode.com>

	* gtkhtml-embedded.c (gtk_html_set_parameter): g_strdup the parameter
	name because we cannot assume that it won't be freed during the life
	of the application.
	* gtkhtml-embedded.c (free_param): Added freeing of the key.

2000-02-12  Joe Shaw <joe@helixcode.com>

	* gtkhtml.c (expose): Did the same thing as I did with the draw
	method; see below.

2000-02-11  Joe Shaw <joe@helixcode.com>

	* gtkhtml.c (draw): Fixed a bug where embedded widgets were not being
	repainted correctly; the widget was updating all of its child widgets 
	and then painting over them. The order has been switched; thus, the 
	widget repaints itself first and then its child widgets are redrawn.
	
	* htmlembedded.c (html_embedded_new_widget): Connected the 
	button_press_event signal to a new handler, html_embedded_grab_cursor,
	that does not propagate up the tree so that embedded text widgets, 
	such as GtkEntry, retain the cursor.

2000-02-10  Ettore Perazzoli  <ettore@helixcode.com>

	* gtkhtml.c (gtk_html_set_paragraph_style): New function.
	(button_press_event): Update styles when moving the cursor
	position at a mouse click.

	* htmlengine-edit-styles.c
	(html_engine_set_clueflow_style): New function.

	* htmlclueflow.c (html_clueflow_set_style): New function.

	* gtkhtml.c (update_styles): New helper function.
	(clueflow_style_to_paragraph_style): New helper function.
	(class_init): Install new signal
	`current_paragraph_style_changed'.
	(init): Initialize `paragraph_style' to
	`GTK_HTML_PARAGRAPH_STYLE_NORMAL'.

	* gtkhtml.h: New enum `GtkHTMLParagraphStyle'.  New signal
	`current_paragraph_style_changed'.  New member
	`GtkHTMLParagraphStyle'.

	* htmlengine-edit-styles.c: New file.
	* htmlengine-edit-styles.h: New file.

	* htmlengine-edit.c (html_engine_insert): Avoid inserting anything
	if the current object is NULL.

	* htmlundo.c (html_undo_add_undo_action): Update the stack size
	value when removing an element.

2000-02-09  Ettore Perazzoli  <ettore@helixcode.com>

	* htmlengine-edit.c (html_engine_insert): Support undo.

	* gtkhtml.c (key_press_event): (Temporarily) bind F1 to "undo", F2
	to "redo".

	* htmlengine-edit.c (html_engine_undo): New function.
	(html_engine_redo): New function.

	* htmlengine.c (html_engine_init): Initialize `undo'.
	(html_engine_destroy): Destroy it.

	* htmlengine.h: New member `undo' in `HTMLEngine'.

	* htmlundo-action.c: New file.
	* htmlundo-action.h: New file.

	* htmlundo.c: New file.
	* htmlundo.h: New file.

	* htmlcursor.c (html_cursor_goto_zero): New function.

	* htmlengine-edit.c (html_engine_jump_to_object): Use
	`html_cursor_jump_to()'.

	* htmlcursor.c (html_cursor_copy): New function.
	(html_cursor_dup): Use it.
	(html_cursor_up): Use it instead of doing direct C assignments
	between the structs.
	(html_cursor_down): Likewise.
	(html_cursor_jump_to): New function.  It is necessary to jump to a
	position while keeping the relative position value intact.
	(html_cursor_home): Reset relative position.

	* htmlcursor.c (html_cursor_new): Initialize `relative_position'.
	(html_cursor_get_relative): New function.
	(html_cursor_reset_relative): New function.
	(html_cursor_home): Set relative position to zero.
	(forward): Increment relative position if successfull.
	(backward): Decrement relative position if successfull.
	(html_cursor_up): Update relative position.
	(html_cursor_down): Likewise.
	(debug_location): Print relative position too.
	(_HTML_CURSOR_DEBUG): Enable.

	* htmlcursor.h: New member `relative_position'.

2000-02-08  Ettore Perazzoli  <ettore@helixcode.com>

	* htmltable.c (calc_min_width): Call `calc_col_info()' before
	returning the value.
	(calc_preferred_width): Likewise.

	* htmlprinter.c (draw_panel): Implemented.  It does actually just
	draws a rectangle for now.
	(class_init): Install it.
	(PIXEL_SIZE): Changed to .5.

	* htmlengine-print.c (html_engine_print): When you call
	`html_engine_calc_size()', it uses `html_object_calc_min_size()'
	to decide the layout width, but the minimum HTMLTable width does
	not really change before you call `html_object_calc_size()' on it.
	So, we have to add an extra call to `html_engine_calc_size()'
	here, to make sure the minimum width is correct when we go back
	from the GnomePrint painter to the GDK one.

	* htmlengine.c (parse_h): Optimize and make more readable the
	H[1-6] checks.

2000-02-07  Ettore Perazzoli  <ettore@helixcode.com>

	* htmltable.c (calc_preferred_width): Do not calc_size.
	(calc_min_width): Likewise.

2000-02-04  Ettore Perazzoli  <ettore@helixcode.com>

	* htmlimage.c (calc_min_width): Fixed brainos.

	* htmltablecell.c (html_table_cell_new): Removed parameters `x'
	and `y'.  Renamed `max_width' to `specified_width'
	(html_table_cell_init): Likewise.

	* htmlimage.c (get_actual_width): New param `painter'.  The
	returned value is now expressed in painter units, instead of image
	pixel units.
	(get_actual_height): Likewise.
	(calc_preferred_width): Updated accordingly.
	(calc_min_width): Updated accordingly.
	(calc_size): Updated accordingly.
	(draw): Updated accordingly.

	* htmlimage.c (draw): Draw an highlighted pixmap when selected.

	* htmlgdkpainter.c (draw_pixmap): Fixed to handle the composition
	color more nicely.

2000-02-03  Ettore Perazzoli  <ettore@helixcode.com>

	* htmlprinter.c (draw_text): Use `gnome_font_get_underline_position()'
	and `gnome_font_get_underline_thickness()' to get the
	strikeout/underline line right.

	* htmlprintfontmanager.c (load_font): Changed default font size
	from 12 pt. to 10 pt.

	* htmlprinter.c (begin): Do a gsave and setup a clip region.
	Also, paint a rectangle around the clip region to make debugging
	easier.
	(end): Do a grestore.
	(draw_line): Added missing `gnome_print_newpath()' call.
	(draw_rect): Likewise.
	(fill_rect): Likewise.
	(draw_text): Likewise.

	* htmlclueflow.c (check_page_split): New function, implementation
	of `HTMLObject::check_page_split'.
	(html_clueflow_class_init): Install it.

	* htmlcluev.c (check_page_split): New function, implementation of
	`HTMLObject::check_page_split()'.
	(html_cluev_class_init): Install it.

	* htmlobject.c (html_object_check_page_split): New function.
	(check_page_split): New function, default implementation for
	`HTMLObject::check_split'.
	(html_object_class_init): Install it.

	* htmlprinter.c (html_printer_get_page_height): New function.

	* htmlobject.h: New virtual method `HTMLObject::check_split'.

	* htmlprinter.c (draw_pixmap): Convert RGBA into RGB if necessary.

	* htmlobject.c (calc_min_width): Calc size before returning the
	width.
	(calc_preferred_width): Likewise.
	* htmlrule.c (calc_min_width): Likewise.
	* htmltable.c (calc_min_width): Likewise.
	(calc_preferred_width): Likewise.

	* htmlimage.c (draw): Multiply scaled width/height by the pixel
	size.

	* htmlprinter.c (draw_pixmap): Implemented.

	* htmlimage.c (draw): Take advantage of `scale_width',
	`scale_height', `color' in `html_painter_draw_pixmap()'.
	(html_image_update_scaled_pixbuf): Removed.
	(html_image_setup): Removed.
	(html_image_factory_area_updated): Removed.
	(html_image_factory_register): Do not connect "area_updated"
	anymore.
	(html_image_factory_end_pixbuf): Don't do any scaled-related stuff
	anymore.
	(html_image_factory_area_prepared): Always schedule an update.

	* htmlgdkpainter.c (draw_pixmap): Updated to use the new
	parameters.
	* htmlprinter.c (draw_pixmap): Likewise.

	* htmlpainter.c (html_painter_draw_pixmap): New params
	`scale_width', `scale_height', `color'.  Removed clipping params.

	* htmlpainter.h: New params `scale_width', `scale_height', `color'
	and removed clipping params in virtual method
	`HTMLPainter::draw_pixmap'.

	* htmlimage.c: Cleaned up the mess.
	(html_image_init): Removed arg `max_width'.  Simplified to just do
	what it should do.
	(html_image_new): Updated accordingly.
	(get_actual_width): New helper function.
	(get_actual_height): New helper function.
	(calc_size): Actually do what expected to.
	(calc_preferred_width): Likewise.
	(calc_min_width): Likewise.
	(set_max_width): Removed.
	(html_image_class_init): Do not install anymore.

	* htmlimage.h: Get rid of `predefinedWidth', `predefinedHeight',
	`engine', `scaled' and `scaled_pixbuf'.  New members
	`specified_width', `specified_height'.

2000-02-02  Ettore Perazzoli  <ettore@helixcode.com>

	* htmltablecell.c (html_table_cell_set_width): New arg
	`painter'.

	* htmlobject.h: New argument `painter' in virtual methods
	`set_max_ascent', `set_max_descent', `set_max_width'.

	* htmlclueflow.c: Removed hardcoded values `VERTICAL_PAD',
	`BULLET_SIZE', `BULLET_HPAD', `BULLET_VPAD', `INDENT_UNIT'.
	(add_pre_padding): Added arg `pad'.
	(add_post_padding): Likewise.
	(calc_padding): New function.
	(calc_size): Use it.
	(get_indent): New arg `painter'.
	(set_max_width): New arg `painter'.
	(calc_indent_unit): New function.
	(get_indent): Use it.
	(calc_bullet_size): New function.
	(get_indent): Use it.
	(draw): Use it.

	* htmlobject.h: Size-related members in `HTMLObject' changed to be
	`gint's instead of `gshort's.

2000-02-01  Ettore Perazzoli  <ettore@helixcode.com>

	* testgtkhtml.c: Added a "print preview" menu item.
	(print_preview_cb): Callback for the menu: it does the preview.

	* gtkhtml.c (gtk_html_print): New function.

	* htmlengine-print.c: New file, implementing printing for
	HTMLEngine.
	* htmlengine-print.h: Corresponding header file.

	* htmlprintfontmanager.c: New file, implementing the font manager
	for HTMLPrinter.
	* htmlprintfontmanager.h: Corresponding header file.

	* htmlprinter.c: New file, implementing a HTMLPainter suitable for
	printing.
	* htmlprinter.h: Corresponding header.

	* htmlclueflow.c (html_clueflow_init): Removed parameter `font'.
	(html_clueflow_new): Likewise.

	* htmlclueflow.h: Removed member `font'.

	* htmlgdkpainter.c: Use `htmlgdkfontmanager.c' instead of
	`htmlfontmanager.c'.

	* All files: updated to use `htmlfontstyle.c' and
	`htmlfontstyle.c' instead of `htmlfontmanager.c' and
	`htmlfontmanager.h' for HTMLFontStyle handling.

	* htmlfontstyle.h: New file.
	* htmlfontstyle.c: New file.

	* htmlgdkfontmanager.c: New file.
	* htmlgdkfontmanager.h: New file.

	* htmlfontmanager.c: Removed.
	* htmlfontmanager.h: Removed.

	* htmlengine.c: Updated to use `HTMLGdkPainter' instead of the
	old `HTMLPainter'.
	* htmlengine.h: Likewise.

	* htmlgdkpainter.c: New file, an HTMLPainter-derived class
	implementing a GDK-based painter.
	* htmlgdkpainter.h: Header for it.

	* htmlpainter.c: Rewritten as an abstract GTK+ class.
	* htmlpainter.h: Likewise.

	* htmlengine.c (html_engine_parse): No need to allocate the
	settings' colors anymore.

	* htmlpainter.c (html_painter_get_window): Removed.
	(html_painter_alloc_color): Updated to work without it.
	(html_painter_free_color): Likewise.

2000-01-30  Ettore Perazzoli  <ettore@helixcode.com>

	* htmlengine.c (check_prev): Take account for the color too.
	(insert_text): Updated accordingly.
	(parse_b): Use `e->settings->vLinkColor' for vlink colors, instead of
	`e->settings->linkColor'.

2000-01-29  Ettore Perazzoli  <ettore@helixcode.com>

	* htmldrawqueue.c (clear_element_new_with_background): Use the
	return value from `gdk_pixbuf_ref()'.  It is not void anymore;
	please update to the latest gdk-pixbuf if you do GtkHTML
	development.
	* htmlimage.c (draw): Likewise.

2000-01-29  Jonas Borgstrm <jonas_b@bitsmart.com>

	* htmlengine.c (insert_text): Use e->settings->linkColor as the color
	for links.

	* htmldrawqueue.c (clear_element_new_with_background): gdk_pixbuf_ref ()
	returns void don't use the return value.

2000-01-28  Ettore Perazzoli  <ettore@helixcode.com>

	* htmlengine.c (parse_color): New function to parse colors.  If
	`gdk_color_parse()' fails, it prepends a `#' and tries again.
	(parse_table): Use `parse_color()' instead of `gdk_color_parse()'.
	(parse_b): Likewise.
	(parse_f): Likewise.

	* htmltokenizer.c (html_tokenizer_new): Initialize all the members
	of the struct individually.

	* htmltextmaster.c (select_range): Take account for newline
	selection when deciding whether to redraw or now.

	* htmltextslave.c (draw): Consider a line that only has the
	newline highlighted as highlighted.

	* htmlengine.c (insert_text): Refuse to insert leading white space
	if we have no paragraph, if there is a pending paragraph or if the
	current clueflow is empty.
	(is_whitespace): Removed.

	* htmlengine.h: Made `avoid_para' and `pending_para' plain
	booleans (no longer 1 bit wide) because debugging is easier this
	way.

	* htmlengine.c (parse_d): Close the flow and set a pending
	paragraph instead of adding a newline.
	(insert_text): Skip all the leading whitespace if we are about to
	create a new paragraph. 

2000-01-28  NotZed  <notzed@zedzone.helixcode.com>

	* tests/test10.html: A simple test driver for embedded widgets.

2000-01-28  Ettore Perazzoli  <ettore@helixcode.com>

	* htmltextslave.c (calc_size): Inconditionally add the width of a
	space.

	* htmltextmaster.c (calc_min_width): Add the width of a space.

	* htmlengine.c (html_engine_parse): Initialize
	`pending_para_alignment' to `HTML_HALIGN_LEFT'.
	(insert_paragraph_break): New parameter `align'.

	* htmlengine.h: New member `pending_para_alignment' in
	`htmlengine.h'.

	* htmlengine.c (parse_table): Restore quote and list level and
	flow pointer before adding the table to the tree.

	* debug.c (debug_dump_tree): Also print the list/quote level for
	HTMLClueFlows.

	* testgtkhtml.c (object_timeout): Added `GTK_WIDGET()' cast.
	(object_requested_cmd): Likewise.  Also, added a `GtkFunction'
	cast.

	* htmlembedded.c (html_embedded_new_widget): Removed unused
	variables.

	* htmlengine.c (parse_o): Added a `GTK_WIDGET()' cast to placate
	the compiler.

	* htmlclue.c (destroy): Use an HTMLClue pointer instead of an
	HTMLObject one, to prevent a warning.

2000-01-27  Ettore Perazzoli  <ettore@helixcode.com>

	* htmlengine-edit.c (html_engine_insert_para): Use both
	`list_level' and `quote_level'.

	* htmlengine.c (html_engine_init): Init `quote_level',
	`list_level'.
	(block_end_list): Renamed to `block_end_level'.  Set `list_level'
	and `quote_level'.
	(block_end_indent): Renamed to `block_end_quote'.  Use
	`quote_level'.
	(parse_table): Restore both `quote_level' and `list_level'.
	(parse_d): Increase `list_level' for `<dir>'.  (I am not sure how
	to handle this for now.)  Increase/decrease `quote_level' for
	`<dl>', `<dd>' and `<dt>'.
	(parse_l): Use `list_level' and `quote_level' when creating the
	new clueflow.
	(parse_o): Use `list_level' for `<ol>'.
	(parse_u): Use `quote_level' for `<ul>'.
	(parse_b): Use `quote_level' for `<blockquote>'.

	* htmlengine.h: `indent' replaced by `quote_level', `list_level'.

	* htmlclueflow.c (html_clueflow_new): New params `list_level',
	`quote_level'.
	(html_clueflow_init): Likewise.
	(add_pre_padding): A change in quote level always adds a space.  A
	change in list level works like before.
	(add_post_padding): Likewise.
	(draw): Updated to just use `list_level' for deciding the bullet's
	shape.
	(get_indent): Updated to use `list_level' and `quote_level'.

	* htmlclueflow.h: Member `level' replaced by `list_level',
	`quote_level'.

	* htmlengine.c (parse_u): Insert a paragraph break if a paragraph
	space is pending and the indentation level is greater than zero.
	(block_end_list): Only erase pending paragraph spaces and prohibit
	new paragraphs if the indentation level is equal to zero.

	* htmltextmaster.c (check_point): Select the newline.

	* htmltextslave.c (calc_size): Add the size of a space if this is
	the last slave of a newline'd text master.
	(draw_newline): New helper function.
	(draw_normal): Draw a space by using it, if we are before a new
	line.
	(draw_highlighted): Likewise.

	* htmltext.c (html_text_have_newline): New function.
	(have_new_line): New function, default implementation of
	`HTMLText::have_newline'.
	(html_text_class_init): Install it.
	(calc_size): If the object has a new line add the width of a space
	to it.

	* htmltext.h: New virtual method `HTMLText::have_newline'.

2000-01-26  Michael Zucchi  <notzed@zedzone.helixcode.com>

	* Makefile.am (libgtkhtml_HEADERS): Renamed htmlelement.h,
	to htmlembedded.h, added gtkhtml-embedded.h.

	* testgtkhtml.c (object_requested_cmd): Add a signal handler for
	testing custom widgets using the object specifier.

	* htmlengine.c (html_engine_class_init): Create object_requested
	signal.

	* gtkhtml.c (gtk_html_new): Link to object_requested signal of
	htmlengine to proxy the call.
	(class_init): Create the new object_requested signal.
	(html_engine_object_requested_cb): Implement the signal proxy.

	* htmlengine.c (html_engine_stop_parser): Clear timerID if we
	remove the timeout.
	(html_object_changed): Use schedule_update to update, dont update
	directly.

	* htmlembedded.c (html_embedded_size_recalc): Force a size
	recalculation of an embedded widget.
	(html_embedded_new_widget): Create a new html embedded element
	from a htmlembedded widget.

	* htmlelement.[ch]: Renamed to htmlembedded.[ch], should probably
	be somehting more different to gtkhtml-embedded, but its not that
	hard to change.
	
	* htmlengine.c (html_engine_init): Initialise the embeddedStack, a
	stack of gtkhtmlembedded widgets.
	(html_engine_destroy): Destroy the embeddedStack.

	* gtkhtml.h: Added object_requested signal, for embedding widgets.

	* htmlengine.h (HTMLEngine): Added embeddedStack for embedded
	widgets.
	(HTMLEngineClass): Added object_requested signal, for embedding
	object widgets.

	* htmlengine.c (html_object_changed): Called when an embedded
	changes, causes a re-layout.  This should probably be queued until
	an idle time.
	(parse_o): Added support for <OBJECT> element.  Returns a callback
	"object_requested" to application.  The semantic of having
	alternative text for non-instantiationable objects is not
	implemented.
	(parse_p): Added <PARAM> element, for object parameters.

	* gtkhtml-embedded.c/h: New object.  A container object for
	embeddeing custom widgets into gtk-html.  It basically notifies
	the caller when its content or layout information about it
	changes.

2000-01-26  Ettore Perazzoli  <ettore@helixcode.com>

	* htmllinktextmaster.c (save): New function, implementing
	`HTMLObject::save'.
	(html_link_text_master_class_init): Install it.

	* htmllinktext.c (save): New function, implementing
	`HTMLObject::save'.
	(html_link_text_class_init): Install it.

	* htmlrule.c (save): New function, implementing
	`HTMLObject::save'.
	(html_rule_class_init): Install it.

	* htmlengine-save.c (encode_entities): `&apos;' is not valid in
	HTML.  Removed (now) unused variable `html'.

	* htmlengine-save.c (write_header): Use uppercase tags for consistency.
	(write_end): Likewise.

	* htmltext.c (get_tags): New helper functions to get the font
	style tags associated with the text element.

	* htmlclueflow.c (save): New function, implementation of
	`HTMLObject::save'.  Add the proper start/end tags according to
	the clueflow's style.
	(html_clueflow_class_init): Install this method implementation.
	(get_tag_for_style): New helper function to get the tag associated
	with a specific style.

	* htmlclue.c (save): New function, implementation of
	`HTMLObject::save'.  It saves all the children.
	(html_clue_class_init): Install this method implementation.

	* htmlengine-save.c (write_header): New function to write the
	start of the HTML file.
	(write_end): New function to write the end of the HTML file.
	(html_engine_save): Use them.
	(save_forall): Removed.
	(html_engine_save): Just save the main (vertical) clue.

	* htmlengine-save.c (html_engine_save_output_string): New function
	to write a plain, unencoded string.

	* htmltext.c (save): Use `html_engine_save_encode()' to write the
	string encoded with entities.

	* htmlengine-save.c (encode_entities): New helper function to
	encode a string through entities.
	(html_engine_save_encode): New function to write an encoded
	buffer.
	(html_engine_save_encode_string): New to write an encoded
	zero-terminated string.

2000-01-25  Ettore Perazzoli  <ettore@helixcode.com>

	* htmlclue.c (destroy): Always ensure the tree is in a valid state
	by removing the clue node before destroying it.

2000-01-25  Ettore Perazzoli  <ettore@helixcode.com>

	* gtkhtml.c (idle_handler): Call `gtk_html_calc_scrollbars' to
	update the scrollbars.

	* gtkhtml.c (gtk_html_save): New function.

	* htmltext.c (save): New function, implementation of
	`HTMLObject::save'.  For now, it just dumps the text.
	(html_text_class_init): Install it.

	* htmlcursor.c (html_cursor_home): Removed debugging message.

	* htmlobject.c (html_object_save): New function.
	(save): New function, default implementation of
	`HTMLObject::save'.
	(html_object_class_init): Install it.

	* htmlobject.h: New virtual method `HTMLObject::save'.

	* htmlengine-save.h: New file.
	* htmlengine-save.c: New file.

	* htmlengine.c (html_engine_set_editable): Move the cursor to the
	home if the widget becomes editable.  Also, if the editable state
	changes, redraw the whole thing.
	(html_engine_timer_event): Move the cursor home.
	(html_engine_update_event): Move the cursor home at the end of
	parsing.

	* testgtkhtml.c (goto_url): Do not call `gtk_html_parse()'
	anymore.

	* gtkhtml.c (init): Initialize `editable' to `FALSE'.
	(gtk_html_parse): Turned into a dummy.
	(gtk_html_begin): Call `html_engine_parse()' too.  Also set
	`load_in_progress' to `TRUE' and the engine's editable state to
	`FALSE'.
	(gtk_html_end): Set `load_in_progress' to `FALSE'.  Set the
	engine's editable state according to the value of the `editable'
	member.
	(gtk_html_set_editable): New function.
	(gtk_html_get_editable): New function.

	* gtkhtml.h: New members `editable', `load_in_progress' in
	`GtkHTML'.

	* Makefile.am (libgtkhtmldir): Never compile the HTML component.

	* htmlengine.c (html_engine_timer_event): No longer do the ugly
	font saving/restoring trick.  I actually don't understand why it
	was there.

	* htmldrawqueue.c (draw_obj): Don't draw the cursor here as the
	idle loop handler will take care of it.

	* gtkhtml.c (key_press_event): Don't move the cursor forward when
	inserting text, as `html_engine_insert()' now does this.

	* htmlengine-edit.c (html_engine_insert): Move the cursor forward.

2000-01-24  Ettore Perazzoli  <ettore@helixcode.com>

	* htmlimage.c (accepts_cursor): New function, implementation of
	`HTMLObject::accepts_cursor'.  It always returns `TRUE', so that
	we can actually move the cursor to an image and edit it.
	(html_image_class_init): Install it.

	* htmlengine-edit.c (merge_text_at_cursor): Fix merging.

	* htmlcursor.c (html_cursor_dup): New function to duplicate a
	cursor.

	* gtkhtml.c (focus_in_event): New function, implementation for
	`GtkWidget::focus_in_event'.
	(focus_out_event): New function, implementation for
	`GtkWidget::focus_out_event'.
	(class_init): Install these.
	(button_press_event): Grab the focus.

	* htmlobject.c (relayout): If the object has no parent and has
	shrunk, queue a clear for the area that is not covered by the
	object anymore.

	* htmlengine.c (html_engine_queue_clear): New function.

	* htmldrawqueue.c (html_draw_queue_add_clear): New function.
	(html_draw_queue_add_clear_with_background): New function.
	(clear): New static function to clear an area specified by an
	HTMLClearElement.
	(html_draw_queue_flush): Flush the clear queue as well.
	(html_draw_queue_add): Emit the "draw_pending" signal only if the
	clear queue is empty too.
	(clear_element_new): New static function to create a clear element
	with a solid color background.
	(clear_element_new_with_background): New static function to create
	a clear element with a pixmap background.
	(clear_element_destroy): New static function to destroy a clear
	element.

	* htmldrawqueue.h: Added an HTMLClearElement queue for erasing
	parts of the window.

	* htmltextslave.c (fit_line): Do not chop the last word if there
	is enough space, even if there is another object after this one.

	* htmltextslave.c (html_text_slave_get_offset_for_pointer):
	Compare with the middle position of the character, not the
	leftmost border, so that it's easier to make selections.

	* htmltextslave.c (draw_highlighted): Fix off-by-one selection
	highlight.
	(html_text_slave_get_offset_for_pointer): Consider the last
	character too.

2000-01-24 Elliot Lee  <sopwith@redhat.com>

	* htmlform.c: Include string.h to eliminate warning.

2000-01-24  Ettore Perazzoli  <ettore@helixcode.com>

	* gtkhtml.c (expose): Return `TRUE'.
	(selection_idle_handler): Removed.
	(motion_notify_event): Do not use an idle handler anymore.

	* gtkhtml.h: Removed `selection_idle_handler_id', `selection_x2',
	`selection_y2'.

	* htmltextmaster.c (select_range): Fixed range comparisons.  I
	think I need to sleep.

	* htmldrawqueue.c (draw_obj): Do not paint the cursor if the
	engine is not editable.
	(html_draw_queue_flush): Removed debugging message.

	* htmlengine.c (html_engine_flush_draw_queue): Only draw the
	cursor if the engine is not editable.
	(html_engine_draw): Do not draw the cursor if not editable.
	(html_engine_draw_cursor_in_area): g_assert() that the widget is
	editable.

	* gtkhtml.c (selection_idle_handler): New function, to perform
	selection in the idle loop.
	(motion_notify_event): Set it up in the idle handler to perform
	selection.
	(destroy): Remove the selection idle, if any.
	(init): Initialize `selection_idle_handler_id' to zero.
	(gtk_html_end): Removed debugging message.

	* gtkhtml.h: New member `selection_idle_handler_id' in `GtkHTML'.

2000-01-23  Federico Mena Quintero  <federico@helixcode.com>

	* gtkhtml.c (realize): Set the background pixmap to NONE so that
	it does not flicker as much when scrolling.

2000-01-23  Ettore Perazzoli  <ettore@helixcode.com>

	* htmltextmaster.c (check_point): Fix selection for slaves after
	the first one.

	* htmlobject.c (check_point): Fix braino: `for_cursor' is a
	`gboolean', not a `gpointer'.

	* htmltextmaster.c (split): Set the selection on the new element
	by hand instead of calling `html_object_select_range()'.

	* gtkhtml.c (motion_notify_event): Call
	`html_engine_select_region' with `TRUE' as the `queue_draw'
	parameter.

	* htmlengine.c (html_engine_select_region): New param
	`queue_draw'.  When not FALSE, put all the objects that change
	selection state on the draw queue.
	(select_region_forall): Updated to do this.
	(html_engine_unselect_all): New param `queue_draw', honoured by
	using `SelectRegionData'.
	(unselect_forall): Updated accordingly.

	* htmlobject.h (select_range): Updated with the `engine' and
	`queue_draw' params.
	(html_object_select_range): Likewise.

	* htmlobject.h: New params `engine', `queue_draw' in
	`HTMLObject::select_range'.

	* htmltextmaster.c (check_point): Removed debugging message.

	* gtkhtml.c (button_press_event): Sum the X/Y offsets before
	passing the coordinates to `html_engine_jump_at'.
	(motion_notify_event): Sum the X/Y offsets before calling
	`html_engine_get_link_at' too.

	* htmlengine.c (html_engine_get_object_at): Do not add the X/Y
	offsets when calling the `check_point' method on the parent clue.

	* htmltextslave.c (fit_line) [HTML_TEXT_SLAVE_DEBUG]: Updated
	debugging code to use the new HTMLFitType values.

	* htmltextmaster.c (check_point): Added ugly kludges to make the
	mouse selection move the cursor and selected text as expected,
	when outside the bounds.

	* htmltextslave.c (check_point): New function, implementation for
	`HTMLObject::check_point'.  Always return NULL: this makes sure
	the object cannot be selected with the mouse.
	(html_text_slave_class_init): Install it.

	* htmlengine.c (html_engine_get_object_at): New param
	`for_cursor'.
	(html_engine_select_region): If any of the extremes is not in an
	object, unselect all.

	* htmlobject.h: New parameter `for_cursor' in
	`HTMLObject::check_point'.  All the method implementations updated.

	* htmltable.c (is_container): New function, implementation of
	`HTMLObject::is_container'.  It returns TRUE.
	(html_table_class_init): Install it.

	* htmlclue.c (is_container): New function, implementation of
	`HTMLObject::is_container'.  It returns TRUE.
	(html_clue_class_init): Install it.

	* htmlobject.c (is_container): New function, default
	implementation for `HTMLObject::is_container'.
	(html_object_class_init): Install it.
	(html_object_is_container): New function.

	* htmlobject.h: New virtual method `is_container'.

	* htmlengine.c: Added members `x1', `y1', `x2', `y2' to
	`SelectionRegionData'.
	(html_engine_select_region): Initialize them to the pointer x/y
	values relative to the objects that bound the selection.  Also,
	g_free() the data.

	* htmltextslave.c (draw_highlighted): Fix off-by-one error.

2000-01-22  Ettore Perazzoli  <ettore@helixcode.com>

	* htmlengine.c (html_engine_select_region): New function.
	(html_engine_unselect_all): New function.

	* htmlclue.c (forall): New function, implementation of
	`HTMLObject::forall'.
	(html_clue_class_init): Install it.

	* htmlobject.c (html_object_forall): New function.
	(forall): New function, default implementation of
	`HTMLObject::forall'.
	(html_object_class_init): Install it.

	* htmlobject.h: New virtual method `forall'.

	* htmlcursor.c (html_cursor_backward_element): New function.

	* htmlcursor.c (debug_location): Made a non-op by default.

	* gtkhtml.c (init): Initialize the new GtkHTML member variables.
	(button_press_event): Return `TRUE' as we always handle the press.
	Do not emit `link_clicked' anymore.  Grab the pointer.  Set
	`in_selection' to TRUE, and initialize `selection_x1' and
	`selection_y1'.  Unselect all in the engine.
	(button_release_event): Remove the grab.  Don't emit the
	"link_clicked" signal if we are performing a selection.  Set
	`in_button' and `in_selection' to FALSE.
	(motion_notify_event): Handle the selection if button is pressed.

	* gtkhtml.h: New members `selection_x1', `selection_y1',
	`selection_x2', `selection_y2', `button_pressed' and
	`in_selection' in `GtkHTML'.

	* htmlobject.c (select_range): Braino fix.

	* htmltextmaster.c (select_range): If the lenght is negative,
	select the whole text.

2000-01-21  Ettore Perazzoli  <ettore@helixcode.com>

	* htmlimage.c (generate_pixbuf_for_selection): New helper
	function.
	(draw): By using it, display a color-composed image, using the
	selection color.

	* htmlcolorset.c (html_color_set_new): I never learn: use 16-bit
	color values.  Also, make highlight foreground color different
	from the highlight color.

	* htmltextslave.c (draw_highlighted): New helper function.
	(draw_normal): New helper function.
	(draw): Draw highlighted text when appropriate, using the above
	two functions.

	* htmlpainter.c (html_painter_draw_text): Made param `text'
	const-safe.

	* htmltextmaster.c (html_text_master_init): Initialize
	`select_start', `select_length'.
	(select_range): New function, implementation of
	`HTMLObject::select_range()'.
	(split): Split the selection between self the newly created text
	master.
	(insert_text): New function, implementation of
	`HTMLText::insert_text'.  Used to update the selection after
	selection happens.
	(remove_text): New function, implementation of
	`HTMLText::remove_text'.  Used to update the selection after the
	removal happens.
	(html_text_master_class_init): Install these implementations.

	* htmltextmaster.h: New member `select_start', `select_length'.

	* htmlobject.c (html_object_select): Removed.
	(select_range): New function, default implementation of
	`HTMLObject::select_range()'.
	(html_object_select_range): New function.
	(html_object_class_init): Install it.

	* htmlobject.h: New virtual method `HTMLObject::select_range()'.

	* htmlengine.c (html_engine_init): Set the color set in the
	painter.

	* htmlpainter.c (html_painter_get_default_background_color): New
	function.
	(html_painter_get_default_foreground_color): Removed.
	(html_painter_get_default_link_color): Removed.
	(html_painter_get_default_highlight_color): Removed.
	(html_painter_get_default_highlight_foreground_color): Removed.
	(html_painter_draw_cursor): Removed.
	(html_painter_realize): Cleaned up a bit.
	(html_painter_new): Set `color_set' to NULL.
	(allocate_color_set): New helper function to allocate the
	HTMLColorSet colors.
	(html_painter_set_color_set): New function.
	(html_painter_realize): Allocate colors if `color_set' is not
	NULL.

	* htmlpainter.h: New member `color_set' in `HTMLPainter'.

	* htmlengine.c: Updated to use `htmlcolorset.c' instead of
	`htmlenginecolorset.c'.
	(html_engine_get_background_color): Removed.
	(html_engine_get_foreground_color): Removed.
	(html_engine_get_link_color): Removed.
	(html_engine_get_highlight_color): Removed.
	(html_engine_get_highlight_foreground_color): Removed.

	* htmlengine.h: Likewise.

	* htmlcolorset.c: New file.
	* htmlcolorset.h: New file.

	* htmlenginecolorset.c: Removed.
	* htmlenginecolorset.h: Removed.

2000-01-20  Ettore Perazzoli  <ettore@helixcode.com>

	* htmlobject.c (draw): Removed param `cursor'.

	* htmlobject.h: Removed param `cursor' in `HTMLObject::draw'.  All
	the implementations fixed in all the classes.

	* htmlengine.c (html_engine_init): Initialize `color_set'.
	(html_engine_destroy): Destroy the color set.
	(html_engine_realize): Realize the color set.
	(html_engine_get_background_color): New function.
	(html_engine_get_foreground_color): New function.
	(html_engine_get_link_color): New function.
	(html_engine_get_highlight_color): New function.
	(html_engine_get_highlight_foreground_color): New function.

	* htmlengine.h: New member `color_set'.

	* htmlenginecolorset.h: New file.
	* htmlenginecolorset.c: New file.

	* htmlobject.c (html_object_init): Initialize `selected' to FALSE.
	(html_object_select): New function.

	* htmlobject.h: New flag `selected' in `HTMLObject'.

	* htmlengine-edit.c (merge_text_at_cursor): Changed so that slaves
	between the two elements are removed only if the two elements can
	actually be merged.

	* htmltextmaster.c (fit_line): Use `html_clue_append_after()'.
	* htmltextslave.c (split): Likewise.

	* htmlengine-edit.c (delete_different_parent): Avoid destroying
	the slaves after the first parent.
	(delete_same_parent): Likewise.

	* htmltextslave.c (fit_line): Remove the object from the parent
	before destroying it.
	(split): Split the assertion so that it's obvious to see what is
	wrong.
	(split_at_newline): Braino fix.  Get the owner's text, as we are
	no HTMLText-derived class.

	* htmlengine-edit.c (html_engine_insert_para): Remove the object
	from the parent before destroying it.

	* htmltextmaster.c (fit_line): Remove the object from the parent
	before destroying it.

	* debug.c (debug_dump_tree): Display the HTMLTextSlave intervals
	as [start, end] instead of [start, len].

	* gtkhtml.c (button_press_event): Implemented.

	* htmlengine-edit.c (html_engine_jump_to): Renamed to
	`html_engine_jump_to_object' and made void.
	(html_engine_jump_at): New function.

	* htmlengine.c (html_engine_get_object_at): New function.

2000-01-19  Ettore Perazzoli  <ettore@helixcode.com>

	* htmltable.c (mouse_event): Removed.
	(html_table_class_init): Do not install it.

	* htmlimageinput.c (mouse_event): Removed.
	(html_imageinput_class_init): Do not install it.

	* htmlengine.c (html_engine_mouse_event): Removed.

	* htmlcluev.c (mouse_event): Removed.
	(html_cluev_class_init): Do not install it.

	* htmlclue.c (mouse_event): Removed.
	(html_clue_class_init): Do not install it.

	* gtkhtml.c (button_press_event): Do not call
	`html_engine_mouse_event' anymore.  We are going to do this
	differently.
	(button_release_event): Likewise.

	* htmlobject.c (mouse_event): Removed.
	(html_object_class_init): Do not install it anymore.
	(html_object_mouse_event): Removed.

	* htmlobject.h: Removed `mouse_event' virtual method.

2000-01-19  Ettore Perazzoli  <ettore@helixcode.com>

	* htmlcluev.c (check_point): Fixed to use the correct offsets.

	* htmlengine.c (html_engine_mouse_event): Make the cursor jump to
	the specified position if the engine is editable.

	* htmlengine-edit.c (html_engine_jump_to): New function.

	* htmltextmaster.c (check_point): New function, implementation of
	`HTMLObject::check_point()'.
	(html_text_master_class_init): Install it.

	* htmltextslave.c (html_text_slave_get_offset_for_pointer): New
	function.

	* htmlobject.h: New arg `painter' in `check_point'.  All the
	method implementations updated.
	* htmlobject.c (check_point): Updated accordingly.

	* htmltextslave.c (fit_line): Removed `#if 0'ed code.

	* htmlobject.h: New parameter `offset_return' in
	`HTMLObject::check_point'.  Through this, the object can also
	return a cursor offset.
	* htmlobject.c (html_object_check_point): Accordingly, new
	parameter `offset_return'.
	* htmlengine.c (html_engine_get_link_at): Updated accordingly.
	* htmlclue.c (check_point): Updated to get the extra parameter.
	* htmlcluev.c (check_point): Likewise.
	* htmlobject.c (check_point): Likewise.

	* htmlengine-edit.c (html_engine_delete): When a non-text, destroy
	the element.

	* htmlcursor.c (html_cursor_up): Use
	`html_object_get_cursor_base', not `html_object_get_cursor'.
	(html_cursor_down): Likewise.

	* htmltextmaster.c (get_cursor_base): New function, implementation
	of `HTMLObject::get_cursor_base'.
	(html_text_master_class_init): Install it.
	(get_cursor): Rewritten by means of `html_object_get_cursor_base'.

	* htmltext.c (get_cursor_base): New function, implementation of
	`HTMLObject::get_cursor_base'.
	(html_text_class_init): Install it.
	(get_cursor): Rewritten by means of `html_object_get_cursor_base'.

	* htmlobject.c (html_object_get_cursor_base): New function.
	(get_cursor_base): New function, default implementation of
	`HTMLObject::get_cursor_base'.
	(html_object_class_init): Install it.
	(get_cursor): Rewritten by means of `html_object_get_cursor_base'.

	* htmlobject.h: New virtual method `get_cursor_base'.

	* debug.c (debug_dump_tree): Print the object position.

	* htmlengine-edit.c (merge_text_at_cursor): Return the amount of
	characters added to the current element.
	(html_engine_delete): Sum it to the cursor's current offset.

	* htmlcursor.c (backward): Don't go beyond the last character if
	there is another element after it.

2000-01-18  Ettore Perazzoli  <ettore@helixcode.com>

	* htmlengine-edit.c (merge_text_at_cursor): New function,
	attempting to merge the text element at the cursor with the
	previous text element, if any and if of the same type and with the
	same attributes.
	(html_engine_delete): Call it.

	* htmlengine-edit.c (delete_different_parent): New param
	`destroy_start'.  If `FALSE', do not destroy the `start_object'.
	(delete_same_parent): Likewise.
	(html_engine_delete): Do not destroy an empty text object if it's
	the last in the clue or it's followed by a vspace.

	* htmlrule.c (draw): Don't call the parent class' `draw' method.

	* htmlobject.c (draw): Don't draw the cursor.

	* htmldrawqueue.c (draw_obj): Draw the cursor in the area we have
	repainted.

	* htmlengine.c (draw_cursor): Removed.
	(html_engine_draw_cursor_in_area): Replaced by this one.
	(html_engine_draw): Updated to use this one.
	(html_engine_draw_cursor): Likewise.

	* htmltextslave.c (fit_line): Do not skip leading space anymore.

	* htmlengine.c (html_engine_make_cursor_visible): Argh.
	s/rightBorder/topBorder/.
	(draw_cursor): Fixed.

	* gtkhtml.c (key_press_event): Queue a draw if return value is
	`TRUE'.

2000-01-18  Jonas Borgstrm <jonas_b@bitsmart.com>

	* htmlengine.c (parse_input): Modified the forms code to work with the
	new htmlengine. Changed html_clue_append to append_element. And did some
	code cleanup.

2000-01-18  Ettore Perazzoli  <ettore@helixcode.com>

	* htmlengine.c (append_element): Silly me.  Don't add the object
	to the flow twice when creating a new flow!

	* htmlcursor.c (forward): Fixed navigation at the end of the
	element so that it works with empty elements.
	(backward): Likewise.
	(next_not_slave): Fixed so that it starts from the object after
	`object', not `object' itself.

	* htmlengine.c (current_clueflow_style): If the stack is empty,
	return `HTML_CLUEFLOW_STYLE_NORMAL', not `HTML_CLUEFLOW_STYLE_P'.

	* htmlclueflow.c (get_default_font_style): Removed handling of
	`HTML_CLUEFLOW_STYLE_P'.

	* debug.c (clueflow_style_to_string): Removed handling of
	`HTML_CLUEFLOW_STYLE_P'.

	* htmlclueflow.h: Get rid of `HTML_CLUEFLOW_STYLE_P' as we don't
	need it.

	* htmlengine.c (html_engine_init): The default value for
	`editable' should be FALSE!

	* htmlengine.c (html_engine_flush_draw_queue): Draw cursor
	before/after flushing the queue.

	* htmlengine-edit.c (html_engine_insert_para): Draw cursor
	before/after doing the stuff.
	(html_engine_insert): Likewise.

	* htmlcursor.c (html_cursor_up): Rewritten by means of
	`html_object_get_cursor'.

	* htmltextmaster.c (calc_char_position): Removed.
	(get_cursor): New function, implementation of
	`HTMLObject::get_cursor'.
	(html_text_master_class_init): Install it.
	(get_cursor): When we encounter a non-HTMLTextSlave object, we
	should break the loop, not continue it.

	* htmltext.c (html_text_calc_char_position): Removed.
	(calc_char_position): Removed.
	(get_cursor): New function, implementation of
	`HTMLObject::get_cursor'.
	(html_text_class_init): Install it.

	* htmltext.h: Removed `calc_char_position' method.

	* htmlobject.c (html_object_get_cursor): New function.
	(accepts_cursor): Return TRUE by default.
	(get_cursor): New function, implementation of
	`HTMLObject::get_cursor'.
	(class_init): Install it.

	* htmlobject.h: New virtual method `get_cursor'.

	* htmlengine-edit.c (queue_draw_for_cursor): Removed.
	(html_engine_move_cursor): Use `html_draw_cursor' instead.

	* htmlengine.c (html_engine_init): Initialize `invert_gc' to
	`NULL'.
	(html_engine_destroy): Destroy `invert_gc' if not `NULL'.
	(html_engine_realize): Initialize `invert_gc' by creating a
	`GDK_INVERT' GC.
	(html_engine_draw_cursor): New function.

	* htmlengine.h: New member `invert_gc' in `HTMLEngine'.

2000-01-17  Ettore Perazzoli  <ettore@helixcode.com>

	* gtkhtml.c: Do not #include "htmlpainter.h" anymore.
	(realize): Call `html_engine_realize' instead of accessing the
	painter and calling `html_painter_realize' directly.

	* htmlengine.c (html_engine_init): Initialize member `window' to
	NULL.
	(html_engine_realize): New function.

	* htmlengine.h: New member `window' in `HTMLEngine'.

	* htmlengine.h (html_painter_set_background_color): Removed bogus
	proto.

	* htmlclueflow.c (draw): Use `html_painter_get_black' to set the
	pen color for the bullet.  I think we should be using the font
	color instead, but it's fine for now.

	* htmlpainter.c (html_painter_get_black): New function.

	* htmlclue.c (draw): Removed bogus code to draw rects around the
	clue and getting rid of corresponding variables.  This was not
	even that useful for debugging, as it was intrinsecally broken.

	* htmlclueflow.c (add_pre_padding): Add some padding for `<pre>'
	as well, if the previous element is not a `<pre>' one.
	(add_post_padding): Likewise, but checking with the next element
	instead of the previous one.

	* htmlengine.c (parse_body): Handle `\n' by inserting a line
	break.

	* htmltype.c: Do not call `html_bullet_type_init()' anymore.

	* htmlbullet.c: Removed.
	* htmlbullet.h: Removed.

	* htmlengine.c (html_engine_init): Initialize `avoid_para' to
	`TRUE', `pending_para' to FALSE.
	(html_engine_parse): Likewise.
	(all functions): Updated to use these new members.
	(block_end_list): Avoid adding empty paragraph breaks after this.
	(block_end_indent): Likewise.
	(parse_f): Fix relative font size.

	* htmlengine.h: New elements `avoid_para', `pending_para'.

	* htmlengine.c (close_flow): Added ugly hack to check if the flow
	ends with a vspace.  If it does, the vspace is killed.  Yes, I
	should do it differently, but let's just get it to work now.

2000-01-16  Ettore Perazzoli  <ettore@helixcode.com>

	* htmlcluev.c (get_right_clear): New function, implementation of
	`HTMLClue::get_right_clear'.
	(get_left_clear): New function, implementation of
	`HTMLClue::get_left_clear'.
	(html_cluev_class_init): Install virtual methods.

	* htmlclueflow.c (add_post_padding): Add padding even if the next
	object is an header.

	* htmlfontmanager.c: Use a static array for calculating the real
	font size.  (Yes, this is just a temporary hack.)

	* htmlclueflow.c (calc_preferred_width): Use `get_indent()'
	correctly instead of simply multiplying the level by the indent
	size.

	* htmlrule.c (draw): Fix braino: `HTML_HALIGN_RIGHT' and
	`HTML_HALIGN_LEFT' were swapped.

2000-01-13  Ettore Perazzoli  <ettore@helixcode.com>

	* htmlclueflow.c: Changed to display bullets correctly even if
	`level' is zero.  (Which should not happen according to the
	standard, but it does happen in practice.)

	* htmlengine.c (html_engine_init): Initialize `pending_vspace' to
	zero.
	(html_engine_insert_text): Removed.
	(insert_pending_vspace): New function.
	(insert_text): New function.
	(add_line_break): New function.
	(block_end_font): No longer insert a vspace.
	(block_end_list): Likewise.
	(parse_body): Do not set `vspace_inserted' anymore.  `\n' just
	causes `pending_vspace' to be inconditionally incremented.
	(All functions): Use `add_line_break' to force line breaks instead
	of `html_engine_insert_vspace()'.
	(parse_h): Set `pending_vspace' to 0 when opening/closing headers.
	Insert pending vspace before adding a rule.
	(parse_i): Insert pending vspace before adding the image.
	(parse_l): Insert pending vspace before creating the new clue.
	(html_engine_insert_vspace): Removed.
	(close_flow): New parameter `clue'.

	* htmlengine.h: `vspace_inserted' removed.  New member
	`pending_vspace'.

	* htmlvspace.c (html_vspace_new): Removed parameter `space'.
	(html_vspace_init): Removed parameter `space'.  Do not init
	`ascent', `descent' anymore.
	(calc_size): New function, implementation for
	`HTMLObject::calc_size'.
	(html_vspace_class_init): Install it.

2000-01-11  Ettore Perazzoli  <ettore@helixcode.com>

	* htmlclueflow.c (calc_size): Add padding at the end only.

	* htmlstack.c (html_stack_pop): Added precondition.

	* htmlengine.c (parse_a): Do not force color and font for links
	anymore.

	* htmllinktextmaster.c (get_font_style): New function,
	implementing `HTMLText::get_font_style'.  It forces the font style
	to be underlined.
	(html_link_text_master_class_init): Install it.

	* htmllinktext.c (get_font_style): New function, implementing
	`HTMLText::get_font_style'.  It forces the font style to be
	underlined.
	(html_link_text_class_init): Install it.

	* htmltablecell.c (html_table_cell_init): Initialize
	`bg_allocated' to `FALSE'.
	(set_bg_color): Set `bg_allocated' to `FALSE' if the new color is
	different from the existing one.
	(draw): If `bg_allocated' is `FALSE', allocate the color and set
	`bg_allocated' to `TRUE'.

	* htmltablecell.h: New member `bg_allocated' in `HTMLTableCell'.

	* htmlengine.c (html_engine_init): Set `bgColor_allocated' to
	`FALSE'.
	(draw_background): If `bgColor_allocated' is `FALSE', allocate
	`bgColor' in the engine's painter.
	(parse_b): Set `bgColor_allocated' to FALSE when setting a new
	`bgColor'.
	(close_anchor): Do not pop color on links anymore.

	* htmlengine.h: New member `bgColor_allocated' in `HTMLEngine'.

2000-01-10  Ettore Perazzoli  <ettore@helixcode.com>

	* htmlengine.c (current_color): New function.
	(html_engine_set_named_color): Removed.
	(push_color): New function.
	(pop_color): New function.
	(html_engine_stop_parser): Clear all the stacks except the
	list/glossary ones as I am still unsure how to handle them.
	(html_engine_pop_color): Removed.
	(All functions): Updated to use these new color stack functions.
	Also, use `gdk_color_parse()' instead of
	`html_engine_set_named_color'.

	* htmlengine.h (html_painter_set_background_color): Removed
	prototype (what the hell is this doing here!?).

	* htmllinktext.c (html_link_text_init): New parameter `color'.
	(html_link_text_new): New parameter `color'.

	* htmltextslave.c (draw): Set the color using
	`html_text_get_color()'.

	* htmltext.c (html_text_init): New parameter `color', to
	initialize the `color' member.  Alos, set `color_allocated' to
	FALSE.
	(html_text_new): New parameter `color'.
	(get_color): New function, default implementation for
	`HTMLText::get_color'.
	(html_text_get_color): New function.
	(draw): Use it.

	* htmltext.h: New members `color', `color_allocated'.  New virtual
	method `HTMLText::get_color'.

	* htmltable.c (draw): Removed stupid "nonono" message.  :-)

	* htmlengine.c (parse_t): Don't put the a new table in itw own
	HTMLClueFlow anymore: close the current flow, and append to the
	specified clue.

	* htmltextslave.c (calc_size): New function, implementation for
	`HTMLObject::calc_size'.
	(html_text_slave_class_init): Install it.

	* htmlclueflow.c (html_clueflow_get_default_font_style): New
	function.
	(get_default_font_style): Default implementation for
	`HTMLClueFlow::get_default_font_style'; just a stub for now.
	(html_clueflow_class_init): Install it.

	* htmlclueflow.h: New virtual method
	`HTMLClueFlow::get_default_font' to get the font associated with
	the HTMLClueFlow's style.

	* htmlclueflow.h (HTML_CLUEFLOW_CLASS): Fixed (do the correct
	cast).

	* htmltextmaster.c (calc_min_width): Implemented.
	(calc_preferred_width): Implemented.
	(calc_size): New function, implementing `HTMLObject::calc_size'.
	(html_text_master_class_init): Install it.

	* htmltext.c (calc_size): New function, implementation of
	`HTMLObject::calc_size()'.
	(html_text_class_init): Install it.

	* htmltext.c (html_text_get_font_style): New function.
	(get_font_style): Default implementation for
	`HTMLText::get_font_style'.
	(html_text_class_init): Install it.
	(draw): Use it.
	(calc_size): Use it.

	* htmltext.h: New virtual method `HTMLText::get_font_style'.

2000-01-09  Ettore Perazzoli  <ettore@helixcode.com>

	* htmlobject.h: New arg `painter' in `HTMLObject::calc_size';
	removed arg `parent'.  New arg `painter' in
	`HTMLObject::calc_preferred_width', `HTMLObject::calc_min_width'
	and `HTMLObject::fit_line' as well.
	* htmlclue.c: Updated accordingly.
	* htmlclue.h: Updated accordingly.
	* htmlcluealigned.c: Updated accordingly.
	* htmlcluealigned.h: Updated accordingly.
	* htmlclueflow.c: Updated accordingly.
	* htmlclueflow.h: Updated accordingly.
	* htmlclueh.c: Updated accordingly.
	* htmlclueh.h: Updated accordingly.
	* htmlcluev.c: Updated accordingly.
	* htmlcluev.h: Updated accordingly.
	* htmlengine.c: Updated accordingly.
	* htmlimage.c: Updated accordingly.
	* htmlimage.h: Updated accordingly.
	* htmllinktext.c: Updated accordingly.
	* htmllinktext.h: Updated accordingly.
	* htmllinktextmaster.c: Updated accordingly.
	* htmllinktextmaster.h: Updated accordingly.
	* htmlobject.c: Updated accordingly.
	* htmlobject.h: Updated accordingly.
	* htmlrule.c: Updated accordingly.
	* htmlrule.h: Updated accordingly.
	* htmlstream.c: Updated accordingly.
	* htmltable.c: Updated accordingly.
	* htmltablecell.c: Updated accordingly.
	* htmltext.c: Updated accordingly.
	* htmltextmaster.c: Updated accordingly.
	* htmltextslave.c: Updated accordingly.
	* htmlvspace.c: Updated accordingly.
	* htmlvspace.h: Updated accordingly.

	* htmlpainter.c (html_painter_calc_ascent): New function.
	(html_painter_calc_descent): New function.
	(html_painter_calc_text_width): New function.

	* htmltable.c (find_anchor): Kill unused variable.

	* htmltype.c (html_types_init): Don't call `html_hspace_init()'
	anymore.

	* htmlhspace.c: Removed.
	* htmlhspace.h: Removed.

	* htmlengine.c: Updated to use `HTMLFontStyle' instead of
	`HTMLFont'.  Also, we do not hardcode the font and color all the
	time anymore: instead, we let the HTMLClueFlow specify the default
	font.
	(select_font_full): Removed.
	(select_font_relative): Removed.
	(current_font_style): New utility function.
	(push_font_style): New utility function.
	(pop_font_style): New utility function.
	(current_clueflow_style): New utility function.
	(push_clueflow_style): New utility function.
	(pop_clueflow_style): New utility function.
	(close_anchor): No longer pop the font.
	(html_engine_parse): Initialize the font stack with
	`HTML_FONT_STYLE_DEFAULT'.
	(html_engine_select_font): Removed.
	(html_engine_get_current_font): Removed.
	(html_engine_insert_text): Parameter `font' removed.  Always use
	the current font style.
	(new_flow): Removed parameter `style'.  Get the style from the top
	of the ClueFlow style stack using `current_clueflow_style'.
	(block_end_clueflow_style): New function.

	* htmlengine-edit.c (html_engine_insert_para): Use an empty
	HTMLTextMaster element instead of an hspace for the new clue.

	* htmlengine.h: New member `clueflow_style_stack' in `HTMLEngine'.

	* htmltextmaster.c (calc_min_width): Always return 0.
	(calc_preferred_width): Return bogus 100 for now.

	* htmltextmaster.h: Removed members `minWidth', `prefWidth'.

	* htmlclueflow.h: Updated to use `HTMLFontStyle' instead of
	`HTMLFont'.
	* htmlclueflow.c: Likewise.

	* htmllinktextmaster.h: Updated to use `HTMLFontStyle' instead of
	`HTMLFont'.
	* htmllinktextmaster.c: Likewise.

	* htmllinktext.h: Updated to use `HTMLFontStyle' instead of
	`HTMLFont'.
	* htmllnktext.c: Likewise.

	* htmltext.h: Updated to use `HTMLFontStyle' instead of
	`HTMLFont'.
	* htmltext.c: Likewise.

	* htmltextmaster.h: Updated to use `HTMLFontStyle' instead of
	`HTMLFont'.
	* htmltextmaster.c: Likewise.

2000-01-08  Ettore Perazzoli  <ettore@helixcode.com>

	* htmlclueflow.c (draw): Temporarily disabled bullet painting
	code.

	* htmlpainter.c (html_painter_set_font): Removed.
	(html_painter_set_font_style): Replaced by this one.
	(html_painter_get_font): Removed.
	(html_painter_get_font_style): Replaced by this one.
	(html_painter_new): New arg `font_manager', to set the
	`font_manager' member.
	(html_painter_draw_text): Retrieve the font using
	`html_font_manager_get_gdk_font()'.  Also, handle underline and
	strikeout according to the value of the `style' member.

	* htmlpainter.h: Member `font' removed: replaced by `font_style'.
	New member `font_manager', pointer to an HTMLFontManager.

	* htmlfont.c: Removed.
	* htmlfont.h: Removed.

	* htmlengine.c (html_engine_init): Initialize member
	`font_manager'.
	(html_engine_destroy): Destroy the font manager.

	* htmlengine.h: New member `font_manager' in `HTMLEngine'.
	Members `fs', `cs' renamed to `font_stack' and `color_stack',
	respectively.  `bold', `underline', `fontsize' removedq.

	* htmlfontmanager.c: New file.
	* htmlfontmanager.h: New file.

	* htmlpainter.c: Moved some functions around to make the code
	cleaner.
	(html_painter_alloc_color): New function.
	(html_painter_free_color): New function.

2000-01-07  Ettore Perazzoli  <ettore@helixcode.com>

	* htmlfont.c, htmlfont.h: Removed.

	* Makefile.am (libgtkhtml_HEADERS): Added `htmlurl.h'.

	* htmlengine.c (parse_body): Insert vspace instead of creating a
	new flow for every newline in the `<pre>' case.
	(html_engine_new_flow): Removed.
	(new_flow): New function, replaces `html_engine_new_flow'.  It has
	a `style' parameter to specify the HTMLClueFlowStyle for the new
	flow.  Callers updated.
	(parse_p): Inconditionally create a new `HTML_CLUEFLOW_STYLE_P'
	flow for the `<p>' tag.  Always close the current one when you get
	a `</p>' tag.  Likewise with `HTML_CLUEFLOW_STYLE_PRE' and
	`<pre>'/`</pre>'.
	(parse_h): Inconditionally create a new flow of the appropriate
	`HTML_CLUEFLOW_STYLE_H*' style.
	(parse_t): Inconditionally create a new flow.

	* debug.c (clueflow_style_to_string): New helper function.
	(debug_dump_tree): Print the ClueFlowStyle for HTMLClueFlow
	objects using it.  Also, print the text for `HTMLLinkText' and
	`HTMLLinkTextMaster' objects as well.

	* htmlclueflow.c (calc_size): Do not split lines if style is
	`HTML_CLUEFLOW_STYLE_PRE'.
	(calc_min_width): Handle HTML_CLUEFLOW_STYLE_PRE correctly.

	* htmlclueflow.h: Added `HTML_CLUEFLOW_STYLE_PRE'.

2000-01-06  Ettore Perazzoli  <ettore@helixcode.com>

	* gtkhtml.c (key_press_event): Move the cursor forward by the
	number of characters inserted.

	* htmlengine-edit.c (html_engine_insert): Return the number of
	characters actually inserted.

	* htmltextslave.c (draw): Updated to use `HTMLText::text_len'
	instead of `HTMLTextMaster::strLen'.
	(fit_line): Likewise.

	* htmltextmaster.c (fit_line): Updated to use `HTMLText::text_len'
	instead of `HTMLTextMaster::strLen'.
	(split): Likewise.
	(insert_text): Removed.
	(remove_text): Removed.
	(html_text_master_class_init): Updated accordingly.
	(html_text_master_init): Do not initialize `strLen' anymore.

	* htmllinktextmaster.c (split): Updated to use `HTMLText::text_len'
	instead of `HTMLTextMaster::strLen'.

	* htmltextmaster.h: Removed member `strLen'.

	* htmltext.c (insert_text): Return value changed from `void' to
	`guint': return the number of characters actually inserted.  Also,
	make sure there are never two consecutive spaces in the resulting
	string.
	(html_text_insert_text): Updated accordingly.
	(calc_actual_len): New helper function for `insert_text'.
	(copy_collapsing_spaces): New helper function for `insert_text'.
	(html_text_init): Initialize `text_len'.
	(remove_text): Update `text_len'.
	(insert_text): Update `text_len'.

	* htmltext.h: New member `text_len' for storing the text's length.

	* htmlengine.c (parse_h): Do not create a new flow for the rule,
	unless there is no current flow.

	* htmlrule.c (html_rule_new): New parameter `halign'.
	(html_rule_init): Likewise.
	(set_max_width): Always set `width' to `max_width'.
	(draw): Only draw the specified percent of the width, and align
	according to the `halign' value.

	* htmlrule.h: New member `halign'.

	* htmlengine-edit.c (html_engine_insert_para): Do not add an
	`HTMLHSpace' at the end of the paragraph anymore.

	* htmlclueflow.c (html_clueflow_split): Removed HTMLHSpace kludge.

	* htmlvspace.c (accepts_cursor): New function, implementation for
	`HTMLObject::accepts_cursor()'.  Always return `TRUE'.
	(html_vspace_class_init): Install it.

	* htmlclueflow.c: New constant `VERTICAL_PAD'.
	(calc_size): Add `VERTICAL_PAD' to the `ascent' value before the
	size computation and to the `descent' value after it, if the style
	is not that of an itemized list: this pads the HTMLClueFlow
	vertically.

	* htmlimage.c: #include <gdk-pixbuf/gdk-pixbuf.h>.

2000-01-05  Ettore Perazzoli  <ettore@helixcode.com>

	* htmlengine.c (html_engine_insert_text): Rewritten to always
	create HTMLTextMasters and no HTMLHSpaces.
	(html_engine_insert_vspace): Do not create a new clueflow for the
	vspace: the vspace will just be at the end of the existing flow.
	(parse_h): Do not put the rule in a new HTMLClueFlow (that's a
	waste!).
	(close_flow): No longer append an hspace.
	(parse_p): Always create a new flow with `html_engine_new_flow()'.

	* htmlfont.c (html_font_equal): New function.

	* htmltextslave.c (split): New helper function.
	(split_at_newline): New helper function.
	(fit_line): Use them.  The TextSlave is now split at the first
	newline character before starting the fit process.

2000-01-06  Jonas Borgstrm <jonas_b@bitsmart.com>

	* Makefile.am : Moving htmlurl.c from libgtkhtml_SOURCES to testgtkhtml_SOURCES

	* gtkhtml.c : (gtk_html_set_base_url) : removed function, not needed.

	* gtkhtml.h : removed function gtk_html_set_base_url

	* htmlengine.c : Removed ALL use of HTMLURL from htmlengine.c. htmlengine shouldn't do any url handling.

	* htmlengine.h : Removed ALL HTMLURL variables

	* testgtkhtml.c : testgtkhtml.c is now doing ALL url handing, it shouldn't be in htmlengine.c
	
2000-01-06  Jonas Borgstrm <jonas_b@bitsmart.com>
 
	This adds support for scaling images.
	OBS! You need a fresh gdk_pixbuf from the CVS.

	* htmlimage.h : New members: gboolean scaled and GdkPixbuf *scaled_pixbuf;

	* htmlimage.c : (destroy) : unref scaled_pixbuf if used;
	(html_image_update_scaled_pixbuf) : New function updates the local
	scaled copy of image_ptr->pixbuf
	(html_image_setup) : Set scaled to TRUE if object->width !=
	image_ptr->pixbuf->art_pixbuf->width.
	(html_image_factory_area_updated) : Call
	html_image_update_scaled_pixbuf if scaled.
	(html_image_factory_end_pixbuf) : Call
	html_image_update_scaled_pixbuf if scaled.
	(html_image_factory_register) : Scale the image if necesary if it
	already is loaded.
	
2000-01-05  Jonas Borgstrm <jonas_b@bitsmart.com>

	[This adds support for references in urls.]
	
	* htmlanchor.c (find_anchor): New function.
	
	* htmlclue.c (find_anchor): New function.
	
	* htmltable.c (find_anchor): New function.

	* htmlengine.c (html_engine_begin): Check if the url wants to view
	a reference on the current page, if so don't load it again, just
	scroll.
	
	(html_engine_goto_anchor): New function. Searches for an anchor
	and scrolls the page.

	* htmlengine.h : Added new member, reference. It is the reference
	html_engine_goto_anchor searches for.

	* htmlimage.c (cleanup_images): Only destroy ptr->pixbuf if it's not NULL.

	* htmlurl.c (html_url_to_string): Add the reference to the string
	also.

	* testgtkhtml.c (entry_goto_url): g_strdup the string from the
	entry.
	(goto_url): Only call gtk_html_parse () When gtk_html_begin
	returns non NULL. Don't call gtk_html_parse when the engine only
	scrolls the page (On a #reference).

2000-01-04  Jonas Borgstrm <jonas_b@bitsmart.com>

	* htmlengine.c : (parse_b): Added "clear=xxx" support in <br> tags.
	(parse_d): Fixed dt function. 
	http://cvs.gnome.org/bonsai/rview.cgi?root=/cvs/gnome looks better now.
	
	(parse_table): Added support for nowrap argument in <td> tags.
			Now http://www.themes.org looks ok.
	
	(parse_table): Added workaround for bad html in table and form combination, 
		       to make gnome bonsai pages render ok.
	
	(parse_f): With a <form action=> defaults to the current URI.
	
	(html_engine_insert_text): Uses HTMLText instead of HTMLTextMaster with NOWRAP

	* htmlengine.h: New variable gboolean noWrap.

	* htmlurl.[ch] (html_url_dup): New flag HTML_URL_DUP_NOCGIARGS.
		
2000-01-03  Jonas Borgstrm <jonas_b@bitsmart.com>
	
	* Makefile.am : Added htmlimageinput.c and htmlimageinput.h

	* gtkhtml.c (button_press_event): Call html_engine_mouse_event

	* htmlengine.c (html_engine_mouse_event): New function.
	(parse_input): Added imageinput support.

	* htmltype.[ch]: Added class HTMLImageInput.
	
	* htmlimageinput.[ch]: New files.

2000-01-03  Jonas Borgstrm <jonas_b@bitsmart.com>

	* Makefile.am : Added htmltextarea and htmlselect
	
	* htmlbutton.c (draw): Removed function.
	
	* htmltextinput.c (draw): Removed function.
	
	* htmlradio.c (draw): Removed function.
	
	* htmlcheckbox.c (draw): Removed function.
	
	* htmlselect.[ch]: New file.

	* htmltextarea.[ch]: New file.

	* htmlelement.c (draw): Added function.

	* htmlengine.c (parse_t): Added <textarea> support.
	
	* htmlengine.h: Added inTextArea and formTextArea.

	* htmltype.[ch]: Added class HTMLTextArea.

	* tests/test9.html: Extended test.

2000-01-02  Ettore Perazzoli  <ettore@helixcode.com>

	* htmlengine-edit.c (delete_same_parent): Save the parent before
	destroying the object.

	* htmlclueflow.c (html_clueflow_split): Set tail.

	* htmlengine-edit.c (delete_different_parent): Do not move
	TextSlaves; destroy them instead.

	* htmltext.c (remove_text): Always queue a redraw for the parent.

2000-01-02  Jonas Borgstrm <jonas_b@bitsmart.com>

	* htmlengine.c (parse_input): Added more support for <input> tag
	
	* htmlbutton.[ch], htmltextinput.[ch], 
	  htmlradio.[ch], htmlcheckbox.[ch],
	  htmlhidden.[ch], htmlform.[ch] and
	  htmlelement.[ch] More frame work.

	* gtkhtml.[ch], htmlengine.[ch]: Added New signal 'submit'

	* testgtkhtml.c: Added submit support.

2000-01-02  Ettore Perazzoli  <ettore@helixcode.com>

	* htmlfont.c (html_font_calc_width): Made const safe.

2000-01-02  Ettore Perazzoli  <ettore@helixcode.com>

	* htmlengine-edit.c (html_engine_delete): Rewritten in a saner
	way.
	(delete_same_parent): Helper function for `html_engine_delete'.
	(delete_different_parent): Helper function for
	`html_engine_delete'.

	* htmldrawqueue.c (draw_obj): Renamed `x', `y', `width', `height'
	to `x1',`y1', `x2', `y2' so that the names make sense.  Also, clip
	the painting region.

2000-01-02  Ettore Perazzoli  <ettore@helixcode.com>

	* htmlengine.c (parse_l): Do not use `indentSize' anymore -- just
	use `listLevel'.

2000-01-02  Jonas Borgstrm <jonas_b@bitsmart.com>

	* htmlengine.c (parse_input): Added more support for <input> tag
	
	* htmlbutton.[ch] : new files, button form element.

	* htmltextinput.[ch]: New files, textinput form element.
	
	* htmlradio.[ch]: New files, radio form element.
	The radio elements start flickering on mouseover.
	
	* htmlcheckbox.[ch]: New files, checkbox form element.

	* htmlhidden.[ch]: New files, hidden form element.

	* htmlclue.c (destroy): Enabled destroying again.

	* htmllinktextmaster.c: Fixed incorrect parent_class.

	* htmltable.c (destroy): New function, free objects.

	* htmltype.[ch]: Added new classes.
	
	* Makefile.am: Added New files

2000-01-01  Ettore Perazzoli  <ettore@helixcode.com>

	* htmlanchor.c (set_max_ascent): Do not change the y.  I have no
	idea why this is done, and breaks the layout of anchors.

	* htmlengine.c (html_engine_new_flow): Argh!  It was setting the
	indentation level in an hideous way.  Anyway, it currently simply
	uses the parameter in `html_clueflow_new()'.
	(INDENT_SIZE): Constant removed.  Instead, we increment/decrement
	indentation level by 1, as HTMLClueFlow takes care of using the
	correct raw offset for us now.
	(parse_b): Modified accordingly.
	(parse_d): Likewise.
	(parse_o): Likewise.
	(parse_u): Likewise.
	(parse_l): Instead of doing all the cluev/clueh/clueflow mess,
	just create a clueflow with an itemized style.  Wee!  This
	dramatically reduces the complexity of the code and the overhead
	of itemized lists in the tree.
	(to_roman): Removed.

	* htmltext.c (remove_text): Actually return a value, as expected.
	(html_text_remove_text): Likewise.

	* htmlclueflow.c (html_clueflow_init): New parameters `font',
	`style', `level' to initialize the corresponding new members.  Do
	not initialize `curr', `tail', `head' as they are initialized by
	`html_clue_init()' already.
	(html_clueflow_new): New parameters `font', `style' and `level',
	passed to `html_clueflow_init()'.
	(INDENT_UNIT): New constant.
	(set_max_width): Use `level' instead of `indent', by multiplying
	by `INDENT_UNIT'.
	(calc_min_width): Likewise.
	(calc_size): Likewise.
	(calc_preferred_width): Likewise.
	(draw): New function, implementation for `HTMLObject::draw'.  This
	is now necessary to draw the bullets/numbers with style
	`HTML_CLUEFLOW_STYLE_ITEM*'.
	(html_clueflow_class_init): Install it.

	* htmlclueflow.h: New enum `HTMLClueFlowStyle'.  New members
	`font', `level', `style' in `HTMLClueFlow'.  Removed member
	`indent'.

	* htmlobject.h: Do not #include "htmlfont.h" anymore.

2000-01-01  Jonas Borgstrm <jonas_b@bitsmart.com>

	* htmlengine.c (parse_i): Added support for <input> tag
	(parse_f): Added support for <form> tag
	(parse_input): New function
	
	* htmlengine.h: Added new members form and formList

	* htmlform.c: New file, initial form support
	* htmlform.h: New file.
	
	* testgtkhtml.c: Added test9.html.
	
	* test9.html: New form test.

	* Makefile.am: Added htmlform.c and htmlform.h

1999-12-31  Ettore Perazzoli  <ettore@helixcode.com>

	* htmlclueflow.c (calc_size): Set `o->y' as for some reason it
	does not work without it.  I have to find out what this is exactly
	for.

1999-12-31  Ettore Perazzoli  <ettore@helixcode.com>

	* htmlengine.c (close_flow): Avoid segfault if there is no prev.

1999-12-31  Ettore Perazzoli  <ettore@helixcode.com>

	* htmlclueflow.c (html_clueflow_init): Removed parameters `x',
	`y', `max_width', `percent'.  I have no idea why they are here
	actually.
	(html_clueflow_new): Likewise.  All callers updated.

	* htmlengine-edit.c (html_engine_delete): Merge the next clueflow
	with the current one if deleting at the end of the flow itself.
	This does not completely work yet; I have to fix some stuff in the
	way the tree is generated first.

	* htmlengine.c (parse_m): Made local variable `content' const
	correct.

	* htmlclue.c (html_clue_remove): New function.
	(html_clue_prepend): Doc'ed and added preconditions.
	(html_clue_append): Likewise.

	* htmltext.c (remove_text): Return the number of characters
	actually deleted.
	(html_text_remove_text): Likewise.
	* htmltextmaster.c (remove_text): Updated accordingly.

1999-12-31  Ettore Perazzoli  <ettore@helixcode.com>

	* htmlengine-edit.c (html_engine_insert_para): Inserting a
	paragraph at the beginning of a paragraph correctly results in an
	empty paragraph now.

	* htmlclueflow.c (html_clueflow_split): Deal with splitting at the
	head of the clue correctly.
	(calc_size): Consider the object's height even if at the left
	margin.  I am not sure this is correct fix, but I don't see the
	reason for not doing it this way, and the previous code did not
	handle a hspace alone in a clueflow as expected.

1999-12-30  Jonas Borgstrm <jonas_b@bitsmart.com>

	* htmlengine.c (parse_m): Added support for META refresh
	
	* htmlengine.[ch] (redirect): New signal
	
	* gtkhtml.[ch] (redirect): New signal

	* testgtkhtml.c (on_redirect): New function, support for META redirection.

1999-12-30  Ettore Perazzoli  <ettore@helixcode.com>

	* htmlobject.c (destroy): Do not deal with the font anymore.

	* htmlobject.h: Removed member `font' from `HTMLObject'.  Bleargh.
	This was truly awful and caused a lot of confusion in the code (as
	`HTML_{TEXT,HSPACE} (obj)->font' was used and `obj->font' was
	always NULL).  It also wasted 4 bytes per object just for nothing.

	* htmltext.c (html_text_init): Precondition: the font pointer must
	not be NULL.

	* htmllinktext.c (split): New function, implementation for
	`HTMLText::split'.
	(html_link_text_class_init): Install it.

	* htmllinktextmaster.c (split): New function, implementation for
	`HTMLText::split'.
	(html_link_text_master_class_init): Install it.

	* htmltextmaster.c (split): New function, implementation for
	`HTMLText::split'.
	(html_text_master_class_init): Install it.

	* htmltext.c (html_text_split): New function.
	(split): New function, default implementation for
	`HTMLText::split()'.
	(html_text_class_init): Install it.

	* htmltext.h: New virtual method `split'.

	* htmlclue.c (html_clue_prepend): New function.
	(html_clue_append_after): New function.

	* htmllinktextmaster.c (html_link_text_master_init): Removed
	parameter `painter'.
	(html_link_text_master_new): Likewise.

	* htmlclue.c (html_clue_append): Set the child's `next' pointer to
	NULL.

	* htmltextmaster.c (html_text_master_init): Removed parameter
	`painter'.
	(html_text_master_new): Likewise.

	* htmltext.c (html_text_init): Removed parameter `painter'.
	(html_text_new): Likewise.

	* htmlhspace.c (html_hspace_init): Removed parameter `painter'.
	(html_hspace_new): Likewise.

	* htmlclue.c (html_clue_split): New function.

	* htmlobject.c (html_object_set_parent): Allow setting a NULL
	parent.

	* htmlcursor.c (forward): Never put the cursor after the last
	character of the text.
	(backward): Likewise.

	* htmlengine.c: Moved helper functions on top.
	(close_flow): New helper function for closing the current
	ClueFlow.
	(block_end_pre): Use it.
	(html_engine_insert_vspace): Use it.
	(block_end_list): Use it.
	(block_end_indent): Use it.
	(parse_b): Use it.

	* htmlhspace.c (draw): Call `HTMLObject::draw()' so that we can
	have the cursor on this.
	(accepts_cursor): New function, implementation for
	`HTMLObject::accepts_cursor()'.
	(html_hspace_class_init): Install it.
	(html_hspace_init): Set the width to 1 if the hspace is invisible.

	* htmlengine.c (html_engine_end): Move the cursor to the home
	position only if the engine is in the editable state.

1999-12-29  Ettore Perazzoli  <ettore@helixcode.com>

	* htmldrawqueue.c (html_draw_queue_flush): Destroy the object
	(without drawing it) if it has `free_pending' true.

	* htmlobject.c (destroy): If the object has a redraw pending, do
	not `g_free()' it; instead, set `free_pending' to `TRUE'.
	(html_object_init): Set `free_pending' to `TRUE'.
	(html_object_destroy): If `free_pending' is true, just `g_free()'
	the object instead of calling the `destroy' method.

	* htmlobject.h: New member `free_pending' in `HTMLObject'.

	* gtkhtml.c (key_press_event): Handle `GDK_BackSpace' by moving
	the cursor to the left and then, if the movement was successful,
	deleting to the right.

	* htmlengine-edit.c (html_engine_move_cursor): Return value
	changed to `guint': return the number of movement actions actually
	taken.  Also, I cleaned up the code a bit.

	* htmlcursor.c (forward): Return value type changed to `gboolean':
	return TRUE if the movement was successful, FALSE otherwise.
	(backward): Likewise.
	(html_cursor_forward): Likewise.
	(html_cursor_backward): Likewise.
	(html_cursor_up): Likewise.
	(html_cursor_down): Likewise.
	(backward): If the cursor is in a NULL position at the beginning
	of the call, move it home.  (Temporary, but consistent with what
	the other cursor movement functions do.)

	* htmlengine-edit.c (queue_draw_for_cursor): Queue the draw even
	if we are not on a text element.

	* htmlcursor.c (next): Removed debugging messages.
	(debug_location): New function to print the cursor position on the
	HTML tree for debugging purposes.
	(html_cursor_home): Use it.
	(html_cursor_forward): Likewise.
	(html_cursor_backward): Likewise.
	(html_cursor_up): Likewise.

	* htmlrule.c (accepts_cursor): New function, implementation of
	`HTMLObject::accepts_cursor'.  This returns TRUE so that you can
	now put the cursor on a rule.
	(html_rule_class_init): Install it.
	(draw): Call `HTMLObject::draw()' so that the cursor is drawn when
	on the rule.  Also, fixed the out-of-area check.

	* htmlcursor.c (forward): Use `html_object_accepts_cursor()'.
	(backward): Likewise.
	(html_cursor_up): Deal with non-HTMLText objects.
	(html_cursor_down): Likewise.

	* htmltext.c (accepts_cursor): New function, implementation of
	`HTMLObject::accepts_cursor'.
	(html_text_class_init): Install it.

	* htmlobject.c (html_object_accepts_cursor): New function.
	(accepts_cursor): New function, default implementation for the
	`accepts_cursor' virtual method.
	(html_object_class_init): Install it.

	* htmlobject.h: New virtual method `accepts_cursor'.

	* htmlengine.c (html_engine_get_type): Removed prototype here.
	* htmlengine.h (html_engine_get_type): Moved here.

	* htmlengine-edit.c (queue_draw_for_cursor): Use
	`html_object_is_text()'.
	(html_engine_insert): Likewise.

	* htmlcursor.c (is_text): Removed.
	(forward): Use `html_object_is_text()' instead.
	(backward): Likewise.

	* htmlobject.c (html_object_is_text): New function.  Ugliest thing
	on Earth, but cheap and working for now.

	* htmlengine-edit.c (html_engine_delete): Added precondition:
	check that `e' is an HTMLEngine.
	(html_engine_insert): Likewise.

	* htmlengine.h (IS_HTML_ENGINE): Renamed to `HTML_IS_ENGINE'.
	(IS_HTML_ENGINE_CLASS): Renamed to `HTML_IS_ENGINE_CLASS'.
	(TYPE_HTML_ENGINE): Renamed to `HTML_TYPE_ENGINE'.

1999-12-28  Ettore Perazzoli  <ettore@helixcode.com>

	* htmlpainter.c (html_painter_draw_cursor): Fix the cursor height:
	it was one pixel too high.

	* htmlobject.c (html_object_calc_abs_position): Take account for
	the ascent.

	* gtkhtml.c (idle_handler): Make cursor visible.

	* htmlengine.c (html_engine_make_cursor_visible): New function.

	* gtkhtml.c (key_press_event): Handle `GDK_Delete' and
	`GDK_KP_Delete'.

	* htmlengine-edit.c (html_engine_delete): New function.

	* htmltextmaster.c (remove_text): New function, implementation for
	the `remove_text' method.
	(html_text_master_class_init): Install it.

	* htmltext.c (html_text_insert_text): Added precondition on
	parameter `engine'.
	(html_text_remove_text): New function.
	(remove_text): New function, default implementation for the
	`remove_text' method.
	(html_text_class_init): Install it.

	* htmltext.h: New virtual method `remove_text'.

	* htmlobject.c (html_object_calc_abs_position): Actually use local
	variable `p'.

	* htmlcursor.c (forward): New helper function.
	(html_cursor_forward): Use it.  Added preconditions.
	(backward): New helper function.
	(html_cursor_backward): Use it.  Added preconditions.
	(html_cursor_up): Set the target X value before anything else, to
	make sure it is always set correctly.  Use `backward()' instead of
	`html_cursor_backward()'.
	(html_cursor_down): Likewise.  Use `forward()' instead of
	`html_cursor_forward()'.
	(html_cursor_new): Initialize `have_target_x' to FALSE, not TRUE.

	* htmltextmaster.c (calc_char_position): Make sure the coordinates
	are always calculated.

	* htmltextslave.c (fit_line): Destroy the next object instead of
	just `g_free()'ing it.  Do not kill the space between the various
	TextSlaves: instead, keep it at the end of the slave.

	* htmlengine-edit.c (queue_draw_for_cursor): Do nothing if the
	pointer to the current object is NULL.

	* htmlurl.c (concat_dir_and_file): Made static.

	* testgtkhtml.c (netin_stream_free): Call `gtk_html_end()' again.
	It does not seem to cause crashes anymore.

	* htmldrawqueue.c (draw_obj): Removed debugging message.

	* gtkhtml.c: Do not #include <stdio.h> anymore.
	(html_engine_draw_pending_cb): Removed debugging message.

	* htmlcursor.c (html_cursor_forward): Skip TextMaster-derived
	objects.

	* gtkhtml.c (key_press_event): Handle `GDK_Up' and `GDK_Down'.

	* htmlengine-edit.c (html_engine_move_cursor): Handle
	`HTML_ENGINE_CURSOR_UP' and `HTML_ENGINE_CURSOR_DOWN'.

	* htmlcursor.c (html_cursor_new): Init `target_x',
	`have_target_x'.
	(html_cursor_equal): New function.
	(html_cursor_up): New function.
	(html_cursor_down): New function.
	(html_cursor_forward): Set `have_target_x' to FALSE.
	(html_cursor_backward): Likewise.

	* htmlcursor.h: New members `target_x', `have_target_x' in
	`HTMLCursor'.

	* htmlobject.c (html_object_calc_abs_position): New function.

	* htmltextmaster.c (calc_char_position): Implementation of the
	`HTMLText::calc_char_position' method.
	(html_text_master_class_init): Install it.

	* htmltext.c (html_text_calc_char_position): New function.
	(calc_char_position): Default implementation for the
	`calc_char_position' method.
	(html_text_class_init): Install it.

	* htmltext.h: New virtual method `calc_char_position'.

1999-12-26  Ettore Perazzoli  <ettore@helixcode.com>

	* htmltext.c (insert_text): Relayout the parent instead of just
	this text.

	* htmlobject.c (relayout): Set the X/Y position manually if this
	is the toplevel object.  Ugly, but there is no way around it for
	now.

1999-12-23  Ettore Perazzoli  <ettore@helixcode.com>

	* htmlengine-edit.c (html_engine_move_cursor): Queue a redraw for
	the cursor.

	* htmltextmaster.c (queue_draw): New function, implementation for
	the `queue_draw' method.
	(html_text_master_class_init): Install it.

	* htmltext.c (html_text_queue_draw): New function.
	(queue_draw): Default implementation for the `queue_draw' method.
	(html_text_class_init): Install it.
	(insert_text): Queue a draw if the parent did not change after
	relayout (and consequently did not queue a draw for itself).

	* htmltext.h: New virtual method `queue_draw'.

	* htmlclueflow.c (calc_size): Do not assign `o->y' anymore.  I am
	not 100% sure that this does not break anything, but at the same
	time I don't see any reason why the y value should be set here.
	So if this breaks, probably it means that something is broken
	somewhere else.

	* htmlcluev.c (calc_size): Replaced hideous binary shift with a
	multiplication.

        [1999-12-22]

	* htmlfont.c (create_gdk_font): `family' made const.
	(html_font_new): Removed unused variable.
	(create_gdk_font): Removed unused variable.

	* htmlcursor.c: #include "htmlclue.h".

	* htmlobject.h: Moved all the typedefs on top, before the #include
	section.

	* htmltext.c (html_text_insert_text): New parameter `engine'.
	(insert_text): New parameter `engine'.  Queue a redraw for the
	object.

	* htmltext.h: New parameter `engine' in method `insert_text'.

	* htmlobject.c (html_object_relayout): New argument `engine'.
	(relayout): New argument `engine'.  Queue a redraw for the object
	if the size changes and the object has no parent, or if the size
	changes and the parent's size does not change.

	* htmlobject.h: New argument `engine' in method `relayout'.

	* htmlengine.c (html_engine_queue_draw): New function.

	* htmlengine-edit.c (html_engine_move_cursor): Do not redraw
	everything.

	* htmlcursor.c (html_cursor_backward): Removed debugging message.
	(html_cursor_forward): Removed debugging message.

	* gtkhtml.c (html_engine_url_requested_cb): First argument
	corrected from `GtkHTML' to `HTMLEngine'.
	(html_engine_draw_pending_cb): New function.
	(gtk_html_new): Connect it to the "draw_pending" signal of the
	HTMLEngine.

	* htmlengine.c: New signal `draw_pending'.
	(html_engine_class_init): Install it.

	* htmlengine.h: Type of first argument in the `url_requested'
	method corrected from `GtkHTML' to `HTMLEngine'.  New signal
	`draw_pending'.

	* gtkhtml.c (idle_handler): New function, flushing the engine's
	draw queue.
	(init): Init it.
	(destroy): Remove pending idle handler.
	(queue_draw): New utility function installing the idle handler.

	* htmlengine.c (html_engine_flush_draw_queue): New function.

	* gtkhtml.h: New member `idle_handler_id' in `GtkHTML'.

	* gtkhtml.c (destroy): Call the parent class' `destroy' method.

	* htmlengine.h: New member `draw_queue' in `HTMLEngine'.
	* htmlengine.c (html_engine_init): Init it.
	(html_engine_destroy): Destroy it.

	* gtkhtml.c: Cleaned up a bit.

	[1999-12-21]

	* htmllinktext.c (html_link_text_new): Use `g_print' instead of
	`printf' for debugging messages.

	* htmltext.c (draw): Removed debugging mesasge.

	* htmlobject.h: New member `redraw_pending' in `HTMLObject'.
	* htmlobject.c (html_object_init): Initialize it to FALSE.

	* htmldrawqueue.c: New file.
	* htmldrawqueue.h: New file.

	* htmltextslave.c (draw): Draw the cursor if it's in the owner,
	instead of the slave.

	* htmlcursor.c (html_cursor_forward): Move on the masters instead
	of the slaves.  The slaves are not a good place for anchoring the
	cursor, as they can be destroyed/recreated without the cursor's
	control.
	(html_cursor_backward): Likewise.

	[1999-12-20]

	* htmlengine.c (html_engine_insert_text): `str' made const.
	`g_strdup()' strings before passing to the text object creation
	functions.

	* htmltextmaster.c (insert_text): New HTMLTextMaster-specific
	implementation for the `insert_text' virtual method.
	(html_text_master_class_init): Install it.

	* htmltext.c (insert_text): Make the text pointer point to the new
	buffer.

	* testgtkhtml.c (main): Removed unused variables.

	* gtkhtml.c (key_press_event): If we are given a nonempty string,
	insert it and move the cursor to the right.

	* htmltext.c (insert_text): Relayout parent.
	(html_text_class_init): Install `insert_text' as the default
	implementation for the `insert_text' method.

	* htmlengine-edit.c (html_engine_cursor_move): Renamed to
	`html_engine_move_cursor'.
	(html_engine_insert_text): New function; not quite finished yet.

	* htmlengine-cursor.c: Renamed to `htmlengine-edit.c'.
	* htmlengine-cursor.h: Renamed to `htmlengine-edit.h'.

	* htmlengine.h: Member `show_cursor' in `HTMLEngine' renamed to
	`editable'.

	* htmlengine.c (html_engine_show_cursor): Renamed to
	`html_engine_set_editable'.

	* htmlobject.c (html_object_relayout): New function.
	(relayout): Default implementation for `relayout'.
	(html_object_class_init): Install it.

	* htmlobject.h: New method `relayout'.

	* htmltextmaster.c (htmL_text_master_get_slave): New function.

	* htmltext.c: Make the `insert_text' method get an integer offset
	instead of a pointer to an `HTMLCursor' object.
	(html_text_insert_text): Updated accordingly.

	[1999-12-13]

	* htmlobject.c (html_object_check_point): Removed debugging code.
	(html_object_draw): Removed debugging code.

1999-12-20  Ariel Rios  <jarios@usa.net>

	* gtkhtml.h: (gtk_html_stream_unref): Moved
	  from gtkhtm-private.h as per Elliot's 
	  recomendation.
	  (gtk_html_stream_ref): Ditto.
	  
	* gtkhtml-private.h:(gtk_html_stream_unref) The function
	  header was moved unto gtkhtml.h
	  (gtk_html_stream_ref) Ditto.

1999-12-19  Jonas Borgstrm  <jonas_b@bitsmart.com>

	* htmlurl.c (html_url_append_path): Strip cgi args
	
1999-12-15  Ariel Rios <jarios@usa.net>
	
          Contributed by Marius Vollmer.

	* gtkhtml-private.h: Add ref_count element in GtkHTML struct.
	(gtk_html_stream_unref): New prototype.
	(gtk_html_stream_ref): New prototype.
	  These two functions would maintain a reference count on a
	  GtkHTMLStream handle so that the struct would only be freed when the
	  ref count reaches zero. gtk_html_stream_new would return a stream
	  with ref_count == 1 and gtk_html_stream_end would flag the stream as
	  terminated and call gtk_html_stream_unref; gtk_html_stream_write
	  would recognize a terminated stream.

	* htmlstream.c (gtk_html_stream_unref): Added.
	(gtk_html_stream_ref): Added.
	(gtk_html_stream_new): Added declararion of new ref_count element.
	(gtk_html_stream_write): Instead of g_freeing the stream here, we
	set write_callback and end_callback as NULL. Then we call
	gtk_html_stream_unref to g_free the handle.

1999-12-15  Havoc Pennington  <hp@redhat.com>

	* gtkhtml.c (gtk_html_realize): Add button press/release to the
	event mask so we get link clicks

1999-12-15  Havoc Pennington  <hp@redhat.com>

	* htmlurl.c (html_url_new): put in a phony path if we return
	because the path string has length 0

1999-12-15  Havoc Pennington  <hp@redhat.com>

	* testgtkhtml.c (main): remove explicit adjustment-setting

	* gtkhtml.c (gtk_html_new): no adjustment args, don't init the
	adjustment fields. This causes Breakage but it's necessary
	probably (and approved by Anders)

	* htmlurl.c (html_url_new): Put in a warning if an HTMLURL with
	NULL path is returned, this is a bug that needs fixing
	(html_url_append_path): put in an assertion that url->path != NULL

1999-12-15  Havoc Pennington  <hp@pobox.com>

	* gtkhtml.c (gtk_html_set_adjustments): zero the connection ID
	if we don't fill it in, avoids a warning message.

1999-12-14  Havoc Pennington  <hp@pobox.com>

	* gtkhtml.c (gtk_html_new): Use
	gtk_widget_set_scroll_adjustments() to set the adjustments
	(gtk_html_class_init): install a scroll adjustments handler
	(gtk_html_set_adjustments): implement this - it connects to the
	adjustments.
	(gtk_html_class_init): add destroy handler

	* gtkhtml.h: add fields to store adjustment connections

1999-12-13  Ettore Perazzoli  <ettore@helixcode.com>

	* gtkhtml.c (gtk_html_size_allocate): Do not call
	`html_engine_calc_absolute_pos' anymore.

	* htmlengine.c (html_engine_calc_absolute_pos): Removed.
	(html_engine_update_event): Do not call it anymore.

	* htmltable.c (calc_absolute_pos): Removed.
	(html_table_class_init): Do not install anymore.

	* htmlclue.c (calc_absolute_pos): Removed.
	(html_clue_class_init): Do not install anymore.

	* htmlobject.c (html_object_init): Do not initialize `abs_x',
	`abs_y' anymore.
	(calc_absolute_posi: Removed.
	(html_object_class_init): Do not install anymore.
	(html_object_calc_absolute_pos): Removed.

	* htmlobject.h: Remove `abs_x', `abs_y'.  Removed
	`calc_absolute_pos' virtual function.

1999-12-12  Miguel de Icaza  <miguel@helixcode.com>

	* htmlengine.c (draw_background): Removed the clipping from here,
	it fixes the double buffering problems.

	* htmlfont.c (create_gdk_font): Fixed memory leaks.

1999-12-12  Ettore Perazzoli  <ettore@helixcode.com>

	* gtkhtml.c (gtk_html_init): Use `GDK_HAND2' and `GDK_LEFT_PTR' as
	the hand/arrow cursors.

	* htmltext.c (html_text_insert_text): New function.
	(insert_text): New function.

	* htmltext.h: New virtual method `insert_text'.

	* htmlurl.c (html_url_destroy): Added precondition.

	* gtkhtml.c (gtk_html_set_geometry): Removed unused function.

	* htmlpainter.c (html_painter_set_font): Destroy the existing
	font, duplicate the new one.

	* htmlfont.c (html_font_destroy): Do not unref the GdkFont if
	NULL.
	(html_font_dup): New function.

	* testgtkhtml.c (title_changed_cb): Removed debugging message.
	Also, free memory returned by `g_strdup_printf()'.

	* htmltable.c (calc_col_info): Free existing row information
	before allocating new.
	(html_table_init): Make sure all the members are initialized.

1999-12-12  Jonas Borgstrm  <jonas_b@bitsmart.com>

	* htmlurl.c (html_url_to_string): html_url_to_string produced
	incorrect urls on url with a port number.
	
	* htmlengine.c (parse_i): Modified the image loading a bit.

1999-12-12  Jonas Borgstrm  <jonas_b@bitsmart.com>

	* testgtkhtml.c (on_stop): Delete all requests.
	(goto_url): Delete requests.

1999-12-12  Ettore Perazzoli  <ettore@helixcode.com>

	* htmltextslave.c (fit_line): Set `prev' on the next, if any.

	* gtkhtml.c (key_press_event): Move left too.

	* htmlcursor.c (html_cursor_backward): Implemented.
	(prev): Removed.

1999-12-12  Jonas Borgstrm  <jonas_b@bitsmart.com>

	* htmlengine.c (parse_table): Added support for backgrounds in tables.
	(parse_href): Better handling of "" hrefs.

	* htmlimage.c (html_image_factory_register(): Insert url into list
	before emitting signal.

	* htmlpainter.c (html_painter_draw_background: Added two
	parameters, pix_width, pix_height.

	* htmltablecell.c (draw): Added support for backgrounds:
	http.//www.themes.org looks great now :)
	(html_table_cell_set_pixmap): New function.

1999-12-12  Ettore Perazzoli  <ettore@helixcode.com>

	* testgtkhtml.c (on_link_followed): New function.
	(main): Instead of connecting `on_button_release_event' to the
	"button_release_event" signal, connect `on_link_followed' to
	"link_followed".
	 (on_button_release_event): Removed.

	* gtkhtml.c: `link_followed' signal renamed to `link_clicked'.
	(gtk_html_button_press_event): New function.  Not doing anything
	for now.
	(gtk_html_button_release_event): New function.  Emit
	"link_clicked" on button release if the pointer is on a URL.
	(gtk_html_class_init): Install them as the "button_press_event"
	and "button_release_event" implementations.

1999-12-11  Ettore Perazzoli  <ettore@helixcode.com>

	* htmltextslave.c (fit_line): Do not assign to `next_obj->prev' if
	`next_obj' is NULL.

1999-12-11  Jonas Borgstrm  <jonas_b@bitsmart.com>

	* htmlengine.c (html_engine_set_base_url): New function
	(parse_s): New function, added support for <small> and </small>
	(html_engine_begin): set newPage = TRUE
	(html_engine_update_event): Scroll page to top if newPage is set.

	* htmlengine.h:(html_engine): new member newPage
	
	* gtkhtml.c (gtkhtml_set_base_url): New function

	* testgtkhtml.c (main): Add a default filter callback (request_terminater).
	(request_terminater): New function. Terminates requests.
	(url_requested): Adds filters for 4 different redirections.
			 Redirections are now handled properly.
	(redirectFilter): New function. calls gtk_html_set_base_url on redirection.
	
	* htmlurl.c (html_url_new): if path == NULL set it to "/"
	(html_url_append_path) Cut the path at the first '/' from the right.
	
1999-12-11  Ettore Perazzoli  <ettore@helixcode.com>

	* htmltextslave.c (fit_line): Update the `prev' pointer.

	* htmltextmaster.c (fit_line): Update the `prev' pointer.

	* htmlclue.c (html_clue_append): Set the `prev' pointer as well.

	* htmlobject.c (html_object_init): Initialize it.

	* htmlobject.h: New member `prev' in `HTMLObject'.

	* htmlcursor.c (html_cursor_backward): New function, does nothing for now.

1999-12-11  Matt Wilson  <msw@redhat.com>

	* htmlurl.c (html_url_append_path): removed dependency on
	gnome by re-implementing g_concat_dir_and_file

1999-12-11  Elliot Turner  <turnere@MimeStar.com>

	* htmlengine.c (parse_m): New function to deal with the `meta'
	tag.
	(parse_table): Remove tmpCell stuff that resulted in random
	segfaults.
	(parse_i): Don't set the parent in the ClueAligned object in
	advance.
	(parse_table): Likewise.

1999-12-11  Ettore Perazzoli  <ettore@helixcode.com>

	* htmlcursor.c (html_cursor_forward): Some navigation fixes.

	* debug.c (debug_dump_tree): Print out the value of the parent
	pointer too.

	* htmltextslave.c (fit_line): Set the parent on the slave.

	* htmltextmaster.c (fit_line): Set the parent on the slave.

	* htmltextslave.c (draw): Draw the cursor if the cursor is here.

	* htmltext.c (draw): Draw the cursor if the cursor is here.

	* htmlobject.c (draw): Draw the cursor if the cursor is here.

	* htmlobject.h: New argument `cursor' in the `draw' method.  All
	of the related functions updated accordingly.

	* htmlengine-cursor.h, htmlengine-cursor.c: New files.

	* gtkhtml.c (key_press_event): New function, implementation for
	the `key_press_event' virtual method.
	(gtk_html_realize): Removed double realization.  Also, add
	`GDK_KEY_PRESS_MASK' and `GDK_KEY_RELEASE_MASK' to the event mask
	for the bin window.

	* htmltext.c (draw_cursor): New function, implementation of the
	`draw_cursor' virtual method.
	(html_text_class_init): Install it.

	* htmlpainter.c (html_painter_draw_cursor): New function.

	* htmlcursor.c (html_cursor_forward): New function to make the
	cursor go forward on the tree.

	* testgtkhtml.c: Big hack to at least make the stop button really
	stop loading.  Something is still wrong, though, as we get no
	callback when the input stream ends.  Help is welcome.  So, there
	is a new local variable called `html_handle' to hold the main html
	stream handle.
	(goto_url): Initialize it with the return value from
	`gtk_html_begin'.
	(stop_cb): Stop the stream and set `html_handle' to NULL.

	* htmlengine.c (html_engine_end): Position the cursor at the
	beginning of the document.

	* htmlcursor.c (html_cursor_home): New function to position the
	cursor at the beginning of the document.

1999-12-10  Ettore Perazzoli  <ettore@helixcode.com>

	* htmlcursor.c (html_cursor_destroy): Added precondition.

	* htmlengine.h (html_engine_get_doc_width): Added prototype.

	* htmlengine.c (parse_body): Add cast to `html_clue_append' call.

	* htmlpainter.h: New member `black' in `HTMLPainter', holding the
	GdkColor for black.
	* htmlpainter.c (html_painter_realize): Allocate it.

	* htmlengine.c (draw_cursor): New function.
	(html_engine_parse): Set the cursor to point at the first clue.

	* htmlpainter.c (html_painter_draw_line): New function.

	* htmlengine.h: New members `cursor', `show_cursor' in `struct
	HTMLEngine'.
	* htmlengine.c (html_engine_init): Init them.
	(html_engine_destroy): Destroy the cursor.

1999-12-11  Anders Carlsson  <andersca@gnu.org>

	* htmlengine.c (parse_body): Add a handler for the '\n' tag
	that's used for newlines in <pre>...</pre>

1999-12-11  Anders Carlsson  <andersca@gnu.org>

	* testgtkhtml.c (main): Set policy to only show scrollbars when needed.

	* gtkhtml.c (gtk_html_calc_scrollbars): use gtk_layout_set_size ();

1999-12-11  Anders Carlsson  <andersca@gnu.org>

	* testgtkhtml.c (main): Use a scrolled window instead of
	a scroll bar.

	* gtkhtml.c (gtk_html_horizontal_scroll): Added function.
	(gtk_html_new): Connect signal to function.
	(gtk_html_calc_scrollbars): Calculate adjustment for horizontal
	scrollbar as well.

	* htmlengine.c: Added functions for calculating document width

1999-12-10  Ettore Perazzoli  <ettore@helixcode.com>

	* htmlengine.h (html_engine_draw_background): Removed prototype.

	* htmlengine.c (html_engine_show_cursor): New function.
	(html_engine_init): Initialize `show_cursor' to TRUE.
	(html_engine_draw_background): Made static and renamed to
	`draw_background'.
	(html_engine_draw): Updated accordingly.

	* htmlengine.h: New flag `show_cursor' in `struct HTMLEngine'.

	* htmlcursor.c, htmlcursor.h: New files.

1999-12-10  Jonas Borgstrm  <jonas_b@bitsmart.com>

	* htmlengine.c (parse_i): Do not pass NULL pointer to
	html_url_to_string.
	
1999-12-10  Ettore Perazzoli  <ettore@helixcode.com>

	* All files: updated to match these changes.

	* htmlclue.c (html_clue_append): Set the parent of the object to
	this one.

	* htmlobject.h: New member `parent' in `HTMLObject'.
	* htmlobject.c (html_object_init): Set it to NULL.
	(html_object_set_parent): New function.

1999-12-10  Jonas Borgstrm  <jonas_b@bitsmart.com>

	* gtkhtml.c (gtk_html_begin): Scroll page to the top on new url
	
	* htmltokenizer.c (html_tokenizer_write): Fixing parsing of entity.
	
	* htmlentity.c (html_entity_parse): Corrected function.
	
1999-12-09  Miguel de Icaza  <miguel@gnu.org>

	* htmlpainter.c (html_painter_draw_pixmap): fix the offsets.

1999-12-09  Anders Carlsson  <andersca@gnu.org>

	* htmltable.c (draw): Doh! Fixed a silly bug where
	it checked c against totalRows, changing to r reallly
	speeded up test6.html

1999-12-09  Jonas Borgstrm  <jonas_b@bitsmart.com>

	* htmlengine.c (parse_a, parse_b, parse_i): Send Absolute urls to
	images.

	* testgtkhtml.c: New Features:
	  * Follow links with mouse click works now.
	  * Implemented Back, Forward, Reload, Home.
	  * Added popup menu (Back, Forward, Home)
	  * Added Go menu (Back, Forward, Home and History list)
	  * Added Wheel mouse scrolling support.
	  * Prepend "http://" To urls if needed.
	  
	* htmlurl.c (html_url_append_path): Fixed correct url handling.

1999-12-08  Miguel de Icaza  <miguel@gnu.org>

	* htmlpainter.c (html_painter_end): Another off-by one error fix.
	(html_painter_draw_panel): Adapt this routine to use the double
	buffering scheme
	(html_painter_draw_background_pixmap): Ditto.

	* htmlurl.c (html_url_append_path): Memory leak fix, and crash fix.

	* htmlpainter.c (html_painter_end): Fix off by one error.
	(html_painter_new): Double buffering is now the default.
	(html_painter_draw_pixmap): Remove soptimization to fix image repainting.
	(html_painter_draw_pixmap): Use proper API.  

1999-12-07  Ettore Perazzoli  <ettore@gnu.org>

	* htmlurl.c (scan_user_and_password): Renamed to `scan_host_info'.
	Do the right thing with URLs that do not have a slash after the
	host name (e.g. because there is no path).

	* htmlengine.c (parse_href): Do the right thing with
	duplicating/changing the HTMLURL structs.

1999-12-06  Ettore Perazzoli  <ettore@gnu.org>

	* testgtkhtml.c (on_url): Removed unused variable.
	(url_requested): Made `ctmp' const.

	* htmltype.c: #include "htmlanchor.h".

	* htmlobject.c (html_object_check_point): Removed unused variable.

	* gtkhtml.c (gtk_html_set_geometry): `#if 0'ed out as currently
	unused.

	* htmlengine.h: Changed type of `url' to `HTMLURL'.
	* htmlengine.c: All functions changed accordingly (i.e. to use
	`HTMLURL' internally, instead of `gchar *').

	* htmlengine.c (parse_href): New function for dealing with links
	properly (i.e. handling relative ones etc.).
	(parse_a): Use it.

	* htmlengine.h: New member `actualURL' in `HTMLEngine'.
	* htmlengine.c (html_engine_begin): Set it.
	(html_engine_init): Init it to NULL.
	(html_engine_destroy): Free it.

	* htmlurl.c: New file.
	* htmlurl.h: New file.

	* htmlfont.c (html_font_new): Made prototype const-safe.

	* htmlpainter.h (html_painter_draw_panel): New function prototype.

	* htmlclue.h (html_clue_append_left_aligned): Added missing prototype.

	* htmltokenizer.c (html_tokenizer_write): Parse the entity with
	`html_entity_parse()'.

	* htmlentity.c, htmlentity.h: New files dealing with entity.
	(html_entity_parse): New function.

	* htmlengine.c (parse_i): Use the current URL and target for the
	new image.

	* htmlimage.c (html_image_init): New parameters `url', `target'.
	(html_image_new): Likewise.

	* htmlimage.h: New members `url' and `target' in `HTMLImage'.

1999-12-03  Ettore Perazzoli  <ettore@gnu.org>

	* testgtkhtml.c (do_request_delete): Do not delete the request.  I
	am not sure if it's supposed to be necessary or not, but it does
	cause crashes.

	* htmlengine.c (parse_b): Oops, fix the `gtk_signal_emit()' calls.

	* htmlobject.c (html_object_get_url): Removed debugging message.

	* gtkhtml.c (gtk_html_motion_notify_event): Keep track of the
	current URL through `pointer_url'.  Also, emit the signal when the
	current URL changes.

	* testgtkhtml.c: Show usage of the `on_url' signal.

	* htmlimage.c (html_image_factory_register): Set the `stream'
	member to point to the newly created stream.
	(html_image_get_stream): New function returning a pointer to the
	stream object.

	* htmlimage.h: New member `stream' in `HTMLImage'.

	* gtkhtml.c (html_engine_title_changed_cb): New signal handler for
	the `title_changed' signal in the HTMLEngine.
	(html_engine_set_base_cb): Likewise for `set_base'.
	(html_engine_set_base_target_cb): Likewise for `set_base_target'.
	(html_engine_load_done_cb): Likewise for `load_done'.
	(gtk_html_new): Connect the signal handlers to the newly created
	object.
	(gtk_html_motion_notify_event): Don't free the URL we get from
	`html_engine_get_link_at()' anymore.

	* htmlengine.c (html_engine_begin): Emit the
	`url_requested_signal' after creating the stream.

	* htmlstream.c (gtk_html_stream_new): Do not make the GtkHTML
	widget emit any signal!

	* htmlengine.c: `html_engine_signals' renamed to `signals' and
	made static.  Also, added "set_base_target", "set_base",
	"load_done", "title_changed" own signals.
	(parse_b): Make the engine emit signals, not the owner widget.
	(parse_t): Likewise.
	(html_engine_end): Likewise.

	* gtkhtml-private.h: Removed signals from here.
	* gtkhtml.c: Moved here.  Also, changed the name from
	`html_signals' to `signals'.

	* gtkhtml.h, gtkhtml.c: New signal `on_url'.

	* gtkhtml.h: New member `pointer_url' in `GtkHTML'.
	* gtkhtml.c (gtk_html_init): Init it to NULL.
	(destroy): `g_free()' it.

	* gtkhtml.c (gtk_html_motion_notify_event): Updated to the const
	return of `html_engine_get_link_at()'.

	* htmlengine.c (html_engine_get_link_at): Return value made const.
	So, we don't strdup the value from `html_object_get_url()'
	anymore.

	* gtkhtml.c (destroy): New function, implementation of the
	`destroy' method.
	(gtk_html_class_init): Install it.
	(gtk_html_realize): Set the arrow cursor as the initial cursor for
	the new widget.

	* gtkhtml.h: New members `hand_cursor' and `arrow_cursor'.
	* gtkhtml.c (gtk_html_init): Init them.

	* htmlengine.c (html_engine_get_uri_at_pointer): Renamed to
	`html_engine_get_link_at'.
	* htmlengine.h: Updated likewise.
	* gtkhtml.c (gtk_html_motion_notify_event): Updated accordingly.

1999-12-04  Anders Carlsson  <andersca@gnu.org>

	* htmlsettings.c: Fix the correct number of font sizes, it's 7 not 6.

	* htmltable.c (draw): Use html_painter_draw_panel for table borders.

	* htmlpainter.c (html_painter_draw_panel): New function for drawing a
	3d panel.

	* htmlimage.c (draw): Use html_painter_draw_panel for pictures that
	are not yet loaded.

1999-12-03  Ettore Perazzoli  <ettore@gnu.org>

	* htmllinktextmaster.c (html_link_text_master_init): `url' and
	`target' made const.  Strdup before assigning.
	(html_link_text_master_new): Likewise.
	(get_url): Removed debugging message.

	* htmllinktext.c (html_link_text_init): Strdup the URL and the
	target strings.
	(html_link_text_new): Made the `url' and `target' arguments const.
	(html_link_text_init): Likewise.

	* htmltextslave.c (get_url): Implementation of the `get_url'
	virtual method.
	(html_text_slave_class_init): Install it.

	* gtkhtml.c (motion_notify_event): New function, handler for the
	`notify_event' signal.
	(gtk_html_class_init): Install it.

1999-12-04  Anders Carlsson  <andersca@gnu.org>

	* htmlcluev.c (appended): Traverse the aligned list, not the
	regular object tree list. This fixes the slashdot bug (Finally).

1999-12-03  Ettore Perazzoli  <ettore@gnu.org>

	* htmltable.c (check_point): Implementation of `check_point'.
	(html_table_class_init): Install it.

	* htmlcluev.c (check_point): Implementation of `check_point'.
	(html_cluev_class_init): Install it.

	* htmlclue.c (check_point): Implementation of `check_point'.
	(html_clue_class_init): Install it.

	* htmlobject.c (check_point): Default implementation for
	`check_point'.
	(html_object_class_init): Install it.
	(html_object_check_point): New function.
	
	* htmlobject.h: New virtual method `check_point'.

1999-12-03  Ettore Perazzoli  <ettore@gnu.org>

	* htmltable.c (mouse_event): New function, implementing the
	`mouse_event()' virtual method.
	(html_table_class_init): Install it.

	* htmlcluev.c (mouse_event): New function, implementing the
	`mouse_event()' virtual method.
	(html_cluev_class_init): Install it.

	* htmlclue.c (mouse_event): New function, implementing the
	`mouse_event()' virtual method.
	(html_clue_class_init): Install it.

	* htmlobject.c (mouse_event): Default implementation for
	`mouse_event()'.
	(html_object_class_init): Install it.
	(html_object_mouse_event): New function.

	* htmlobject.h: New virtual method `mouse_event()'.

	* htmllinktextmaster.c: The parent class is
	`HTMLLinkTextMasterClass', not `HTMLTextMasterClass'.

	* htmlobject.h: Renamed `ClearType' to `HTMLClearType'; made the
	ids uppercase and prefixed with `HTML_CLEAR_'.  Similiar treatmant
	for `HTMLVAlignType' and `HTMLHAlignType'.  Changed values for
	`HTMLFitType' to be all uppercase and be prefixed with `HTML_FIT'
	as well.  All instances updated.

1999-11-28  Ettore Perazzoli  <ettore@gnu.org>

	* htmlengine.c (parse_b): Handle `link=', `vlink=' and `text=' in
	`<body>'.
	(html_engine_init): Allocate `defaultSettings'.
	(html_engine_destroy): Free it.
	(html_engine_parse): AAARGH!  Colors must *never* be allocated
	with `g_new()'!  Anyway, we needed to push the default color, not
	an arbitrary black.
	(html_engine_parse): Allocate colors in the defaultSettings and
	copy to the settings.  Use the settings to set the initial font.
	(parse_a): Color and underline links according to the settings.
	(parse_table): Honour the `forceDefault' flag in the settings.
	(select_font_full): New helper function.
	(parse_c): Use it.  Set the correct font for `<code>'.
	(select_font_relative): New function.
	(parse_h): Use it to deal with header font sizes correctly.
	(parse_t): Use correct font for `<tt>'.
	(parse_p): Use correct font for `<pre>'.

	* htmlengine.h: New member `defaultSettings' in `HTMLEngine'.

	* htmlsettings.c (html_settings_set_font_sizes): New function.
	(html_settings_get_font_sizes): New function.
	(html_settings_reset_font_sizes): New function.
	(HTML_NUM_FONT_SIZES): New constant.
	(html_settings_alloc_colors): New function.
	(html_settings_copy): New function.
	(html_settings_set_fixed_font_face): New function.
	(html_settings_set_font_base_face): New function.

	* htmlsettings.h: Updated `HTMLSettings' to contain all the fields
	in the original KHTMLW code.  `fontbasesize' renamed to
	`fontBaseSize' and `bgcolor' to `bgColor', for consistency.

1999-11-28  Ettore Perazzoli  <ettore@gnu.org>

	* htmlengine.c (select_font_relative): Call `html_engine_set_font'
	so that it does not crash.

1999-11-28  Ettore Perazzoli  <ettore@gnu.org>

	* htmlimage.c (draw): Quick hack to always draw the border
	rectangle.

	* htmltablecell.h: Fixed typo in `HTMLTableCellClass'.

	* htmlobject.c (html_object_draw): Added debug message.

	* htmlcluev.c (draw): Add `x' to `tx' and `y - ascent' to `ty', as
	the original HTMLW code does.  Also, draw left-aligned items as
	well.  Also, I fixed the drawing calls: stupid polymorphism!

1999-11-27  Ettore Perazzoli  <ettore@gnu.org>

	* htmltokenizer.c (html_tokenizer_add_pending): Fixed typo: `%
	TAB_SIZE' instead of `& TAB_SIZE'.

1999-11-27  Ettore Perazzoli  <ettore@gnu.org>

	* htmlengine.h: Removed `parseFuncArray[]' from `struct
	_HTMLEngine'.
	* htmlengine.c: Moved here.
	(html_engine_init): Do not install `parseFuncArray' anymore.

	* htmlengine.c (parse_t): Implemented `<tt>' handling (wrong font
	though).

1999-11-26  Ettore Perazzoli  <ettore@gnu.org>

	* htmlengine.c (html_engine_init): Init `inPre', `inTitle'.
	(block_end_pre): New function.
	(parse_p): Implemented `<pre>' handling.  Also, call
	`close_anchor()' appropriately for the `<p>' case.
	(html_engine_pop_font): Report a warning if the stack is empty
	after popping to prevent segfault.
	(html_engine_new_flow): Handle `inPre'.
	(parse_v): New function, implementing `<var>'.
	(html_engine_init): Install it in the parsing vtable.
	(parse_u): Enable code for `<ul>'.

	* htmlengine.h: New member `inPre' in `HTMLEngine'.

1999-11-26  Ettore Perazzoli  <ettore@gnu.org>

	* htmlengine.c (html_engine_init): Init `tempStrings'.
	(html_engine_destroy): Free it.
	(to_roman): New function.
	(parse_l): Implemented ordered lists.
	(parse_o): Implemented.  (Parses only `<ol>' and not `<option>'
	for now.)
	(html_engine_init): Install `parse_o' in the parsing vtable.
	(block_end_list): Pop and destroy the list on the top of the
	listStack.

	* htmlengine.h: New member `tempStrings' in `HTMLEngine'.

	* htmlengine.c (html_engine_init): Init `glossaryStack'.
	(html_engine_destroy): Destroy it.
	(parse_d): Implemented `<dl>', `<dd>' and `<dt>' from the KHTMLW
	source.
	(html_engine_new_flow): Use the indent value from the HTMLEngine,
	not the clue!
	(parse_k): New function, parsing for the `<kbd>' tag.
	(html_engine_init): Install it.
	(parse_l): Call `close_anchor' for `<li>'.  Also, use
	`html_stack_is_empty()' instead of `html_stack_count()' for
	checking for emptiness.

	* htmlengine.h: New enum `HTMLGlossaryEntry'.  New member
	`glossaryStack' in `HTMLEngine'.

	* htmlstack.c (html_stack_clear): If the `free_func' is NULL,
	don't try to free elements.
	(html_stack_top): If the stack is empty, return NULL.

1999-11-26  Ettore Perazzoli  <ettore@gnu.org>

	* htmlengine.h: Replaced `HTMLListStack' with an `HTMLStack'.
	* htmlengine.c: Updated accordingly.

	* htmllist.h: `ListType' renamed to `HTMLListType', `ListNumType'
	renamed to `HTMLListNumType'.  Also, changed the values to upper
	case, and prefixed them with `HTML_LIST_TYPE' and
	`HTML_LIST_NUM_TYPE' respectively.  Occurrences updated.

	* htmllist.c, htmllist.h: Removed `HTMLListStack' implementation.

	* htmlengine.c (parse_a): Get `<address>' to work.

	* htmlengine.h: Replaced the `HTMLFontStack' with an `HTMLStack'.
	* htmlengine.c: Updated accordingly.

	* htmlfont.c, htmlfont.h: Removed the `HTMLFontStack'
	implementation.

	* htmlfont.c (html_font_new): Init `textColor'.
	(html_font_destroy): Free `textColor' if not NULL.
	(html_font_set_color): New function.
	* htmlengine.c (html_engine_parse): Use it.
	(html_engine_select_font): Use it.

	* htmlengine.h: Replaced the `HTMLColorStack' stack with a
	`HTMLStack'.
	* htmlengine.c: All the functions updated accordingly.
	(html_engine_pop_color): Free the popped color.

	* htmlcolor.c, htmlcolor.h: Removed.  #inclusions from other
	source files removed as well.

	* htmlstack.c, htmlstack.h: Implementation of a generic
	`HTMLStack' type.

	* htmlengine.c: New typedef `BlockStackElement'.
	(block_stack_element_new): New static function, derived from
	`html_stack_element_new()'.
	(html_engine_push_block): Updated to use it.
	(html_block_stack_element_free): New function.
	(html_engine_free_block): Updated to use it.
	(html_engine_push_block): Removed.
	(push_block): New static function replacing it.  Former callers of
	`html_engine_push_block' updated to use it.
	(html_engine_free_block): Removed.
	(free_block): New static function replacing it.  Former callers of
	`html_engine_free_block' updated to use it.
	(html_engine_pop_block): Removed.
	(pop_block): New static function replacing it.  Former callers of
	`html_engine_pop_block' updated to use it.
	(html_engine_block_end_font): Removed.
	(block_end_font): New static function replacing it.  Former
	callers of `html_engine_block_end_font' updated to use it.
	(html_engine_block_end_color_font): Removed.
	(block_end_color_font): New static function replacing it.  Former
	callers of `html_engine_block_end_color_font' updated to use it.
	(html_engine_block_end_list): Removed.
	(block_end_list): New static function replacing it.  Former
	callers of `html_engine_block_end_list' updated to use it.
	(html_engine_block_end_indent): Removed.
	(block_end_indent): New static function replacing it.  Former
	callers of `html_block_end_indent' updated to use it.
	(html_engine_block_end_div): Removed.
	(block_end_div): New static function replacing it.  Former callers
	of `html_engine_block_end_div' updated to use it.
	* htmlengine.h: Updated prototypes accordingly.

	* htmlengine.h: New typedef `HTMLBlockStackElement' that will
	replace former `HTMLStackElement'.

	* htmlstack.c (html_stack_element_new): Removed.  This function is
	only used by `htmlengine.c' for the block stack, so the name is
	misleading.

	* htmlengine.c (parse_d): Enable code for `</div>' which was `#if
	0'ed by mistake.

1999-11-26  Ettore Perazzoli  <ettore@gnu.org>

	* htmlengine.c (parse_table): Call `close_anchor()' when `</table'
	is encountered.  Added support for `<caption>'.  Handle headings.
	Destroy objects correctly.  Handle Left/Right alignment.  With all
	of this, this function should finally be completely ported.
	(set_base_url): New function; for now it's just a dummy.
	(select_font_relative): New function; incomplete.
	(html_engine_block_end_indent): New function.
	(parse_b): Ported `<base>', `<big>' and `<blockquote>' from
	KHTMLW.
	(parse_c): Added `<cite>' and `<code>'.  Font for `<code>' is
	wrong for now.
	(html_engine_begin): Removed unused variable.
	(html_engine_block_end_div): New function.
	(parse_d): New function, implementing only `<dir>' and `<div>' for
	now.
	(html_engine_init): Install it in the parse array.

	* htmlcluev.c (remove_aligned_by_parent): Implemented (from
	`HTMLClueV::removeAlignedByParent()').
	(calc_size): Call it (as the corresponding KHTMLW function did).

	* htmlclueflow.c (calc_size): Handle clear types correctly, using
	`html_clue_get_{left,right}_clear()'.

	* htmlclue.c (html_clue_get_right_clear): New function.
	(html_clue_get_left_clear): New function.
	(get_left_clear): Default implementation of the `get_left_clear()'
	virtual method.
	(get_right_clear): Default implementation of the `get_right_clear()'
	virtual method.
	(html_clue_class_init): Install them.
	(find_free_area): Default implementation changed to match the
	KHTMLW one.

	* htmlclue.h: New virtual methods `get_right_clear()' and
	`get_left_clear()'.
	(html_clue_get_right_clear): New prototype.
	(html_clue_get_left_clear): New prototype.

1999-11-26  Anders Carlsson  <andersca@gnu.org>

	* htmlengine.c (html_engine_draw_background): Use the new function
	when drawing backgrounds.

	* htmlpainter.c (html_painter_draw_background_pixmap): Added a new
	function for drawing the background pixmap.

	* debug.c: Adapted the debug code to the new object system.

	* htmlbullet.c (draw): Fixed the bullet redraw bug.

	* htmlimage.c (draw): Fixed the image redraw bug.

1999-11-25  Ettore Perazzoli  <ettore@gnu.org>

	* htmlengine.c: Added `ID_I' to enum `ID'.
	(parse_h): Removed extra `html_engine_select_font()' call which
	should not be there.
	(parse_i): Added code to deal with the `<i>' tag.
	(html_engine_set_named_color): Aaargh.  Return `TRUE'!
	(parse_a): Pass `TRUE' as the last argument to
	`html_engine_push_block()' when doing the "address" tag.

	* htmlengine.c (html_engine_set_named_color): Return value made
	`gboolean': return FALSE if the color could not be parsed.
	(parse_b): If `html_engine_set_named_color()' fails, don't mark
	the color as set.
	(parse_table): Likewise.

	* htmlengine.h (html_engine_set_named_color): Updated prototype.

1999-11-24  Ettore Perazzoli  <ettore@gnu.org>

	* htmllinktextmaster.c (html_link_text_master_class_init): Assign
	`parent_class' correctly.

	* htmlengine.c (parse_table): Use `html_object_set_bg_color()'
	instead of setting `cell->bg' directly.  Also, avoid using the
	colors if they have not set explicitly.  This fixes the random
	color bugs we were having with tables.

	* htmltablecell.c (set_bg_color): Implementation of the
	`set_bg_color' virtual method for HTMLTableCell.
	(html_table_cell_class_init): Install it.

	* htmlobject.c (html_object_set_bg_color): New function.
	(set_bg_color): Default implementation for the `set_bg_color'
	method.
	(html_object_class_init): Install it.

	* htmlobject.h: New virtual method `set_bg_color'.

	* htmltablecell.h: New member `have_bg' in `HTMLTableCell'.
	* htmltablecell.c (html_table_cell_init): Init it to `FALSE'.
	(draw): Don't draw the background if you don't have a background
	color.

	* htmlengine.c (parse_l): Removed allocation of `fontbasecolor'.
	(html_engine_draw_background): `bgColor' is now always allocated.
	(html_engine_parse): `settings->bgcolor' is no longer a pointer,
	so deal with it.
	(parse_h): Added code from KHTMLW to deal with different alignments
	and sizes.

	* htmlsettings.h: Type of members `bgcolor' and `fontbasecolor' in
	`HTMLSettings' changed from `GdkColor *' to `GdkColor'.
	* htmlsettings.c (html_settings_destroy): Updated accordingly.
	(html_settings_new): Likewise.

	* htmlengine.c (parse_b): Updated accordingly.
	(html_engine_parse): Likewise.
	(html_engine_draw_background): Likewise.

	* htmlengine.h: Type of member `bgcolor' in `HTMLEngine' changed
	from `GdkColor *' to `GdkColor'.

	* htmlclue.c (draw): Do not draw a green rect around the clue
	anymore.

	* htmltablecell.c (draw): Removed meaningless check for a non-zero
	pixel value.

	* htmlengine.c: Added `ID_EM' to enum `ID'.
	(parse_e): New function, imported from KHTMLW.
	(html_engine_init): Install it.

	* htmlengine.c: Renamed all the `html_engine_parse_*()' functions
	to `parse_*()', made static and moved to the top of the file.
	* htmlengine.h: Removed public prototypes accordingly.

1999-11-23  Ettore Perazzoli  <ettore@gnu.org>

	* htmlengine.c (html_engine_new_flow): Updated accordingly.
	(html_engine_insert_vspace): Updated accordingly.
	(html_engine_insert_text): Updated accordingly.
	(html_engine_parse_b): Updated accordingly.
	(html_engine_parse_i): Updated accordingly.
	(html_engine_parse_l): Updated accordingly.
	(html_engine_parse_f): Fixed allocation of `color' which caused a
	memory leak.

	* htmlclue.c (html_clue_append): Type of arg `clue' changed to
	from `HTMLObject' to `HTMLClue'.

	* htmlengine.c (html_engine_parse): Use `lucida' instead of
	`times' (temp hack).

	* htmlfont.c (create_gdk_font): Temp hack to make font handling
	behave a little more sanely.

	* htmlcluev.h: Fixed braino `HTMLClue' -> `HTMLClueClass'.

	* htmlengine.c (html_engine_insert_text): Ported all the code from
	the corresponding function in KHTMLW.
	(html_engine_parse_a): New function, ported from
	`KHTMLWidget::parseA' in KHTMLW.
	(html_engine_init): Install it.
	(close_anchor): New helper function, ported from
	`KHTMLWidget::closeAnchor()'.

	* htmlengine.h: New members `url', `target' and `baseTarget' in
	`struct _HTMLEngine'.
	* htmlengine.c (html_engine_init): Init them.
	(html_engine_destroy): Free them.

	* htmltype.h: New types `HTML_TYPE_LINKTEXT',
	`HTML_TYPE_LINKTEXTMASTER'.
	* htmltype.c (html_type_name): Updated accordingly.

	* htmllinktextmaster.c: New file, implementing the
	`HTMLLinkTextMaster' class.

	* htmlobject.c (get_url): Default implementation for the `get_url'
	virtual method.
	(get_target): Default implementation for the `get_target' virtual
	method.
	(find_anchor): Default implementation for the `find_anchor'
	virtual method.
	(html_object_class_init): Install these functions in the class
	structure.
	(html_object_get_url): New function.
	(html_object_get_target): New function.
	(html_object_find_anchor): New function.

	* htmlobject.h: New virtual methods `get_url', `get_target' and
	`find_anchor' in `HTMLObjectClass'.

	* htmlengine.h: Replaced `HTMLFontWeight weight' with `gboolean
	bold'.
	* htmlengine.c (html_engine_parse): Updated accordingly.
	(html_engine_select_font): Likewise.
	(html_engine_parse_b): Likewise.
	(html_engine_parse_h): Likewise.

	* htmllinktext.c, htmllinktext.h: New files, implementing the
	`HTMLLinkText' class.

	* htmlanchor.c, htmlanchor.h: New files, implementing
	`HTMLAnchor'.

1999-11-17  Ettore Perazzoli  <ettore@gnu.org>

	* htmlengine.c (html_engine_parse_body): Handle empty space
	correctly.  (Added a bunch of lines from the KHTMLW original.)
	This fixes the bug reported in the previous ChangeLog entry.
	(html_tokenizer_write): Added missing increment for `t->dest' when
	a sequence that is too long is ignored.

1999-11-17  Ettore Perazzoli  <ettore@gnu.org>

	* htmltokenizer.c (html_tokenizer_write): Changed handling of
	space according to the KHTMLW source; I am not sure why it was
	done differently.  Something is still wrong though, as `<li> <p>'
	introduces a vspace while `<li><p>' does not.

	* htmlengine.c (html_engine_parse_l): Set `vspace_inserted' to
	TRUE when parsing `li'.  Otherwise, things like
	`<li><p>text</p></li>' incorrectly insert a newline between the
	bullet and the text.

1999-11-17  Ettore Perazzoli  <ettore@gnu.org>

	* Makefile.am (dist-hook): Removed wrong `cp' line.
	(libgtkhtml_HEADERS): Added `gtkhtml-private'.

	* Reimplemented object handling for all the object classes.  We
	still need to fix all the `destroy' handlers and generally
	double-check that things are working right.

	* htmltype.c, htmltype.h: New files implementing a very minimal
	static object system.

	* debug.c (debug_dump_object_type): Removed.
	(debug_dump_tree): Do nothing for now, while we fix the object
	system.

1999-11-11  Elliot Lee  <sopwith@redhat.com>

	* testgtkhtml.c: WWW_SOURCE, not WWW_PRESENT (so it will work with local files).
	* htmlengine.c: Use canonicalized URL for stream creation.

1999-11-09  Ettore Perazzoli  <ettore@gnu.org>

	* Makefile.am: Compile as a standalone library `libgtkhtml.la'.

1999-10-30  Michael Meeks  <mmeeks@gnu.org>

	* html-component.c (embeddable_factory): Add persist stream interface.
	Set stream item = NULL.
	(embeddable_destroy_cb): Kill stream after use.
	(embeddable_load, load_html_from_stream): vicious hack.
	(save_html): stub.
	(view_factory): Hack out view_date->html and move into embeddable_data,
	far reaching change; we need doc / view.

	* Makefile.am (gnorba_DATA): redundant ( kill ).

1999-10-30  Michael Meeks  <mmeeks@gnu.org>

	* Makefile.am (gnorba_DATA): Add gnorba install.

	* html-component.c (update_view): just do a gtk_widget_queue_draw +
	fix args. (view_update): kill.

1999-10-28  Miguel de Icaza  <miguel@gnu.org>

	* htmlpainter.c (html_painter_begin): Use the propper offset here
	when clearing the rectangle.

	* gtkhtml.c (gtk_html_vertical_scroll): Remove the spurious call
	to repaint the whole exposed region.
	(gtk_html_new): If the adjustment was not passed, create it, so
	that we can connect to the signal changed emmission before the
	layout

	* htmlpainter.c (html_painter_draw_text): Adjust the text output
	offset too.

1999-10-26  Miguel de Icaza  <miguel@gnu.org>

	* gtkhtml.c (gtk_html_vertical_scroll): Do not force a redraw anymore.
	(gtk_html_new): Now we take two adjustment arguments.
	(gtk_html_init): Do not create an artificial scrollbar nor its
	adjustments. 
	(gtk_html_calc_scrollbars): This should be no longer required;  An
	alternate mechanism should be pursued.
	(gtk_html_calc_scrollbars): Update the adjustment here.
	(gtk_html_init): Set the APP_PAINTABLE bit here.

1999-10-25  Miguel de Icaza  <miguel@gnu.org>

	* htmlengine.c (html_engine_timer_event): Use exported routines to
	access the painter.

	* htmlpainter.c (html_painter_clear, html_painter_realize,
	html_painter_being, html_painter_end): New methods to implement
	double buffering.
	
	Moved HTMLPainter structure here to make it completely opaque.

	Added preconditions everywhere.

	Made all methods aware of the painter offset, to support double
	buffering. 
	
1999-10-24  Miguel de Icaza  <miguel@gnu.org>

	* gtkhtml.c (gtk_html_unrealize): Added unrealize handler.

1999-10-24  Richard Hult  <rhult@frenzy.hemmet.chalmers.se>

	* testgtkhtml.c (main): Exit when the window is deleted.

1999-10-23  Miguel de Icaza  <miguel@gnu.org>

	* htmltextmaster.c (html_text_master_fit_line): Use
	html_object_destroy here instead of g_free directly.

	* htmlengine.c (html_engine_parse_b): Set the color using the
	proper API to insure proper color allocation management (Gdk uses
	chunks).

	* htmlsettings.c (html_settings_destroy): New method.
	(html_settings_set_bgcolor): New method.

	* htmllist.c (html_list_destroy): New method.
	(html_list_stack_clear): Implement.

	* htmlcolor.c (html_color_stack_destroy): Added destroy method.
	(html_color_stack_clear): Implemented.

	* htmlfont.c (html_font_stack_destroy): Added destroy method.

	* stringtokenizer.c (string_tokenizer_destroy): Added destroy method.

	* htmltokenizer.c (html_tokenizer_destroy): Added destroy method
	and release reosouorces.
	(html_tokenizer_reset): Free buffers here.

	* htmlengine.c (html_engine_class_init): Added destroy handler.

	* htmltokenizer.c (html_tokenizer_begin): Fixed FIXME.

	* htmlcluev.c (html_cluev_appended): Initialize this one.
	(cluev_next_aligned): Utility routine to kill warnings.

	* htmlfont.c (html_font_destroy): Add a destructor for fonts.
	(html_font_stack_clear): Added font stack destruction code.

	Added precondition entry points.
	
1999-10-17  Richard Hult  <rhult@hem2.passagen.se>

	* htmlengine.[ch]: Turn the engine into a GtkObject.

1999-10-17  Anders Carlsson  <andersca@gnu.org>

	* testgtkhtml.c: The goto button shouldn't be able to focus

1999-10-17  Richard Hult  <rhult@hem2.passagen.se>

	* html-component.c: Use a GtkHTML widget directly instead of duplicating the code here.

1999-10-17  Anders Carlsson  <andersca@gnu.org>

	* testgtkhtml.c: More work on the ui

1999-10-17  Richard Hult  <rhult@hem2.passagen.se>

	* Makefile.am: Fixed component build.
