Re: OBJECT, inheritance, and rendering

Braden N. McDaniel wrote:

>This, I submit, would be a mistake. AFAICT, there is no inheritance rule to
>deal with this. Importantly, in a browser that supports CSS, *every*
>document (including, presumably, those included via OBJECT) has a default
>style sheet (by virtue of there being default values for the CSS
>properties). There is nothing in the specs to indicate that this default
>style sheet should be *replaced* by an inherited style sheet from an "outer
>document," but that is exactly the behavior you seem to be suggesting.

Documents don't have a default style sheet. Rather, the UA has default
display properties for the various display elements. Subsequent style
declarations alter those display properties for a particular user and/or

There are two ways an included HTML document might be rendered:

1. As a nested UA window, independent of the enclosing document. The OBJECT
simply defines the dimensions of the nested window. The enclosed document is
rendered as if it were a new document, with no regard to the display
properties of the enclosing document at the point of insertion.

2. As a sub-document of the enclosing document. The enclosed document uses
the current display properties as its own defaults, which may or may not be
used depending on the style declarations in the enclosed document. Or the
enclosed document uses the UA defaults/user stylesheet except for color and
background. Or...

Option #1 is simple. Nothing needs to be added to the CSS spec. All the
arguments about special properties and selective color inheritance become
moot. The disadvantage, for some, is that the enclosing document can not
affect the appearance of the enclosed. But with the enclosed document as a
distinct window, elements such as META refresh, STYLE, and LINK are treated
normally and have no impact on the enclosing document.

Option #2 requires new rules regarding the rendering of one HTML document
inside another. If the second document is truly nested, how can another
STYLE declaration be legal? How should a META refresh be treated? Should the
entire HEAD element be discarded? Should the enclosed document use the
current style *declarations* as defaults, or the actual style properties in
effect due to inheritance?

Option #2 is a can of worms.

From the HTML 4.0 draft, first rule for rendering OBJECT: "The user agent
must first try to render the object..." How would the UA normally render a
text/html document? In its own window. 'Nuff said.

If there are to be special treatments for text/html as an OBJECT, these need
to be implemented by the UA as PARAMs. For example, the UA might support a
'nest' parameter for text/html. If the UA finds <PARAM NAME="nest"
VALUE="body" VALUETYPE="data">, only the contents of the inserted document's
BODY element are rendered as the object, and the current display properties

David Perrell

Received on Friday, 31 July 1998 13:20:25 UTC