| Differences between
and this patch
- LayoutTests/ChangeLog +25 lines
Lines 1-3 LayoutTests/ChangeLog_sec1
1
2007-02-07  Nicholas Shanks  <webkit@nickshanks.com>
2
3
        Reviewed by NOBODY (OOPS!).
4
5
        Removed broken recognition of :last-* and :only-* selectors
6
        Test results show red indicating property unsupported
7
        Previous behaviour was to erroniously make everything green
8
9
        * css3/css3-modsel-33-expected.checksum: Added.
10
        * css3/css3-modsel-33-expected.png: Added.
11
        * css3/css3-modsel-33-expected.txt: Added.
12
        * css3/css3-modsel-33.html: Added.
13
        * css3/css3-modsel-35-expected.checksum: Added.
14
        * css3/css3-modsel-35-expected.png: Added.
15
        * css3/css3-modsel-35-expected.txt: Added.
16
        * css3/css3-modsel-35.html: Added.
17
        * css3/css3-modsel-36-expected.checksum: Added.
18
        * css3/css3-modsel-36-expected.png: Added.
19
        * css3/css3-modsel-36-expected.txt: Added.
20
        * css3/css3-modsel-36.html: Added.
21
        * css3/css3-modsel-37-expected.checksum: Added.
22
        * css3/css3-modsel-37-expected.png: Added.
23
        * css3/css3-modsel-37-expected.txt: Added.
24
        * css3/css3-modsel-37.html: Added.
25
1
2007-02-06  Justin Garcia  <justin.garcia@apple.com>
26
2007-02-06  Justin Garcia  <justin.garcia@apple.com>
2
27
3
        Reviewed by john
28
        Reviewed by john
- LayoutTests/css3/css3-modsel-33-expected.checksum +1 lines
Line 0 LayoutTests/css3/css3-modsel-33-expected.checksum_sec1
1
73463500cbee4f2438458169a79ed651
- LayoutTests/css3/css3-modsel-33-expected.txt +45 lines
Line 0 LayoutTests/css3/css3-modsel-33-expected.txt_sec1
1
layer at (0,0) size 800x600
2
  RenderView at (0,0) size 800x600
3
layer at (0,0) size 800x134
4
  RenderBlock {HTML} at (0,0) size 800x134
5
    RenderBody {BODY} at (8,8) size 784x110
6
      RenderBlock {DIV} at (0,0) size 784x76
