W3C home > Mailing lists > Public > www-svg@w3.org > July 2000

Re(2): SVGColor Inheritance.

From: Blaine Brodie <bbrodie@savagesoftware.com>
Date: Tue, 04 Jul 2000 18:30:49 -0700
Message-id: <fc.0085846d0000a0b70085846d00009987.a0bb@savagesoftware.com>
To: www-svg@w3.org
>Blaine,
>I believe you have analyzed things correctly.
>
>Not only SVGColor, but also SVGPaint, needs to inherit from CSSValue. We
>will fix the spec at our earliest opportunity. 
>
>Thanks for the report.
>
>Jon Ferraiolo
>SVG Editor
>Adobe Systems Incorporated

After looking at the spec. again I noticed that there are two factory
methods named createSVGColor() and createSVGPaint(). There could be a
problem if SVGColor inherits from CSSValue, since these methods create
their objects outside the context of a CSS property.  This means the user
will not be able to use the CSSValue::setCssText() method since there will
be no property grammar to parse against.  Perhaps a better solution,
rather than having SVGColor inherit from CSSValue, would be to do
something like the following, which is similar to how CSSPrimitiveValue
retrieves its RGBColor, Rect and Counter objects.
	SVGCSSValue : CSSValue 			// where SVGCSSValue has a valueType of
CSS_CUSTOM	
	{ 
		SVGColor getSVGColor(); 	
	};
---
Blaine
Received on Tuesday, 4 July 2000 21:30:47 GMT

This archive was generated by hypermail 2.3.1 : Friday, 8 March 2013 15:54:19 GMT