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

Side by Side Diff: chrome/test/data/dromaeo/tests/jslib-attr-jquery.html

Issue 2499923002: Update dromaeo to upstream a876d5250befbc41e2deab9d10cf6085b511d5ed (Closed)
Patch Set: Removing unrelated files Created 4 years, 1 month 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
OLDNEW
1 <html> 1 <html>
2 <head> 2 <head>
3 <script src="../htmlrunner.js"></script> 3 <script src="../htmlrunner.js"></script>
4 <script src="../lib/jquery.js"></script> 4 <script src="https://ajax.googleapis.com/ajax/libs/jquery/1.10.2/jquery.min.js"> </script>
5 <script> 5 <script>
6 window.onload = function(){ 6 window.onload = function(){
7 startTest("jslib-attr-jquery", 'd2fbb123'); 7 startTest("jslib-attr-jquery", '675a354f');
8 8
9 // Try to force real results 9 // Try to force real results
10 var ret, tmp, div; 10 var ret, tmp, div;
11 11
12 var html = document.body.innerHTML; 12 var html = document.body.innerHTML;
13 13
14 prep(function(){ 14 prep(function(){
15 div = jQuery("div"); 15 div = jQuery("div");
16 var tmp = document.createElement("div"); 16 var tmp = document.createElement("div");
17 tmp.innerHTML = html; 17 tmp.innerHTML = html;
18 document.body.appendChild( tmp ); 18 document.body.appendChild( tmp );
19 }); 19 });
20 » 20
21 test("jQuery - addClass", function(){ 21 test("jQuery - addClass", function(){
22 for ( var i = 0; i < 10; i++ ) 22 for ( var i = 0; i < 10; i++ )
23 div.addClass("foo"); 23 div.addClass("foo");
24 }); 24 });
25 25
26 test("jQuery - removeClass", function(){ 26 test("jQuery - removeClass", function(){
27 for ( var i = 0; i < 10; i++ ) 27 for ( var i = 0; i < 10; i++ )
28 div.removeClass("foo"); 28 div.removeClass("foo");
29 }); 29 });
30 30
(...skipping 266 matching lines...) Expand 10 before | Expand all | Expand 10 after
297 specification, these have been described in terms of CSS2.1. <a 297 specification, these have been described in terms of CSS2.1. <a
298 href="#refsCSS21">[CSS21]</a></p> 298 href="#refsCSS21">[CSS21]</a></p>
299 299
300 <h3><a name=terminology></a>1.2. Terminology</h3> 300 <h3><a name=terminology></a>1.2. Terminology</h3>
301 301
302 <p>All of the text of this specification is normative except 302 <p>All of the text of this specification is normative except
303 examples, notes, and sections explicitly marked as 303 examples, notes, and sections explicitly marked as
304 non-normative.</p> 304 non-normative.</p>
305 305
306 <h3><a name=changesFromCSS2></a>1.3. Changes from CSS2</h3> 306 <h3><a name=changesFromCSS2></a>1.3. Changes from CSS2</h3>
307 307
308 <p><em>This section is non-normative.</em></p> 308 <p><em>This section is non-normative.</em></p>
309 309
310 <p>The main differences between the selectors in CSS2 and those in 310 <p>The main differences between the selectors in CSS2 and those in
311 Selectors are: 311 Selectors are:
312 312
313 <ul> 313 <ul>
314 314
315 <li>the list of basic definitions (selector, group of selectors, 315 <li>the list of basic definitions (selector, group of selectors,
316 simple selector, etc.) has been changed; in particular, what was 316 simple selector, etc.) has been changed; in particular, what was
317 referred to in CSS2 as a simple selector is now called a sequence 317 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
1480 1480
1481 1481
1482 <h5><a name=indeterminate>The :indeterminate pseudo-class</a></h5> 1482 <h5><a name=indeterminate>The :indeterminate pseudo-class</a></h5>
1483 1483
1484 <div class="note"> 1484 <div class="note">
1485 1485
1486 <p>Radio and checkbox elements can be toggled by the user, but are 1486 <p>Radio and checkbox elements can be toggled by the user, but are
1487 sometimes in an indeterminate state, neither checked nor unchecked. 1487 sometimes in an indeterminate state, neither checked nor unchecked.
1488 This can be due to an element attribute, or DOM manipulation.</p> 1488 This can be due to an element attribute, or DOM manipulation.</p>
1489 1489
1490 <p>A future version of this specification may introduce an 1490 <p>A future version of this specification may introduce an
1491 <code>:indeterminate</code> pseudo-class that applies to such elements. 1491 <code>:indeterminate</code> pseudo-class that applies to such elements.
1492 <!--While the <code>:indeterminate</code> pseudo-class is dynamic in 1492 <!--While the <code>:indeterminate</code> pseudo-class is dynamic in
1493 nature, and is altered by user action, since it can also be based on 1493 nature, and is altered by user action, since it can also be based on
1494 the presence of an element attribute, it applies to all media.</p> 1494 the presence of an element attribute, it applies to all media.</p>
1495 1495
1496 <p>Components of a radio-group initialized with no pre-selected choice 1496 <p>Components of a radio-group initialized with no pre-selected choice
1497 are an example of :indeterminate state.--></p> 1497 are an example of :indeterminate state.--></p>
1498 1498
1499 </div> 1499 </div>
1500 1500
1501 1501
1502 <h4><a name=structural-pseudos>6.6.5. Structural pseudo-classes</a></h4> 1502 <h4><a name=structural-pseudos>6.6.5. Structural pseudo-classes</a></h4>
1503 1503
1504 <p>Selectors introduces the concept of <dfn>structural 1504 <p>Selectors introduces the concept of <dfn>structural
1505 pseudo-classes</dfn> to permit selection based on extra information that lies in 1505 pseudo-classes</dfn> to permit selection based on extra information that lies in
1506 the document tree but cannot be represented by other simple selectors or 1506 the document tree but cannot be represented by other simple selectors or
1507 combinators. 1507 combinators.
1508 1508
1509 <p>Note that standalone pieces of PCDATA (text nodes in the DOM) are 1509 <p>Note that standalone pieces of PCDATA (text nodes in the DOM) are
1510 not counted when calculating the position of an element in the list of 1510 not counted when calculating the position of an element in the list of
1511 children of its parent. When calculating the position of an element in 1511 children of its parent. When calculating the position of an element in
1512 the list of children of its parent, the index numbering starts at 1. 1512 the list of children of its parent, the index numbering starts at 1.
1513 1513
1514 1514
1515 <h5><a name=root-pseudo>:root pseudo-class</a></h5> 1515 <h5><a name=root-pseudo>:root pseudo-class</a></h5>
1516 1516
1517 <p>The <code>:root</code> pseudo-class represents an element that is 1517 <p>The <code>:root</code> pseudo-class represents an element that is
(...skipping 171 matching lines...) Expand 10 before | Expand all | Expand 10 after
1689 <p>Examples:</p> 1689 <p>Examples:</p>
1690 <p>The following selector represents a <code>p</code> element that is 1690 <p>The following selector represents a <code>p</code> element that is
1691 the first child of a <code>div</code> element:</p> 1691 the first child of a <code>div</code> element:</p>
1692 <pre>div &gt; p:first-child</pre> 1692 <pre>div &gt; p:first-child</pre>
1693 <p>This selector can represent the <code>p</code> inside the 1693 <p>This selector can represent the <code>p</code> inside the
1694 <code>div</code> of the following fragment:</p> 1694 <code>div</code> of the following fragment:</p>
1695 <pre>&lt;p&gt; The last P before the note.&lt;/p&gt; 1695 <pre>&lt;p&gt; The last P before the note.&lt;/p&gt;
1696 &lt;div class="note"&gt; 1696 &lt;div class="note"&gt;
1697 &lt;p&gt; The first P inside the note.&lt;/p&gt; 1697 &lt;p&gt; The first P inside the note.&lt;/p&gt;
1698 &lt;/div&gt;</pre>but cannot represent the second <code>p</code> in the followin g 1698 &lt;/div&gt;</pre>but cannot represent the second <code>p</code> in the followin g
1699 fragment: 1699 fragment:
1700 <pre>&lt;p&gt; The last P before the note.&lt;/p&gt; 1700 <pre>&lt;p&gt; The last P before the note.&lt;/p&gt;
1701 &lt;div class="note"&gt; 1701 &lt;div class="note"&gt;
1702 &lt;h2&gt; Note &lt;/h2&gt; 1702 &lt;h2&gt; Note &lt;/h2&gt;
1703 &lt;p&gt; The first P inside the note.&lt;/p&gt; 1703 &lt;p&gt; The first P inside the note.&lt;/p&gt;
1704 &lt;/div&gt;</pre> 1704 &lt;/div&gt;</pre>
1705 <p>The following two selectors are usually equivalent:</p> 1705 <p>The following two selectors are usually equivalent:</p>
1706 <pre>* &gt; a:first-child /* a is first child of any element */ 1706 <pre>* &gt; a:first-child /* a is first child of any element */
1707 a:first-child /* Same (assuming a is not the root element) */</pre> 1707 a:first-child /* Same (assuming a is not the root element) */</pre>
1708 </div> 1708 </div>
1709 1709
1710 <h5><a name=last-child-pseudo>:last-child pseudo-class</a></h5> 1710 <h5><a name=last-child-pseudo>:last-child pseudo-class</a></h5>
1711 1711
1712 <p>Same as <code>:nth-last-child(1)</code>. The <code>:last-child</code> pseudo- class 1712 <p>Same as <code>:nth-last-child(1)</code>. The <code>:last-child</code> pseudo- class
1713 represents an element that is the last child of some other element. 1713 represents an element that is the last child of some other element.
1714 1714
1715 <div class="example"> 1715 <div class="example">
1716 <p>Example:</p> 1716 <p>Example:</p>
1717 <p>The following selector represents a list item <code>li</code> that 1717 <p>The following selector represents a list item <code>li</code> that
1718 is the last child of an ordered list <code>ol</code>. 1718 is the last child of an ordered list <code>ol</code>.
1719 <pre>ol &gt; li:last-child</pre> 1719 <pre>ol &gt; li:last-child</pre>
1720 </div> 1720 </div>
1721 1721
1722 <h5><a name=first-of-type-pseudo>:first-of-type pseudo-class</a></h5> 1722 <h5><a name=first-of-type-pseudo>:first-of-type pseudo-class</a></h5>
1723 1723
1724 <p>Same as <code>:nth-of-type(1)</code>. The <code>:first-of-type</code> pseudo- class 1724 <p>Same as <code>:nth-of-type(1)</code>. The <code>:first-of-type</code> pseudo- class
1725 represents an element that is the first sibling of its type in the list of 1725 represents an element that is the first sibling of its type in the list of
1726 children of its parent element. 1726 children of its parent element.
1727 1727
1728 <div class="example"> 1728 <div class="example">
1729 <p>Example:</p> 1729 <p>Example:</p>
1730 <p>The following selector represents a definition title 1730 <p>The following selector represents a definition title
1731 <code>dt</code> inside a definition list <code>dl</code>, this 1731 <code>dt</code> inside a definition list <code>dl</code>, this
1732 <code>dt</code> being the first of its type in the list of children of 1732 <code>dt</code> being the first of its type in the list of children of
1733 its parent element.</p> 1733 its parent element.</p>
1734 <pre>dl dt:first-of-type</pre> 1734 <pre>dl dt:first-of-type</pre>
1735 <p>It is a valid description for the first two <code>dt</code> 1735 <p>It is a valid description for the first two <code>dt</code>
1736 elements in the following example but not for the third one:</p> 1736 elements in the following example but not for the third one:</p>
(...skipping 158 matching lines...) Expand 10 before | Expand all | Expand 10 after
1895 1895
1896 <p>The selector <code>p::first-line</code> does not match any real 1896 <p>The selector <code>p::first-line</code> does not match any real
1897 HTML element. It does match a pseudo-element that conforming user 1897 HTML element. It does match a pseudo-element that conforming user
1898 agents will insert at the beginning of every paragraph.</p> 1898 agents will insert at the beginning of every paragraph.</p>
1899 1899
1900 <p>Note that the length of the first line depends on a number of 1900 <p>Note that the length of the first line depends on a number of
1901 factors, including the width of the page, the font size, etc. Thus, 1901 factors, including the width of the page, the font size, etc. Thus,
1902 an ordinary HTML paragraph such as:</p> 1902 an ordinary HTML paragraph such as:</p>
1903 1903
1904 <pre> 1904 <pre>
1905 &lt;P&gt;This is a somewhat long HTML 1905 &lt;P&gt;This is a somewhat long HTML
1906 paragraph that will be broken into several 1906 paragraph that will be broken into several
1907 lines. The first line will be identified 1907 lines. The first line will be identified
1908 by a fictional tag sequence. The other lines 1908 by a fictional tag sequence. The other lines
1909 will be treated as ordinary lines in the 1909 will be treated as ordinary lines in the
1910 paragraph.&lt;/P&gt; 1910 paragraph.&lt;/P&gt;
1911 </pre> 1911 </pre>
1912 1912
1913 <p>the lines of which happen to be broken as follows: 1913 <p>the lines of which happen to be broken as follows:
1914 1914
1915 <pre> 1915 <pre>
1916 THIS IS A SOMEWHAT LONG HTML PARAGRAPH THAT 1916 THIS IS A SOMEWHAT LONG HTML PARAGRAPH THAT
1917 will be broken into several lines. The first 1917 will be broken into several lines. The first
1918 line will be identified by a fictional tag 1918 line will be identified by a fictional tag
1919 sequence. The other lines will be treated as 1919 sequence. The other lines will be treated as
1920 ordinary lines in the paragraph. 1920 ordinary lines in the paragraph.
1921 </pre> 1921 </pre>
1922 1922
1923 <p>This paragraph might be "rewritten" by user agents to include the 1923 <p>This paragraph might be "rewritten" by user agents to include the
1924 <em>fictional tag sequence</em> for <code>::first-line</code>. This 1924 <em>fictional tag sequence</em> for <code>::first-line</code>. This
1925 fictional tag sequence helps to show how properties are inherited.</p> 1925 fictional tag sequence helps to show how properties are inherited.</p>
1926 1926
1927 <pre> 1927 <pre>
1928 &lt;P&gt;<b>&lt;P::first-line&gt;</b> This is a somewhat long HTML 1928 &lt;P&gt;<b>&lt;P::first-line&gt;</b> This is a somewhat long HTML
1929 paragraph that <b>&lt;/P::first-line&gt;</b> will be broken into several 1929 paragraph that <b>&lt;/P::first-line&gt;</b> 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>If a pseudo-element breaks up a real element, the desired effect 1936 <p>If a pseudo-element breaks up a real element, the desired effect
1937 can often be described by a fictional tag sequence that closes and 1937 can often be described by a fictional tag sequence that closes and
1938 then re-opens the element. Thus, if we mark up the previous paragraph 1938 then re-opens the element. Thus, if we mark up the previous paragraph
1939 with a <code>span</code> element:</p> 1939 with a <code>span</code> element:</p>
1940 1940
1941 <pre> 1941 <pre>
1942 &lt;P&gt;<b>&lt;SPAN class="test"&gt;</b> This is a somewhat long HTML 1942 &lt;P&gt;<b>&lt;SPAN class="test"&gt;</b> This is a somewhat long HTML
1943 paragraph that will be broken into several 1943 paragraph that will be broken into several
1944 lines.<b>&lt;/SPAN&gt;</b> The first line will be identified 1944 lines.<b>&lt;/SPAN&gt;</b> The first line will be identified
1945 by a fictional tag sequence. The other lines 1945 by a fictional tag sequence. The other lines
1946 will be treated as ordinary lines in the 1946 will be treated as ordinary lines in the
1947 paragraph.&lt;/P&gt; 1947 paragraph.&lt;/P&gt;
1948 </pre> 1948 </pre>
1949 1949
1950 <p>the user agent could simulate start and end tags for 1950 <p>the user agent could simulate start and end tags for
1951 <code>span</code> when inserting the fictional tag sequence for 1951 <code>span</code> when inserting the fictional tag sequence for
1952 <code>::first-line</code>. 1952 <code>::first-line</code>.
1953 1953
1954 <pre> 1954 <pre>
1955 &lt;P&gt;&lt;P::first-line&gt;<b>&lt;SPAN class="test"&gt;</b> This is a 1955 &lt;P&gt;&lt;P::first-line&gt;<b>&lt;SPAN class="test"&gt;</b> This is a
1956 somewhat long HTML 1956 somewhat long HTML
1957 paragraph that will <b>&lt;/SPAN&gt;</b>&lt;/P::first-line&gt;<b>&lt;SPAN class= "test"&gt;</b> be 1957 paragraph that will <b>&lt;/SPAN&gt;</b>&lt;/P::first-line&gt;<b>&lt;SPAN class= "test"&gt;</b> be
1958 broken into several 1958 broken into several
1959 lines.<b>&lt;/SPAN&gt;</b> The first line will be identified 1959 lines.<b>&lt;/SPAN&gt;</b> The first line will be identified
1960 by a fictional tag sequence. The other lines 1960 by a fictional tag sequence. The other lines
1961 will be treated as ordinary lines in the 1961 will be treated as ordinary lines in the
1962 paragraph.&lt;/P&gt; 1962 paragraph.&lt;/P&gt;
1963 </pre> 1963 </pre>
1964 1964
1965 <p>In CSS, the <code>::first-line</code> pseudo-element can only be 1965 <p>In CSS, the <code>::first-line</code> pseudo-element can only be
1966 attached to a block-level element, an inline-block, a table-caption, 1966 attached to a block-level element, an inline-block, a table-caption,
1967 or a table-cell.</p> 1967 or a table-cell.</p>
1968 1968
1969 <p><a name="first-formatted-line"></a>The "first formatted line" of an 1969 <p><a name="first-formatted-line"></a>The "first formatted line" of an
1970 element may occur inside a 1970 element may occur inside a
1971 block-level descendant in the same flow (i.e., a block-level 1971 block-level descendant in the same flow (i.e., a block-level
(...skipping 117 matching lines...) Expand 10 before | Expand all | Expand 10 after
2089 2089
2090 <p>The <span class="index-inst" title="fictional tag 2090 <p>The <span class="index-inst" title="fictional tag
2091 sequence">fictional tag sequence</span> is:</p> 2091 sequence">fictional tag sequence</span> is:</p>
2092 2092
2093 <pre> 2093 <pre>
2094 &lt;P&gt; 2094 &lt;P&gt;
2095 &lt;SPAN&gt; 2095 &lt;SPAN&gt;
2096 &lt;P::first-letter&gt; 2096 &lt;P::first-letter&gt;
2097 T 2097 T
2098 &lt;/P::first-letter&gt;he first 2098 &lt;/P::first-letter&gt;he first
2099 &lt;/SPAN&gt; 2099 &lt;/SPAN&gt;
2100 few words of an article in the Economist. 2100 few words of an article in the Economist.
2101 &lt;/P&gt; 2101 &lt;/P&gt;
2102 </pre> 2102 </pre>
2103 2103
2104 <p>Note that the <code>::first-letter</code> pseudo-element tags abut 2104 <p>Note that the <code>::first-letter</code> pseudo-element tags abut
2105 the content (i.e., the initial character), while the ::first-line 2105 the content (i.e., the initial character), while the ::first-line
2106 pseudo-element start tag is inserted right after the start tag of the 2106 pseudo-element start tag is inserted right after the start tag of the
2107 block element.</p> </div> 2107 block element.</p> </div>
2108 2108
2109 <p>In order to achieve traditional drop caps formatting, user agents 2109 <p>In order to achieve traditional drop caps formatting, user agents
(...skipping 90 matching lines...) Expand 10 before | Expand all | Expand 10 after
2200 p::first-line { color: blue } 2200 p::first-line { color: blue }
2201 2201
2202 &lt;P&gt;Some text that ends up on two lines&lt;/P&gt;</pre> 2202 &lt;P&gt;Some text that ends up on two lines&lt;/P&gt;</pre>
2203 2203
2204 <p>Assuming that a line break will occur before the word "ends", the 2204 <p>Assuming that a line break will occur before the word "ends", the
2205 <span class="index-inst" title="fictional tag sequence">fictional tag 2205 <span class="index-inst" title="fictional tag sequence">fictional tag
2206 sequence</span> for this fragment might be:</p> 2206 sequence</span> for this fragment might be:</p>
2207 2207
2208 <pre>&lt;P&gt; 2208 <pre>&lt;P&gt;
2209 &lt;P::first-line&gt; 2209 &lt;P::first-line&gt;
2210 &lt;P::first-letter&gt; 2210 &lt;P::first-letter&gt;
2211 S 2211 S
2212 &lt;/P::first-letter&gt;ome text that 2212 &lt;/P::first-letter&gt;ome text that
2213 &lt;/P::first-line&gt; 2213 &lt;/P::first-line&gt;
2214 ends up on two lines 2214 ends up on two lines
2215 &lt;/P&gt;</pre> 2215 &lt;/P&gt;</pre>
2216 2216
2217 <p>Note that the <code>::first-letter</code> element is inside the <code>::first -line</code> 2217 <p>Note that the <code>::first-letter</code> element is inside the <code>::first -line</code>
2218 element. Properties set on <code>::first-line</code> are inherited by 2218 element. Properties set on <code>::first-line</code> are inherited by
2219 <code>::first-letter</code>, but are overridden if the same property is set on 2219 <code>::first-letter</code>, but are overridden if the same property is set on
2220 <code>::first-letter</code>.</p> 2220 <code>::first-letter</code>.</p>
2221 </div> 2221 </div>
2222 2222
2223 2223
2224 <h4><a name=UIfragments>7.3.</a> <a name=selection>The ::selection pseudo-elemen t</a></h4> 2224 <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
2711 <th>Specification</th> 2711 <th>Specification</th>
2712 <td>CSS level 1</td></tr> 2712 <td>CSS level 1</td></tr>
2713 <tr> 2713 <tr>
2714 <th>Accepts</th> 2714 <th>Accepts</th>
2715 <td>type selectors<br>class selectors<br>ID selectors<br>:link, 2715 <td>type selectors<br>class selectors<br>ID selectors<br>:link,
2716 :visited and :active pseudo-classes<br>descendant combinator 2716 :visited and :active pseudo-classes<br>descendant combinator
2717 <br>::first-line and ::first-letter pseudo-elements</td></tr> 2717 <br>::first-line and ::first-letter pseudo-elements</td></tr>
2718 <tr> 2718 <tr>
2719 <th>Excludes</th> 2719 <th>Excludes</th>
2720 <td> 2720 <td>
2721 2721
2722 <p>universal selector<br>attribute selectors<br>:hover and :focus 2722 <p>universal selector<br>attribute selectors<br>:hover and :focus
2723 pseudo-classes<br>:target pseudo-class<br>:lang() pseudo-class<br>all UI 2723 pseudo-classes<br>:target pseudo-class<br>:lang() pseudo-class<br>all UI
2724 element states pseudo-classes<br>all structural 2724 element states pseudo-classes<br>all structural
2725 pseudo-classes<br>negation pseudo-class<br>all 2725 pseudo-classes<br>negation pseudo-class<br>all
2726 UI element fragments pseudo-elements<br>::before and ::after 2726 UI element fragments pseudo-elements<br>::before and ::after
2727 pseudo-elements<br>child combinators<br>sibling combinators 2727 pseudo-elements<br>child combinators<br>sibling combinators
2728 2728
2729 <p>namespaces</td></tr> 2729 <p>namespaces</td></tr>
2730 <tr> 2730 <tr>
2731 <th>Extra constraints</th> 2731 <th>Extra constraints</th>
2732 <td>only one class selector allowed per sequence of simple 2732 <td>only one class selector allowed per sequence of simple
2733 selectors</td></tr></tbody></table><br><br> 2733 selectors</td></tr></tbody></table><br><br>
2734 <table class="tprofile"> 2734 <table class="tprofile">
2735 <tbody> 2735 <tbody>
2736 <tr> 2736 <tr>
2737 <th class="title" colspan=2>Selectors profile</th></tr> 2737 <th class="title" colspan=2>Selectors profile</th></tr>
2738 <tr> 2738 <tr>
2739 <th>Specification</th> 2739 <th>Specification</th>
2740 <td>CSS level 2</td></tr> 2740 <td>CSS level 2</td></tr>
2741 <tr> 2741 <tr>
2742 <th>Accepts</th> 2742 <th>Accepts</th>
2743 <td>type selectors<br>universal selector<br>attribute presence and 2743 <td>type selectors<br>universal selector<br>attribute presence and
2744 values selectors<br>class selectors<br>ID selectors<br>:link, :visited, 2744 values selectors<br>class selectors<br>ID selectors<br>:link, :visited,
2745 :active, :hover, :focus, :lang() and :first-child pseudo-classes 2745 :active, :hover, :focus, :lang() and :first-child pseudo-classes
2746 <br>descendant combinator<br>child combinator<br>adjacent sibling 2746 <br>descendant combinator<br>child combinator<br>adjacent sibling
2747 combinator<br>::first-line and ::first-letter pseudo-elements<br>::before 2747 combinator<br>::first-line and ::first-letter pseudo-elements<br>::before
2748 and ::after pseudo-elements</td></tr> 2748 and ::after pseudo-elements</td></tr>
2749 <tr> 2749 <tr>
2750 <th>Excludes</th> 2750 <th>Excludes</th>
2751 <td> 2751 <td>
2752 2752
2753 <p>content selectors<br>substring matching attribute 2753 <p>content selectors<br>substring matching attribute
2754 selectors<br>:target pseudo-classes<br>all UI element 2754 selectors<br>:target pseudo-classes<br>all UI element
2755 states pseudo-classes<br>all structural pseudo-classes other 2755 states pseudo-classes<br>all structural pseudo-classes other
2756 than :first-child<br>negation pseudo-class<br>all UI element 2756 than :first-child<br>negation pseudo-class<br>all UI element
2757 fragments pseudo-elements<br>general sibling combinators 2757 fragments pseudo-elements<br>general sibling combinators
2758 2758
2759 <p>namespaces</td></tr> 2759 <p>namespaces</td></tr>
2760 <tr> 2760 <tr>
2761 <th>Extra constraints</th> 2761 <th>Extra constraints</th>
2762 <td>more than one class selector per sequence of simple selectors (CSS1 2762 <td>more than one class selector per sequence of simple selectors (CSS1
2763 constraint) allowed</td></tr></tbody></table> 2763 constraint) allowed</td></tr></tbody></table>
2764 2764
2765 <p>In CSS, selectors express pattern matching rules that determine which style 2765 <p>In CSS, selectors express pattern matching rules that determine which style
2766 rules apply to elements in the document tree. 2766 rules apply to elements in the document tree.
2767 2767
2768 <p>The following selector (CSS level 2) will <b>match</b> all anchors <code>a</c ode> 2768 <p>The following selector (CSS level 2) will <b>match</b> all anchors <code>a</c ode>
2769 with attribute <code>name</code> set inside a section 1 header <code>h1</code>: 2769 with attribute <code>name</code> set inside a section 1 header <code>h1</code>:
2770 <pre>h1 a[name]</pre> 2770 <pre>h1 a[name]</pre>
2771 2771
2772 <p>All CSS declarations attached to such a selector are applied to elements 2772 <p>All CSS declarations attached to such a selector are applied to elements
2773 matching it. </div> 2773 matching it. </div>
2774 2774
2775 <div class="profile"> 2775 <div class="profile">
2776 <table class="tprofile"> 2776 <table class="tprofile">
2777 <tbody> 2777 <tbody>
2778 <tr> 2778 <tr>
2779 <th class="title" colspan=2>Selectors profile</th></tr> 2779 <th class="title" colspan=2>Selectors profile</th></tr>
2780 <tr> 2780 <tr>
2781 <th>Specification</th> 2781 <th>Specification</th>
2782 <td>STTS 3</td> 2782 <td>STTS 3</td>
2783 </tr> 2783 </tr>
2784 <tr> 2784 <tr>
2785 <th>Accepts</th> 2785 <th>Accepts</th>
2786 <td> 2786 <td>
2787 2787
2788 <p>type selectors<br>universal selectors<br>attribute selectors<br>class 2788 <p>type selectors<br>universal selectors<br>attribute selectors<br>class
2789 selectors<br>ID selectors<br>all structural pseudo-classes<br> 2789 selectors<br>ID selectors<br>all structural pseudo-classes<br>
2790 all combinators 2790 all combinators
2791 2791
2792 <p>namespaces</td></tr> 2792 <p>namespaces</td></tr>
2793 <tr> 2793 <tr>
2794 <th>Excludes</th> 2794 <th>Excludes</th>
2795 <td>non-accepted pseudo-classes<br>pseudo-elements<br></td></tr> 2795 <td>non-accepted pseudo-classes<br>pseudo-elements<br></td></tr>
2796 <tr> 2796 <tr>
2797 <th>Extra constraints</th> 2797 <th>Extra constraints</th>
2798 <td>some selectors and combinators are not allowed in fragment 2798 <td>some selectors and combinators are not allowed in fragment
2799 descriptions on the right side of STTS declarations.</td></tr></tbody></ta ble> 2799 descriptions on the right side of STTS declarations.</td></tr></tbody></ta ble>
2800 <form> 2800 <form>
2801 <input type="text" name="test10"/> 2801 <input type="text" name="test10"/>
(...skipping 15 matching lines...) Expand all
2817 <input type="text" name="foo"/> 2817 <input type="text" name="foo"/>
2818 <input type="text" name="foo"/> 2818 <input type="text" name="foo"/>
2819 <input type="text" name="foo"/> 2819 <input type="text" name="foo"/>
2820 <input type="text" name="foo"/> 2820 <input type="text" name="foo"/>
2821 <input type="text" name="foo"/> 2821 <input type="text" name="foo"/>
2822 <input type="text" name="foo"/> 2822 <input type="text" name="foo"/>
2823 <input type="text" name="foo"/> 2823 <input type="text" name="foo"/>
2824 <input type="text" name="foo"/> 2824 <input type="text" name="foo"/>
2825 <input type="text" name="foo"/> 2825 <input type="text" name="foo"/>
2826 </form> 2826 </form>
2827 2827
2828 <p>Selectors can be used in STTS 3 in two different 2828 <p>Selectors can be used in STTS 3 in two different
2829 manners: 2829 manners:
2830 <ol> 2830 <ol>
2831 <li>a selection mechanism equivalent to CSS selection mechanism: declarations 2831 <li>a selection mechanism equivalent to CSS selection mechanism: declarations
2832 attached to a given selector are applied to elements matching that selector, 2832 attached to a given selector are applied to elements matching that selector,
2833 <li>fragment descriptions that appear on the right side of declarations. 2833 <li>fragment descriptions that appear on the right side of declarations.
2834 </li></ol></div> 2834 </li></ol></div>
2835 2835
2836 <h2><a name=Conformance></a>13. Conformance and requirements</h2> 2836 <h2><a name=Conformance></a>13. Conformance and requirements</h2>
2837 2837
2838 <p>This section defines conformance with the present specification only. 2838 <p>This section defines conformance with the present specification only.
2839 2839
2840 <p>The inability of a user agent to implement part of this specification due to 2840 <p>The inability of a user agent to implement part of this specification due to
2841 the limitations of a particular device (e.g., non interactive user agents will 2841 the limitations of a particular device (e.g., non interactive user agents will
2842 probably not implement dynamic pseudo-classes because they make no sense without 2842 probably not implement dynamic pseudo-classes because they make no sense without
2843 interactivity) does not imply non-conformance. 2843 interactivity) does not imply non-conformance.
2844 2844
2845 <p>All specifications reusing Selectors must contain a <a 2845 <p>All specifications reusing Selectors must contain a <a
2846 href="#profiling">Profile</a> listing the 2846 href="#profiling">Profile</a> listing the
2847 subset of Selectors it accepts or excludes, and describing the constraints 2847 subset of Selectors it accepts or excludes, and describing the constraints
2848 it adds to the current specification. 2848 it adds to the current specification.
2849 2849
2850 <p>Invalidity is caused by a parsing error, e.g. an unrecognized token or a toke n 2850 <p>Invalidity is caused by a parsing error, e.g. an unrecognized token or a toke n
2851 which is not allowed at the current parsing point. 2851 which is not allowed at the current parsing point.
2852 2852
2853 <p>User agents must observe the rules for handling parsing errors: 2853 <p>User agents must observe the rules for handling parsing errors:
2854 <ul> 2854 <ul>
2855 <li>a simple selector containing an undeclared namespace prefix is invalid</li > 2855 <li>a simple selector containing an undeclared namespace prefix is invalid</li >
2856 <li>a selector containing an invalid simple selector, an invalid combinator 2856 <li>a selector containing an invalid simple selector, an invalid combinator
2857 or an invalid token is invalid. </li> 2857 or an invalid token is invalid. </li>
2858 <li>a group of selectors containing an invalid selector is invalid.</li> 2858 <li>a group of selectors containing an invalid selector is invalid.</li>
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after
2891 2891
2892 <h2><a name=references>16. References</a></h2> 2892 <h2><a name=references>16. References</a></h2>
2893 2893
2894 <dl class="refs"> 2894 <dl class="refs">
2895 2895
2896 <dt>[CSS1] 2896 <dt>[CSS1]
2897 <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 2897 <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
2898 <dd>(<code><a href="http://www.w3.org/TR/REC-CSS1">http://www.w3.org/TR/REC-CS S1</a></code>) 2898 <dd>(<code><a href="http://www.w3.org/TR/REC-CSS1">http://www.w3.org/TR/REC-CS S1</a></code>)
2899 2899
2900 <dt>[CSS21] 2900 <dt>[CSS21]
2901 <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 2901 <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
2902 <dd>(<code><a href="http://www.w3.org/TR/CSS21">http://www.w3.org/TR/CSS21</a> </code>) 2902 <dd>(<code><a href="http://www.w3.org/TR/CSS21">http://www.w3.org/TR/CSS21</a> </code>)
2903 2903
2904 <dt>[CWWW] 2904 <dt>[CWWW]
2905 <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 2905 <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
2906 <dd>(<code><a href="http://www.w3.org/TR/charmod/">http://www.w3.org/TR/charmo d/</a></code>) 2906 <dd>(<code><a href="http://www.w3.org/TR/charmod/">http://www.w3.org/TR/charmo d/</a></code>)
2907 2907
2908 <dt>[FLEX] 2908 <dt>[FLEX]
2909 <dd><a name="refsFLEX"></a> "<cite>Flex: The Lexical Scanner Generator</cite>" , Version 2.3.7, ISBN 1882114213 2909 <dd><a name="refsFLEX"></a> "<cite>Flex: The Lexical Scanner Generator</cite>" , Version 2.3.7, ISBN 1882114213
2910 2910
2911 <dt>[HTML4] 2911 <dt>[HTML4]
2912 <dd><a name="refsHTML4"></a> Dave Ragget, Arnaud Le Hors, Ian Jacobs, editors; "<cite>HTML 4.01 Specification</cite>", W3C Recommendation, 24 December 1999 2912 <dd><a name="refsHTML4"></a> Dave Ragget, Arnaud Le Hors, Ian Jacobs, editors; "<cite>HTML 4.01 Specification</cite>", W3C Recommendation, 24 December 1999
2913 <dd>(<a href="http://www.w3.org/TR/html4/"><code>http://www.w3.org/TR/html4/</ code></a>) 2913 <dd>(<a href="http://www.w3.org/TR/html4/"><code>http://www.w3.org/TR/html4/</ code></a>)
2914 2914
2915 <dt>[MATH] 2915 <dt>[MATH]
2916 <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 2916 <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
2917 <dd>(<code><a href="http://www.w3.org/TR/REC-MathML/">http://www.w3.org/TR/REC -MathML/</a></code>) 2917 <dd>(<code><a href="http://www.w3.org/TR/REC-MathML/">http://www.w3.org/TR/REC -MathML/</a></code>)
2918 2918
2919 <dt>[RFC3066] 2919 <dt>[RFC3066]
2920 <dd><a name="refsRFC3066"></a> H. Alvestrand; "<cite>Tags for the Identificati on of Languages</cite>", Request for Comments 3066, January 2001 2920 <dd><a name="refsRFC3066"></a> H. Alvestrand; "<cite>Tags for the Identificati on of Languages</cite>", Request for Comments 3066, January 2001
2921 <dd>(<a href="http://www.ietf.org/rfc/rfc3066.txt"><code>http://www.ietf.org/r fc/rfc3066.txt</code></a>) 2921 <dd>(<a href="http://www.ietf.org/rfc/rfc3066.txt"><code>http://www.ietf.org/r fc/rfc3066.txt</code></a>)
2922 2922
2923 <dt>[STTS] 2923 <dt>[STTS]
2924 <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 2924 <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
2925 <dd>(<code><a href="http://www.w3.org/TR/NOTE-STTS3">http://www.w3.org/TR/NOTE -STTS3</a></code>) 2925 <dd>(<code><a href="http://www.w3.org/TR/NOTE-STTS3">http://www.w3.org/TR/NOTE -STTS3</a></code>)
2926 2926
2927 <dt>[SVG] 2927 <dt>[SVG]
2928 <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 2928 <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
2929 <dd>(<code><a href="http://www.w3.org/TR/SVG/">http://www.w3.org/TR/SVG/</a></ code>) 2929 <dd>(<code><a href="http://www.w3.org/TR/SVG/">http://www.w3.org/TR/SVG/</a></ code>)
2930 2930
2931 <dt>[UNICODE]</dt> 2931 <dt>[UNICODE]</dt>
2932 <dd><a name="refsUNICODE"></a> <cite><a 2932 <dd><a name="refsUNICODE"></a> <cite><a
2933 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>. 2933 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>.
2934 <dd>(<code><a href="http://www.unicode.org/versions/">http://www.unicode.org/v ersions/</a></code>)</dd> 2934 <dd>(<code><a href="http://www.unicode.org/versions/">http://www.unicode.org/v ersions/</a></code>)</dd>
2935 2935
2936 <dt>[XML10] 2936 <dt>[XML10]
2937 <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 2937 <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
2938 <dd>(<a href="http://www.w3.org/TR/REC-xml/"><code>http://www.w3.org/TR/REC-xm l/</code></a>) 2938 <dd>(<a href="http://www.w3.org/TR/REC-xml/"><code>http://www.w3.org/TR/REC-xm l/</code></a>)
2939 2939
2940 <dt>[XMLNAMES] 2940 <dt>[XMLNAMES]
2941 <dd><a name="refsXMLNAMES"></a> Tim Bray, Dave Hollander, Andrew Layman, edito rs; "<cite>Namespaces in XML</cite>", W3C Recommendation, 14 January 1999 2941 <dd><a name="refsXMLNAMES"></a> Tim Bray, Dave Hollander, Andrew Layman, edito rs; "<cite>Namespaces in XML</cite>", W3C Recommendation, 14 January 1999
2942 <dd>(<a href="http://www.w3.org/TR/REC-xml-names/"><code>http://www.w3.org/TR/ REC-xml-names/</code></a>) 2942 <dd>(<a href="http://www.w3.org/TR/REC-xml-names/"><code>http://www.w3.org/TR/ REC-xml-names/</code></a>)
2943 2943
2944 <dt>[YACC] 2944 <dt>[YACC]
2945 <dd><a name="refsYACC"></a> S. C. Johnson; "<cite>YACC &mdash; Yet another com piler compiler</cite>", Technical Report, Murray Hill, 1975 2945 <dd><a name="refsYACC"></a> S. C. Johnson; "<cite>YACC &mdash; Yet another com piler compiler</cite>", Technical Report, Murray Hill, 1975
2946 2946
2947 </dl> 2947 </dl>
2948 </body> 2948 </body>
2949 </html> 2949 </html>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698