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

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

Issue 1872343002: Allow multiple host pseudos in same compound. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: ... and a test with :host() Created 4 years, 8 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/Source/core/css/RuleFeature.cpp ('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 187 matching lines...) Expand 10 before | Expand all | Expand 10 after
198 default: 198 default:
199 break; 199 break;
200 } 200 }
201 201
202 if (!tagName.isEmpty()) { 202 if (!tagName.isEmpty()) {
203 addToRuleSet(tagName, ensurePendingRules()->tagRules, ruleData); 203 addToRuleSet(tagName, ensurePendingRules()->tagRules, ruleData);
204 return true; 204 return true;
205 } 205 }
206 206
207 if (component.isHostPseudoClass()) { 207 if (component.isHostPseudoClass()) {
208 ASSERT(component.isLastInTagHistory() || (component.relation() == CSSSel ector::SubSelector && component.tagHistory()->match() == CSSSelector::PseudoElem ent));
209 m_shadowHostRules.append(ruleData); 208 m_shadowHostRules.append(ruleData);
210 return true; 209 return true;
211 } 210 }
212 211
213 return false; 212 return false;
214 } 213 }
215 214
216 void RuleSet::addRule(StyleRule* rule, unsigned selectorIndex, AddRuleFlags addR uleFlags) 215 void RuleSet::addRule(StyleRule* rule, unsigned selectorIndex, AddRuleFlags addR uleFlags)
217 { 216 {
218 RuleData ruleData(rule, selectorIndex, m_ruleCount++, addRuleFlags); 217 RuleData ruleData(rule, selectorIndex, m_ruleCount++, addRuleFlags);
(...skipping 176 matching lines...) Expand 10 before | Expand all | Expand 10 after
395 394
396 #ifndef NDEBUG 395 #ifndef NDEBUG
397 void RuleSet::show() const 396 void RuleSet::show() const
398 { 397 {
399 for (const auto& rule: m_allRules) 398 for (const auto& rule: m_allRules)
400 rule.selector().show(); 399 rule.selector().show();
401 } 400 }
402 #endif 401 #endif
403 402
404 } // namespace blink 403 } // namespace blink
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/css/RuleFeature.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698