[html5] r6642 - [c] (1) Nail down <style scoped> content model rules. If anyone has a better ide [...]

whatwg at whatwg.org whatwg at whatwg.org
Wed Oct 5 16:24:32 PDT 2011


Author: ianh
Date: 2011-10-05 16:24:31 -0700 (Wed, 05 Oct 2011)
New Revision: 6642

Modified:
   complete.html
   index
   source
Log:
[c] (1) Nail down <style scoped> content model rules. If anyone has a better idea of how to do this, let me know.
Fixing http://www.w3.org/Bugs/Public/show_bug.cgi?id=14016

Modified: complete.html
===================================================================
--- complete.html	2011-10-05 23:08:41 UTC (rev 6641)
+++ complete.html	2011-10-05 23:24:31 UTC (rev 6642)
@@ -14886,7 +14886,7 @@
    <dt>Contexts in which this element can be used:</dt>
    <dd>If the <code title=attr-style-scoped><a href=#attr-style-scoped>scoped</a></code> attribute is absent: where <a href=#metadata-content>metadata content</a> is expected.</dd>
    <dd>If the <code title=attr-style-scoped><a href=#attr-style-scoped>scoped</a></code> attribute is absent: in a <code><a href=#the-noscript-element>noscript</a></code> element that is a child of a <code><a href=#the-head-element>head</a></code> element.</dd>
-   <dd>If the <code title=attr-style-scoped><a href=#attr-style-scoped>scoped</a></code> attribute is present: where <a href=#flow-content>flow content</a> is expected, but before any other <a href=#flow-content>flow content</a> other than other <code><a href=#the-style-element>style</a></code> elements and <a href=#inter-element-whitespace>inter-element whitespace</a>.</dd>
+   <dd>If the <code title=attr-style-scoped><a href=#attr-style-scoped>scoped</a></code> attribute is present: where <a href=#flow-content>flow content</a> is expected, but before any other <a href=#flow-content>flow content</a> other than <a href=#inter-element-whitespace>inter-element whitespace</a>, and not as the child of an element whose content model is <a href=#transparent>transparent</a>.</dd>
    <dt>Content model:</dt>
    <dd>Depends on the value of the <code title=attr-style-type><a href=#attr-style-type>type</a></code> attribute, but must match requirements described in prose below.</dd>
    <dt>Content attributes:</dt>
@@ -14954,10 +14954,20 @@
   attribute is a <a href=#boolean-attribute>boolean attribute</a>. If present, it
   indicates that the styles are intended just for the subtree rooted
   at the <code><a href=#the-style-element>style</a></code> element's parent element, as opposed to
-  the whole <code><a href=#document>Document</a></code>. If the <code title=attr-style-scoped><a href=#attr-style-scoped>scoped</a></code> attribute is present, the
-  <code><a href=#the-style-element>style</a></code> element must be the first element of <a href=#flow-content>flow
-  content</a> in its parent element, if any.</p>
+  the whole <code><a href=#document>Document</a></code>.</p>
 
+  <p>If the <code title=attr-style-scoped><a href=#attr-style-scoped>scoped</a></code> attribute is
+  present and the element has a parent element, then the
+  <code><a href=#the-style-element>style</a></code> element must be the first node of <a href=#flow-content>flow
+  content</a> in its parent element other than <a href=#inter-element-whitespace>inter-element
+  whitespace</a>, and the parent element's content model must not
+  have a <a href=#transparent>transparent</a> component.</p>
+
+  <p class=note>This implies that only one scoped <code><a href=#the-style-element>style</a></code>
+  element is allowed at a time, and that such elements cannot be
+  children of, e.g., <code><a href=#the-a-element>a</a></code> or <code><a href=#the-ins-element>ins</a></code> elements, even
+  when those are used as <a href=#flow-content>flow content</a> containers.</p>
+
   <div class=impl>
 
   <p>If the <code title=attr-style-scoped><a href=#attr-style-scoped>scoped</a></code> attribute is

Modified: index
===================================================================
--- index	2011-10-05 23:08:41 UTC (rev 6641)
+++ index	2011-10-05 23:24:31 UTC (rev 6642)
@@ -14886,7 +14886,7 @@
    <dt>Contexts in which this element can be used:</dt>
    <dd>If the <code title=attr-style-scoped><a href=#attr-style-scoped>scoped</a></code> attribute is absent: where <a href=#metadata-content>metadata content</a> is expected.</dd>
    <dd>If the <code title=attr-style-scoped><a href=#attr-style-scoped>scoped</a></code> attribute is absent: in a <code><a href=#the-noscript-element>noscript</a></code> element that is a child of a <code><a href=#the-head-element>head</a></code> element.</dd>
