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

Unified Diff: third_party/WebKit/Source/core/frame/UseCounter.cpp

Issue 2701353002: Make explicit constant for num of CSSPropertyIDs (Closed)
Patch Set: Created 3 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 | « third_party/WebKit/Source/core/frame/Deprecation.cpp ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/Source/core/frame/UseCounter.cpp
diff --git a/third_party/WebKit/Source/core/frame/UseCounter.cpp b/third_party/WebKit/Source/core/frame/UseCounter.cpp
index 79272a3075bb1af7a4b11567b0cf8e1fbf853488..f22e26496e27b6b235f94578af12d291d9f673f8 100644
--- a/third_party/WebKit/Source/core/frame/UseCounter.cpp
+++ b/third_party/WebKit/Source/core/frame/UseCounter.cpp
@@ -1099,7 +1099,7 @@ UseCounter::UseCounter(Context context)
m_disableReporting(false),
m_context(context),
m_featuresRecorded(NumberOfFeatures),
- m_CSSRecorded(lastUnresolvedCSSProperty + 1) {}
+ m_CSSRecorded(numCSSPropertyIDs) {}
void UseCounter::muteForInspector() {
m_muteCount++;
@@ -1312,8 +1312,7 @@ static EnumerationHistogram& featureObserverHistogram() {
}
UseCounter::LegacyCounter::LegacyCounter()
- : m_featureBits(NumberOfFeatures),
- m_CSSBits(lastUnresolvedCSSProperty + 1) {}
+ : m_featureBits(NumberOfFeatures), m_CSSBits(numCSSPropertyIDs) {}
UseCounter::LegacyCounter::~LegacyCounter() {
// PageDestruction was intended to be used as a scale, but it's broken (due to
@@ -1347,7 +1346,7 @@ void UseCounter::LegacyCounter::updateMeasurements() {
EnumerationHistogram, cssPropertiesHistogram,
("WebCore.FeatureObserver.CSSProperties", kMaximumCSSSampleId));
bool needsPagesMeasuredUpdate = false;
- for (size_t i = firstCSSProperty; i <= lastUnresolvedCSSProperty; ++i) {
+ for (size_t i = firstCSSProperty; i < numCSSPropertyIDs; ++i) {
if (m_CSSBits.quickGet(i)) {
int cssSampleId = mapCSSPropertyIdToCSSSampleIdForHistogram(
static_cast<CSSPropertyID>(i));
« no previous file with comments | « third_party/WebKit/Source/core/frame/Deprecation.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698