summaryrefslogtreecommitdiffstats
path: root/third_party/WebKit/Source/core/css/parser/CSSSelectorParser.cpp
diff options
context:
space:
mode:
authorTakayoshi Kochi <kochi@chromium.org>2016-03-09 14:02:13 +0900
committerTakayoshi Kochi <kochi@chromium.org>2016-03-09 05:04:06 +0000
commit9154f3d7ad33e79b6f4d9934f2bc1bbc74387892 (patch)
tree8621e6bccfd5e3e96083385a6ba534dc70691553 /third_party/WebKit/Source/core/css/parser/CSSSelectorParser.cpp
parent0eea8b3b09706687bb828790362c140dfdda1a46 (diff)
downloadchromium_src-9154f3d7ad33e79b6f4d9934f2bc1bbc74387892.zip
chromium_src-9154f3d7ad33e79b6f4d9934f2bc1bbc74387892.tar.gz
chromium_src-9154f3d7ad33e79b6f4d9934f2bc1bbc74387892.tar.bz2
Allow simple selectors after ::content for compat.
Allow simple selectors which are not pseudo elements after ::content in compound selectors. Polymer 0.5 content sometimes use ::content[attr] instead of [attr]::content. This was made invalid with r369760. R=timloh@chromium.org BUG=589252 Review URL: https://codereview.chromium.org/1749713002 Cr-Commit-Position: refs/heads/master@{#378331} (cherry picked from commit b9661ac4a6e7f0cfcd9b6fc8b25b074cac3b7bed) Review URL: https://codereview.chromium.org/1771853005 . Cr-Commit-Position: refs/branch-heads/2623@{#603} Cr-Branched-From: 92d77538a86529ca35f9220bd3cd512cbea1f086-refs/heads/master@{#369907}
Diffstat (limited to 'third_party/WebKit/Source/core/css/parser/CSSSelectorParser.cpp')
-rw-r--r--third_party/WebKit/Source/core/css/parser/CSSSelectorParser.cpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/third_party/WebKit/Source/core/css/parser/CSSSelectorParser.cpp b/third_party/WebKit/Source/core/css/parser/CSSSelectorParser.cpp
index 61024f5..5ce5f53 100644
--- a/third_party/WebKit/Source/core/css/parser/CSSSelectorParser.cpp
+++ b/third_party/WebKit/Source/core/css/parser/CSSSelectorParser.cpp
@@ -225,6 +225,8 @@ bool isSimpleSelectorValidAfterPseudoElement(const CSSParserSelector& simpleSele
{
if (compoundPseudoElement == CSSSelector::PseudoUnknown)
return true;
+ if (compoundPseudoElement == CSSSelector::PseudoContent)
+ return simpleSelector.match() != CSSSelector::PseudoElement;
if (simpleSelector.match() != CSSSelector::PseudoClass)
return false;
CSSSelector::PseudoType pseudo = simpleSelector.pseudoType();