[CSS Parser] Fix @page rule parsing
authorhyatt@apple.com <hyatt@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 29 Nov 2016 17:14:45 +0000 (17:14 +0000)
committerhyatt@apple.com <hyatt@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 29 Nov 2016 17:14:45 +0000 (17:14 +0000)
https://bugs.webkit.org/show_bug.cgi?id=165143

Reviewed by Zalan Bujtas.

* css/parser/CSSParserImpl.cpp:
(WebCore::CSSParserImpl::parsePageSelector):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@209072 268f45cc-cd09-0410-ab3c-d52691b4dbfc

Source/WebCore/ChangeLog
Source/WebCore/css/parser/CSSParserImpl.cpp

index af04d05..d9c6c18 100644 (file)
@@ -1,3 +1,13 @@
+2016-11-29  Dave Hyatt  <hyatt@apple.com>
+
+        [CSS Parser] Fix @page rule parsing
+        https://bugs.webkit.org/show_bug.cgi?id=165143
+
+        Reviewed by Zalan Bujtas.
+
+        * css/parser/CSSParserImpl.cpp:
+        (WebCore::CSSParserImpl::parsePageSelector):
+
 2016-11-29  Wenson Hsieh  <wenson_hsieh@apple.com>
 
         Unreviewed, fix the build after r209070
index 8f814e1..9fe1c55 100644 (file)
@@ -217,7 +217,7 @@ CSSSelectorList CSSParserImpl::parsePageSelector(CSSParserTokenRange range, Styl
         selector = std::unique_ptr<CSSParserSelector>(new CSSParserSelector);
         if (!pseudo.isNull()) {
             selector = std::unique_ptr<CSSParserSelector>(CSSParserSelector::parsePagePseudoSelector(pseudo));
-            if (!selector || selector->match() != CSSSelector::PseudoElement || selector->pseudoElementType() == CSSSelector::PseudoElementUnknown)
+            if (!selector || selector->match() != CSSSelector::PagePseudoClass)
                 return CSSSelectorList();
         }
         if (!typeSelector.isNull())