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

Side by Side Diff: third_party/WebKit/Source/core/frame/UseCounter.cpp

Issue 2702183002: Incl. custom properties in CSS property UseCounter (Closed)
Patch Set: Update test expectations after rebase 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 unified diff | Download patch
« no previous file with comments | « third_party/WebKit/Source/core/css/parser/CSSParserImpl.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) 2012 Google, Inc. All rights reserved. 2 * Copyright (C) 2012 Google, Inc. All rights reserved.
3 * 3 *
4 * Redistribution and use in source and binary forms, with or without 4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions 5 * modification, are permitted provided that the following conditions
6 * are met: 6 * are met:
7 * 1. Redistributions of source code must retain the above copyright 7 * 1. Redistributions of source code must retain the above copyright
8 * notice, this list of conditions and the following disclaimer. 8 * notice, this list of conditions and the following disclaimer.
9 * 2. Redistributions in binary form must reproduce the above copyright 9 * 2. Redistributions in binary form must reproduce the above copyright
10 * notice, this list of conditions and the following disclaimer in the 10 * notice, this list of conditions and the following disclaimer in the
(...skipping 1221 matching lines...) Expand 10 before | Expand all | Expand 10 after
1232 } 1232 }
1233 1233
1234 void UseCounter::countCrossOriginIframe(const Document& document, 1234 void UseCounter::countCrossOriginIframe(const Document& document,
1235 Feature feature) { 1235 Feature feature) {
1236 LocalFrame* frame = document.frame(); 1236 LocalFrame* frame = document.frame();
1237 if (frame && frame->isCrossOriginSubframe()) 1237 if (frame && frame->isCrossOriginSubframe())
1238 count(frame, feature); 1238 count(frame, feature);
1239 } 1239 }
1240 1240
1241 void UseCounter::count(CSSParserMode cssParserMode, CSSPropertyID property) { 1241 void UseCounter::count(CSSParserMode cssParserMode, CSSPropertyID property) {
1242 // FIXME(suzyh): Count custom properties as well as named properties 1242 DCHECK(isCSSPropertyIDWithName(property) || property == CSSPropertyVariable);
1243 DCHECK(isCSSPropertyIDWithName(property));
1244 1243
1245 if (!isUseCounterEnabledForMode(cssParserMode) || m_muteCount) 1244 if (!isUseCounterEnabledForMode(cssParserMode) || m_muteCount)
1246 return; 1245 return;
1247 1246
1248 if (!m_CSSRecorded.quickGet(property)) { 1247 if (!m_CSSRecorded.quickGet(property)) {
1249 // Note that HTTPArchive tooling looks specifically for this event - see 1248 // Note that HTTPArchive tooling looks specifically for this event - see
1250 // https://github.com/HTTPArchive/httparchive/issues/59 1249 // https://github.com/HTTPArchive/httparchive/issues/59
1251 int sampleId = mapCSSPropertyIdToCSSSampleIdForHistogram(property); 1250 int sampleId = mapCSSPropertyIdToCSSSampleIdForHistogram(property);
1252 if (!m_disableReporting) { 1251 if (!m_disableReporting) {
1253 TRACE_EVENT1(TRACE_DISABLED_BY_DEFAULT("blink.feature_usage"), 1252 TRACE_EVENT1(TRACE_DISABLED_BY_DEFAULT("blink.feature_usage"),
(...skipping 164 matching lines...) Expand 10 before | Expand all | Expand 10 after
1418 } 1417 }
1419 } 1418 }
1420 1419
1421 if (needsPagesMeasuredUpdate) 1420 if (needsPagesMeasuredUpdate)
1422 cssPropertiesHistogram.count(totalPagesMeasuredCSSSampleId()); 1421 cssPropertiesHistogram.count(totalPagesMeasuredCSSSampleId());
1423 1422
1424 m_CSSBits.clearAll(); 1423 m_CSSBits.clearAll();
1425 } 1424 }
1426 1425
1427 } // namespace blink 1426 } // namespace blink
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/css/parser/CSSParserImpl.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698