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

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

Issue 2522793002: Remove ShadowDOMV1 runtime flag (status=stable) (Closed)
Patch Set: rebased Created 4 years 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 | « no previous file | third_party/WebKit/Source/core/css/resolver/StyleResolver.cpp » ('j') | 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 "core/css/parser/CSSSelectorParser.h" 5 #include "core/css/parser/CSSSelectorParser.h"
6 6
7 #include "core/css/CSSSelectorList.h" 7 #include "core/css/CSSSelectorList.h"
8 #include "core/css/StyleSheetContents.h" 8 #include "core/css/StyleSheetContents.h"
9 #include "core/frame/UseCounter.h" 9 #include "core/frame/UseCounter.h"
10 #include "platform/RuntimeEnabledFeatures.h" 10 #include "platform/RuntimeEnabledFeatures.h"
(...skipping 539 matching lines...) Expand 10 before | Expand all | Expand 10 after
550 selectorVector.append(std::move(innerSelector)); 550 selectorVector.append(std::move(innerSelector));
551 selector->adoptSelectorVector(selectorVector); 551 selector->adoptSelectorVector(selectorVector);
552 return selector; 552 return selector;
553 } 553 }
554 case CSSSelector::PseudoSlotted: { 554 case CSSSelector::PseudoSlotted: {
555 DisallowPseudoElementsScope scope(this); 555 DisallowPseudoElementsScope scope(this);
556 556
557 std::unique_ptr<CSSParserSelector> innerSelector = 557 std::unique_ptr<CSSParserSelector> innerSelector =
558 consumeCompoundSelector(block); 558 consumeCompoundSelector(block);
559 block.consumeWhitespace(); 559 block.consumeWhitespace();
560 if (!innerSelector || !block.atEnd() || 560 if (!innerSelector || !block.atEnd())
561 !RuntimeEnabledFeatures::shadowDOMV1Enabled())
562 return nullptr; 561 return nullptr;
563 Vector<std::unique_ptr<CSSParserSelector>> selectorVector; 562 Vector<std::unique_ptr<CSSParserSelector>> selectorVector;
564 selectorVector.append(std::move(innerSelector)); 563 selectorVector.append(std::move(innerSelector));
565 selector->adoptSelectorVector(selectorVector); 564 selector->adoptSelectorVector(selectorVector);
566 return selector; 565 return selector;
567 } 566 }
568 case CSSSelector::PseudoLang: { 567 case CSSSelector::PseudoLang: {
569 // FIXME: CSS Selectors Level 4 allows :lang(*-foo) 568 // FIXME: CSS Selectors Level 4 allows :lang(*-foo)
570 const CSSParserToken& ident = block.consumeIncludingWhitespace(); 569 const CSSParserToken& ident = block.consumeIncludingWhitespace();
571 if (ident.type() != IdentToken || !block.atEnd()) 570 if (ident.type() != IdentToken || !block.atEnd())
(...skipping 302 matching lines...) Expand 10 before | Expand all | Expand 10 after
874 splitAfter->releaseTagHistory(); 873 splitAfter->releaseTagHistory();
875 secondCompound->appendTagHistory( 874 secondCompound->appendTagHistory(
876 secondCompound->pseudoType() == CSSSelector::PseudoSlotted 875 secondCompound->pseudoType() == CSSSelector::PseudoSlotted
877 ? CSSSelector::ShadowSlot 876 ? CSSSelector::ShadowSlot
878 : CSSSelector::ShadowPseudo, 877 : CSSSelector::ShadowPseudo,
879 std::move(compoundSelector)); 878 std::move(compoundSelector));
880 return secondCompound; 879 return secondCompound;
881 } 880 }
882 881
883 } // namespace blink 882 } // namespace blink
OLDNEW
« no previous file with comments | « no previous file | third_party/WebKit/Source/core/css/resolver/StyleResolver.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698