Re: DocumentCSS vs ViewCSS

Na , Kartikaya Gupta <kagupta@rim.com> escreveu:

> Well, considering developers don't really need to be calling  
> document.getOverrideStyle, it shouldn't really matter to them too much.  
> It does matter from a DOM implementation point of view, since the  
> DocumentCSS interface gets implemented by the Document object, whereas  
> the ViewCSS interface gets implemented by the Window object. The DOM  
> implementation may be completely independent of the Window  
> implementation (may even be separate third-party libraries or  
> something), and moving the getOverrideStyle method to the ViewCSS  
> interface (i.e. the Window implementation) would rob the DOM  
> implementation of a mechanism to override styles.

getOverrideStyle only queries information. The document, if needed, is  
implicit in the element (1st argument). The third-libraries structuring is  
a non-issue, just a way to organize source code and hardly significant  
here.

>
> As for merging it with DocumentStyle instead, well, CSS is only one of  
> different possible style languages. The Level 2 Style spec is supposed  
> to a more abstract base for all style languages, whereas the Level 2  
> CSS2 spec is, obviously, specific to CSS. Again, merging DocumentCSS  
> with DocumentStyle doesn't make sense here because that would bind the  
> L2 Style spec to CSS rather than keeping it abstract.

Yes, I steped over that detail.

>
> Cheers,
> kats
>
> -----Original Message-----
> From: www-dom-request@w3.org [mailto:www-dom-request@w3.org] On Behalf  
> Of Joćo Eiras
> Sent: Sunday, March 30, 2008 9:00 PM
> To: www-dom@w3.org
> Subject: DocumentCSS vs ViewCSS
>
>
>
> Hi!
>
> Why does DOM 2 StyleSheets defines two new interfaces (DocumentCSS,
> ViewCSS), which only difference is the only method they expose while
> having equal signatures?
> Should getOverrideStyle have some sepecific binding or validation with  
> the
> Document which implements DocumentCSS?
> IMO, it would be fairly enough to add it to ViewCSS, and in the  
> ecmascript
> binding, it would spare developers of have to contantly type document.foo
> all day long.
>
> But then, we already have an interface implemented by Document, which is
> DocumentStyle. So DocumentCSS should either be merged with ViewCSS, of
> with DocumentStyle. I prefer the former.
> All these interfaces bloat the spec.
>
> What do you think ?
>
> Thank you.
>
>
> ---------------------------------------------------------------------
> This transmission (including any attachments) may contain confidential  
> information, privileged material (including material protected by the  
> solicitor-client or other applicable privileges), or constitute  
> non-public information. Any use of this information by anyone other than  
> the intended recipient is prohibited. If you have received this  
> transmission in error, please immediately reply to the sender and delete  
> this information from your system. Use, dissemination, distribution, or  
> reproduction of this transmission by unintended recipients is not  
> authorized and may be unlawful.

Received on Monday, 31 March 2008 01:45:37 UTC