Re: comments/questions/suggestions/bug reports for DOM Level 2

Philippe and others,

----- Original Message -----
From: Philippe Le Hegaret <>
To: Garret Wilson <>
Cc: <>
Sent: Thursday, November 25, 1999 10:05 AM
Subject: Re: comments/questions/suggestions/bug reports for DOM Level 2

> > * CSSValue has a set of unit types, and CSSPrimitiveValue has another
set of
> > unit types. The former is referred to as "valueType" and the latter as
> > "primitiveType". This is fine, except the "valueType" of CSS_INHERIT
> > in later discussion to get mixed in as a valid value of "primitiveType."
> > true value of "primitiveType" when a value is inherited is uncertain,
> > CSS_INHERIT is not listed as one of the possibilities. Perhaps a
> > CSS_INHERIT should be defined for "primitiveType," and it should be
> > as an accepted value under CSSPrimitiveValue.primitiveType. Also, how
> > "valueType" ever return CSS_INHERIT from this interface, if this
> > is only returned when "valueType" is set to CSS_PRIMITIVE_TYPE? (This is
> > where I miss the type-safe enum in C++ that aren't in Java, BTW, but
> > a different issue.)
> I'm not sure I understand your comment. CSSValue.CSS_INHERIT is not mixed
> primitiveType and you can't cast the CSSValue instance to

Since my ramblings above aren't exactly straightforward, let me take it
step-by-step. Please let me know where my assumptions go wrong:

1) Inheritance: The interface CSSPrimitiveValue descends from CSSValue.
1a) This means that every CSSPrimitiveValue has a "valueType" property which
holds one of the constants of CSSValue.
1b) According to the spec, when CSSValue.valueType==CSS_PRIMITIVE_VALUE,
"The value is a CSSPrimitiveValue."
1c) I take this to mean that whenever I have the CSSValue interface with its
"valueType" set to CSS_PRIMITIVE_VALUE, the interface is also a
CSSPrimitiveValue (meaning I can cast the CSSValue to a CSSPrimitiveValue).
Or conversely, CSSPrimitiveValue.valuteType will always equal

2) CSSPrimitiveValue defines a separate property, "primitiveType," which is
distinct from CSSValue.valueType.

3) CSSPrimitiveValue.setStringValue() accepts a stringType parameter.
3a) According to the spec, stringType is "A string code as defined above.
The string code can only be a string unit type (e.g. CSS_URI, CSS_IDENT,
3b) Three of those codes (CSS_URI, CSS_IDENT, and CSS_ATTR) are defined
under CSSPrimitiveValue as valid types for CSSPrimitiveType.primitiveType.
The other code (CSS_INHERIT) is defined under CSSValue as a valid type for
3c) This seems to me to be mixing CSSValue.CSS_INHERIT with

Perhaps there's something I'm missing here...

> > * CSSStyleDeclaration.cssText does not have a description of parameter
> > cssText in the documentation.
>  I checked the latest public version [1] and there is a description for
> parameter cssText.

So there is. I don't have a clue to what I was referring to here... :)


Garret Wilson
GlobalMentor, Inc.

Received on Thursday, 25 November 1999 18:57:14 UTC