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

Side by Side Diff: Source/core/css/parser/CSSSelectorParser.cpp

Issue 1119983002: Allow whitespace at end of :not() pseudo-class, i.e. :not(div ) (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 5 years, 7 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 unified diff | Download patch
« no previous file with comments | « LayoutTests/css-parser/not-pseudo-class-whitespace.html ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "config.h" 5 #include "config.h"
6 #include "core/css/parser/CSSSelectorParser.h" 6 #include "core/css/parser/CSSSelectorParser.h"
7 7
8 #include "core/css/CSSSelectorList.h" 8 #include "core/css/CSSSelectorList.h"
9 #include "core/css/StyleSheetContents.h" 9 #include "core/css/StyleSheetContents.h"
10 #include "core/frame/UseCounter.h" 10 #include "core/frame/UseCounter.h"
(...skipping 291 matching lines...) Expand 10 before | Expand all | Expand 10 after
302 return nullptr; 302 return nullptr;
303 303
304 selector->setSelectorList(adoptPtr(selectorList)); 304 selector->setSelectorList(adoptPtr(selectorList));
305 selector->pseudoType(); // FIXME: Do we need to force the pseudo type to be cached? 305 selector->pseudoType(); // FIXME: Do we need to force the pseudo type to be cached?
306 ASSERT(selector->pseudoType() != CSSSelector::PseudoUnknown); 306 ASSERT(selector->pseudoType() != CSSSelector::PseudoUnknown);
307 return selector.release(); 307 return selector.release();
308 } 308 }
309 309
310 if (colons == 1 && token.valueEqualsIgnoringCase("not")) { 310 if (colons == 1 && token.valueEqualsIgnoringCase("not")) {
311 OwnPtr<CSSParserSelector> innerSelector = consumeCompoundSelector(block) ; 311 OwnPtr<CSSParserSelector> innerSelector = consumeCompoundSelector(block) ;
312 block.consumeWhitespace();
312 if (!innerSelector || !innerSelector->isSimple() || !block.atEnd()) 313 if (!innerSelector || !innerSelector->isSimple() || !block.atEnd())
313 return nullptr; 314 return nullptr;
314 Vector<OwnPtr<CSSParserSelector>> selectorVector; 315 Vector<OwnPtr<CSSParserSelector>> selectorVector;
315 selectorVector.append(innerSelector.release()); 316 selectorVector.append(innerSelector.release());
316 selector->adoptSelectorVector(selectorVector); 317 selector->adoptSelectorVector(selectorVector);
317 return selector.release(); 318 return selector.release();
318 } 319 }
319 320
320 if (colons == 1 && token.valueEqualsIgnoringCase("lang")) { 321 if (colons == 1 && token.valueEqualsIgnoringCase("lang")) {
321 // FIXME: CSS Selectors Level 4 allows :lang(*-foo) 322 // FIXME: CSS Selectors Level 4 allows :lang(*-foo)
(...skipping 354 matching lines...) Expand 10 before | Expand all | Expand 10 after
676 context.useCounter()->count(feature); 677 context.useCounter()->count(feature);
677 if (current->relation() == CSSSelector::ShadowDeep) 678 if (current->relation() == CSSSelector::ShadowDeep)
678 context.useCounter()->count(UseCounter::CSSDeepCombinator); 679 context.useCounter()->count(UseCounter::CSSDeepCombinator);
679 if (current->selectorList()) 680 if (current->selectorList())
680 recordSelectorStats(context, *current->selectorList()); 681 recordSelectorStats(context, *current->selectorList());
681 } 682 }
682 } 683 }
683 } 684 }
684 685
685 } // namespace blink 686 } // namespace blink
OLDNEW
« no previous file with comments | « LayoutTests/css-parser/not-pseudo-class-whitespace.html ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698