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

Unified Diff: Source/core/css/resolver/MatchResult.h

Issue 1162583002: Use begin/end istead of first/last for rule ranges. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 5 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « Source/core/css/ElementRuleCollector.cpp ('k') | Source/core/css/resolver/StyleResolver.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/css/resolver/MatchResult.h
diff --git a/Source/core/css/resolver/MatchResult.h b/Source/core/css/resolver/MatchResult.h
index ceb37b386ea7b852ba4ea7bfc195ca360b4b91e8..8170d451d5f000a2093d6543a17758d4515bea2c 100644
--- a/Source/core/css/resolver/MatchResult.h
+++ b/Source/core/css/resolver/MatchResult.h
@@ -64,15 +64,15 @@ class MatchResult {
public:
void addMatchedProperties(const StylePropertySet* properties, unsigned linkMatchType = CSSSelector::MatchAll, PropertyWhitelistType = PropertyWhitelistNone);
- int firstRule() const { return 0; }
- int lastRule() const { return matchedProperties.size() - 1; }
- int firstUARule() const { return lastUARuleIndex == -1 ? -1 : 0; }
- int lastUARule() const { return lastUARuleIndex; }
- int firstAuthorRule() const { return lastUARuleIndex + 1; }
- int lastAuthorRule() const { return lastRule(); }
+ unsigned begin() const { return 0; }
+ unsigned end() const { return matchedProperties.size(); }
+ unsigned beginUA() const { return 0; }
+ unsigned endUA() const { return uaEnd; }
+ unsigned beginAuthor() const { return uaEnd; }
+ unsigned endAuthor() const { return matchedProperties.size(); }
WillBeHeapVector<MatchedProperties, 64> matchedProperties;
- int lastUARuleIndex = -1;
+ unsigned uaEnd = 0;
bool isCacheable = true;
};
« no previous file with comments | « Source/core/css/ElementRuleCollector.cpp ('k') | Source/core/css/resolver/StyleResolver.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698