[prev in list] [next in list] [prev in thread] [next in thread]
List: kfm-devel
Subject: Re: media support: almost there :-)
From: Lars Knoll <knoll () kde ! org>
Date: 2001-09-27 12:28:41
[Download RAW message or body]
On Thursday 27 September 2001 13:40, Martijn Klingens wrote:
> The entire tree is now properly parsed and stored. CSSStyleSelector::append
> properly sees the media elements and handles them properly - save for one
> thing:
>
> It doesn't know for what medium it is rendering when it is called... Any
> idea how to find out? Add a 'DOMString medium' to append? Or is there a
> better approach?
It should always use "all", plus the media type passed to the
CSSStyleSelector in the constructor.
So I'd add a QString media as member to the CSSStyleSelector, initialize it
in the constructor and make it default to "screen". append() can then jsut
check this member variable.
> It should be something that the printing code can modify as well, of
> course.
No problem. It just means we have to create a different StyleSelector for
printing.
> While waiting for the answer I'll clean up my code in preparation of the
> patch.
>
> Which reminds me of the DOM Exceptions: how can I throw exceptions for
> readonly objects?
>
> Quoting:
> ---
> NO_MODIFICATION_ALLOWED_ERR: Raised if this media list is readonly.
> ---
>
> Same for the other DOM objects. I don't think I can runtime determine
> whether a function is called on a const or non-const object. Or should I
> add a second 'setMediaText() const' method that is called for const objects
> and raises the error?
It's not a programming issue, because the compiler will give you an error
when trying to access a non const method in a const object.
The whole readonly thing needs some more thoughts and actually it's not that
important currently. I'd just ignore it for now.
Lars
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic