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
+2010-05-06 Alexey Proskuryakov <ap@apple.com>
+
+ 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 <andersca@apple.com>
Reviewed by Darin Adler and Dan Bernstein..
--- /dev/null
+Test for bug 38697: Replying on reddit.com no longer works.
+
+PASS
--- /dev/null
+<body>
+<p>Test for <a href="https://bugs.webkit.org/show_bug.cgi?id=38697">bug 38697<a/>:
+Replying on reddit.com no longer works.</p>
+<script>
+if (window.layoutTestController)
+ layoutTestController.dumpAsText();
+
+try {
+ document.querySelectorAll(".login-popup:first");
+ document.write("FAIL");
+} catch (EX) {
+ document.write("PASS");
+}
+</script>
+</body>
@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; }
+2010-05-06 Alexey Proskuryakov <ap@apple.com>
+
+ 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 <jianli@chromium.org>
Reviewed by Adam Barth.
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) {