Re: [cssom] CSSNamespaceRule

On Tue, 18 Mar 2014 22:54:50 +0100, Daniel Glazman  
<daniel.glazman@disruptive-innovations.com> wrote:

> On 18/03/2014 12:56, Simon Pieters wrote:
>
>> When a namespace rule is changed and there are rules after it, what do
>> you want to happen? Do you want the other rules to be affected or not?
>
> Sure I want all rules to be affected.

OK. I don't mind that, personally, but I can imagine that it can affect  
performance. Does anyone object to implementing this?

To clarify, this is about the following

http://software.hixie.ch/utilities/js/live-dom-viewer/saved/2894

<!DOCTYPE html>
<style>html{background:red}</style>
<script>
document.styleSheets[0].insertRule('@namespace "x"', 0);
w(document.styleSheets[0].cssRules[0])
</script>
There should be no red

and similarly setting .namespaceURI or .prefix or .cssText on an existing  
CSSNamespaceRule.

Currently Blink throws for insertRule above while Gecko inserts the rule  
but the html{} rule is not affected. I haven't tested IE.

> Again, the scenario is the
> following one: a html document contains an embedded stylesheet. I'm
> adding a SVG image I want to style. I need to add a namespace rule
> to the existing stylesheet to style my SVG. I can't. This is a blocker
> for all conforming editing environments.
>
> </Daniel>
>


-- 
Simon Pieters
Opera Software

Received on Wednesday, 19 March 2014 08:36:17 UTC