Changeset 19528 in webkit
- Timestamp:
- Feb 9, 2007 5:55:43 AM (17 years ago)
- Location:
- trunk
- Files:
-
- 18 added
- 6 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/LayoutTests/ChangeLog
r19522 r19528 1 2007-02-09 Nicholas Shanks <webkit@nickshanks.com> 2 3 Reviewed by Dave Hyatt. 4 5 Removed broken recognition of :last-* and :only-* selectors 6 Test results show red indicating property unsupported 7 Previous behaviour was to erroneously make everything green 8 9 * css3/expected_failures/css3-modsel-33-expected.checksum: Added. 10 * css3/expected_failures/css3-modsel-33-expected.png: Added. 11 * css3/expected_failures/css3-modsel-33-expected.txt: Added. 12 * css3/expected_failures/css3-modsel-33.html: Added. 13 * css3/expected_failures/css3-modsel-35-expected.checksum: Added. 14 * css3/expected_failures/css3-modsel-35-expected.png: Added. 15 * css3/expected_failures/css3-modsel-35-expected.txt: Added. 16 * css3/expected_failures/css3-modsel-35.html: Added. 17 * css3/expected_failures/css3-modsel-36-expected.checksum: Added. 18 * css3/expected_failures/css3-modsel-36-expected.png: Added. 19 * css3/expected_failures/css3-modsel-36-expected.txt: Added. 20 * css3/expected_failures/css3-modsel-36.html: Added. 21 * css3/expected_failures/css3-modsel-37-expected.checksum: Added. 22 * css3/expected_failures/css3-modsel-37-expected.png: Added. 23 * css3/expected_failures/css3-modsel-37-expected.txt: Added. 24 * css3/expected_failures/css3-modsel-37.html: Added. 25 1 26 2007-02-08 Adele Peterson <adele@apple.com> 2 27 -
trunk/WebCore/ChangeLog
r19527 r19528 1 2007-02-09 Nicholas Shanks <webkit@nickshanks.com> 2 3 Reviewed by Dave Hyatt. 4 5 Removed broken recognition of :last-* and :only-* selectors 6 7 * css/CSSGrammar.y: 8 * css/CSSSelector.cpp: 9 (WebCore::CSSSelector::extractPseudoType): 10 * css/CSSSelector.h: 11 (WebCore::CSSSelector::): 12 * css/cssstyleselector.cpp: 13 (WebCore::CSSStyleSelector::checkOneSelector): 14 1 15 2007-02-09 Maciej Stachowiak <mjs@apple.com> 2 16 -
trunk/WebCore/css/CSSGrammar.y
r19276 r19528 847 847 if (type == CSSSelector::PseudoUnknown) 848 848 $$ = 0; 849 else if (type == CSSSelector::PseudoEmpty || type == CSSSelector::PseudoOnlyChild ||850 type == CSSSelector::PseudoFirstChild || type == CSSSelector::PseudoLastChild) {849 else if (type == CSSSelector::PseudoEmpty || 850 type == CSSSelector::PseudoFirstChild) { 851 851 CSSParser* p = static_cast<CSSParser*>(parser); 852 852 Document* doc = p->document(); -
trunk/WebCore/css/CSSSelector.cpp
r19276 r19528 91 91 static AtomicString link("link"); 92 92 static AtomicString lang("lang("); 93 static AtomicString lastChild("last-child");94 static AtomicString lastOfType("last-of-type");95 93 static AtomicString notStr("not("); 96 static AtomicString onlyChild("only-child");97 static AtomicString onlyOfType("only-of-type");98 94 static AtomicString root("root"); 99 95 static AtomicString searchCancelButton("-webkit-search-cancel-button"); … … 159 155 else if (m_value == lang) 160 156 m_pseudoType = PseudoLang; 161 else if (m_value == lastChild)162 m_pseudoType = PseudoLastChild;163 else if (m_value == lastOfType)164 m_pseudoType = PseudoLastOfType;165 157 else if (m_value == notStr) 166 158 m_pseudoType = PseudoNot; 167 else if (m_value == onlyChild)168 m_pseudoType = PseudoOnlyChild;169 else if (m_value == onlyOfType)170 m_pseudoType = PseudoOnlyOfType;171 159 else if (m_value == root) 172 160 m_pseudoType = PseudoRoot; -
trunk/WebCore/css/CSSSelector.h
r19276 r19528 122 122 PseudoFirstChild, 123 123 PseudoFirstOfType, 124 PseudoLastChild,125 PseudoLastOfType,126 PseudoOnlyChild,127 PseudoOnlyOfType,128 124 PseudoFirstLine, 129 125 PseudoFirstLetter, -
trunk/WebCore/css/cssstyleselector.cpp
r19421 r19528 1450 1450 if (!n) 1451 1451 return true; 1452 }1453 break;1454 }1455 case CSSSelector::PseudoLastChild: {1456 // last-child matches the last child that is an element!1457 if (e->parentNode() && e->parentNode()->isElementNode()) {1458 Node *n = e->nextSibling();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 1452 } 1512 1453 break;
Note: See TracChangeset
for help on using the changeset viewer.