News For Previous Grail Releases
New Features in Grail 0.3
Many bugs present in previous versions have been fixed. (See also
the list of Grail 0.2 bugs fixed.)
Contents:
General:
- Support optional use of the
Python Imaging Library if available and Tk integration
is detected. This allows support of most image formats
used on the Web without requiring NetPBM or other external
filters. This allows better handling than Tk for some GIF
images and supports JPEG/JFIF and PNG images directly, including
transparent PNGs and image scaling. Add the line:
browser--enable-pil: 0
to the ~/.grail/grail-preferences
file if you don't
want to use PIL for some reason. Leaving it enabled will not
affect Grail if PIL is not available.
- Support standardized color names from the HTML 3.2 (``Wilbur'')
W3C recommendation.
- Revise interpretation of " " to be more like that of
other browsers by default. The more correct interpretation is
used when ``advanced'' recognition mode is enabled.
- Implemented client-pull updating of documents.
- Fixed a bunch of really tedious bugs.
- Use filetypes extension mechanism to load the parsers for
text/html
and text/plain
; this allows
user customization of the existing parsers via subclassing as
well as replacement.
- Support
ALIGN
, BGCOLOR
, and
VALIGN
attributes for table cells.
User Interface:
- Added a ``Document Info'' window showing server response headers
and query fields. Also indicates whether or not the document
was loaded from the cache.
- Added command to open the URL marked by the selection.
- Extended the document menu (third button for X11 users) to
allow access to the Document Info window for a frame, open or
save an image under the pointer, and bookmark, print, or save
the document pointed to by a link under the pointer.
- Allow the bookmarks file title to be edited similarly to
bookmark section headers.
- History dialog key bindings more closely match those of the
Bookmarks dialog.
- Downloads are now fully asynchronous.
- Grail-initiated ``Save As...'' dialogs now indicate the content
type of the document being saved.
Applets:
- Applet objects may now provide an additional special method,
__cleanup__()
, that is called when the viewer is
reset in preparation for loading another page. This allows
applets to release resources if needed.
Printing:
- Paper size and orientation may be configured in the ``Printing
Preferences'' dialog. Additional configurability for printing
is supported.
- Base font size and leading distance are now configurable.
- Local files may be printed even if a MIME type cannot be
determined; the type
text/plain
is used and the
user is warned.
- Horizontal alignment is now supported.
- Improved wrapping of text at the right margin.
- Right-hand margin now supported for
BLOCKQUOTE
element.
- Added support for
BIG
and SMALL
elements, also <FONT SIZE="...">
elements
(other FONT
attributes are ignored).
- Dan Connolly's SGML lexer code has been removed temporarily,
until we have more clarity about its copyright status.
- Interpretation of sys.argv[0] is even more clever now -- it
follows symbolic links, so you can have a symlink
"/usr/local/bin/grail" pointing to the grail.py file where it is
installed.
- Fixed problem retrieving ftp: URLs containing %-quoted characters
in the filename.
- Tables: bug fixes and memory leaks patched; some minor performance
improvements.
- Coloring of active link (red) takes place at the right time.
- Histification (i.e. adding to the global history list and coloring
the link purple) of link when saving a file (via FileDialog) has been
fixed.
- Bookmarks: Fixes to various dialog windows so that window deletes
via the window manager are handled properly. The Insert Entry (`K')
command no longer adds bogus leading spaces in Location field. Fixed
a bug when popping up main bookmarks dialog after Browser window has
been deleted. Allowed bookmarks and history to load pages into new
windows.
- Remote control: More robustness in checking the remote control
socket. If a socket is found to have a live Grail on the other end,
the new Grail will not abscond with it. If the socket doesn't have a
live Grail (i.e. doesn't respond to a PING), then the new Grail will
steal the socket. Some API changes to allow for callbacks to respond
to the remote caller (see the web page). Fixed broken import of
tkinter.
- Choose default font sizes that are more generally available
(superseding the patch for 0.3b1).
- Generalized the fonts preferences scheme so it includes symbols
and dingbats.
- Proxy support enhancement: the proxy exceptions list now supports
the use of domain wildcards by specifying a domain with a leading dot
(e.g.,
.python.org
).
- HTML parsing and display:
- Header numbering is enabled automatically only on encountering a
SKIP or SEQNUM attribute on a header.
- Math & Greek entities support resizing when the needed fonts are
available (always for Greek). Bullets use Dingbat font when the
size needed is available but fallback to constant size GIFs if
needed.
- Improved handling of URLs containing whitespace.
- Supported <HR SRC="...">.
- Added some additional font-based entities based on HTML 3.0 and
existing practice.
- Added support for <FN ID="name">, empty <A
NAME="name"> and <FN ID="name"> elements.
- Fixed indentation of nested definition lists.
- Improved compatibility of comment recognition in non-strict
mode; robustification in both modes.
- Printing changes:
- De-tab PRE data before display; corrects lots of problems in
preformatted text.
- Fixed some vertical spacing problems.
- Context/AsyncImage, bug fixed: make sure that only a single
AsyncImage reader is created for an image. Bug occured when a page
had multiple inlines of the same image; a seperate reader was created
for each one.
- Save to disk: when a user decides to save a file to disk instead
of viewing it, boost the readers bufsize to 8k. Makes downloading a
little faster.
- IOError, bug fix: catch exceptions from the protocol object in
BaseReader. Prevents socket errors from crashing grail.
- SocketQueue: control for the number of sockets open at one
time. Involved changes to grail.py (added SocketQueue) and extensive
changes to http protocol api and base reader so that they don't open
connections immediately, but wait to be called back by socket queue.
- SocketQueue/display: the number of active streams is shown in the
status window along with the total number of streams.
- SharedItem/SharedAPI: changed name of CacheItem/API. The old
names were confusing because a SharedAPI for a SharedItem is returned
by grail.open_url regardless of whether the item is in the cache. The
primary purpose of these objects is to allow multiple readers to share
the same protocol object.
- Synchronous refresh, bug fix: when a page in the cache needed to
be refresh, the HTTP If-Modified-Since request was made synchronously.
Ouch! Changed so that SharedItem does this asynchronously.
- SharedItem.getdata, performance fix for reading files: each time
getdata was called, the SharedItem stored the results of reading from
the protocol object by using string append (e.g. data = data + new).
This was expensive, so data became a list of strings and a dictionary
of offsets to string indices. This makes performance much faster in
the common case where there is a single reader and the data member is
used *only* to write to the cache. Performance is also improved for
multiple readers, because they probably all ask for the same chunks of
data in the same order; as a result, we can just hand them back
successive strings from the data list.
- Cache log, performance improvement: the cache log code was also
written with string appends (e.g. field1 + field2 + field3 + ... +
fieldn). Changed this to a string.join, which improved performance by
70 percent.
- An architecture for user preference management has been
implemented.
- A proper persistent disk cache replaces the in-memory cache.
- An attempt has been made at improving performance, but there's
still a long way to go...
- Grail now supports tables (to the
extent made possible by Tk).
- Grail now supports frame sets, much like Netscape's. The pop-up menu bound to mouse button 3
supports frame-specific operations.
- Improvements to forms:
- More image formats (JPEG, XBM, TIFF) are supported if
NetPBM is present.
- A preferences menu with dialogs to control aspects of Grail's
behavior is now provided.
- I/O status messages now show the percentage or number of
bytes received.
- An I/O status monitor window has been added for more detailed
viewing of I/O status.
- The file selector boxes for Save As and Open File are much
improved: they remember their last directory, contain scroll
bars, and support
~
expansion.
- History commands (Back, Reload, Forward) and "Clone current
window" remember the scrolling position as well as forms
contents.
- The bookmarks viewer interface has been reorganized.
- The Bookmarks and History dialogs support loading a selection
into a new browser window using a double-click on mouse button
2. The Bookmarks dialog also provides this in the menus.
- Several dialogs (e.g. Find, and perhaps most importantly the
splash screen) no longer need to be placed manually.
- All windows and dialogs now support Alt-W as a shortcut for
Close or Cancel, as well as the window manager "delete window"
operation.
- Mouse button 3 is now bound to a pop-up menu with some common
operations. The "open this link in a new window" command has
been moved to mouse button 2.
- A "smooth scrolling hack" can optionally be installed. This
allows viewing of images or tables larger than the screen. Its
use is a mixed blessing, unfortunately; the Page Down/Up
keyboard shortcuts and Tk's middle-mouse-button scrolling
feature don't work any more, applets that resize their frame
may end up partially hidden, scrolling to a fragment identified
by <A NAME="id">...</A> doesn't work, and (worst of
all) scrolling big
tables looks horrible. We really need to put more
pressure on Ousterhout's group to
add smooth scrolling to the text widget.
- Faster!
- Now handles images, including the ALIGN attribute, if
NetPBM is present.
- Output includes footnotes for anchors found in the
document, page header with the document title, and a
page footer with the document URL and page number.
Footnotes and anchor underlines are optional, and can be
toggled from the Print dialog. Footnotes make use of
the advisory TITLE attribute of the <A> tag if
present.
- Added support for arbitrary nesting of <SUP> and
<SUB> elements. <SUB> and <SUP> are currently
only supported in printing.
- Some printing features can be controlled by check
buttons in the print dialog.
- Text containing tabs in <PRE> elements is now printed
correctly.
- Two new tags are supported to embed applets in a page:
<OBJECT> (a W3C proposal) and <APPLET> (also used
by Java).
- It is possible to disable applet loading selectively or
completely.
- Applets have much more restricted access to Grail objects, and
all objects are now "bastionized", meaning that their instance
variables are made unaccessible and only selected methods can
be called.
- Applets are now divided in "applet groups" based on the host or
domain name of the server from which the HTML page containing
the applet is loaded. Each group has its own restricted
execution environment, so applets can't mess with each other's
globals.
- Applets can now write files in an area reserved to their applet
group (and only there).
Many of the features added are defined in some form in the expired
HTML 3.0 internet draft. While we recognize that the draft is no
longer considered a significant document and is not on a standards
track, it has proved a valuable source of direction for many
extensions to HTML 2.0. Hence, it has been used as an advisory
document during the development of Grail's HTML support. A detailed
description of Grail's HTML support is available.
- Headings (<H1> .. <H6>) now support the ALIGN, DINGBAT,
and SRC attributes proposed in HTML 3. For ALIGN, the
'justify' alternative is not supported: the value of ALIGN must
be left, center, or
right.
- Footnotes (<FN ID=name>) are supported as link targets.
- Strike-out is supported by the
<S> and
<STRIKE> elements. Note the <S> is
font-oriented markup and <STRIKE> is logical markup. <S>
is proposed in HTML 3.0, and <STRIKE> is implemented by some
other browsers. Logical markup also makes more sense. The
<DEL> element should probably be preferred to <STRIKE>
since it is part of the formal HTML 3.0 proposal.
- Underlining is supported by the <U> element. This is
from the HTML 3.0 proposal.
- Inserted and
deleted text are supported
via the <INS> and <DEL> elements. These are derived from
the HTML 3.0 proposal.
- <BLOCKQUOTE> provides a right margin.
- Target anchors (<A NAME=id></A>) and footnotes
(<FN ID=id></FN>) with no content are correctly
supported.
- Iconic entities as proposed in a W3C working
draft. The mechanism used to implement this is extensible & customizable.
- <HR> elements now handle the ALIGN, NOSHADE, SIZE, SRC,
and WIDTH attributes. For printing, NOSHADE is always assumed.
- Several improvements in lists have been made:
- <OL> supports the START and SEQNUM attributes.
- <LI> tags now handle the DINGBAT, SEQNUM, and VALUE
attributes, and emulates other browsers' ideas about
TYPE more flexibly. Real bullets are provided (disc,
circle, and square).
- The <LH> (list heading) tag from HTML 3 is dealt with
intelligently, and is affected by the COMPACT attribute
of the enclosing list.
- The COMPACT attribute is propogated to nested lists.
- Formatting is generally more reasonable, and nested
block elements are correctly sized and indented.
- <ISINDEX> now understands the HREF attribute defined in
HTML 3.
- Support for the ALIGN attribute on DIV and P elements is
provided. The 'justify' option, however, is not: the value of
ALIGN must be left, center,
or right.
- Content of the <SCRIPT> and <STYLE> elements is discarded
rather than displayed.
- Closure of open elements is handled more intelligently as the
document is parsed.
There have been many mprovements in the SGML capabilities
underlying the HTML support. These affect the HTML handling provided
with Grail and any extensions built on the SGML layer. These changes
are mostly of interest to extension authors.
- Grail ensures that open contained elements are closed in the
correct order even if some end tags are ommitted. An example
of this in HTML would be:
<P>text..<A
NAME=target>more text</P>
. In this instance,
the handler for the end tag of the A
element would
be called before the end tag handler for the P
element. Many HTML browsers get this wrong.
- Provided a preference setting to allow stricter parsing
of SGML syntax. Enabling ``advanced'' SGML recognition
enables support for named character entities, null end
tags, empty tags, and unclosed tags. Note that these
are not normally recognized by other browsers; the
default is ``browser style'' parsing. The parsers for
each DTD must explicitly select the parsing modes.
- Entity references in attribute values are now handled
properly. Iconic entities are not supported in
attribute values.
- Changed approach to passing attributes to start-tag handlers.
Extensions for individual tags are backward compatible, but
methods of parser classes based on SGMLParser are not. New
modules are provided for the new SGML base implementation;
these are required for extensions wishing to support the faster
lexical analyzer or to track future improvements in the SGML
base.
The list of features new in
Grail 0.2 is still available.