# HG changeset patch
# User Simon Pieters The literal string " The URL of the
+ The absolute URL of the first request of the
CSS style sheet or null if the CSS style sheet was
embedded. The CSS rules associated with the
CSS style sheet. Either set or clear. If it is set, the API allows reading and modifying of the CSS rules.
When you are to create a CSS style sheet the above properties,
@@ -1020,19 +1023,35 @@
The The Even though the returned The The The If the origin-clean flag is clear,
+ throw a Return a read-only, live Even though the returned The If the origin-clean flag is clear,
+ throw a Return the result of invoking insert a CSS rule rule in the CSS rules
+ at index.
+ The If the origin-clean flag is clear,
+ throw a Remove a CSS rule in the CSS rules at index.
+ Resolve
- the URL specified by the
- When the resource is available, the document is in
- quirks mode
- and the
- Content-Type metadata of
- the resource is not a supported styling language change the
- Content-Type metadata of the resource
- to If the resource is not in a
+ Let input URL be the value specified by the
+ Let base URL be the processing instruction's node document's
+ document base URL.
+
+ Let origin be the processing instruction's node document's
+ origin.
+
+ Let parsed URL be the return value of invoking the URL parser with the
+ string input URL and the base URL base URL.
+
+ If parsed URL is failure, terminate these steps.
+
+ Let request be a new request, with the
+ url parsed URL,
+ origin origin and
+ referrer base URL.
+
+ Let response be the result of fetching request. Wait until response is available.
+
+ If response is a network error, terminate these steps.
+
+ If the processing instruction's node document is
+ in quirks mode, response is
+ CORS-same-origin and the Content-Type metadata of response is not a
+ supported styling language change the Content-Type metadata of response to
+ If response is not in a
supported styling language terminate these steps. The absolute URL of the
- resource. The result of invoking the URL serializer with parsed URL. null null. The node. The processing instruction. null null. The value of the title title. Set if the Set if response is CORS-same-origin, or clear otherwise.
When the resource is available, the document is in
- quirks mode
- and the Content-Type metadata of
- the resource is not a supported styling language change the
- Content-Type metadata of the resource
- to If the resource is not in a
+ Let input URL be the value specified. Be more specific
+
+ Let base URL be the document's document base URL. Is there a document at this
+ point?
+
+ Let origin be the document's origin.
+
+ Let parsed URL be the return value of invoking the URL parser with the
+ string input URL and the base URL base URL.
+
+ If parsed URL is failure, terminate these steps.
+
+ Let request be a new request, with the
+ url parsed URL,
+ origin origin and
+ referrer base URL.
+
+ Let response be the result of fetching request. Wait until response is available.
+
+ If response is a network error, terminate these steps.
+
+ If the processing instruction's node document is
+ in quirks mode, response is
+ CORS-same-origin and the Content-Type metadata of response is not a
+ supported styling language change the Content-Type metadata of response to
+ If response is not in a
supported styling language terminate these steps. The absolute URL of the
- resource. The result of invoking the URL serializer with parsed URL. null null. null null. null null. The value of the first title title. Set if one of the specified link relation type for this HTTP
Set if response is CORS-same-origin, or clear otherwise.
An optional reference to an associated CSS style sheet.
This item is initialized to reference an associated style sheet when the rule is created. Subsequent to initialization, this item
is reset to null if the rule becomes disassociated from its initial style sheet. Once reset to null, it must never change. A list of child CSS rules.
In addition to the above state, each CSS rule may be associated
@@ -1786,6 +1846,7 @@
Insert new rule into list at the zero-indexed position index. Return index.
DOM-2 CSS specifies that a text/css
".ownerRule
attribute must return the owner
CSS rule or null if none. If a value other than null is ever returned, than that same value must always be returned on each get access.cssRules
attribute must return a read-only, live CSSRuleList
object representing
-the CSS rules. The same object must be returned on each get access.CSSRuleList
object is read-only (from the perspective of
-client-authored script), it can nevertheless change over time due to its liveness status. For example, invoking
-the insertRule()
or deleteRule()
methods can result in mutations
-reflected in the returned object.insertRule(rule, index)
method must insert a CSS
-rule rule in the CSS rule list returned by cssRules
at index, and return
-index.
-
-deleteRule(index)
method must remove a CSS rule in the CSS rule
-list returned by cssRules
at index.
+cssRules
attribute must follow these steps:
+
+
+
+
+SecurityError
exception.
+ CSSRuleList
object representing
+ the CSS rules. The same object must be returned on each get access.CSSRuleList
object is read-only (from the perspective of
+ client-authored script), it can nevertheless change over time due to its liveness status. For example, invoking
+ the insertRule()
or deleteRule()
methods can result in
+ mutations reflected in the returned object.insertRule(rule, index)
method must run the following steps:
+
+
+
+
+SecurityError
exception.
+ deleteRule(index)
method must run the following steps:
+
+
+
SecurityError
exception.
+ 6.2 CSS Style Sheet Collections
@@ -1543,22 +1562,38 @@
value is not a supported styling language the user agent
may terminate these steps.
- href
pseudo-attribute and then
- fetch it.text/css
.href
pseudo-attribute.
+
+ text/css
.
+
+
media
pseudo-attribute
if any, or the empty string otherwise.alternate
pseudo-attribute
value is a case-sensitive match for
"yes
", or clear otherwise.
+
+ alternate
" and title is the
empty string terminate these steps.
- text/css
.text/css
.
+
+
media
parameter.Link
header is an
ASCII case-insensitive match for
"alternate
", or false otherwise.
+
+ @charset
at-rules, @import
at-rules, and @namespace
at-rules,
throw an InvalidStateError
exception.
NO_MODIFICATION_ALLOWED_ERR
exception is thrown
if the style sheet is read-only. Are there any read-only style sheets?
The styleSheet
attribute must return the associated CSS style sheet.
If loading of the style sheet fails its cssRules
+
If loading of the style sheet fails its CSS rules
list is simply empty, i.e., an @import
at-rule always has an associated CSS style sheet.
The media
attribute must return a MediaList
object for the list of media queries specified
with the @media
at-rule.
The cssRules
attribute must return a CSSRuleList
object for the list of CSS rules
-specified with the @media
at-rule.
The insertRule(rule, index)
method must insert a CSS
-rule rule into the CSS rule list returned by cssRules
at index, and
-return index.
The deleteRule(index)
method must remove a CSS rule from the CSS rule
-list returned by cssRules
at index.
The cssRules
attribute must return a CSSRuleList
object for the
+child CSS rules specified with the @media
at-rule.
The insertRule(rule, index)
method must return the result of
+invoking insert a CSS rule rule into the child CSS rules at
+index.
The deleteRule(index)
method must remove a CSS rule from the
+child CSS rules at index.
CSSFontFaceRule
InterfaceOn setting, the namespaceURI
attribute must run the following steps:
Let CSS style sheet be the value returned by parentStyleSheet
.
-
Let list be the value returned by cssRules
of CSS style sheet, or
- null if CSS style sheet is null.
+
Let parent be the parent CSS style sheet. +
Let list be the CSS rules of parent, or + null if parent is null.
If list is not null and contains anything other than
@charset
at-rules, @import
at-rules, and @namespace
at-rules,
throw an InvalidStateError
exception.
@@ -2060,9 +2121,9 @@
On setting, the prefix
attribute must run the following steps:
Let CSS style sheet be the value returned by parentStyleSheet
.
-
Let list be the value returned by cssRules
of CSS style sheet, or
- null if CSS style sheet is null.
+
Let parent be the parent CSS style sheet. +
Let list be the CSS rules of parent, or + null if parent is null.
If list is not null and contains anything other than
@charset
at-rules, @import
at-rules, and @namespace
at-rules,
throw an InvalidStateError
exception.
@@ -2920,6 +2981,9 @@
The literal string "text/css
".
The URL of the +
The absolute URL of the first request of the CSS style sheet or null if the CSS style sheet was embedded.
The CSS rules associated with the CSS style sheet.
Either set or clear. If it is set, the API allows reading and modifying of the CSS rules.
When you are to create a CSS style sheet the above properties, @@ -951,19 +954,35 @@
The ownerRule
attribute must return the owner
CSS rule or null if none. If a value other than null is ever returned, than that same value must always be returned on each get access.
The cssRules
attribute must return a read-only, live CSSRuleList
object representing
-the CSS rules. The same object must be returned on each get access.
Even though the returned CSSRuleList
object is read-only (from the perspective of
-client-authored script), it can nevertheless change over time due to its liveness status. For example, invoking
-the insertRule()
or deleteRule()
methods can result in mutations
-reflected in the returned object.
The insertRule(rule, index)
method must insert a CSS
-rule rule in the CSS rule list returned by cssRules
at index, and return
-index.
-
-
The deleteRule(index)
method must remove a CSS rule in the CSS rule
-list returned by cssRules
at index.
+
The cssRules
attribute must follow these steps:
+
+
If the origin-clean flag is clear,
+ throw a SecurityError
exception.
+
Return a read-only, live CSSRuleList
object representing
+ the CSS rules. The same object must be returned on each get access.
Even though the returned CSSRuleList
object is read-only (from the perspective of
+ client-authored script), it can nevertheless change over time due to its liveness status. For example, invoking
+ the insertRule()
or deleteRule()
methods can result in
+ mutations reflected in the returned object.
The insertRule(rule, index)
method must run the following steps:
+
+
If the origin-clean flag is clear,
+ throw a SecurityError
exception.
+
Return the result of invoking insert a CSS rule rule in the CSS rules + at index. +
The deleteRule(index)
method must run the following steps:
+
+
If the origin-clean flag is clear,
+ throw a SecurityError
exception.
+
Remove a CSS rule in the CSS rules at index. +
Resolve
- the URL specified by the
- href
pseudo-attribute and then
- fetch it.
When the resource is available, the document is in
- quirks mode
- and the
- Content-Type metadata of
- the resource is not a supported styling language change the
- Content-Type metadata of the resource
- to text/css
.
If the resource is not in a +
Let input URL be the value specified by the
+ href
pseudo-attribute.
+
+
Let base URL be the processing instruction's node document's + document base URL. + +
Let origin be the processing instruction's node document's + origin. + +
Let parsed URL be the return value of invoking the URL parser with the + string input URL and the base URL base URL. + +
If parsed URL is failure, terminate these steps. + +
Let request be a new request, with the + url parsed URL, + origin origin and + referrer base URL. + +
Let response be the result of fetching request.
Wait until response is available. + +
If response is a network error, terminate these steps. + +
If the processing instruction's node document is
+ in quirks mode, response is
+ CORS-same-origin and the Content-Type metadata of response is not a
+ supported styling language change the Content-Type metadata of response to
+ text/css
.
+
+
If response is not in a supported styling language terminate these steps.
The absolute URL of the - resource.
The result of invoking the URL serializer with parsed URL.
null
null.
The node.
The processing instruction.
null
null.
The value of the media
pseudo-attribute
if any, or the empty string otherwise.
title
title.
Set if the alternate
pseudo-attribute
value is a case-sensitive match for
"yes
", or clear otherwise.
+
+
Set if response is CORS-same-origin, or clear otherwise.
alternate
" and title is the
empty string terminate these steps.Resolve - the specified URL and - fetch it.
When the resource is available, the document is in
- quirks mode
- and the Content-Type metadata of
- the resource is not a supported styling language change the
- Content-Type metadata of the resource
- to text/css
.
If the resource is not in a +
Let input URL be the value specified. Be more specific + +
Let base URL be the document's document base URL. Is there a document at this + point? + +
Let origin be the document's origin. + +
Let parsed URL be the return value of invoking the URL parser with the + string input URL and the base URL base URL. + +
If parsed URL is failure, terminate these steps. + +
Let request be a new request, with the + url parsed URL, + origin origin and + referrer base URL. + +
Let response be the result of fetching request.
Wait until response is available. + +
If response is a network error, terminate these steps. + +
If the processing instruction's node document is
+ in quirks mode, response is
+ CORS-same-origin and the Content-Type metadata of response is not a
+ supported styling language change the Content-Type metadata of response to
+ text/css
.
+
+
If response is not in a supported styling language terminate these steps.
The absolute URL of the - resource.
The result of invoking the URL serializer with parsed URL.
null
null.
null
null.
null
null.
The value of the first media
parameter.
title
title.
Set if one of the specified link relation type for this HTTP
Link
header is an
ASCII case-insensitive match for
"alternate
", or false otherwise.
+
+
Set if response is CORS-same-origin, or clear otherwise.
An optional reference to an associated CSS style sheet. This item is initialized to reference an associated style sheet when the rule is created. Subsequent to initialization, this item is reset to null if the rule becomes disassociated from its initial style sheet. Once reset to null, it must never change.
A list of child CSS rules.
In addition to the above state, each CSS rule may be associated
@@ -1717,6 +1777,7 @@
@charset
at-rules, @import
at-rules, and @namespace
at-rules,
throw an InvalidStateError
exception.
Insert new rule into list at the zero-indexed position index.
Return index.
DOM-2 CSS specifies that a NO_MODIFICATION_ALLOWED_ERR
exception is thrown
if the style sheet is read-only. Are there any read-only style sheets?
The styleSheet
attribute must return the associated CSS style sheet.
If loading of the style sheet fails its cssRules
+
If loading of the style sheet fails its CSS rules
list is simply empty, i.e., an @import
at-rule always has an associated CSS style sheet.
The media
attribute must return a MediaList
object for the list of media queries specified
with the @media
at-rule.
The cssRules
attribute must return a CSSRuleList
object for the list of CSS rules
-specified with the @media
at-rule.
The insertRule(rule, index)
method must insert a CSS
-rule rule into the CSS rule list returned by cssRules
at index, and
-return index.
The deleteRule(index)
method must remove a CSS rule from the CSS rule
-list returned by cssRules
at index.
The cssRules
attribute must return a CSSRuleList
object for the
+child CSS rules specified with the @media
at-rule.
The insertRule(rule, index)
method must return the result of
+invoking insert a CSS rule rule into the child CSS rules at
+index.
The deleteRule(index)
method must remove a CSS rule from the
+child CSS rules at index.
CSSFontFaceRule
InterfaceOn setting, the namespaceURI
attribute must run the following steps:
Let CSS style sheet be the value returned by parentStyleSheet
.
-
Let list be the value returned by cssRules
of CSS style sheet, or
- null if CSS style sheet is null.
+
Let parent be the parent CSS style sheet. +
Let list be the CSS rules of parent, or + null if parent is null.
If list is not null and contains anything other than
@charset
at-rules, @import
at-rules, and @namespace
at-rules,
throw an InvalidStateError
exception.
@@ -1991,9 +2052,9 @@
On setting, the prefix
attribute must run the following steps:
Let CSS style sheet be the value returned by parentStyleSheet
.
-
Let list be the value returned by cssRules
of CSS style sheet, or
- null if CSS style sheet is null.
+
Let parent be the parent CSS style sheet. +
Let list be the CSS rules of parent, or + null if parent is null.
If list is not null and contains anything other than
@charset
at-rules, @import
at-rules, and @namespace
at-rules,
throw an InvalidStateError
exception.