From: ap@apple.com Date: Fri, 7 May 2010 00:03:19 +0000 (+0000) Subject: Reviewed by Geoff Garen. X-Git-Url: http://git.webkit.org/?p=WebKit-https.git;a=commitdiff_plain;h=24db4185fe2f8efbca702fd7ac906fd24a5323cc Reviewed by Geoff Garen. https://bugs.webkit.org/show_bug.cgi?id=38697 REGRESSION (r58299): Replying on reddit.com no longer works * css/CSSSelector.cpp: (WebCore::CSSSelector::extractPseudoType): Don't recognize :first, :left and :right. The aren't allowed in all contexts, and properly implementing them is out of scope for this regression fix. git-svn-id: https://svn.webkit.org/repository/webkit/trunk@58922 268f45cc-cd09-0410-ab3c-d52691b4dbfc --- diff --git a/LayoutTests/ChangeLog b/LayoutTests/ChangeLog index 0e4b36f..d5f6659 100644 --- a/LayoutTests/ChangeLog +++ b/LayoutTests/ChangeLog @@ -1,3 +1,16 @@ +2010-05-06 Alexey Proskuryakov + + Reviewed by Geoff Garen. + + https://bugs.webkit.org/show_bug.cgi?id=38697 + REGRESSION (r58299): Replying on reddit.com no longer works + + * fast/css/misplaced-paged-media-pseudo-expected.txt: Added. + * fast/css/misplaced-paged-media-pseudo.html: Added. + + * printing/page-rule-css-text-expected.txt: :first, :left and :right are no longer recognized, + landing regressed results until they can be properly implemented. + 2010-05-06 Anders Carlsson Reviewed by Darin Adler and Dan Bernstein.. diff --git a/LayoutTests/fast/css/misplaced-paged-media-pseudo-expected.txt b/LayoutTests/fast/css/misplaced-paged-media-pseudo-expected.txt new file mode 100644 index 0000000..1d85585 --- /dev/null +++ b/LayoutTests/fast/css/misplaced-paged-media-pseudo-expected.txt @@ -0,0 +1,3 @@ +Test for bug 38697: Replying on reddit.com no longer works. + +PASS diff --git a/LayoutTests/fast/css/misplaced-paged-media-pseudo.html b/LayoutTests/fast/css/misplaced-paged-media-pseudo.html new file mode 100644 index 0000000..a45d954 --- /dev/null +++ b/LayoutTests/fast/css/misplaced-paged-media-pseudo.html @@ -0,0 +1,15 @@ + +

Test for bug 38697: +Replying on reddit.com no longer works.

+ + diff --git a/LayoutTests/printing/page-rule-css-text-expected.txt b/LayoutTests/printing/page-rule-css-text-expected.txt index f18b1e2..71c146b 100644 --- a/LayoutTests/printing/page-rule-css-text-expected.txt +++ b/LayoutTests/printing/page-rule-css-text-expected.txt @@ -1,10 +1,5 @@ @page { margin-top: 5cm; margin-bottom: 10cm; } -@page :left { margin-right: 3cm; } -@page :right { margin-left: 3cm; } -@page :first { border-top-width: 1px; border-right-width: 1px; border-bottom-width: 1px; border-left-width: 1px; } @page hello { color: green; } -@page world:right { color: red; } -@media print { @page somepage:first { margin-top: 3cm; margin-right: 3cm; margin-bottom: 3cm; margin-left: 3cm; } } @page auto_page { size: auto; } @page square_page { size: 4in; } @page letter_page { size: letter; } diff --git a/WebCore/ChangeLog b/WebCore/ChangeLog index 028bcf0..48c99bd 100644 --- a/WebCore/ChangeLog +++ b/WebCore/ChangeLog @@ -1,3 +1,14 @@ +2010-05-06 Alexey Proskuryakov + + Reviewed by Geoff Garen. + + https://bugs.webkit.org/show_bug.cgi?id=38697 + REGRESSION (r58299): Replying on reddit.com no longer works + + * css/CSSSelector.cpp: (WebCore::CSSSelector::extractPseudoType): Don't recognize :first, + :left and :right. The aren't allowed in all contexts, and properly implementing them is out + of scope for this regression fix. + 2010-05-06 Jian Li Reviewed by Adam Barth. diff --git a/WebCore/css/CSSSelector.cpp b/WebCore/css/CSSSelector.cpp index 7d23d1c..ee9c846 100644 --- a/WebCore/css/CSSSelector.cpp +++ b/WebCore/css/CSSSelector.cpp @@ -525,10 +525,13 @@ void CSSSelector::extractPseudoType() const case PseudoSingleButton: case PseudoNoButton: case PseudoNotParsed: + break; case PseudoFirstPage: case PseudoLeftPage: case PseudoRightPage: - break; + // FIXME: These should only be allowed in @page rules. Disabled them altogether until that's implemented correctly. + m_pseudoType = PseudoUnknown; + return; } if (m_match == PseudoClass && element) {