Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(717)

Unified Diff: Source/core/html/HTMLContentElement.cpp

Issue 547363002: Reject pseudo class inside :not() (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: add test Created 6 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « LayoutTests/fast/dom/shadow/content-selector-query-expected.txt ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/html/HTMLContentElement.cpp
diff --git a/Source/core/html/HTMLContentElement.cpp b/Source/core/html/HTMLContentElement.cpp
index 1602680764bd74a1c2d2c8518913c90b57bad8ad..228b23561e84a97f06a0e4400e35f77f0d05484e 100644
--- a/Source/core/html/HTMLContentElement.cpp
+++ b/Source/core/html/HTMLContentElement.cpp
@@ -82,6 +82,10 @@ void HTMLContentElement::parseAttribute(const QualifiedName& name, const AtomicS
static inline bool includesDisallowedPseudoClass(const CSSSelector& selector)
{
+ if (selector.pseudoType() == CSSSelector::PseudoNot) {
+ const CSSSelector* subSelector = selector.selectorList()->first();
hayato 2014/09/10 06:29:11 It looks that current implementation of ':not()' c
+ return subSelector->match() == CSSSelector::PseudoClass;
+ }
return selector.match() == CSSSelector::PseudoClass && selector.pseudoType() != CSSSelector::PseudoNot;
hayato 2014/09/10 06:29:11 You can remove `selector.pseudoType() != CSSSelect
yurina1 2014/09/10 11:02:53 Done.
}
« no previous file with comments | « LayoutTests/fast/dom/shadow/content-selector-query-expected.txt ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698