-   <dd>If the <code title=attr-style-scoped><a href=#attr-style-scoped>scoped</a></code> attribute is present: where <a href=#flow-content>flow content</a> is expected, but before any other <a href=#flow-content>flow content</a> other than other <code><a href=#the-style-element>style</a></code> elements and <a href=#inter-element-whitespace>inter-element whitespace</a>.</dd>
+   <dd>If the <code title=attr-style-scoped><a href=#attr-style-scoped>scoped</a></code> attribute is present: where <a href=#flow-content>flow content</a> is expected, but before any other <a href=#flow-content>flow content</a> other than <a href=#inter-element-whitespace>inter-element whitespace</a>, and not as the child of an element whose content model is <a href=#transparent>transparent</a>.</dd>
    <dt>Content model:</dt>
    <dd>Depends on the value of the <code title=attr-style-type><a href=#attr-style-type>type</a></code> attribute, but must match requirements described in prose below.</dd>
    <dt>Content attributes:</dt>
@@ -14954,10 +14954,20 @@
   attribute is a <a href=#boolean-attribute>boolean attribute</a>. If present, it
   indicates that the styles are intended just for the subtree rooted
   at the <code><a href=#the-style-element>style</a></code> element's parent element, as opposed to
-  the whole <code><a href=#document>Document</a></code>. If the <code title=attr-style-scoped><a href=#attr-style-scoped>scoped</a></code> attribute is present, the
-  <code><a href=#the-style-element>style</a></code> element must be the first element of <a href=#flow-content>flow
-  content</a> in its parent element, if any.</p>
+  the whole <code><a href=#document>Document</a></code>.</p>
 
+  <p>If the <code title=attr-style-scoped><a href=#attr-style-scoped>scoped</a></code> attribute is
+  present and the element has a parent element, then the
+  <code><a href=#the-style-element>style</a></code> element must be the first node of <a href=#flow-content>flow
+  content</a> in its parent element other than <a href=#inter-element-whitespace>inter-element
+  whitespace</a>, and the parent element's content model must not
+  have a <a href=#transparent>transparent</a> component.</p>
+
+  <p class=note>This implies that only one scoped <code><a href=#the-style-element>style</a></code>
+  element is allowed at a time, and that such elements cannot be
+  children of, e.g., <code><a href=#the-a-element>a</a></code> or <code><a href=#the-ins-element>ins</a></code> elements, even
+  when those are used as <a href=#flow-content>flow content</a> containers.</p>
+
   <div class=impl>
 
   <p>If the <code title=attr-style-scoped><a href=#attr-style-scoped>scoped</a></code> attribute is

Modified: source
===================================================================
--- source	2011-10-05 23:08:41 UTC (rev 6641)
+++ source	2011-10-05 23:24:31 UTC (rev 6642)
@@ -15758,7 +15758,7 @@
    <dt>Contexts in which this element can be used:</dt>
    <dd>If the <code title="attr-style-scoped">scoped</code> attribute is absent: where <span>metadata content</span> is expected.</dd>
    <dd>If the <code title="attr-style-scoped">scoped</code> attribute is absent: in a <code>noscript</code> element that is a child of a <code>head</code> element.</dd>
-   <dd>If the <code title="attr-style-scoped">scoped</code> attribute is present: where <span>flow content</span> is expected, but before any other <span>flow content</span> other than other <code>style</code> elements and <span>inter-element whitespace</span>.</dd>
+   <dd>If the <code title="attr-style-scoped">scoped</code> attribute is present: where <span>flow content</span> is expected, but before any other <span>flow content</span> other than <span>inter-element whitespace</span>, and not as the child of an element whose content model is <span>transparent</span>.</dd>
    <dt>Content model:</dt>
    <dd>Depends on the value of the <code title="attr-style-type">type</code> attribute, but must match requirements described in prose below.</dd>
    <dt>Content attributes:</dt>
@@ -15834,11 +15834,20 @@
   attribute is a <span>boolean attribute</span>. If present, it
   indicates that the styles are intended just for the subtree rooted
   at the <code>style</code> element's parent element, as opposed to
-  the whole <code>Document</code>. If the <code
-  title="attr-style-scoped">scoped</code> attribute is present, the
-  <code>style</code> element must be the first element of <span>flow
-  content</span> in its parent element, if any.</p>
+  the whole <code>Document</code>.</p>
 
+  <p>If the <code title="attr-style-scoped">scoped</code> attribute is
+  present and the element has a parent element, then the
+  <code>style</code> element must be the first node of <span>flow
+  content</span> in its parent element other than <span>inter-element
+  whitespace</span>, and the parent element's content model must not
+  have a <span>transparent</span> component.</p>
+
+  <p class="note">This implies that only one scoped <code>style</code>
+  element is allowed at a time, and that such elements cannot be
+  children of, e.g., <code>a</code> or <code>ins</code> elements, even
+  when those are used as <span>flow content</span> containers.</p>
+
   <div class="impl">
 
   <p>If the <code title="attr-style-scoped">scoped</code> attribute is




More information about the Commit-Watchers mailing list