7
        RenderTable {TABLE} at (0,0) size 123x76 [border: (1px outset #808080)]
8
          RenderTableSection {TBODY} at (1,1) size 121x74
9
            RenderTableRow {TR} at (0,2) size 121x22
10
              RenderTableCell {TD} at (2,2) size 24x22 [border: (1px inset #808080)] [r=0 c=0 rs=1 cs=1]
11
                RenderText {#text} at (2,2) size 20x18
12
                  text run at (2,2) width 20: "1.1"
13
              RenderTableCell {TD} at (28,2) size 24x22 [border: (1px inset #808080)] [r=0 c=1 rs=1 cs=1]
14
                RenderText {#text} at (2,2) size 20x18
15
                  text run at (2,2) width 20: "1.2"
16
              RenderTableCell {TD} at (54,2) size 65x22 [bgcolor=#FF0000] [border: (1px inset #808080)] [r=0 c=2 rs=1 cs=1]
17
                RenderText {#text} at (2,2) size 61x18
18
                  text run at (2,2) width 61: "green cell"
19
            RenderTableRow {TR} at (0,26) size 121x22
20
              RenderTableCell {TD} at (2,26) size 24x22 [border: (1px inset #808080)] [r=1 c=0 rs=1 cs=1]
21
                RenderText {#text} at (2,2) size 20x18
22
                  text run at (2,2) width 20: "2.1"
23
              RenderTableCell {TD} at (28,26) size 24x22 [border: (1px inset #808080)] [r=1 c=1 rs=1 cs=1]
24
                RenderText {#text} at (2,2) size 20x18
25
                  text run at (2,2) width 20: "2.2"
26
              RenderTableCell {TD} at (54,26) size 65x22 [bgcolor=#FF0000] [border: (1px inset #808080)] [r=1 c=2 rs=1 cs=1]
27
                RenderText {#text} at (2,2) size 61x18
28
                  text run at (2,2) width 61: "green cell"
29
            RenderTableRow {TR} at (0,50) size 121x22
30
              RenderTableCell {TD} at (2,50) size 24x22 [border: (1px inset #808080)] [r=2 c=0 rs=1 cs=1]
31
                RenderText {#text} at (2,2) size 20x18
32
                  text run at (2,2) width 20: "3.1"
33
              RenderTableCell {TD} at (28,50) size 24x22 [border: (1px inset #808080)] [r=2 c=1 rs=1 cs=1]
34
                RenderText {#text} at (2,2) size 20x18
35
                  text run at (2,2) width 20: "3.2"
36
              RenderTableCell {TD} at (54,50) size 65x22 [bgcolor=#FF0000] [border: (1px inset #808080)] [r=2 c=2 rs=1 cs=1]
37
                RenderText {#text} at (2,2) size 61x18
38
                  text run at (2,2) width 61: "green cell"
39
      RenderBlock {P} at (0,92) size 784x18
40
        RenderInline {SPAN} at (0,0) size 431x18
41
          RenderText {#text} at (0,0) size 431x18
42
            text run at (0,0) width 272: "This paragraph contains a span that should "
43
            text run at (272,0) width 159: "have a green background"
44
        RenderText {#text} at (431,0) size 139x18
45
          text run at (431,0) width 139: " and some text after it."
- LayoutTests/css3/css3-modsel-33.html +40 lines
Line 0 LayoutTests/css3/css3-modsel-33.html_sec1
1
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN">
2
<html>
3
 <head>
4
  <title>:last-child pseudo-class</title>
5
  <style type="text/css">.red { background-color : red }
6
.t1 td:last-child { background-color : lime }
7
p > *:last-child { background-color : lime }
8
</style>
9
  <link rel="first" href="css3-modsel-1.html" title="Groups of selectors">
10
  <link rel="prev" href="css3-modsel-32.html" title=":first-child pseudo-class">
11
  <link rel="next" href="css3-modsel-34.html" title=":first-of-type pseudo-class">
12
  <link rel="last" href="css3-modsel-d5e.html" title="NEGATED :indeterminate with :checked">
13
  <link rel="up" href="./index.html">
14
  <link rel="top" href="../../index.html">
15
 </head>
16
 <body>
17
<div>
18
<table class="t1" border="1">
19
  <tr>
20
    <td>1.1</td>
21
    <td>1.2</td>
22
    <td class="red">green cell</td>
23
  </tr>
24
  <tr>
25
    <td>2.1</td>
26
    <td>2.2</td>
27
    <td class="red">green cell</td>
28
  </tr>
29
  <tr>
30
    <td>3.1</td>
31
    <td>3.2</td>
32
    <td class="red">green cell</td>
33
  </tr>
34
</table>
35
</div>
36
<p>
37
<span>This paragraph contains a span that should
38
     have a green background</span> and some text after it.</p>
39
</body>
40
</html>
- LayoutTests/css3/css3-modsel-35-expected.checksum +1 lines
Line 0 LayoutTests/css3/css3-modsel-35-expected.checksum_sec1
1
57ad0a59166f682446f22a1c63677bb8
- LayoutTests/css3/css3-modsel-35-expected.txt +18 lines
Line 0 LayoutTests/css3/css3-modsel-35-expected.txt_sec1
1
layer at (0,0) size 800x600
2
  RenderView at (0,0) size 800x600
3
layer at (0,0) size 800x136
4
  RenderBlock {HTML} at (0,0) size 800x136
5
    RenderBody {BODY} at (8,8) size 784x120
6
      RenderBlock {DIV} at (0,0) size 784x120
7
        RenderBlock {ADDRESS} at (16,0) size 768x18
8
          RenderText {#text} at (0,0) size 252x18
9
            text run at (0,0) width 252: "A first address with normal background"
10
        RenderBlock {ADDRESS} at (16,34) size 768x18
11
          RenderText {#text} at (0,0) size 272x18
12
            text run at (0,0) width 272: "A second address with normal background"
13
        RenderBlock {ADDRESS} at (16,68) size 768x18 [bgcolor=#FF0000]
14
          RenderText {#text} at (0,0) size 337x18
15
            text run at (0,0) width 337: "A third address that should have a green background"
16
        RenderBlock (anonymous) at (0,102) size 784x18
17
          RenderText {#text} at (0,0) size 314x18
18
            text run at (0,0) width 314: "This div contains 3 addresses above this sentence."
- LayoutTests/css3/css3-modsel-35.html +23 lines
Line 0 LayoutTests/css3/css3-modsel-35.html_sec1
1
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN">
2
<html>
3
 <head>
4
  <title>:last-of-type pseudo-class</title>
5
  <style type="text/css">.red { background-color : red }
6
address { margin-bottom : 1em ; margin-left : 1em }
7
address:last-of-type { background-color : lime }
8
</style>
9
  <link rel="first" href="css3-modsel-1.html" title="Groups of selectors">
10
  <link rel="prev" href="css3-modsel-34.html" title=":first-of-type pseudo-class">
11
  <link rel="next" href="css3-modsel-36.html" title=":only-child pseudo-class">
12
  <link rel="last" href="css3-modsel-d5e.html" title="NEGATED :indeterminate with :checked">
13
  <link rel="up" href="./index.html">
14
  <link rel="top" href="../../index.html">
15
 </head>
16
 <body>
17
<div>
18
<address>A first address with normal background</address>
19
<address>A second address with normal background</address>
20
<address class="red">A third address that should have a green background</address>
21
This div contains 3 addresses above this sentence.</div>
22
</body>
23
</html>
- LayoutTests/css3/css3-modsel-36-expected.checksum +1 lines
Line 0 LayoutTests/css3/css3-modsel-36-expected.checksum_sec1
1
f16b3c5d593bc6f64bdab268bf2d84c8
- LayoutTests/css3/css3-modsel-36-expected.txt +15 lines
Line 0 LayoutTests/css3/css3-modsel-36-expected.txt_sec1
1
layer at (0,0) size 800x600
2
  RenderView at (0,0) size 800x600
3
layer at (0,0) size 800x118
4
  RenderBlock {HTML} at (0,0) size 800x118
5
    RenderBody {BODY} at (8,16) size 784x86
6
      RenderBlock {P} at (0,0) size 784x18
7
        RenderText {#text} at (0,0) size 302x18
8
          text run at (0,0) width 302: "This paragraph should have normal background"
9
      RenderBlock {DIV} at (0,34) size 784x52
10
        RenderBlock (anonymous) at (0,0) size 784x18
11
          RenderText {#text} at (0,0) size 234x18
12
            text run at (0,0) width 234: "This div contains only one paragraph"
13
        RenderBlock {P} at (0,34) size 784x18 [bgcolor=#FF0000]
14
          RenderText {#text} at (0,0) size 293x18
15
            text run at (0,0) width 293: "This paragraph should have green background"
- LayoutTests/css3/css3-modsel-36.html +22 lines
Line 0 LayoutTests/css3/css3-modsel-36.html_sec1
1
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN">
2
<html>
3
 <head>
4
  <title>:only-child pseudo-class</title>
5
  <style type="text/css">.red { background-color : red }
6
p:only-child { background-color : lime }
7
div.testText > div > p { margin-left : 1em }
8
</style>
9
  <link rel="first" href="css3-modsel-1.html" title="Groups of selectors">
10
  <link rel="prev" href="css3-modsel-35.html" title=":last-of-type pseudo-class">
11
  <link rel="next" href="css3-modsel-37.html" title=":only-of-type pseudo-class">
12
  <link rel="last" href="css3-modsel-d5e.html" title="NEGATED :indeterminate with :checked">
13
  <link rel="up" href="./index.html">
14
  <link rel="top" href="../../index.html">
15
 </head>
16
 <body>
17
<p>This paragraph should have normal background</p>
18
<div>This div contains only one paragraph
19
    <p class="red">This paragraph should have green background</p>
20
</div>
21
</body>
22
</html>
- LayoutTests/css3/css3-modsel-37-expected.checksum +1 lines
Line 0 LayoutTests/css3/css3-modsel-37-expected.checksum_sec1
1
42edbe4ed1adae0e132a5889eb6ecef4
- LayoutTests/css3/css3-modsel-37-expected.txt +15 lines
Line 0 LayoutTests/css3/css3-modsel-37-expected.txt_sec1
1
layer at (0,0) size 800x600
2
  RenderView at (0,0) size 800x600
3
layer at (0,0) size 800x118
4
  RenderBlock {HTML} at (0,0) size 800x118
5
    RenderBody {BODY} at (8,16) size 784x86
6
      RenderBlock {DIV} at (0,0) size 784x86
7
        RenderBlock {P} at (0,0) size 784x18
8
          RenderText {#text} at (0,0) size 302x18
9
            text run at (0,0) width 302: "This paragraph should have normal background"
10
        RenderBlock {ADDRESS} at (0,34) size 784x18 [bgcolor=#FF0000]
11
          RenderText {#text} at (0,0) size 301x18
12
            text run at (0,0) width 301: "But this address should have green background"
13
        RenderBlock {P} at (0,68) size 784x18
14
          RenderText {#text} at (0,0) size 302x18
15
            text run at (0,0) width 302: "This paragraph should have normal background"
- LayoutTests/css3/css3-modsel-37.html +22 lines
Line 0 LayoutTests/css3/css3-modsel-37.html_sec1
1
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN">
2
<html>
3
 <head>
4
  <title>:only-of-type pseudo-class</title>
5
  <style type="text/css">.red { background-color : red }
6
.t1 :only-of-type { background-color : lime }
7
</style>
8
  <link rel="first" href="css3-modsel-1.html" title="Groups of selectors">
9
  <link rel="prev" href="css3-modsel-36.html" title=":only-child pseudo-class">
10
  <link rel="next" href="css3-modsel-38.html" title="::first-line pseudo-element">
11
  <link rel="last" href="css3-modsel-d5e.html" title="NEGATED :indeterminate with :checked">
12
  <link rel="up" href="./index.html">
13
  <link rel="top" href="../../index.html">
14
 </head>
15
 <body>
16
<div class="t1">
17
<p>This paragraph should have normal background</p>
18
<address class="red">But this address should have green background</address>
19
<p>This paragraph should have normal background</p>
20
</div>
21
</body>
22
</html>
- WebCore/ChangeLog +9 lines
Lines 1-3 WebCore/ChangeLog_sec1
1
2007-02-07  Nicholas Shanks  <webkit@nickshanks.com>
2
3
        Reviewed by NOBODY (OOPS!).
4
5
        Removed broken recognition of :last-* and :only-* selectors
6
7
        * css/cssstyleselector.cpp:
8
        (WebCore::CSSStyleSelector::checkOneSelector):
9
1
2007-02-06  Alice Liu  <alice.liu@apple.com>
10
2007-02-06  Alice Liu  <alice.liu@apple.com>
2
11
3
        Reviewed by Maciej.
12
        Reviewed by Maciej.
- WebCore/css/cssstyleselector.cpp -58 / +4 lines
Lines 1452-1516 bool CSSStyleSelector::checkOneSelector( WebCore/css/cssstyleselector.cpp_sec1
1452
                }
1452
                }
1453
                break;
1453
                break;
1454
            }
1454
            }
1455
            case CSSSelector::PseudoLastChild: {
1455
            case CSSSelector::PseudoLastChild:
1456
                // last-child matches the last child that is an element!
1456
            case CSSSelector::PseudoLastOfType:
1457
                if (e->parentNode() && e->parentNode()->isElementNode()) {
1457
            case CSSSelector::PseudoOnlyChild:
1458
                    Node *n = e->nextSibling();
1458
            case CSSSelector::PseudoOnlyOfType:
1459
                    while (n && !n->isElementNode())
1460
                        n = n->nextSibling();
1461
                    if (!n)
1462
                        return true;
1463
                }
1464
                break;
1465
            }
1466
            case CSSSelector::PseudoLastOfType: {
1467
                // last-of-type matches the last element of its type!
1468
                if (e->parentNode() && e->parentNode()->isElementNode()) {
1469
                    const QualifiedName& type = e->tagQName();
1470
                    Node *n = e->nextSibling();
1471
                    while (n) {
1472
                        if (n->isElementNode() && static_cast<Element*>(n)->hasTagName(type))
1473
                            break;
1474
                        n = n->nextSibling();
1475
                    }
1476
                    if (!n)
1477
                        return true;
1478
                }
1479
                break;
1480
            }
1481
            case CSSSelector::PseudoOnlyChild: {
1482
                // If both first-child and last-child apply, then only-child applies.
1483
                if (e->parentNode() && e->parentNode()->isElementNode()) {
1484
                    Node *n = e->previousSibling();
1485
                    while (n && !n->isElementNode())
1486
                        n = n->previousSibling();
1487
                    if (!n) {
1488
                        n = e->nextSibling();
1489
                        while (n && !n->isElementNode())
1490
                            n = n->nextSibling();
1491
                        if (!n)
1492
                            return true;
1493
                    }
1494
                }
1495
                break;
1496
            }
1497
            case CSSSelector::PseudoOnlyOfType: {
1498
                // If both first-of-type and last-of-type apply, then only-of-type applies.
1499
                if (e->parentNode() && e->parentNode()->isElementNode()) {
1500
                    const QualifiedName& type = e->tagQName();
1501
                    Node *n = e->previousSibling();
1502
                    while (n && !static_cast<Element*>(n)->hasTagName(type))
1503
                        n = n->previousSibling();
1504
                    if (!n) {
1505
                        n = e->nextSibling();
1506
                        while (n && !static_cast<Element*>(n)->hasTagName(type))
1507
                            n = n->nextSibling();
1508
                        if (!n)
1509
                            return true;
1510
                    }
1511
                }
1512
                break;
1459
                break;
1513
            }
1514
            case CSSSelector::PseudoTarget:
1460
            case CSSSelector::PseudoTarget:
1515
                if (e == e->document()->getCSSTarget())
1461
                if (e == e->document()->getCSSTarget())
1516
                    return true;
1462
                    return true;
- LayoutTests/css3/css3-modsel-35-expected.png +8 lines
Line 2 LayoutTests/css3/css3-modsel-35-expected.png_sec1
9
wZky5YtCg0NVXZ2to4cOaJWrVpp3759Pt+zY8cOtWrVyv2rRAkJCQoPD1evXr0kSf/4xz/UqlUr
10
NrHssxMOTk5qlatmnvd1atXSy0XKxtff/EqGx9/Ll68eM2TxNPT01WjRg33Ce/1ysjIUPXq1d3f
11
Xr33Xf1yCOPaN26de6y9PR0zZgxQ0uXLtXLL7+s1atXu8syMzP1/PPP6/3339eLL76o2bNnS3Jd
12
piZK/579+51bztp0iT3tyVmZmPHjrXf/e537uV+/frZgAED3J/Qjxw50iZPnuy1bV/jE8j4eoqX
13
flWu3ZtS0xMtKysLJs/f76Fh4dbfHy8mVX+cQUAAG59N/wSrGPHjmnVqlUaMmRIqfVt27aVmWnX
14
ulPf6qJEyfqzTffdJ/E9unTRyNHjtQvfvELvfXWW1q4cKG6desmSXrwwQfVvn17vf3221qxYoWW
15
lCub0/i5Tqx2CEpWlLnom0laYlcn1S/IFeCs0CuTxBjJM2Q1EhSStG2VyRNlzSv6LVGvv9nnyFp
16
aLlXEmfFf39tqQ0uS5lGq3vL+/xtr6s8sbWXwzK1leWt375a7eTSv9E6/6itv9atLxHrhuOe8h1
- LayoutTests/css3/css3-modsel-36-expected.png +4 lines
Line 10 LayoutTests/css3/css3-modsel-36-expected.png_sec1
9
fTp0/OqV70qSTJgwID06dOn07bDhg3LAQccsM3rpZTujDWbNm1KkvTv3z99+/5j6J31+3zbsGFD
10
nxK69jHbNX3jNa/+9AO1mRJdux4alab7T2+AIAXh14PIO1POoamMS2l/bLNy4encUJ1UpKPp3Gy
11
7dZ/50tm5uUPdO4e9P8pPwuKeNb2/6ik7FdlJRDkvKV1u38tzTusNWd4+zW1vUnKWOSMq/1737Y
12
jf7J+VXSVnS+nd7J+U/d6AmO3I8dac2PTm+PDw8PDw8PF5gjyb6NDJGF/rsnJnXm9L4+mVFGlNK

Return to Bug 5468