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

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

Issue 1917403002: Allow multiple host pseudos in same compound. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@2661
Patch Set: Created 4 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 | « third_party/WebKit/LayoutTests/fast/dom/shadow/multiple-host-pseudos-in-compound-expected.txt ('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 /* 1 /*
2 * Copyright (C) 1999 Lars Knoll (knoll@kde.org) 2 * Copyright (C) 1999 Lars Knoll (knoll@kde.org)
3 * (C) 2004-2005 Allan Sandfeld Jensen (kde@carewolf.com) 3 * (C) 2004-2005 Allan Sandfeld Jensen (kde@carewolf.com)
4 * Copyright (C) 2006, 2007 Nicholas Shanks (webkit@nickshanks.com) 4 * Copyright (C) 2006, 2007 Nicholas Shanks (webkit@nickshanks.com)
5 * Copyright (C) 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012 Apple Inc. All r ights reserved. 5 * Copyright (C) 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012 Apple Inc. All r ights reserved.
6 * Copyright (C) 2007 Alexey Proskuryakov <ap@webkit.org> 6 * Copyright (C) 2007 Alexey Proskuryakov <ap@webkit.org>
7 * Copyright (C) 2007, 2008 Eric Seidel <eric@webkit.org> 7 * Copyright (C) 2007, 2008 Eric Seidel <eric@webkit.org>
8 * Copyright (C) 2008, 2009 Torch Mobile Inc. All rights reserved. (http://www.t orchmobile.com/) 8 * Copyright (C) 2008, 2009 Torch Mobile Inc. All rights reserved. (http://www.t orchmobile.com/)
9 * Copyright (c) 2011, Code Aurora Forum. All rights reserved. 9 * Copyright (c) 2011, Code Aurora Forum. All rights reserved.
10 * Copyright (C) Research In Motion Limited 2011. All rights reserved. 10 * Copyright (C) Research In Motion Limited 2011. All rights reserved.
(...skipping 591 matching lines...) Expand 10 before | Expand all | Expand 10 after
602 case CSSSelector::PseudoOnlyOfType: 602 case CSSSelector::PseudoOnlyOfType:
603 case CSSSelector::PseudoNthChild: 603 case CSSSelector::PseudoNthChild:
604 case CSSSelector::PseudoNthOfType: 604 case CSSSelector::PseudoNthOfType:
605 case CSSSelector::PseudoNthLastChild: 605 case CSSSelector::PseudoNthLastChild:
606 case CSSSelector::PseudoNthLastOfType: 606 case CSSSelector::PseudoNthLastOfType:
607 if (!metadata.foundInsertionPointCrossing) 607 if (!metadata.foundInsertionPointCrossing)
608 metadata.foundSiblingSelector = true; 608 metadata.foundSiblingSelector = true;
609 break; 609 break;
610 case CSSSelector::PseudoHost: 610 case CSSSelector::PseudoHost:
611 case CSSSelector::PseudoHostContext: 611 case CSSSelector::PseudoHostContext:
612 if (relation == CSSSelector::SubSelector) 612 if (!foundHostPseudo && relation == CSSSelector::SubSelector)
613 return SelectorNeverMatches; 613 return SelectorNeverMatches;
614 if (!current->isLastInTagHistory() && current->tagHistory()->match() != CSSSelector::PseudoElement) 614 if (!current->isLastInTagHistory()
615 && current->tagHistory()->match() != CSSSelector::PseudoElement
616 && !current->tagHistory()->isHostPseudoClass()) {
615 return SelectorNeverMatches; 617 return SelectorNeverMatches;
618 }
616 foundHostPseudo = true; 619 foundHostPseudo = true;
617 // fall through. 620 // fall through.
618 default: 621 default:
619 if (const CSSSelectorList* selectorList = current->selectorList()) { 622 if (const CSSSelectorList* selectorList = current->selectorList()) {
620 for (const CSSSelector* subSelector = selectorList->first(); sub Selector; subSelector = CSSSelectorList::next(*subSelector)) 623 for (const CSSSelector* subSelector = selectorList->first(); sub Selector; subSelector = CSSSelectorList::next(*subSelector))
621 collectFeaturesFromSelector(*subSelector, metadata); 624 collectFeaturesFromSelector(*subSelector, metadata);
622 } 625 }
623 break; 626 break;
624 } 627 }
625 628
(...skipping 152 matching lines...) Expand 10 before | Expand all | Expand 10 after
778 781
779 DEFINE_TRACE(RuleFeatureSet) 782 DEFINE_TRACE(RuleFeatureSet)
780 { 783 {
781 #if ENABLE(OILPAN) 784 #if ENABLE(OILPAN)
782 visitor->trace(siblingRules); 785 visitor->trace(siblingRules);
783 visitor->trace(uncommonAttributeRules); 786 visitor->trace(uncommonAttributeRules);
784 #endif 787 #endif
785 } 788 }
786 789
787 } // namespace blink 790 } // namespace blink
OLDNEW
« no previous file with comments | « third_party/WebKit/LayoutTests/fast/dom/shadow/multiple-host-pseudos-in-compound-expected.txt ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698