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

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

Issue 2289333003: CSS Lazy Parsing perf jobs (Closed)
Patch Set: CL for src perf tryjob to run blink_style.top_25 benchmark on all-android platform(s) Created 4 years, 2 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 | « no previous file | third_party/WebKit/Source/core/css/StylePropertySet.h » ('j') | 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, 2013 Apple Inc. 5 * Copyright (C) 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012, 2013 Apple Inc.
6 * All rights reserved. 6 * All rights reserved.
7 * Copyright (C) 2007 Alexey Proskuryakov <ap@webkit.org> 7 * Copyright (C) 2007 Alexey Proskuryakov <ap@webkit.org>
8 * Copyright (C) 2007, 2008 Eric Seidel <eric@webkit.org> 8 * Copyright (C) 2007, 2008 Eric Seidel <eric@webkit.org>
9 * Copyright (C) 2008, 2009 Torch Mobile Inc. All rights reserved. 9 * Copyright (C) 2008, 2009 Torch Mobile Inc. All rights reserved.
10 * (http://www.torchmobile.com/) 10 * (http://www.torchmobile.com/)
(...skipping 135 matching lines...) Expand 10 before | Expand all | Expand 10 after
146 146
147 // FIXME: Exposing the non-standard getMatchedCSSRules API to web is the 147 // FIXME: Exposing the non-standard getMatchedCSSRules API to web is the
148 // only reason this is needed. 148 // only reason this is needed.
149 if (m_sameOriginOnly && !ruleData.hasDocumentSecurityOrigin()) 149 if (m_sameOriginOnly && !ruleData.hasDocumentSecurityOrigin())
150 continue; 150 continue;
151 151
152 StyleRule* rule = ruleData.rule(); 152 StyleRule* rule = ruleData.rule();
153 153
154 // If the rule has no properties to apply, then ignore it in the non-debug 154 // If the rule has no properties to apply, then ignore it in the non-debug
155 // mode. 155 // mode.
156 const StylePropertySet& properties = rule->properties(); 156 if (!rule->shouldConsiderForMatchingRules(m_includeEmptyRules))
157 if (properties.isEmpty() && !m_includeEmptyRules)
158 continue; 157 continue;
159 158
160 SelectorChecker::MatchResult result; 159 SelectorChecker::MatchResult result;
161 context.selector = &ruleData.selector(); 160 context.selector = &ruleData.selector();
162 if (!checker.match(context, result)) { 161 if (!checker.match(context, result)) {
163 rejected++; 162 rejected++;
164 continue; 163 continue;
165 } 164 }
166 if (m_pseudoStyleRequest.pseudoId != PseudoIdNone && 165 if (m_pseudoStyleRequest.pseudoId != PseudoIdNone &&
167 m_pseudoStyleRequest.pseudoId != result.dynamicPseudo) { 166 m_pseudoStyleRequest.pseudoId != result.dynamicPseudo) {
(...skipping 198 matching lines...) Expand 10 before | Expand all | Expand 10 after
366 // should not see the element's treescope. Because RuleSet has no information 365 // should not see the element's treescope. Because RuleSet has no information
367 // about "scope". 366 // about "scope".
368 MatchRequest matchRequest(ruleSet); 367 MatchRequest matchRequest(ruleSet);
369 collectMatchingRules(matchRequest); 368 collectMatchingRules(matchRequest);
370 collectMatchingShadowHostRules(matchRequest); 369 collectMatchingShadowHostRules(matchRequest);
371 370
372 return !m_matchedRules.isEmpty(); 371 return !m_matchedRules.isEmpty();
373 } 372 }
374 373
375 } // namespace blink 374 } // namespace blink
OLDNEW
« no previous file with comments | « no previous file | third_party/WebKit/Source/core/css/StylePropertySet.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698