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

Unified Diff: Source/core/css/ElementRuleCollector.cpp

Issue 181783005: Have Element::ensureMutableInlineStyle() return a reference (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Rebase Created 6 years, 10 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « Source/core/css/CSSViewportRule.cpp ('k') | Source/core/css/FontFace.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/css/ElementRuleCollector.cpp
diff --git a/Source/core/css/ElementRuleCollector.cpp b/Source/core/css/ElementRuleCollector.cpp
index 745b3c914ae69ca96bb91f89f6b996d09fc450ab..e6f103d0e811e8693fe64b2ead628f871259d340 100644
--- a/Source/core/css/ElementRuleCollector.cpp
+++ b/Source/core/css/ElementRuleCollector.cpp
@@ -253,7 +253,7 @@ void ElementRuleCollector::sortAndTransferMatchedRules()
const RuleData* ruleData = matchedRules[i].ruleData();
if (m_style && ruleData->containsUncommonAttributeSelector())
m_style->setUnique();
- m_result.addMatchedProperties(ruleData->rule()->properties(), ruleData->rule(), ruleData->linkMatchType(), ruleData->propertyWhitelistType(m_matchingUARules));
+ m_result.addMatchedProperties(&ruleData->rule()->properties(), ruleData->rule(), ruleData->linkMatchType(), ruleData->propertyWhitelistType(m_matchingUARules));
}
}
@@ -307,8 +307,8 @@ void ElementRuleCollector::collectRuleIfMatches(const RuleData& ruleData, Select
SelectorChecker::MatchResult result;
if (ruleMatches(ruleData, matchRequest.scope, behaviorAtBoundary, &result)) {
// If the rule has no properties to apply, then ignore it in the non-debug mode.
- const StylePropertySet* properties = rule->properties();
- if (!properties || (properties->isEmpty() && !matchRequest.includeEmptyRules))
+ const StylePropertySet& properties = rule->properties();
+ if (properties.isEmpty() && !matchRequest.includeEmptyRules)
return;
// FIXME: Exposing the non-standard getMatchedCSSRules API to web is the only reason this is needed.
if (m_sameOriginOnly && !ruleData.hasDocumentSecurityOrigin())
« no previous file with comments | « Source/core/css/CSSViewportRule.cpp ('k') | Source/core/css/FontFace.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698