The first entry dates back to november 12, 1996. While this may seem a long
time, I'm doing the development
single-handed, making stupid mistakes, writing, rewriting and re-rewriting
code. XmHTML has come a long way since then and it's gaining more attention
every day. The XmHTML Developers mailing list currently contains about 120
subscribers, and it's still growing.
This document gives a fairly good description on how XmHTML is progressing,
and, most of all, it shows that XmHTML is a project that is alive and
kicking!
- October 10
- Last preparations for the XmHTML Beta 1.1.0 release.
Fixed a small bug in local anchor jumping: XmNanchorVisitedUnderlineType
resource wasn't properly honored.
Removed a number of unused resource class names from the XmHTML
string table (1kb of data), added the XmCAnchorUnderlineType resource
class and corresponding converter and added a warning message to the
parser (in some cases it forgot to complain about closing elements
without an opening counterpart).
- October 9
- Added a "fast" mode to the parser which entirely bypasses
the document verification and repair routines (as if it wasn't fast enough
already :-) If you are absolute sure that a document is fully compliant
with the HTML3.2 standard, and all elements for which termination is
optional have a terminator, setting the value of the
XmNmimeType resource to
text/html-perfect will select the fast parser.
- October 8
- Finally fixed a very annoying bug: when the widget is created, the height
wasn't always computed correctly, leading to incorrect screen updates when
scrolling (small gaps appeared). The only way to get around this bug was
to resize the widget. It turned out that the core class height gets
modified sometime after the Widget's Initialize method has been
called, but before it is being mapped to screen. What causes this is a
mystery to me.
Final preparations for the first official Beta release, 1.1.0: added
a collection of manual pages that describe each and every convenience
function offered by XmHTML and updated the (hugely out of data) widget
description.
- October 7
- Dithering to a fixed palette is now fully possible. There are four
different methods available (closest match without error correction,
ordered with and without error correction and closest match with error
correction). You can specify a palette using the XmNimagePalette resource
or let XmHTML create one for you.
- October 6
- Working on implementing support for the XmNimageMapToPalette and
XmNimagePalette resources, which allow you to define a palette for XmHTML
to use. Besides the obvious advantages this can offer, another advantage
is a rather large speedup when switching pages: since a palette contains a
fixed number of colors, XmHTML can allocate all colors on startup and
doesn't have to free them until it is destroyed. This obliterates the need
to release allocated colors each time a new page is loaded.
- October 3
- Replaced the current quantizer with a compacter and faster one. Previously
XmHTML carried two quantizers: one for global use and one specifically
for PNG images.
Fixed a bug in the colormap reading code of GIF images.
- October 2
- Fixed a small bug in form handling: optionmenu's didn't get reset when
the reset button was pressed.
- September 28
- Added support for Fast Loadable Graphics. This is a format especially
designed for XmHTML and optimized for very fast loading of images.
The FLG format is actually nothing more than a compacted version of the
XmImageInfo structure, and as such it supports plain transparency,
alpha channel and animations (with all GIF disposal methods).
Data can be stored either compressed or uncompressed. Uncompressed FLG's
are the fastest possible way to load an image into XmHTML, but they can
take up a huge amount of space. A funny thing I noticed though is that,
quite often, an uncompressed FLG takes up less space
than the same image saved as a GIF image...
Animation support: the global colormap of an animation is now only
allocated once for the entire animation instead of being allocated for
each frame separatly. This has two significant advantages: memory usage is
reduced and less time is spent in allocating colors. XmHTML will now also
use the global colormap if the local colormap of an animation frame is
equal to the global colormap.
- September 26
- Some changes to reduce memory usage:
- Changed the type of the color component fields of the XmImageInfo
structure from signed int to unsigned short (can save up to 1.5kb
per image). Modified all internal color allocation routines as well;
- the size of the clipmasks is now computed correctly: storage
occupied by clipmask data has been reduced by a factor 8;
- alpha channel processing of PNG images been modified to use a colormap
instead of full RGBA quartets: the 24bit RGB data is converted to an
8bit paletted image and the alpha channel is stored separatly.
This reduces the memory occupied by these images with at least a
factor two;
- September 22
- A lot of improvements in the font allocation/caching routines:
- a separate font cache for each display is now maintained.
The previous scheme didn't look at which display it was running while
the font cache was shared between every XmHTML instance.
Displaying multiple instances of a XmHTML widget on different
displays should now be possible;
- made the font caching scheme a lot more efficient and removed the
limit on the maximum number of loadable fonts (it now uses a binary
tree lookup instead of a lineair search through a table with fixed
size;
- fonts are now freed when the widget is destroyed (that is, the actual
font data is only freed if the widget being destroyed is the last
widget using a display-bound font cache);
- modified the internal data structures so font properties are now
stored with each font instead of calculating them each time the layout
needs to be recalculated;
One very major performance enhancement is the introduction of a
smart font mapping scheme which maps unknown font names to known ones.
I am particularly pleased with this scheme, it allows XmHTML to map fonts
it does not know in the beginning to known ones later one. Assuming the
helvetica font is present in your font path and arial isn't, the following
happens: when XmHTML encounters a <FONT FACE="Arial">
tag, it will not know to which font it should be mapped and it will use the
default font (whatever that is). However, when at a later stage a
<FONT FACE="Arial,Helvetica"> is encountered, XmHTML
will see that this Arial font can be mapped to the
Helvetica font (which it does known), and as a result, any future
reference to the Arial font will be mapped to the
Helvetica font. XmHTML is smart enough to take any
combination of weight, slant and size into account when making these
decisions.
Performance tests with the new font caching and mapping schemes show some
very satisfactory results: the cache hit ratio is steadily increasing,
approaching 90 or more percent after about 10 documents with different
fonts have been loaded. The average number of search actions seems to
remain steady around 7 in this case. The font cache contained 55 fonts
(including 10 font mappings) in various families, sizes and styles.
As a side note: this new ``font technology'' allows users to define
their own font mapping by providing a document with a list of simple font
mappings. Click this link for a sample
document.
Before I forget: I made the builtin cursor allocation display-independant
as well.
- September 21
- First success at flowing text around images with the ALIGN="LEFT"
or ALIGN="RIGHT" attribute set.
- September 20
- Small parser bugfix: mime type of a new document wasn't properly saved.
Added a ``View Document Source'' menu item to example_2 and fixed a bug
in jumping to locations in different files.
- September 18
- Fixed a few important bugs:
- imagemap list wasn't properly reset when a document was
reformatted. Could lead to a SIGSEGV in some cases;
- list of anchor data wasn't properly reset in some cases;
XmHTML now properly honors the XmNstringDirection resource:
when set to XmSTRING_DIRECTION_R_TO_L, text is properly inversed.
Paragraphs contents are ordered from bottom to top. Needs a bit more
work though: list markers are always left-aligned at the first line of
a paragraph instead of right aligned at the bottom.
Modified the linebreaking algorithm to handle line/paragraph breaks
properly when the paragraphs contain non-text objects (HTML form components
and images).
Table support: changed the text layout algorithms to work independantly of
XmHTML's dimensions. They now use a (dynamically adjustable) bounding box.
- September 16
- When the title of a document is requested, leading and trailing spaces
are now removed.
Added the HeadDocType mask bit to XmHTMLGetHeadAttributes()
convenience function. When set, the value of the <!DOCTYPE> tag
will be returned.
Improved path resolution and mime detection routines in example_2.c
- September 10-12
- Some prelimenary work on XmHTMLTextGetFormatted()
- September 4
- Fixed a few important memory leaks. One of those caused the stored anchor
data never to be freed.
Reverted a few bad fixes.
- September 1
- XmHTMLTextSetString fix, text was always rendered twice.
Moved all resources into a stringtable. This actually seems to introduce
a rather noticable speedup in document loading. Haven't got the slightest
clue why this happens.
- August 29-31
- Numerous bugfixes & memory leak fixups. A grand applause to
Ricky Ralston for having the
courage to run XmHTML through purify. Thanks Ricky!!
Started with daily snapshot distribution.
- August 28
- Released XmHTML/Alpha Version 1.0.21., last Alpha release. The
next release will be the first publically available Beta.
- August 26
- Rewrote and extended <PRE> support greatly. Plain text, form
components and images can now be mixed freely.
Some minor changes in anchor rendering: anchors are now only extended to
the right when there is room for it, they no longer cover adjacent text
when activated. Fixed highlighting of transparent anchored images.
Added the XmNimageRGBConversion resource which allows one to select
the conversion method XmHTML should use when converting 24bit to 8bit
images.
Some minor fixes in the SetValues method: XmHTML now only triggers
a redisplay if a resource change requires it.
- August 25
- Changed the proto's for
XmHTMLImageReplace() and
XmHTMLImageUpdate() :
they now return a status indicating whether or not the document needs
a recomputation of document layout if an image is replaced or updated.
Fixed a bug in the default image processing: when images were delayed, the
delayed icon wouldn't show up. I forgot to properly propagate the image
dimensions.
- August 21, evening
- Fully restored PNG alpha channeling support, there was a silly bug in
doing the 24 to 8 bit conversion. Alpha channeling is now also supported
for delayed images and any combination of background setting, set either
via the loaded document or the SetValues method.
See XmHTML PNG
Demo for some screenshots.
Transparent background images are now also supported.
- August 21, morning
- Fixed a bug in delayed image loading that caused a fatal crash when
the delayed image was freed.
Progressive and normal image loading now share the same XImage creation
and update routines. Also fixed clipmask creation for progressively
loaded images.
Rewrote most part of the handling of PNG images with an alpha channel.
Several bugfixes and changes to example_2 and it's caching routines.
- August 20
- HTML form support: vertical scrolling of a document with a HTML form in
it should now be correct whether or not a horizontal scrollbar is present.
Also fixed a bug in the SetValues method which caused XmHTML to ignore the
already present form widgets.
Modified the debug routines, output can now be sent to a file.
Eliminated some dead/duplicate code in the painter and widget methods.
- August 19
- HTML form support:
- The traversal stuff for tabbing between all HTML form components
almost works. Still need to figure out the proper XmTextField
translations so the tab key can be used instead of the enter key;
- added support for the HTML <TEXTAREA> form component and got
form resetting working. HTML form support is nearly completed: only
submit is still missing;
- scrollbars are no longer covered by the form widgets when the
document is scrolled.
Some code cleanup in the document formatter.
Experimented with the BaseClass stuff. Gave up on it after half a day
or so, implementing it would require a totally different approach and
a lot of information on Motif's BaseClass. XmHTML is very much
an Intrinsics widget with some added Motif value, and I would keep to
like it that way, at least for a while.
- August 18
- Small performance increase: XmHTML now uses Manager's GC's (XmHTML is a
subclass of Manager) to paint the anchorbuttons and horizontal rules
instead of using it's own GC (and switching colors all the time).
Changed the XmNanchorHighlightOnArm resource to the standard
XmNhighlightOnEnter resource. The highlight color is now computed
dynamically depending on the current background color, which makes a
lot more sense than having a fixed highlight color.
Modified the anchor highlighting stuff when anchors are displayed as
buttons: with highlighting enabled they now really resemble pushbuttons.
Extended the supported HTML extensions to now also recognize a color
attribute on the <P>, <DIV> and <CENTER> tags.
The color attribute is now also supported for <HR> with the
noshade attribute set, so you can now have colored lines in your
document.
Progressively loaded images can be scaled on the fly (and as a side
effect it resolved a fatal bug in the plc code).
- August 16-17
- Took two days off, needed some rest drastically...
- August 15
- Changing any font resource should now work properly. There was a bug
in the font cache and the SetValues method which prevented XmHTML
from properly honoring this change. Most of the time XmHTML choose to
ignore any changes to the font resources altogether...
Fixed a very nasty bug which occured with the
SetValues/XmNdocumentCallback combination: setting any formatting
resource from within the XmNdocumentCallback would sometimes lead to
a document being loaded twice, but mostly it just caused a sigsegv.
SetValues fix: changing the XmNimageEnable, XmNenableBodyImages and
XmNbodyImage resources should work properly.
- August 14
- Added the XmNanchorHighlightOnArm resource. Enabling this resource
provides a constant visual feedback as each anchor the user moves his/hers
mouse over will receive highlighting. The XmNarmColor resource
allows one to set the color to use for this anchor highlighting.
- August 10-13
- Lots of bugfixes in the progressive image loading routines. They finally
seem to behave in an orderly manner.
Rather large performance increase in color allocation on PseudoColor and
StaticColor displays. XmHTML now uses a hashtable instead of querying the
X server.
Test with dynamically changing of resource setting revealed a couple of
bugs in the SetValues method. One of those bugs caused XmHTML to overlook
internally cached images.
- August 6
- Setting XmNscrollBarDisplayPolicy to XmSTATIC will now also force
a horizontal scrollbar to appear.
Modified the parser so it will now properly remove the contents of the
<SCRIPT> and <STYLE> tags when these tags aren't placed in
the <HEAD> tag (which is the only place where they may
occur).
- August 5
- Added the XmNenableColorSwitching and XmNenableFontSwitching resources.
XmNenableColorSwitching allows one to disable support for the color tag
while XmNenableFontSwitching allows one to disable support for the
<FONT> element.
Added an options menu to example_2.
- August 4
- Fixed a parser bug: elements with an optional closure are now being
flushed when they prevent a new element from becoming legal. Previously
the new element was discarded, which sometimes lead to bad results
(pointed out by Danny Backx).
- August 3
- Added an additional pass to the font loading algorithm to search for a
font when it can't be found with the current value of the XmNcharset
resource.
Modified the PLC routines to share a single GC for every image that is
being loaded.
- July 18-August 2
- Took a much needed holiday.
- July 17
- Released XmHTML/Alpha Version 1.0.20.
- July 15
- Fixed a few bugs in font loading:
- font changes after a <FONT FACE="SomeTypeFace"> used
the document font instead of the new font;
- successive font changes did not always yield the proper result;
- incrementing/decrementing the size of a font did not always yield the
correct result.
Text enclosed in a paragraph (<P>...</P> or
<DIV>...</DIV>) now also gets a trailing linefeed.
- July 13,14
- Made a start at making XmHTML's image support self-sustaining for various
reasons:
- allows implementation of a primary and secondary image cache. A primary
image cache could for example contain the real image data XmHTML uses
internally (pixmaps and thelike) and have a short-time lifespan, while
the secondary image cache could contain the XmImageInfo structures
required for creating XmHTML's internal images and have a long
lifespan.
This would gain a huge performance increase in switching between
documents.
- makes it a lot easier for other people to add image capability to
their own applications without needing to use XmHTML;
- and last but not least, it would make the core of XmHTML a lot
lighter.
Form image buttons work correctly.
- July 11
- Fixed a baseline adjustment bug for image objects.
Fixed a GIF animation bug with dispose by background disposal method.
Modified the parser so it is now able to backtrack when unbalanced HTML
tags are encountered.
Fixed progressive image loading to work with buffers as small as
one byte. Progressively loading XBM images now works correctly.
- July 9
- More work on forms:
- fixed XmFontList problems (text on form widgets is now rendered
using the default font);
- added support for <SELECT> form components;
- form widgets now use the background and foreground colors specified
in the document itself.
- removed highlight rectangle.
Fixed a memory leak: when freeing anchor data, the value of named anchors
wasn't freed properly.
- July 4
- I've found the wonderfull XtInsertEventHandler function! This
finally got me to get form scrolling correctly working: I can now simply
choose to ignore all exposure events generated all over the place
when the form components are being scrolled!
Fixed a bug in baseline adjustment for form components.
- July 3
- Made a few changes in the text outlining routines, should
look a lot better now (the words on a line are distributed more evenly).
Detected and fixed a number of bugs:
- lines with different words on them (font, fontstyle, image object,
form components and anchors) didn't always get the baseline
correct;
- lineheight of images wasn't always computed correctly;
- before updating the background image a check is done if the
background gc is really present and that the background image isn't
delayed or being loaded.
The background image and X11 Bitmaps can now also be loaded progressively.
- July 2
- Fixed a number of bugs in the progressive JPEG loader that showed up
when experimenting with PLC buffer resizing.
All PLC routines are finally fully reentrant.
- July 1
- The buffers used by the progressive image loader can now be resized by
an application.
GIF images can now also be loaded progressively by using an external GIF
decoder installed on the XmNdecodeGIFProc resource. Introduced the
XmHTMLGIFStream object which is now the sole argument to any
function attached to this resource.
Modified progressive decoding of GIF images when using the internal GIF
decoder to wait until all compressed raster data has been received;
progressive decoding of a GIF image by the internal GIF decoder is
impossible due to the forking of uncompress(1) (a well, it's
not impossible but terribly slow).
Added a new resource, XmNprogressivePerfectColors, which allows
one to instruct XmHTML when and if a final color quantization pass
should be performed once a progressive image has been loaded. I've made
this into an option instead of doing it always as this is a rather
time-consuming operation. Possible values are Never, Always or Automatic
(let XmHTML decide when a quality increase can be expected).
- June 26
- Fixed simultaneous updating of multiple copies of the same, progressively
loaded, image in the current document.
Modified XmHTMLXYToInfo() to ignore images that are currently being loaded
progressively: most of the XmImageInfo fields returned have a very
limited lifespan (a few or so polling intervals) during image load.
- June 25
- Progressive JPEG images that are loaded progressively are now also
displayed properly: each pass adds additional detail.
XmHTML now requires libjpeg version 6 or above for full jpeg support.
Added a final color quantization pass in progressive JPEG support (first
passes are dithered against a fixed palette, the final pass will do
Floyd-Steinberg using a histogram of the image itself).
Added three convenience functions to suspend, continue and kill progressive
image loading.
Fixed a serious bug in the main plc engine which caused a total
server (and system) lock when any mouse button was activated on
the display area.
- June 20
- Baseline JPEG images can now also be loaded progressively.
- June 19
- Fixed a bug for transparent frames in animated gifs with dispose by
background disposal method; clipmask was used incorrectly when restoring to background.
- June 18
- Interlaced GIF & GZF images are loaded properly now.
- June 17
- First success at progressive image loading!!
- June 16
- Modified XmHTMLAllocColor and XmHTMLFreeColor (two non-XmHTML supporting
routines) so they no longer interfere with XmHTML's private color
allocation.
Fixed a bug in the color matching algorithm, RGB values were shifted out
of range, causing colors to be mapped to the wrong color or even worse
(to black).
- June 15
- All PLC interfacing routines written. Image PLC interfacing routines
written and verified. First tests show the scheme is working better than
expected.
- June 14
- Most top-level PLC routines written. Image PLC routines nearly finished,
GIF and GZF progressive image decoders written.
- June 11
- Rewrote the color allocation routines: profiling showed that XmHTML's
old color allocation scheme spends quite a lot of time allocating its
colors. The new scheme is nearly 30% faster.
- June 10
- Started on progressive image loading: Progressive Loading Context
(PLC) object written. Object-specific structures written. Started
splitting the image loading routines so they can be used for progressive
image loading.
- June 9
- Wrote a very feasible progressive object loading concept. The
implementation will use a ringbuffer with object-specific function
pointers, visited by XmHTML using a variable polling interval. The concept
allows for an easy implementation of progressive document loading as well.
- June 5
- Alpha channel PNG images are now created when they are needed by the
painter. The reason behind this is that when XmHTML is resized
horizontally, the position of the image changes with respect to the
current background setting, making a redo of alpha channel processing
necessary. It works but causes a very undesirable delay. Seems like
progressive image loading is becoming a real necessity...
- June 3
- PNG support: XmHTML now supports the following features as set forth in
the decoder requirements specified in the
W3C Official PNG
Recommendation:
- Gamma correction;
- all color types and bit depths;
- full tRNS chunk support;
- full alpha channel support;
- bKGD chunk support;
The tRNS and alpha channel support both work with a fixed background color
as well as composing against a background image. As you can see,
everything except progressive image loading is now supported.
Thanks to Greg Roelofs for the quite
usefull PNG Home Page,
usefull tips and adding XmHTML to the PNG Supporting Applications page.
Also upgraded the PNG code to comply with libpng version 0.96.
- June 2
- Finally fixed a transparency bug on animations with a disposal method of
none while the first frame contains transparency. This bug has been around
since Alpha 1.0.16 or so.
- June 1
- Fixed a bug in image scaling: scaling the clipmask data of transparent
images directly was wrong so I now simply recreate the clipmask data out
of the scaled image data (which also gains us a small performance increase).
- May 31
- More work on PNG image support: background substitution and RGB images.
Alpha channel support and transparency support is partially in.
Added the XmNscreenGamma resource to fully exploit the gamma
correction capabilities of both PNG and JPEG images.
Released XmHTML/Alpha Version 1.0.19.
- May 29
- Fixed a few more bugs in the parser: the rules for definition lists
were not entirely correct. Added a check on invalid nesting of HTML
markup elements.
- May 27
- Added a check on the scrollbar dimensions when they are specified using
application defaults or in a resource file. Subsequently added a section
on specifying XmHTML's dimensions in the same way in the Programmers guide.
More work on the XmHTML Programmers Guide.
- May 26
- Bugfix 05/26/97-01, a nasty bug which caused XmHTML to crash every so
often in the most strangest ways. It turned out to be a stupid typo...
Rewrote the caching routines in example_2 to be more generic and robust.
- May 23
- Fixed the parser to recognize the contents of the <SCRIPT> and
<STYLE> elements. The XmHTMLGetHeadAttributes convenience
function now also fills the appropriate fields of the XmHTMLHeadAttributes
structure.
- May 22
- Fixed a nasty bug in XmImageFreeImageInfo when it was called by
application code. As a result of this the function call itself now takes
two arguments: the widget id of a XmHTMLWidget and a pointer to the
XmImageInfo structure that is to be released.
Fixed a bug in comment parsing: single dashes appearing in a HTML comment
are now properly ignored.
Added the XmHTMLAllocColor convenience routine which can be used for
easy color allocation using the colormap installed on a given XmHTMLWidget.
- May 18
- Added the XmImageConfig structure for use with XmHTML's external image
support. This structure allows one to configure the behaviour of the
XmImageCreate... routines and contains various flags to set
(amongst others) an external gif decoder, create a clipmask, perform
background substitution, color quantization and frame selection on gif
animations.
- May 16
- Added support for the XmNmaxImageColors resource: when an image
contains more colors than allowed, it will be quantized (and possibly
dithered using the Floyd-Steinberg algorithm) to match the maximum number
of allowed colors.
- May 15
- Added the XmHTMLGIFtoGZF convenience routine: this routine converts
a gif image to a compatible image format in which the LZW compressed
raster data has been replaced with deflate compressed raster data.
This function can be used by application programmers that want to keep
the slowdown caused by XmHTML's gif workaround to an absolute minimum by
converting a GIF image to a GZF image and subsequently using the GZF
image whenever a corresponding GIF image is to be loaded. The GZF image
format is a compatible GIF format, in which only the raster data
is compressed in a different format.
GZF images can be somewhere between 5 and 60%(!) smaller than the original
GIF image and it loads considerably faster.
- May 13
- After two weeks of negotiating with Unisys to obtain a license for the
use of their patented LZW algorithm for decoding the LZW compressed
raster data as found in GIF images, I was utterly frustrated by their
absolutely mindboggling attitude towards the use of the LZW algorithm for
decoding gif images. I was even more frustrated by the ridiculous
restrictions an LZW license would place on the distribution of XmHTML
(for instance: a splash screen would be mandatory for every application
using XmHTML and I would not be allowed to distribute the LZW decoder to
people that don't have an LZW license, even if I have a valid LZW
license).
Instead of removing support for gif images, I decided to replace the
built-in LZW decoder with a workaround that translates the LZW
compressed raster data to the format used by compress(1), after
which XmHTML calls uncompress to perform the actual decoding of the
compressed raster data. This workaround causes (surprisingly) a hardly
noticable slowdown for single-image and small gif animations. Decoding
large animations however takes a bit more time now.
For those that want to take the risk of violating Unisys's patent policy
(or those that have a valid LZW license), the
XmNdecodeGIFProc resource has been added. One can use this resource
to install an alternate gif decoding procedure and thus surpass XmHTML's
workaround.
- May 2
- Released XmHTML/Alpha Version 1.0.18.
- April 30
- XmHTML will now always use any colormap provided for it (thru Core's
XmNcolormap resource) instead of using the default colormap. It will also
walk the widget tree to find a Shell (or a subclass of Shell) and use the
visual provided for that Shell. XmHTML will only use the default visual if
no Shell parent can be found. All of this also works for the XmImage type.
Modified the HTML comment detection routine in the parser so nested
and bad HTML comments (dashes don't occur in a multiple of four) are
properly dealt with.
- April 28
- Setting the XmNfreezeAnimations resource to True will now restart
animations when they were previously frozen.
Added an additional IMAGE_GIFANIMLOOP type to XmHTMLImageGetType() when
the image is an animated gif with the NETSCAPE2.0 loop extension.
Bugfixes:
- truly inlined images are now repainted correctly when they are scrolled;
- animations serving as anchors have their borders painted correctly;
- all images serving as anchors should now appear properly centered in
the anchor bounding box;
- changing document resources without setting a new text will no longer
reload images;
- April 27
- Still busy rewriting the documentation: programming manuals for both XmHTML
and XmHTMLParser. The XmHTML manual is halfway now.
Fixed a lot of minor bugs that I discovered when writing example code
for the XmHTML programming manual:
- XmNresizeWidth and XmNresizeHeight now work properly;
- setting and getting the XmNtopLine resource works;
- a few performance enhancements on document scrolling;
- horizontal scrollbar should now be present when the width of
preformatted text or images is somewhere between the widget width minus
the margin width;
- fixed a bug in the paint engine: height of text blocks was computed
incorrectly;
- fixed another bug in the paint engine: linenumbers on preformatted text
wasn't set at all;
- XmHTML's testbed crashes less frequently: both document and image cache
are a lot smarter now
- also on XmHTML's testbed: added code to show possible use for
XmNlinkCallback callback resource and XmHTMLXYToInfo (new convenience
routine);
- added the XmImageCreateFromInfo routine which creates a standalone
XmImage from the data in a given (XmHTML's) XmImageInfo structure.
- XmHTMLParserObject example now contains both normal and progressive
parsing modes. Added a HTML preview.
- April 20
- Reverted integration of the htmlParserObjectClass. Too many problems and
too many overhead involved.
Made a start with writing programming manuals for both XmHTML and
HTMLParserObject.
Pretty cool news: added the XmImage type which allows using XmHTML's image
reading capability to be used by other programs as well.
- April 15
- Moved XmHTML's parser into a seperate widget subclassed from Object.
A standalone parser can now be created and configured using the standard
X functions. Class pointer of this parser is
htmlParserObjectClass.
The standalone parser is an Intrinsic widget which can be used without
Motif.
Replaced XmHTML built-in parser with this HTMLParserObject (with
surprisingly few modifications to XmHTML's interface).
- April 10
- A lot of enhancements to the parser: one can now create and use a
standalone HTML parser for a number of purposes. Features include:
- Progressive (or incremental as you will) parser;
- aliasing of unknown HTML elements to known ones;
- a XmNmodifyVerifyCallback;
- extended XmHTMLParserCallbackStruct to include description of
offending and proposed repair elements;
- multiple passes to increase HTML conformance;
- dynamic updating of the current source;
- wrapped all of the above (and more) in a new collective example
which demonstrates how to use the XmHTMLParser object for interactive
document checking and repair.
Modified the document verification/repair routines to use better defaults.
- April 6
- Released XmHTML/Alpha Version 1.0.17.
- April 3
- Fixed a problem with scrollbars when XmHTMLRedisplay was called: document
length wasn't updated properly.
Fixed two problems related to documents with a body image: images
serving as anchors should no longer disappear when scrolling and regular
anchors (XmNanchorButtons == False) should now be rendered transparantly.
Anchors with mixed fonts are now rendered as a single anchor instead of
separate blocks. Mixing images and text in an anchor doesn't work well.
Underlining and/or striking out of words with mixed fonts is now treated
properly.
Released XmHTML/Alpha Version 1.0.16.
- April 2
- Delayed image loading now also works for the background image.
Added the XmHTMLFrameGetChild convenience function.
Fixed the SetValues method for enabling/disabling body colors and body
images: the effect should be visible immediatly.
- April 1
- Fixed a problem related to color freeing with StaticGray, GrayScale,
DirectColor and TrueColor visuals (colors got freed more than once for
these types of visuals). Color freeing should no longer cause X Protocol
Errors.
Fixed a number of things pointed out by
Dick Porter:
- a robuster method for body color allocation;
- internal images no longer get freed by calling XmHTMLImageFreeImageInfo;
- corrected layout recomputation when images are updated: XmHTML now uses
the new image dimensions instead of the old ones;
- images of which the dimensions have been specified in a HTML
document are now painted immediatly when replacing or updating them
instead of just being removed;
- fixed image transparency problems: XmHTMLImageDefaultProc now always
creates a clipmask. Previously, a clipmask was only created if a
document contained a background image.
Animations are now explicitly excluded as a background image. Image
scaling now also works properly for delayed images. Finally fixed
transparency for the default images.
- March 28
- Released XmHTML/Alpha Version 1.0.15.
- March 27
- The parser now calls the XmNparserCallback resource when installed.
Added a new action field to the
XmHTMLParserCallbackStruct which allows
a user to select certain actions when a fault in a document is encountered.
Warning messages caused by the document verification/repair routines
are no longer displayed on screen but propagated to the XmNparserCallback
instead.
Fixed a small bug in the text layout routines: text and images are now
only centered or adjust to the right margin if their width doesn't exceed
the available screen width.
The scrolling attribute on frames is now properly handled.
All action routines are now implemented and fully functional.
- March 26
- Frames are in. Not perfect yet but it certainly works!
Fixed a few bugs that caused XmHTML to crash when the widget's Destroy
method was called. Added the
XmNframeCallback resource and
XmHTMLFrameCallbackStruct callback structure.
Fixed a small bug in horizontal scrolling, text should no longer flow
onto itself when there isn't a vertical scrollbar present.
Fixed a small bug in refreshment if image anchors, images serving as
an anchor should now always be selectable.
- March 25
- Bugfix in JPEG loading.
XmHTML now makes proper use of the core offsets: a XmHTML widget can now
be a child of any Motif manager widget at any position.
- March 24
- Released XmHTML/Alpha Version 1.0.14.
- March 23
- Fixed a buffer overrun when converting preformatted text to a series of
words.
Added the XmNmimeType resource:
allows XmHTML to be used for documents of which the content-type isn't
text/html. Mime types recognized by XmHTML are text/html, text/plain and
a number of image mime type specifications.
- March 21
- XmHTML recognizes character escape sequences without a trailing ;.
Character escape sequences in the alternate image description are now
also expanded.
More improvements on document verification and repair: really bad
HTML documents (numerous and consecutive misplaced elements) are now
repaired in such a way that display is possible.
Animation support: the first frame of an animation now also uses the
requested disposal method.
- March 20
- Completely rewrote the HTML parser: document verification and
auto-repair of poorly formatted HTML documents has been added.
Especially the latter is fairly powerfull. Features include
detection and repair of overlapping elements, omitted list start
tags and improperly nested font switches. It also includes auto-addition
of terminators on elements for which a terminator is optional
(dd, dt, li, p, option, td, th and tr). XmHTML can now also handle
documents without the required <HTML> and optional
<BODY> tags.
More work on the mixed text/image layout: vertical alignment attributes
on images are now properly recognized and dealt with.
Released XmHTML/Alpha Version 1.0.13.
- March 14
- Again more work on animation frame disposal: both disposal methods (by
background and by previous) now work with any background color or image.
Animation support is almost fully completed, the only thing missing is
the ability to immediatly restore composite animations that are scrolled
off and back on screen.
Added a workaround for incomplete screen updates when scrolling full
screen: the XmNrepeatDelay
resource now determines the minimum time a key must remain pressed
before scrolling continues.
Text colors are now also properly freed (and fixed a serious bug as well).
Also some work on example_2: added a global image cache and a
per-document history stack.
Added the
XmHTMLImageFreeImageInfo
convenience function.
And last but not least, added
PNG image support to the
XmHTMLImageDefaultProc
convenience function.
- March 13
- More work on animation support: all frame disposal methods are now
supported.
And a lot of bugfixes:
Font stack is now properly reset when a new document is loaded;
named anchors are now rendered in the current text color instead of
XmNanchorVisitedForeground;
no more color flashing when switching between documents that make heavy
use of color-rich images;
Images wider than the available screen width are no longer moved
downwards;
delayed images are now displayed in the correct dimensions when they
are flushed to XmHTML and transparent XPM images are now truly
transparent.
- March 12
- Colors allocated for images are now properly released when the images
are freed.
Fixed X11 bitmaps. Updated all documentation.
- March 24
- Released XmHTML/Alpha Version 1.0.12 (documentation update).
- March 11
XmHTML now supports Gif89a animated gifs (Netscape Loop Extensions
as well as multi-image Gif89a files). Scrolling composite animations
currently doesn't work as it should. Added the
XmNfreezeAnimations
resource.
Replaced the XmNimageDefaultProc resource by the
XmHTMLImageDefaultProc
convenience function.
All image reading routines now use a memory buffer instead
of reading directly from a file. Text layout now considers text and
images as the same object.
XmHTML now properly renders any alternate text if images are disabled.
Modified the XmImageInfo structure again and renamed most of the
convenience functions to more logical names.
Released XmHTML/Alpha Version 1.0.11.
- March 5
- XmHTML Developers mailing list is up and running, with 51 subscribers from
the first day.
Many thanks to Brian Dowling and
Simplicity Communications for
offering me this valuable service. Thanks Brian!
Released XmHTML/Alpha Version 1.0.10.
- March 4
- Fixed a spacing bug in the text layout routines which caused words
that shouldn't be glued together got glued together anyway.
Added the animation support.
- March 3
- Added polygon and default shape imagemap support.
Delayed Image Loading: XmImageInfo structure updated and three new
convenience functions added: XmHTMLUpdateImage, XmHTMLReplaceImage
and XmHTMLRedisplay.
- February 28
- A number of changes in the text-layout routines: words should now be
glued together properly. Text colors are now preserved accross anchors.
Released XmHTML/Alpha Version 1.0.8.
- February 27
- More work on Imagemaps: support for external client-side imagemaps
has been added but not tested (yet). Added the XmHTMLAddImagemap
convenience routine. Added default images which are displayed when
the XmNimageEnable resource is set to False or when an unsupported
imagetype is encountered.
Changed the XmHTMLAnchorCallbackStruct, please be aware of this!
- February 26
- Added client-side imagemaps; rectangular and circle shaped area types
work well. Empty as well as combined anchors (both name and href in a
single anchor) are now supported. Added the
XmNimagemapCallback
resource and corresponding callback structure.
Fixed a small parser bug which sometimes (only seen it once really)
caused wrong text alignment. A lot of small bugfixes in anchor creation
and selection. Removed the extra field in XmHTMLanchorCallbackStruct
and added three new fields instead.
- February 25
- Modified color allocation to get an exact, close or substituted color.
This produces *very* nice results. The background attribute on the
body tag is properly honored, scrolling with an image as background is
very smooth. Images can now also serve as anchors. Mixed text and image
layout works but needs a bit more work.
- February 20
- Major News: image support is almost completely added and functional!
The default image loading procedure supports X11 bitmaps, X11 XPM
pixmaps, JPEG and GIF87a and GIF89a images, PNG is being worked on.
This procedure should in theory work properly with every visual class,
although only PseudoColor has been tested. Images with a width and
height specification different from the real image dimensions are
automatically scaled. I hacked this code in on two evenings, and
I'm pretty proud of it.
The XmImageInfo section has
been updated and contains some more information on image handling. For
future animated image support, a few extra members have been added to
the XmImageInfo structure itself.
I do owe John L. Cwikla
a lot of gratitude for his small but very usefull
XCC package!
- February 18
- Internationalization: the font loading scheme employed by XmHTML
has been modified drastically and is much more robust now.
Added the XmNcharset resource to
allow specification of the ISO character set and changed the format
of the XmNfontFamily and
XmNfontFamilyFixed resources.
(pointed out by
Valery Kravchuk)
- February 13
- Added support for the face tag on the font element, e.i.
<font face="Helvetica,arial"> is now recognized.
- February 11
- Released XmHTML/Alpha Version 1.0.6.
- February 10
- Fixed a number of potential buffer overruns (suggested by
Dick Porter).
Complete rewrite of the text layout routines. Interword and interline
spacing is adjusted depending on the current font. Simplified the
outlining and alignment adjustment routines.
Removed a number of internally unused structure members.
Changed anchor treatment: consumes less memory and is easier to use.
Second alpha release shipped.
- February 6
- Fixed interword and interline spacing when different fonts are mixed on
a single line: lines do no longer overlap each other and font changes
in the middle of a word are properly attached.
Indentation is now computed regardless of the current font.
- February 4
- Added code to support the BASEFONT element and updated the code that
deals with the FONT element accordingly.
All shorttag elements are
now recognized and dealt with properly by the parser (empty tags, empty
closing tags, unclosed tags and NULL-end tags). XmHTML passes all example
pages from the Dark Side of the
HTML without even as much as a single hickup. Watch your browser choke
on the test pages at the above URL ;-).
- February 3
- First bug reports are seeping in: fixed a bug in font loading routines,
color releasing routines and unknown anchor types.
Updated the <li> element formatting to recognize the type and value
attributes.
Removed default identation for preformatted text.
- January 31
- Released XmHTML/Alpha Version 1.0.5, first alpha release.
- January 30
- Fixed a bug with jumping to anchors: when jumping to the end of a
document, the value of the vertical scrollbar exceeded the maximum
allowable value.
Final preparations for the alpha release. We'll be shipping out
any time now.
- January 29
- Reworked some of the anchor parsing/handling routines: anchor activation
and anchor tracking callbacks are a little bit more efficient now.
XmHTML is now able to determine the type of URL referenced by an anchor:
added the url_type field to the XmHTMLAnchorCallbackStruct.
Updated exposure handling after tests with Motif 1.2.0/X11R5.
Preparations for the alpha release: cleaned up the source and
wrote a few examples demonstrating the use
of XmHTML.
- January 28
- A lot of memory leaks have been fixed.
Switching between documents with/without a <body> color specification
seems to be working.
- January 27
- Fixed a serious bug with preformatted text: multiple newlines weren't
recognized properly and thus were rendered wrong.
- January 26
- Added a SubstructureNotifyMask so we get notified when the widget is
mapped on the screen for the first time. Text is now displayed properly if
text is set directly on XtCreateWidget. This fixed a serious bug in
SetValues which caused a BadWindow error when setting text on the widget
before XtRealizeWidget was called.
- January 25
- Nested aligment is now recognized properly.
Changed the font routines to use a pointsize specification as mentioned in
the documentation. Previously pixel size was used.
Linespacing for text with a font other than the default font is now
correct.
Public request for XmHTML alpha testers posted on comp.windows.x.motif,
comp.windows.x and comp.windows.x.apps
- January 24
- Screen redrawing finally done: only the exposed regions are now redrawn
instead of the entire line of which the exposed region was part.
Preformatted text now also draws anchors correctly.
- January 23
- More work on horizontal scrolling: when scrolling to the left, text drawn
previously in the margin is now properly erased. Horizontal redrawing to
the right now takes the starting x position of the exposed region into
account, instead of repainting the entire screen.
Preformatted text is now painted properly.
- January 20
- Enhanced the parser to insert closing elements on elements where they
are optional (<P>, <LI>, <DT> and <DD>).
Finally got round to implementing preformatted text.
- January 19
- Scrolling: the widget now remembers it's current vertical text position
when it is resized.
Removed left and right quotes from the list of punctuation characters.
- January 17
- Added the <TAB> element
extension.
Fixed a number of memory leaks reported by
dmalloc.
Fixed a bug in the parser which made it impossible to correctly detect
elements with trailing spaces inside them.
- January 16
- Text outlining: bugfixes and few performance enhancements.
Added the <COLOR> tag extension.
- January 13
- Removed the XmHTMLCallbackStruct and replaced it with callback-specific
callback structures:
XmHTMLAnchorCallbackStruct, XmHTMLFormCallbackStruct,
XmHTMLLinkCallbackStruct and XmHTMLParserCallbackStruct.
Added jumping to local anchors when a local anchor is pressed.
Added the
XmNanchorVisitedProc
resource.
More work on vertical scrolling.
XmHTML can now handle named anchors by itself (but it can be vetoed by the
programmer).
Added the following convenience functions:
XmHTMLGetAnchorId, XmHTMLScrollToAnchorById, XmHTMLScrollToAnchorByName,
XmHTMLScrollToLine.
Enhanced HTML comment detection in the raw HTML parser.
- January 12
- Accelerated screen update when scrolling vertically. Horizontal scrolling
needs a bit more work.
Nested lists are now rendered as they should: mixing ordered and unordered
lists works.
Added the XmNenableOutlining
resource: when enabled (default) all text of which the alignment is not
explicitly set will be outlined.
Implemented the color tag for all elements mentioned in the extensions.
- January 10
- Horizontal scrolling works.
Fixed scrollBar offsets when XmNmarginWidth/XmNmarginHeight is smaller
than the width of a scrollBar. sliderSize and pageIncrement now
reflect the percantage of hidden text.
Nesting of ordered lists and unordered lists now works when they are not
mixed.
Changed the type of all positions from Position (signed short) to int.
Documents larger than SHRT_MAX used to cause a wrap-around of their
y-position.
- January 9
- Working on scrolling. Scrollbars are displayed according to the
XmNscrollBarPlacement resource. Vertical scrolling works.
Changed the linebreaking algorithm to eat multiple block elements without
contents. Also a number of aesthetical changes.
I expect to have an alpha release by the end of this month. Things that
need to be implemented before a release will be made are:
preformatted text, support for a few image types and nested sorted lists.
If you want be informed when an alpha release
becomes available, please send us a
mail.
- January 8
- Added autosizing stuff: setting XmNresizeWidth and/or XmNresizeHeight
now causes XmHTML to size itself around the document properly.
Rewrote text alignment routines. Fixed a bug in the parser which caused an
anchor not be recognized if the name contained the string ``name'' or
``target''.
- January 7
- Fixed text alignment for lines consisting of different text elements.
Finished the text outlining algorithm: paragraphs can now be outlined
properly, which gives pretty neat results.
- January 6
- Happy Newyear!
A lot of work and thought went into the render engine.
The previous method proved to be very memory- and time consuming, but did
have a lot of potential. After a lot of trial and error, the final method
is a mix of the original rendering engine and the state machine approach,
resulting a an even more flexible (read extensible) and less memory- and
time consuming.
Changed XmNstringDirection to XmNalignment, which makes more sense. Added a
description of the implemented
HTML 3.2 extensions. Added the
XmNparserCallback resource.
- December 19
- Changed rendering completely: a stream of paint commands is now generated
whenever a document is loaded. The actual paint engine is represented by a
state machine in which parts of the painting stream are poured whenever a
screen update is required. This is much more flexible and faster than the
previous setup, in which rendering was performed ``just in time''.
This state machine approach also allows for an easy implementation of
forthcoming extensions such as the <OBJECT> tag and HTML math. It
also offers considerable advantages for a (possible) conversion of the
widget to an HTML editor widget, although that would require an integration
of the raw HTML parser and paint stream generator.
- December 18
- Implemented proper rendering of all attributes on horizontal rules.
Linefeed checking almost working properly.
Added the XmNinputCallback and
XmNmotionTrackCallback
resources and updated action routines accordingly (as suggested by
Ricky Ralston).
Added the track-motion and
help action routines. Added the
XmNworkWindow resource.
- December 17
- Rendering of anchors as buttons is now done properly and anchors wrapping
around a newline are finally connected as it should: linebreaking algorithm
finally working properly.
Added an outlining algorithm for blocks of plain text (this is for a future
OUTLINE attribute on the <DIV> tag). This produces some very nice
results!
Furthermore a number of cosmetic updates on rules, underlining, strikeout
and anchor selection rendering.
Updated the set-values method: almost all resources can now be set using
XtSetValues.
- December 16
- More work on anchor selection: pressing an anchor now highlights that
anchor; anchors that wrap around a newline are now redrawn correctly;
anchor cursor setting/unsetting finally seems to be working satisfactory.
Also added a target field to XmHTMLCallbackStruct to support the frame
extension.
XmNarmCallback implemented. <HR> rules are now painted.
Numbered lists with type=i|I are now being rendered for roman numerals upto
a value of 4999. Simplified list indentation.
Corrected a few minor bugs that came up when testing multiple instances of
XmHTML widgets.
Major news: added the
XmNanchorButtons resource:
anchors can now be rendered as pushbuttons instead of being underlined.
Needs some more work though.
- December 13
- XmHTML begins to take real shape! XmNactivateCallback and
XmNanchorTrackCallback completely implemented: anchor selection fully
functional now. First real XmHTML tests by using it in
XntHelp, and it seems to be working quite
well!
Numbered lists with type=1|a|A are now being rendered correctly.
Fixed a number of major memory leaks and minor small bugs in format.c and
the set_values method.
- December 12
- Solid and dashed underlines as well as strikeout are being drawn correctly.
List indentation finally correct. All three types of bullets in <UL>
are also placed correctly.
Punctuation characters have a special treatment now so they are attached to
words where they should be attached.
Fixed a few bugs in the font switching routines; nested fonts are rendered
correctly now.
First attempts at anchor tracking have some success, XmNanchorTrackCallback
resource treatment partially finished.
- December 10
- Linebreaking algorithm works pretty okay. Horizontal alignment is now also
treated correctly.
Added the XmNstringDirection
resource. Fixed a few bugs in format.c.
- December 9
- First success at text displaying! The paint routines now can display all
sort of texts in the selected font and/or color. Added support for a future
``outline'' attribute on the <DIV> tag. The linebreaking algorithm
needs a lot more work. Changed the XmNanchorTrackProc resource to a
callback:
XmNanchorTrackCallback
(as suggested by Danny Backx).
- December 6
- ALIGN and VALIGN attributes recognized. Added a few extra attribute parsing
routines. Optimized recognition for underlining, strikout and anchors:
nested combinations are now treated ok. Checked and corrected a few memory
leaks. Performed some robustness checks and corrected bugs detected from
this testing.
- December 5
- List support added: indentation and the TYPE attribute are recognized as
well as nested lists. Underline, strikeout and anchor stuff written. More
work on font routines: nested font combinations are recognized and treated
ok.
Posted very first announcement on XmHTML on comp.windows.x.motif and
comp.windows.x.
- December 4
- First implementation of text formatting/painting. Font loading/switching
routines written.
- December 2
- Initialize now calls the HTML parser, creates the widget and anchor cursor
and calls the HTML formatting routines. XmNlinkCallback installed.
Prelimenary tests on widget creation and resource setting/changing
performed succesfully.
- November 28
- First drafts of expose, layout, resize, set_values, get_values_hook,
query_geometry, geometry_manager and destroy methods.
- November 26
- Enhanced the parser to allow strict checking of HTML documents against
the HTML 3.2 standard. Added the XmNstrictHTMLChecking resource.
- November 22
- Changed the XmNfontSize resources to XmNfontSizeList. Added
XmHTMLLinkCallback, XmNanchorTrackProc, XmNanchorTarget and
XmNenableBody resources. Figured out how to use the XmRepType functions.
ClassInitialize, ClassPartInitialize and Initialize methods written.
- November 21
- Public and private interfaces defined. Updated Widget interface definition.
- November 20
- XmHTML Widget resources, callbacks and action routines
interface definition nearly completed (you're reading it now).
- November 19
- Made some performance enhancements to the HTML parser after testing.
When compared to NCSA, our parser is almost twice as fast!
(Loading and parsing a 230kb HTML file with 14126 elements takes 0.16
seconds. NCSA takes 0.30 and does not parse table elements).
- November 18
- Final HTML parser completed, performance tests started.
- November 12
- First draft of HTML parser.