W3C home > Mailing lists > Public > www-dom@w3.org > January to March 2000

RE: DOM-2 CSS2FontFaceSrc, CSS2FontFaceWidths, CSS2TextShadow

From: Bill dehOra <Wdehora@cromwellmedia.co.uk>
Date: Thu, 30 Mar 2000 08:25:45 +0100
Message-ID: <AA4C152BA2F9D211B9DD0008C79F760A5CA4AC@odin.cromwellmedia.co.uk>
To: "'Glenn Adams'" <gadams@vgi.com>, www-dom@w3.org
If I understand you the substantial problem seems to be that there is no way
to obtain an instance of these interface types as the CSSOM stands, with out
a succession of 'guessing' casts (as opposed to casts with a type code
involved). This admittedly defeats the purpose of having the public
interfaces. In another thread I suggested that the reason these interfaces
do not have type codes may be because they are not core to the CSSOM. 

However I don't see a reason why type codes and corrsponding getXX methods
should not be added to the CSSPrimitiveValue interface, and the idiom used
to obtain counter, rect and rgb types applied. Each get method could be
specified to throw an UnsupportedOperationException() if the type is not
realised in a particular implementation. The compelling use case here is
simple: there is no use case at all without access through the published
API. Perhaps Phillipe would like to weigh in on this?

-Bill



:-----Original Message-----
:From: Glenn Adams [mailto:gadams@vgi.com]
:Sent: 29 March 2000 18:44
:To: www-dom@w3.org
:Subject: RE: DOM-2 CSS2FontFaceSrc, CSS2FontFaceWidths, CSS2TextShadow
:
:
:
:It is not so simple as implying that there is some templatized 
:method on CSSPrimitiveValue of the order 
:get<SomeRandomType>(). Either CSSPrimitiveValue will have to 
:provide new primitive type constants and accessors or it can't be used.
:
:I see this as one of two substantive technical problems which 
:I raised yesterday (the other being CSS_INHERIT). I believe 
:the problem discussed by this message is the more serious of the two.
:
:Glenn
:
:-----Original Message-----
:From: www-dom-request@w3.org [mailto:www-dom-request@w3.org]On 
:Behalf Of
:Bill dehOra
:Sent: Wednesday, March 29, 2000 8:22 AM
:To: www-dom@w3.org
:Subject: RE: DOM-2 CSS2FontFaceSrc, CSS2FontFaceWidths, CSS2TextShadow
:
::In Document Object Model (DOM) Level 2 Specification, Version 
::1.0, W3C Candidate Recommendation 07 March, 2000, under 
::Section 5.3 CSS Extended Interfaces, just prior to the 
::description of Interface CSS2FontFaceSrc appears a table whose 
::descriptions states:
::
::"The following table specifies the type of CSSValue used to 
::represent each descriptor that can be specified in a 
::CSSStyleDeclaration found in a CSSFontFaceRule for a CSS Level 
::2 style sheet."
::
::In this table, the entries for "src", and "width" specify 
::"list of CSS2FontFaceSrc" and "list of CSS2FontFaceWidths", 
::respectively. However, neither CSS2FontFaceSrc nor 
::CSS2FontFaceWidths are derived from CSSValue (and thus are not 
::candidates for valueType CSS_CUSTOM), nor are they covered by 
::a CSSPrimitiveValue.
::
::My question then is how are CSS2FontFaceSrce or 
::CSS2FontFaceWidths to be interpreted as a "type of CSSValue"?
::
::A similar question holds for CSS2TextShadow which also does 
::not derive from CSSValue yet is shown in the larger table at 
::the beginning of section 5.3 as being used in a "list of 
::CSSTextShadow" for the "text-shadow" property.
:
:I imagine that this would be implementation specific, but 
:would probably
:follow the idiom used for counter rect and rgb types. That is, 
:embed the
:types in a CSSPrimitiveValue and use a getXX() call which throws an
:exception if the embbeded type XX is not the case.
:
:-Bill
:
:--------------------------------------------------------------------
:    Bill de hOra    :    Cromwell Media    :    London
:
:  bill@cromwellmedia.co.uk  :  +44 (0)20 8817 4039  
:--------------------------------------------------------------------
:
:             
:
Received on Thursday, 30 March 2000 02:26:23 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Friday, 22 June 2012 06:13:47 GMT