Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1140)

Side by Side Diff: samples/third_party/dromaeo/tests/dom-traverse.html

Issue 11418075: Dartifying members. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Fixing menuelement.compact exclusion. Created 8 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 <html> 1 <html>
2 <head> 2 <head>
3 <script src="../htmlrunner.js"></script> 3 <script src="../htmlrunner.js"></script>
4 <script> 4 <script>
5 window.onload = function(){ 5 window.onload = function(){
6 startTest("dom-traverse"); 6 startTest("dom-traverse");
7 7
8 // Try to force real results 8 // Try to force real results
9 var ret, tmp; 9 var ret, tmp;
10 var num = 40; 10 var num = 40;
11 var html = document.body.innerHTML; 11 var html = document.body.innerHtml;
12 12
13 prep(function(){ 13 prep(function(){
14 html = html.replace(/id="test.*?"/g, 'id="test' + num + '"'); 14 html = html.replace(/id="test.*?"/g, 'id="test' + num + '"');
15 html = html.replace(/name="test.*?"/g, 'name="test' + num + '"') ; 15 html = html.replace(/name="test.*?"/g, 'name="test' + num + '"') ;
16 html = html.replace(/class="foo.*?"/g, 'class="foo test' + num + ' bar"'); 16 html = html.replace(/class="foo.*?"/g, 'class="foo test' + num + ' bar"');
17 var div = document.createElement("div"); 17 var div = document.createElement("div");
18 » » div.innerHTML = html; 18 » » div.innerHtml = html;
19 document.body.appendChild( div ); 19 document.body.appendChild( div );
20 }); 20 });
21 21
22 test( "firstChild", function(){ 22 test( "firstChild", function(){
23 var nodes = document.body.childNodes, nl = nodes.length; 23 var nodes = document.body.childNodes, nl = nodes.length;
24 24
25 for ( var i = 0; i < num; i++ ) { 25 for ( var i = 0; i < num; i++ ) {
26 for ( var j = 0; j < nl; j++ ) { 26 for ( var j = 0; j < nl; j++ ) {
27 var cur = nodes[j]; 27 var cur = nodes[j];
28 while ( cur ) 28 while ( cur )
(...skipping 291 matching lines...) Expand 10 before | Expand all | Expand 10 after
320 specification, these have been described in terms of CSS2.1. <a 320 specification, these have been described in terms of CSS2.1. <a
321 href="#refsCSS21">[CSS21]</a></p> 321 href="#refsCSS21">[CSS21]</a></p>
322 322
323 <h3><a name=terminology></a>1.2. Terminology</h3> 323 <h3><a name=terminology></a>1.2. Terminology</h3>
324 324
325 <p>All of the text of this specification is normative except 325 <p>All of the text of this specification is normative except
326 examples, notes, and sections explicitly marked as 326 examples, notes, and sections explicitly marked as
327 non-normative.</p> 327 non-normative.</p>
328 328
329 <h3><a name=changesFromCSS2></a>1.3. Changes from CSS2</h3> 329 <h3><a name=changesFromCSS2></a>1.3. Changes from CSS2</h3>
330 330
331 <p><em>This section is non-normative.</em></p> 331 <p><em>This section is non-normative.</em></p>
332 332
333 <p>The main differences between the selectors in CSS2 and those in 333 <p>The main differences between the selectors in CSS2 and those in
334 Selectors are: 334 Selectors are:
335 335
336 <ul> 336 <ul>
337 337
338 <li>the list of basic definitions (selector, group of selectors, 338 <li>the list of basic definitions (selector, group of selectors,
339 simple selector, etc.) has been changed; in particular, what was 339 simple selector, etc.) has been changed; in particular, what was
340 referred to in CSS2 as a simple selector is now called a sequence 340 referred to in CSS2 as a simple selector is now called a sequence
(...skipping 1162 matching lines...) Expand 10 before | Expand all | Expand 10 after
1503 1503
1504 1504
1505 <h5><a name=indeterminate>The :indeterminate pseudo-class</a></h5> 1505 <h5><a name=indeterminate>The :indeterminate pseudo-class</a></h5>
1506 1506
1507 <div class="note"> 1507 <div class="note">
1508 1508
1509 <p>Radio and checkbox elements can be toggled by the user, but are 1509 <p>Radio and checkbox elements can be toggled by the user, but are
1510 sometimes in an indeterminate state, neither checked nor unchecked. 1510 sometimes in an indeterminate state, neither checked nor unchecked.
1511 This can be due to an element attribute, or DOM manipulation.</p> 1511 This can be due to an element attribute, or DOM manipulation.</p>
1512 1512
1513 <p>A future version of this specification may introduce an 1513 <p>A future version of this specification may introduce an
1514 <code>:indeterminate</code> pseudo-class that applies to such elements. 1514 <code>:indeterminate</code> pseudo-class that applies to such elements.
1515 <!--While the <code>:indeterminate</code> pseudo-class is dynamic in 1515 <!--While the <code>:indeterminate</code> pseudo-class is dynamic in
1516 nature, and is altered by user action, since it can also be based on 1516 nature, and is altered by user action, since it can also be based on
1517 the presence of an element attribute, it applies to all media.</p> 1517 the presence of an element attribute, it applies to all media.</p>
1518 1518
1519 <p>Components of a radio-group initialized with no pre-selected choice 1519 <p>Components of a radio-group initialized with no pre-selected choice
1520 are an example of :indeterminate state.--></p> 1520 are an example of :indeterminate state.--></p>
1521 1521
1522 </div> 1522 </div>
1523 1523
1524 1524
1525 <h4><a name=structural-pseudos>6.6.5. Structural pseudo-classes</a></h4> 1525 <h4><a name=structural-pseudos>6.6.5. Structural pseudo-classes</a></h4>
1526 1526
1527 <p>Selectors introduces the concept of <dfn>structural 1527 <p>Selectors introduces the concept of <dfn>structural
1528 pseudo-classes</dfn> to permit selection based on extra information that lies in 1528 pseudo-classes</dfn> to permit selection based on extra information that lies in
1529 the document tree but cannot be represented by other simple selectors or 1529 the document tree but cannot be represented by other simple selectors or
1530 combinators. 1530 combinators.
1531 1531
1532 <p>Note that standalone pieces of PCDATA (text nodes in the DOM) are 1532 <p>Note that standalone pieces of PCDATA (text nodes in the DOM) are
1533 not counted when calculating the position of an element in the list of 1533 not counted when calculating the position of an element in the list of
1534 children of its parent. When calculating the position of an element in 1534 children of its parent. When calculating the position of an element in
1535 the list of children of its parent, the index numbering starts at 1. 1535 the list of children of its parent, the index numbering starts at 1.
1536 1536
1537 1537
1538 <h5><a name=root-pseudo>:root pseudo-class</a></h5> 1538 <h5><a name=root-pseudo>:root pseudo-class</a></h5>
1539 1539
1540 <p>The <code>:root</code> pseudo-class represents an element that is 1540 <p>The <code>:root</code> pseudo-class represents an element that is
(...skipping 171 matching lines...) Expand 10 before | Expand all | Expand 10 after
1712 <p>Examples:</p> 1712 <p>Examples:</p>
1713 <p>The following selector represents a <code>p</code> element that is 1713 <p>The following selector represents a <code>p</code> element that is
1714 the first child of a <code>div</code> element:</p> 1714 the first child of a <code>div</code> element:</p>
1715 <pre>div &gt; p:first-child</pre> 1715 <pre>div &gt; p:first-child</pre>
1716 <p>This selector can represent the <code>p</code> inside the 1716 <p>This selector can represent the <code>p</code> inside the
1717 <code>div</code> of the following fragment:</p> 1717 <code>div</code> of the following fragment:</p>
1718 <pre>&lt;p&gt; The last P before the note.&lt;/p&gt; 1718 <pre>&lt;p&gt; The last P before the note.&lt;/p&gt;
1719 &lt;div class="note"&gt; 1719 &lt;div class="note"&gt;
1720 &lt;p&gt; The first P inside the note.&lt;/p&gt; 1720 &lt;p&gt; The first P inside the note.&lt;/p&gt;
1721 &lt;/div&gt;</pre>but cannot represent the second <code>p</code> in the followin g 1721 &lt;/div&gt;</pre>but cannot represent the second <code>p</code> in the followin g
1722 fragment: 1722 fragment:
1723 <pre>&lt;p&gt; The last P before the note.&lt;/p&gt; 1723 <pre>&lt;p&gt; The last P before the note.&lt;/p&gt;
1724 &lt;div class="note"&gt; 1724 &lt;div class="note"&gt;
1725 &lt;h2&gt; Note &lt;/h2&gt; 1725 &lt;h2&gt; Note &lt;/h2&gt;
1726 &lt;p&gt; The first P inside the note.&lt;/p&gt; 1726 &lt;p&gt; The first P inside the note.&lt;/p&gt;
1727 &lt;/div&gt;</pre> 1727 &lt;/div&gt;</pre>
1728 <p>The following two selectors are usually equivalent:</p> 1728 <p>The following two selectors are usually equivalent:</p>
1729 <pre>* &gt; a:first-child /* a is first child of any element */ 1729 <pre>* &gt; a:first-child /* a is first child of any element */
1730 a:first-child /* Same (assuming a is not the root element) */</pre> 1730 a:first-child /* Same (assuming a is not the root element) */</pre>
1731 </div> 1731 </div>
1732 1732
1733 <h5><a name=last-child-pseudo>:last-child pseudo-class</a></h5> 1733 <h5><a name=last-child-pseudo>:last-child pseudo-class</a></h5>
1734 1734
1735 <p>Same as <code>:nth-last-child(1)</code>. The <code>:last-child</code> pseudo- class 1735 <p>Same as <code>:nth-last-child(1)</code>. The <code>:last-child</code> pseudo- class
1736 represents an element that is the last child of some other element. 1736 represents an element that is the last child of some other element.
1737 1737
1738 <div class="example"> 1738 <div class="example">
1739 <p>Example:</p> 1739 <p>Example:</p>
1740 <p>The following selector represents a list item <code>li</code> that 1740 <p>The following selector represents a list item <code>li</code> that
1741 is the last child of an ordered list <code>ol</code>. 1741 is the last child of an ordered list <code>ol</code>.
1742 <pre>ol &gt; li:last-child</pre> 1742 <pre>ol &gt; li:last-child</pre>
1743 </div> 1743 </div>
1744 1744
1745 <h5><a name=first-of-type-pseudo>:first-of-type pseudo-class</a></h5> 1745 <h5><a name=first-of-type-pseudo>:first-of-type pseudo-class</a></h5>
1746 1746
1747 <p>Same as <code>:nth-of-type(1)</code>. The <code>:first-of-type</code> pseudo- class 1747 <p>Same as <code>:nth-of-type(1)</code>. The <code>:first-of-type</code> pseudo- class
1748 represents an element that is the first sibling of its type in the list of 1748 represents an element that is the first sibling of its type in the list of
1749 children of its parent element. 1749 children of its parent element.
1750 1750
1751 <div class="example"> 1751 <div class="example">
1752 <p>Example:</p> 1752 <p>Example:</p>
1753 <p>The following selector represents a definition title 1753 <p>The following selector represents a definition title
1754 <code>dt</code> inside a definition list <code>dl</code>, this 1754 <code>dt</code> inside a definition list <code>dl</code>, this
1755 <code>dt</code> being the first of its type in the list of children of 1755 <code>dt</code> being the first of its type in the list of children of
1756 its parent element.</p> 1756 its parent element.</p>
1757 <pre>dl dt:first-of-type</pre> 1757 <pre>dl dt:first-of-type</pre>
1758 <p>It is a valid description for the first two <code>dt</code> 1758 <p>It is a valid description for the first two <code>dt</code>
1759 elements in the following example but not for the third one:</p> 1759 elements in the following example but not for the third one:</p>
(...skipping 158 matching lines...) Expand 10 before | Expand all | Expand 10 after
1918 1918
1919 <p>The selector <code>p::first-line</code> does not match any real 1919 <p>The selector <code>p::first-line</code> does not match any real
1920 HTML element. It does match a pseudo-element that conforming user 1920 HTML element. It does match a pseudo-element that conforming user
1921 agents will insert at the beginning of every paragraph.</p> 1921 agents will insert at the beginning of every paragraph.</p>
1922 1922
1923 <p>Note that the length of the first line depends on a number of 1923 <p>Note that the length of the first line depends on a number of
1924 factors, including the width of the page, the font size, etc. Thus, 1924 factors, including the width of the page, the font size, etc. Thus,
1925 an ordinary HTML paragraph such as:</p> 1925 an ordinary HTML paragraph such as:</p>
1926 1926
1927 <pre> 1927 <pre>
1928 &lt;P&gt;This is a somewhat long HTML 1928 &lt;P&gt;This is a somewhat long HTML
1929 paragraph that will be broken into several 1929 paragraph that will be broken into several
1930 lines. The first line will be identified 1930 lines. The first line will be identified
1931 by a fictional tag sequence. The other lines 1931 by a fictional tag sequence. The other lines
1932 will be treated as ordinary lines in the 1932 will be treated as ordinary lines in the
1933 paragraph.&lt;/P&gt; 1933 paragraph.&lt;/P&gt;
1934 </pre> 1934 </pre>
1935 1935
1936 <p>the lines of which happen to be broken as follows: 1936 <p>the lines of which happen to be broken as follows:
1937 1937
1938 <pre> 1938 <pre>
1939 THIS IS A SOMEWHAT LONG HTML PARAGRAPH THAT 1939 THIS IS A SOMEWHAT LONG HTML PARAGRAPH THAT
1940 will be broken into several lines. The first 1940 will be broken into several lines. The first
1941 line will be identified by a fictional tag 1941 line will be identified by a fictional tag
1942 sequence. The other lines will be treated as 1942 sequence. The other lines will be treated as
1943 ordinary lines in the paragraph. 1943 ordinary lines in the paragraph.
1944 </pre> 1944 </pre>
1945 1945
1946 <p>This paragraph might be "rewritten" by user agents to include the 1946 <p>This paragraph might be "rewritten" by user agents to include the
1947 <em>fictional tag sequence</em> for <code>::first-line</code>. This 1947 <em>fictional tag sequence</em> for <code>::first-line</code>. This
1948 fictional tag sequence helps to show how properties are inherited.</p> 1948 fictional tag sequence helps to show how properties are inherited.</p>
1949 1949
1950 <pre> 1950 <pre>
1951 &lt;P&gt;<b>&lt;P::first-line&gt;</b> This is a somewhat long HTML 1951 &lt;P&gt;<b>&lt;P::first-line&gt;</b> This is a somewhat long HTML
1952 paragraph that <b>&lt;/P::first-line&gt;</b> will be broken into several 1952 paragraph that <b>&lt;/P::first-line&gt;</b> will be broken into several
1953 lines. The first line will be identified 1953 lines. The first line will be identified
1954 by a fictional tag sequence. The other lines 1954 by a fictional tag sequence. The other lines
1955 will be treated as ordinary lines in the 1955 will be treated as ordinary lines in the
1956 paragraph.&lt;/P&gt; 1956 paragraph.&lt;/P&gt;
1957 </pre> 1957 </pre>
1958 1958
1959 <p>If a pseudo-element breaks up a real element, the desired effect 1959 <p>If a pseudo-element breaks up a real element, the desired effect
1960 can often be described by a fictional tag sequence that closes and 1960 can often be described by a fictional tag sequence that closes and
1961 then re-opens the element. Thus, if we mark up the previous paragraph 1961 then re-opens the element. Thus, if we mark up the previous paragraph
1962 with a <code>span</code> element:</p> 1962 with a <code>span</code> element:</p>
1963 1963
1964 <pre> 1964 <pre>
1965 &lt;P&gt;<b>&lt;SPAN class="test"&gt;</b> This is a somewhat long HTML 1965 &lt;P&gt;<b>&lt;SPAN class="test"&gt;</b> This is a somewhat long HTML
1966 paragraph that will be broken into several 1966 paragraph that will be broken into several
1967 lines.<b>&lt;/SPAN&gt;</b> The first line will be identified 1967 lines.<b>&lt;/SPAN&gt;</b> The first line will be identified
1968 by a fictional tag sequence. The other lines 1968 by a fictional tag sequence. The other lines
1969 will be treated as ordinary lines in the 1969 will be treated as ordinary lines in the
1970 paragraph.&lt;/P&gt; 1970 paragraph.&lt;/P&gt;
1971 </pre> 1971 </pre>
1972 1972
1973 <p>the user agent could simulate start and end tags for 1973 <p>the user agent could simulate start and end tags for
1974 <code>span</code> when inserting the fictional tag sequence for 1974 <code>span</code> when inserting the fictional tag sequence for
1975 <code>::first-line</code>. 1975 <code>::first-line</code>.
1976 1976
1977 <pre> 1977 <pre>
1978 &lt;P&gt;&lt;P::first-line&gt;<b>&lt;SPAN class="test"&gt;</b> This is a 1978 &lt;P&gt;&lt;P::first-line&gt;<b>&lt;SPAN class="test"&gt;</b> This is a
1979 somewhat long HTML 1979 somewhat long HTML
1980 paragraph that will <b>&lt;/SPAN&gt;</b>&lt;/P::first-line&gt;<b>&lt;SPAN class= "test"&gt;</b> be 1980 paragraph that will <b>&lt;/SPAN&gt;</b>&lt;/P::first-line&gt;<b>&lt;SPAN class= "test"&gt;</b> be
1981 broken into several 1981 broken into several
1982 lines.<b>&lt;/SPAN&gt;</b> The first line will be identified 1982 lines.<b>&lt;/SPAN&gt;</b> The first line will be identified
1983 by a fictional tag sequence. The other lines 1983 by a fictional tag sequence. The other lines
1984 will be treated as ordinary lines in the 1984 will be treated as ordinary lines in the
1985 paragraph.&lt;/P&gt; 1985 paragraph.&lt;/P&gt;
1986 </pre> 1986 </pre>
1987 1987
1988 <p>In CSS, the <code>::first-line</code> pseudo-element can only be 1988 <p>In CSS, the <code>::first-line</code> pseudo-element can only be
1989 attached to a block-level element, an inline-block, a table-caption, 1989 attached to a block-level element, an inline-block, a table-caption,
1990 or a table-cell.</p> 1990 or a table-cell.</p>
1991 1991
1992 <p><a name="first-formatted-line"></a>The "first formatted line" of an 1992 <p><a name="first-formatted-line"></a>The "first formatted line" of an
1993 element may occur inside a 1993 element may occur inside a
1994 block-level descendant in the same flow (i.e., a block-level 1994 block-level descendant in the same flow (i.e., a block-level
(...skipping 117 matching lines...) Expand 10 before | Expand all | Expand 10 after
2112 2112
2113 <p>The <span class="index-inst" title="fictional tag 2113 <p>The <span class="index-inst" title="fictional tag
2114 sequence">fictional tag sequence</span> is:</p> 2114 sequence">fictional tag sequence</span> is:</p>
2115 2115
2116 <pre> 2116 <pre>
2117 &lt;P&gt; 2117 &lt;P&gt;
2118 &lt;SPAN&gt; 2118 &lt;SPAN&gt;
2119 &lt;P::first-letter&gt; 2119 &lt;P::first-letter&gt;
2120 T 2120 T
2121 &lt;/P::first-letter&gt;he first 2121 &lt;/P::first-letter&gt;he first
2122 &lt;/SPAN&gt; 2122 &lt;/SPAN&gt;
2123 few words of an article in the Economist. 2123 few words of an article in the Economist.
2124 &lt;/P&gt; 2124 &lt;/P&gt;
2125 </pre> 2125 </pre>
2126 2126
2127 <p>Note that the <code>::first-letter</code> pseudo-element tags abut 2127 <p>Note that the <code>::first-letter</code> pseudo-element tags abut
2128 the content (i.e., the initial character), while the ::first-line 2128 the content (i.e., the initial character), while the ::first-line
2129 pseudo-element start tag is inserted right after the start tag of the 2129 pseudo-element start tag is inserted right after the start tag of the
2130 block element.</p> </div> 2130 block element.</p> </div>
2131 2131
2132 <p>In order to achieve traditional drop caps formatting, user agents 2132 <p>In order to achieve traditional drop caps formatting, user agents
(...skipping 90 matching lines...) Expand 10 before | Expand all | Expand 10 after
2223 p::first-line { color: blue } 2223 p::first-line { color: blue }
2224 2224
2225 &lt;P&gt;Some text that ends up on two lines&lt;/P&gt;</pre> 2225 &lt;P&gt;Some text that ends up on two lines&lt;/P&gt;</pre>
2226 2226
2227 <p>Assuming that a line break will occur before the word "ends", the 2227 <p>Assuming that a line break will occur before the word "ends", the
2228 <span class="index-inst" title="fictional tag sequence">fictional tag 2228 <span class="index-inst" title="fictional tag sequence">fictional tag
2229 sequence</span> for this fragment might be:</p> 2229 sequence</span> for this fragment might be:</p>
2230 2230
2231 <pre>&lt;P&gt; 2231 <pre>&lt;P&gt;
2232 &lt;P::first-line&gt; 2232 &lt;P::first-line&gt;
2233 &lt;P::first-letter&gt; 2233 &lt;P::first-letter&gt;
2234 S 2234 S
2235 &lt;/P::first-letter&gt;ome text that 2235 &lt;/P::first-letter&gt;ome text that
2236 &lt;/P::first-line&gt; 2236 &lt;/P::first-line&gt;
2237 ends up on two lines 2237 ends up on two lines
2238 &lt;/P&gt;</pre> 2238 &lt;/P&gt;</pre>
2239 2239
2240 <p>Note that the <code>::first-letter</code> element is inside the <code>::first -line</code> 2240 <p>Note that the <code>::first-letter</code> element is inside the <code>::first -line</code>
2241 element. Properties set on <code>::first-line</code> are inherited by 2241 element. Properties set on <code>::first-line</code> are inherited by
2242 <code>::first-letter</code>, but are overridden if the same property is set on 2242 <code>::first-letter</code>, but are overridden if the same property is set on
2243 <code>::first-letter</code>.</p> 2243 <code>::first-letter</code>.</p>
2244 </div> 2244 </div>
2245 2245
2246 2246
2247 <h4><a name=UIfragments>7.3.</a> <a name=selection>The ::selection pseudo-elemen t</a></h4> 2247 <h4><a name=UIfragments>7.3.</a> <a name=selection>The ::selection pseudo-elemen t</a></h4>
(...skipping 486 matching lines...) Expand 10 before | Expand all | Expand 10 after
2734 <th>Specification</th> 2734 <th>Specification</th>
2735 <td>CSS level 1</td></tr> 2735 <td>CSS level 1</td></tr>
2736 <tr> 2736 <tr>
2737 <th>Accepts</th> 2737 <th>Accepts</th>
2738 <td>type selectors<br>class selectors<br>ID selectors<br>:link, 2738 <td>type selectors<br>class selectors<br>ID selectors<br>:link,
2739 :visited and :active pseudo-classes<br>descendant combinator 2739 :visited and :active pseudo-classes<br>descendant combinator
2740 <br>::first-line and ::first-letter pseudo-elements</td></tr> 2740 <br>::first-line and ::first-letter pseudo-elements</td></tr>
2741 <tr> 2741 <tr>
2742 <th>Excludes</th> 2742 <th>Excludes</th>
2743 <td> 2743 <td>
2744 2744
2745 <p>universal selector<br>attribute selectors<br>:hover and :focus 2745 <p>universal selector<br>attribute selectors<br>:hover and :focus
2746 pseudo-classes<br>:target pseudo-class<br>:lang() pseudo-class<br>all UI 2746 pseudo-classes<br>:target pseudo-class<br>:lang() pseudo-class<br>all UI
2747 element states pseudo-classes<br>all structural 2747 element states pseudo-classes<br>all structural
2748 pseudo-classes<br>negation pseudo-class<br>all 2748 pseudo-classes<br>negation pseudo-class<br>all
2749 UI element fragments pseudo-elements<br>::before and ::after 2749 UI element fragments pseudo-elements<br>::before and ::after
2750 pseudo-elements<br>child combinators<br>sibling combinators 2750 pseudo-elements<br>child combinators<br>sibling combinators
2751 2751
2752 <p>namespaces</td></tr> 2752 <p>namespaces</td></tr>
2753 <tr> 2753 <tr>
2754 <th>Extra constraints</th> 2754 <th>Extra constraints</th>
2755 <td>only one class selector allowed per sequence of simple 2755 <td>only one class selector allowed per sequence of simple
2756 selectors</td></tr></tbody></table><br><br> 2756 selectors</td></tr></tbody></table><br><br>
2757 <table class="tprofile"> 2757 <table class="tprofile">
2758 <tbody> 2758 <tbody>
2759 <tr> 2759 <tr>
2760 <th class="title" colspan=2>Selectors profile</th></tr> 2760 <th class="title" colspan=2>Selectors profile</th></tr>
2761 <tr> 2761 <tr>
2762 <th>Specification</th> 2762 <th>Specification</th>
2763 <td>CSS level 2</td></tr> 2763 <td>CSS level 2</td></tr>
2764 <tr> 2764 <tr>
2765 <th>Accepts</th> 2765 <th>Accepts</th>
2766 <td>type selectors<br>universal selector<br>attribute presence and 2766 <td>type selectors<br>universal selector<br>attribute presence and
2767 values selectors<br>class selectors<br>ID selectors<br>:link, :visited, 2767 values selectors<br>class selectors<br>ID selectors<br>:link, :visited,
2768 :active, :hover, :focus, :lang() and :first-child pseudo-classes 2768 :active, :hover, :focus, :lang() and :first-child pseudo-classes
2769 <br>descendant combinator<br>child combinator<br>adjacent sibling 2769 <br>descendant combinator<br>child combinator<br>adjacent sibling
2770 combinator<br>::first-line and ::first-letter pseudo-elements<br>::before 2770 combinator<br>::first-line and ::first-letter pseudo-elements<br>::before
2771 and ::after pseudo-elements</td></tr> 2771 and ::after pseudo-elements</td></tr>
2772 <tr> 2772 <tr>
2773 <th>Excludes</th> 2773 <th>Excludes</th>
2774 <td> 2774 <td>
2775 2775
2776 <p>content selectors<br>substring matching attribute 2776 <p>content selectors<br>substring matching attribute
2777 selectors<br>:target pseudo-classes<br>all UI element 2777 selectors<br>:target pseudo-classes<br>all UI element
2778 states pseudo-classes<br>all structural pseudo-classes other 2778 states pseudo-classes<br>all structural pseudo-classes other
2779 than :first-child<br>negation pseudo-class<br>all UI element 2779 than :first-child<br>negation pseudo-class<br>all UI element
2780 fragments pseudo-elements<br>general sibling combinators 2780 fragments pseudo-elements<br>general sibling combinators
2781 2781
2782 <p>namespaces</td></tr> 2782 <p>namespaces</td></tr>
2783 <tr> 2783 <tr>
2784 <th>Extra constraints</th> 2784 <th>Extra constraints</th>
2785 <td>more than one class selector per sequence of simple selectors (CSS1 2785 <td>more than one class selector per sequence of simple selectors (CSS1
2786 constraint) allowed</td></tr></tbody></table> 2786 constraint) allowed</td></tr></tbody></table>
2787 2787
2788 <p>In CSS, selectors express pattern matching rules that determine which style 2788 <p>In CSS, selectors express pattern matching rules that determine which style
2789 rules apply to elements in the document tree. 2789 rules apply to elements in the document tree.
2790 2790
2791 <p>The following selector (CSS level 2) will <b>match</b> all anchors <code>a</c ode> 2791 <p>The following selector (CSS level 2) will <b>match</b> all anchors <code>a</c ode>
2792 with attribute <code>name</code> set inside a section 1 header <code>h1</code>: 2792 with attribute <code>name</code> set inside a section 1 header <code>h1</code>:
2793 <pre>h1 a[name]</pre> 2793 <pre>h1 a[name]</pre>
2794 2794
2795 <p>All CSS declarations attached to such a selector are applied to elements 2795 <p>All CSS declarations attached to such a selector are applied to elements
2796 matching it. </div> 2796 matching it. </div>
2797 2797
2798 <div class="profile"> 2798 <div class="profile">
2799 <table class="tprofile"> 2799 <table class="tprofile">
2800 <tbody> 2800 <tbody>
2801 <tr> 2801 <tr>
2802 <th class="title" colspan=2>Selectors profile</th></tr> 2802 <th class="title" colspan=2>Selectors profile</th></tr>
2803 <tr> 2803 <tr>
2804 <th>Specification</th> 2804 <th>Specification</th>
2805 <td>STTS 3</td> 2805 <td>STTS 3</td>
2806 </tr> 2806 </tr>
2807 <tr> 2807 <tr>
2808 <th>Accepts</th> 2808 <th>Accepts</th>
2809 <td> 2809 <td>
2810 2810
2811 <p>type selectors<br>universal selectors<br>attribute selectors<br>class 2811 <p>type selectors<br>universal selectors<br>attribute selectors<br>class
2812 selectors<br>ID selectors<br>all structural pseudo-classes<br> 2812 selectors<br>ID selectors<br>all structural pseudo-classes<br>
2813 all combinators 2813 all combinators
2814 2814
2815 <p>namespaces</td></tr> 2815 <p>namespaces</td></tr>
2816 <tr> 2816 <tr>
2817 <th>Excludes</th> 2817 <th>Excludes</th>
2818 <td>non-accepted pseudo-classes<br>pseudo-elements<br></td></tr> 2818 <td>non-accepted pseudo-classes<br>pseudo-elements<br></td></tr>
2819 <tr> 2819 <tr>
2820 <th>Extra constraints</th> 2820 <th>Extra constraints</th>
2821 <td>some selectors and combinators are not allowed in fragment 2821 <td>some selectors and combinators are not allowed in fragment
2822 descriptions on the right side of STTS declarations.</td></tr></tbody></ta ble> 2822 descriptions on the right side of STTS declarations.</td></tr></tbody></ta ble>
2823 <form> 2823 <form>
2824 <input type="text" name="test10"/> 2824 <input type="text" name="test10"/>
(...skipping 15 matching lines...) Expand all
2840 <input type="text" name="foo"/> 2840 <input type="text" name="foo"/>
2841 <input type="text" name="foo"/> 2841 <input type="text" name="foo"/>
2842 <input type="text" name="foo"/> 2842 <input type="text" name="foo"/>
2843 <input type="text" name="foo"/> 2843 <input type="text" name="foo"/>
2844 <input type="text" name="foo"/> 2844 <input type="text" name="foo"/>
2845 <input type="text" name="foo"/> 2845 <input type="text" name="foo"/>
2846 <input type="text" name="foo"/> 2846 <input type="text" name="foo"/>
2847 <input type="text" name="foo"/> 2847 <input type="text" name="foo"/>
2848 <input type="text" name="foo"/> 2848 <input type="text" name="foo"/>
2849 </form> 2849 </form>
2850 2850
2851 <p>Selectors can be used in STTS 3 in two different 2851 <p>Selectors can be used in STTS 3 in two different
2852 manners: 2852 manners:
2853 <ol> 2853 <ol>
2854 <li>a selection mechanism equivalent to CSS selection mechanism: declarations 2854 <li>a selection mechanism equivalent to CSS selection mechanism: declarations
2855 attached to a given selector are applied to elements matching that selector, 2855 attached to a given selector are applied to elements matching that selector,
2856 <li>fragment descriptions that appear on the right side of declarations. 2856 <li>fragment descriptions that appear on the right side of declarations.
2857 </li></ol></div> 2857 </li></ol></div>
2858 2858
2859 <h2><a name=Conformance></a>13. Conformance and requirements</h2> 2859 <h2><a name=Conformance></a>13. Conformance and requirements</h2>
2860 2860
2861 <p>This section defines conformance with the present specification only. 2861 <p>This section defines conformance with the present specification only.
2862 2862
2863 <p>The inability of a user agent to implement part of this specification due to 2863 <p>The inability of a user agent to implement part of this specification due to
2864 the limitations of a particular device (e.g., non interactive user agents will 2864 the limitations of a particular device (e.g., non interactive user agents will
2865 probably not implement dynamic pseudo-classes because they make no sense without 2865 probably not implement dynamic pseudo-classes because they make no sense without
2866 interactivity) does not imply non-conformance. 2866 interactivity) does not imply non-conformance.
2867 2867
2868 <p>All specifications reusing Selectors must contain a <a 2868 <p>All specifications reusing Selectors must contain a <a
2869 href="#profiling">Profile</a> listing the 2869 href="#profiling">Profile</a> listing the
2870 subset of Selectors it accepts or excludes, and describing the constraints 2870 subset of Selectors it accepts or excludes, and describing the constraints
2871 it adds to the current specification. 2871 it adds to the current specification.
2872 2872
2873 <p>Invalidity is caused by a parsing error, e.g. an unrecognized token or a toke n 2873 <p>Invalidity is caused by a parsing error, e.g. an unrecognized token or a toke n
2874 which is not allowed at the current parsing point. 2874 which is not allowed at the current parsing point.
2875 2875
2876 <p>User agents must observe the rules for handling parsing errors: 2876 <p>User agents must observe the rules for handling parsing errors:
2877 <ul> 2877 <ul>
2878 <li>a simple selector containing an undeclared namespace prefix is invalid</li > 2878 <li>a simple selector containing an undeclared namespace prefix is invalid</li >
2879 <li>a selector containing an invalid simple selector, an invalid combinator 2879 <li>a selector containing an invalid simple selector, an invalid combinator
2880 or an invalid token is invalid. </li> 2880 or an invalid token is invalid. </li>
2881 <li>a group of selectors containing an invalid selector is invalid.</li> 2881 <li>a group of selectors containing an invalid selector is invalid.</li>
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after
2914 2914
2915 <h2><a name=references>16. References</a></h2> 2915 <h2><a name=references>16. References</a></h2>
2916 2916
2917 <dl class="refs"> 2917 <dl class="refs">
2918 2918
2919 <dt>[CSS1] 2919 <dt>[CSS1]
2920 <dd><a name=refsCSS1></a> Bert Bos, H&aring;kon Wium Lie; "<cite>Cascading Sty le Sheets, level 1</cite>", W3C Recommendation, 17 Dec 1996, revised 11 Jan 1999 2920 <dd><a name=refsCSS1></a> Bert Bos, H&aring;kon Wium Lie; "<cite>Cascading Sty le Sheets, level 1</cite>", W3C Recommendation, 17 Dec 1996, revised 11 Jan 1999
2921 <dd>(<code><a href="http://www.w3.org/TR/REC-CSS1">http://www.w3.org/TR/REC-CS S1</a></code>) 2921 <dd>(<code><a href="http://www.w3.org/TR/REC-CSS1">http://www.w3.org/TR/REC-CS S1</a></code>)
2922 2922
2923 <dt>[CSS21] 2923 <dt>[CSS21]
2924 <dd><a name=refsCSS21></a> Bert Bos, Tantek &Ccedil;elik, Ian Hickson, H&aring ;kon Wium Lie, editors; "<cite>Cascading Style Sheets, level 2 revision 1</cite> ", W3C Working Draft, 13 June 2005 2924 <dd><a name=refsCSS21></a> Bert Bos, Tantek &Ccedil;elik, Ian Hickson, H&aring ;kon Wium Lie, editors; "<cite>Cascading Style Sheets, level 2 revision 1</cite> ", W3C Working Draft, 13 June 2005
2925 <dd>(<code><a href="http://www.w3.org/TR/CSS21">http://www.w3.org/TR/CSS21</a> </code>) 2925 <dd>(<code><a href="http://www.w3.org/TR/CSS21">http://www.w3.org/TR/CSS21</a> </code>)
2926 2926
2927 <dt>[CWWW] 2927 <dt>[CWWW]
2928 <dd><a name=refsCWWW></a> Martin J. D&uuml;rst, Fran&ccedil;ois Yergeau, Misha Wolf, Asmus Freytag, Tex Texin, editors; "<cite>Character Model for the World W ide Web</cite>", W3C Recommendation, 15 February 2005 2928 <dd><a name=refsCWWW></a> Martin J. D&uuml;rst, Fran&ccedil;ois Yergeau, Misha Wolf, Asmus Freytag, Tex Texin, editors; "<cite>Character Model for the World W ide Web</cite>", W3C Recommendation, 15 February 2005
2929 <dd>(<code><a href="http://www.w3.org/TR/charmod/">http://www.w3.org/TR/charmo d/</a></code>) 2929 <dd>(<code><a href="http://www.w3.org/TR/charmod/">http://www.w3.org/TR/charmo d/</a></code>)
2930 2930
2931 <dt>[FLEX] 2931 <dt>[FLEX]
2932 <dd><a name="refsFLEX"></a> "<cite>Flex: The Lexical Scanner Generator</cite>" , Version 2.3.7, ISBN 1882114213 2932 <dd><a name="refsFLEX"></a> "<cite>Flex: The Lexical Scanner Generator</cite>" , Version 2.3.7, ISBN 1882114213
2933 2933
2934 <dt>[HTML4] 2934 <dt>[HTML4]
2935 <dd><a name="refsHTML4"></a> Dave Ragget, Arnaud Le Hors, Ian Jacobs, editors; "<cite>HTML 4.01 Specification</cite>", W3C Recommendation, 24 December 1999 2935 <dd><a name="refsHTML4"></a> Dave Ragget, Arnaud Le Hors, Ian Jacobs, editors; "<cite>HTML 4.01 Specification</cite>", W3C Recommendation, 24 December 1999
2936 <dd>(<a href="http://www.w3.org/TR/html4/"><code>http://www.w3.org/TR/html4/</ code></a>) 2936 <dd>(<a href="http://www.w3.org/TR/html4/"><code>http://www.w3.org/TR/html4/</ code></a>)
2937 2937
2938 <dt>[MATH] 2938 <dt>[MATH]
2939 <dd><a name="refsMATH"></a> Patrick Ion, Robert Miner, editors; "<cite>Mathema tical Markup Language (MathML) 1.01</cite>", W3C Recommendation, revision of 7 J uly 1999 2939 <dd><a name="refsMATH"></a> Patrick Ion, Robert Miner, editors; "<cite>Mathema tical Markup Language (MathML) 1.01</cite>", W3C Recommendation, revision of 7 J uly 1999
2940 <dd>(<code><a href="http://www.w3.org/TR/REC-MathML/">http://www.w3.org/TR/REC -MathML/</a></code>) 2940 <dd>(<code><a href="http://www.w3.org/TR/REC-MathML/">http://www.w3.org/TR/REC -MathML/</a></code>)
2941 2941
2942 <dt>[RFC3066] 2942 <dt>[RFC3066]
2943 <dd><a name="refsRFC3066"></a> H. Alvestrand; "<cite>Tags for the Identificati on of Languages</cite>", Request for Comments 3066, January 2001 2943 <dd><a name="refsRFC3066"></a> H. Alvestrand; "<cite>Tags for the Identificati on of Languages</cite>", Request for Comments 3066, January 2001
2944 <dd>(<a href="http://www.ietf.org/rfc/rfc3066.txt"><code>http://www.ietf.org/r fc/rfc3066.txt</code></a>) 2944 <dd>(<a href="http://www.ietf.org/rfc/rfc3066.txt"><code>http://www.ietf.org/r fc/rfc3066.txt</code></a>)
2945 2945
2946 <dt>[STTS] 2946 <dt>[STTS]
2947 <dd><a name=refsSTTS></a> Daniel Glazman; "<cite>Simple Tree Transformation Sh eets 3</cite>", Electricit&eacute; de France, submission to the W3C, 11 November 1998 2947 <dd><a name=refsSTTS></a> Daniel Glazman; "<cite>Simple Tree Transformation Sh eets 3</cite>", Electricit&eacute; de France, submission to the W3C, 11 November 1998
2948 <dd>(<code><a href="http://www.w3.org/TR/NOTE-STTS3">http://www.w3.org/TR/NOTE -STTS3</a></code>) 2948 <dd>(<code><a href="http://www.w3.org/TR/NOTE-STTS3">http://www.w3.org/TR/NOTE -STTS3</a></code>)
2949 2949
2950 <dt>[SVG] 2950 <dt>[SVG]
2951 <dd><a name="refsSVG"></a> Jon Ferraiolo, &#34276;&#27810; &#28147;, Dean Jack son, editors; "<cite>Scalable Vector Graphics (SVG) 1.1 Specification</cite>", W 3C Recommendation, 14 January 2003 2951 <dd><a name="refsSVG"></a> Jon Ferraiolo, &#34276;&#27810; &#28147;, Dean Jack son, editors; "<cite>Scalable Vector Graphics (SVG) 1.1 Specification</cite>", W 3C Recommendation, 14 January 2003
2952 <dd>(<code><a href="http://www.w3.org/TR/SVG/">http://www.w3.org/TR/SVG/</a></ code>) 2952 <dd>(<code><a href="http://www.w3.org/TR/SVG/">http://www.w3.org/TR/SVG/</a></ code>)
2953 2953
2954 <dt>[UNICODE]</dt> 2954 <dt>[UNICODE]</dt>
2955 <dd><a name="refsUNICODE"></a> <cite><a 2955 <dd><a name="refsUNICODE"></a> <cite><a
2956 href="http://www.unicode.org/versions/Unicode4.1.0/">The Unicode Standard, Ve rsion 4.1</a></cite>, The Unicode Consortium. Boston, MA, Addison-Wesley, March 2005. ISBN 0-321-18578-1, as amended by <a href="http://www.unicode.org/versions /Unicode4.0.1/">Unicode 4.0.1</a> and <a href="http://www.unicode.org/versions/U nicode4.1.0/">Unicode 4.1.0</a>. 2956 href="http://www.unicode.org/versions/Unicode4.1.0/">The Unicode Standard, Ve rsion 4.1</a></cite>, The Unicode Consortium. Boston, MA, Addison-Wesley, March 2005. ISBN 0-321-18578-1, as amended by <a href="http://www.unicode.org/versions /Unicode4.0.1/">Unicode 4.0.1</a> and <a href="http://www.unicode.org/versions/U nicode4.1.0/">Unicode 4.1.0</a>.
2957 <dd>(<code><a href="http://www.unicode.org/versions/">http://www.unicode.org/v ersions/</a></code>)</dd> 2957 <dd>(<code><a href="http://www.unicode.org/versions/">http://www.unicode.org/v ersions/</a></code>)</dd>
2958 2958
2959 <dt>[XML10] 2959 <dt>[XML10]
2960 <dd><a name="refsXML10"></a> Tim Bray, Jean Paoli, C. M. Sperberg-McQueen, Eve Maler, Fran&ccedil;ois Yergeau, editors; "<cite>Extensible Markup Language (XML ) 1.0 (Third Edition)</cite>", W3C Recommendation, 4 February 2004 2960 <dd><a name="refsXML10"></a> Tim Bray, Jean Paoli, C. M. Sperberg-McQueen, Eve Maler, Fran&ccedil;ois Yergeau, editors; "<cite>Extensible Markup Language (XML ) 1.0 (Third Edition)</cite>", W3C Recommendation, 4 February 2004
2961 <dd>(<a href="http://www.w3.org/TR/REC-xml/"><code>http://www.w3.org/TR/REC-xm l/</code></a>) 2961 <dd>(<a href="http://www.w3.org/TR/REC-xml/"><code>http://www.w3.org/TR/REC-xm l/</code></a>)
2962 2962
2963 <dt>[XMLNAMES] 2963 <dt>[XMLNAMES]
2964 <dd><a name="refsXMLNAMES"></a> Tim Bray, Dave Hollander, Andrew Layman, edito rs; "<cite>Namespaces in XML</cite>", W3C Recommendation, 14 January 1999 2964 <dd><a name="refsXMLNAMES"></a> Tim Bray, Dave Hollander, Andrew Layman, edito rs; "<cite>Namespaces in XML</cite>", W3C Recommendation, 14 January 1999
2965 <dd>(<a href="http://www.w3.org/TR/REC-xml-names/"><code>http://www.w3.org/TR/ REC-xml-names/</code></a>) 2965 <dd>(<a href="http://www.w3.org/TR/REC-xml-names/"><code>http://www.w3.org/TR/ REC-xml-names/</code></a>)
2966 2966
2967 <dt>[YACC] 2967 <dt>[YACC]
2968 <dd><a name="refsYACC"></a> S. C. Johnson; "<cite>YACC &mdash; Yet another com piler compiler</cite>", Technical Report, Murray Hill, 1975 2968 <dd><a name="refsYACC"></a> S. C. Johnson; "<cite>YACC &mdash; Yet another com piler compiler</cite>", Technical Report, Murray Hill, 1975
2969 2969
2970 </dl> 2970 </dl>
2971 </body> 2971 </body>
2972 </html> 2972 </html>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698