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

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

Issue 2554263002: CSS Motion Path: Use counter for offset-rotate (Closed)
Patch Set: tests Created 4 years 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
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 27 matching lines...) Expand all
38 #include "platform/Histogram.h" 38 #include "platform/Histogram.h"
39 #include "platform/tracing/TraceEvent.h" 39 #include "platform/tracing/TraceEvent.h"
40 40
41 namespace { 41 namespace {
42 42
43 int totalPagesMeasuredCSSSampleId() { 43 int totalPagesMeasuredCSSSampleId() {
44 return 1; 44 return 1;
45 } 45 }
46 46
47 // Make sure update_use_counter_css.py was run which updates histograms.xml. 47 // Make sure update_use_counter_css.py was run which updates histograms.xml.
48 constexpr int kMaximumCSSSampleId = 547; 48 constexpr int kMaximumCSSSampleId = 548;
49 49
50 } // namespace 50 } // namespace
51 51
52 namespace blink { 52 namespace blink {
53 53
54 int UseCounter::mapCSSPropertyIdToCSSSampleIdForHistogram( 54 int UseCounter::mapCSSPropertyIdToCSSSampleIdForHistogram(
55 CSSPropertyID cssPropertyID) { 55 CSSPropertyID cssPropertyID) {
56 switch (cssPropertyID) { 56 switch (cssPropertyID) {
57 // Begin at 2, because 1 is reserved for totalPagesMeasuredCSSSampleId. 57 // Begin at 2, because 1 is reserved for totalPagesMeasuredCSSSampleId.
58 case CSSPropertyColor: 58 case CSSPropertyColor:
(...skipping 984 matching lines...) Expand 10 before | Expand all | Expand 10 after
1043 case CSSPropertyAliasWebkitTextSizeAdjust: 1043 case CSSPropertyAliasWebkitTextSizeAdjust:
1044 return 537; 1044 return 537;
1045 case CSSPropertyOverflowAnchor: 1045 case CSSPropertyOverflowAnchor:
1046 return 538; 1046 return 538;
1047 case CSSPropertyUserSelect: 1047 case CSSPropertyUserSelect:
1048 return 539; 1048 return 539;
1049 case CSSPropertyOffsetDistance: 1049 case CSSPropertyOffsetDistance:
1050 return 540; 1050 return 540;
1051 case CSSPropertyOffsetPath: 1051 case CSSPropertyOffsetPath:
1052 return 541; 1052 return 541;
1053 case CSSPropertyOffsetRotate:
1054 case CSSPropertyOffsetRotation: 1053 case CSSPropertyOffsetRotation:
1055 // TODO(ericwilligers): Distinct use counter for CSSPropertyOffsetRotate.
1056 return 542; 1054 return 542;
1057 case CSSPropertyOffset: 1055 case CSSPropertyOffset:
1058 return 543; 1056 return 543;
1059 case CSSPropertyOffsetAnchor: 1057 case CSSPropertyOffsetAnchor:
1060 return 544; 1058 return 544;
1061 case CSSPropertyOffsetPosition: 1059 case CSSPropertyOffsetPosition:
1062 return 545; 1060 return 545;
1063 case CSSPropertyTextDecorationSkip: 1061 case CSSPropertyTextDecorationSkip:
1064 return 546; 1062 return 546;
1065 case CSSPropertyCaretColor: 1063 case CSSPropertyCaretColor:
1066 return 547; 1064 return 547;
1065 case CSSPropertyOffsetRotate:
1066 return 548;
1067 // 1. Add new features above this line (don't change the assigned numbers of 1067 // 1. Add new features above this line (don't change the assigned numbers of
1068 // the existing items). 1068 // the existing items).
1069 // 2. Update kMaximumCSSSampleId with the new maximum value. 1069 // 2. Update kMaximumCSSSampleId with the new maximum value.
1070 // 3. Run the update_use_counter_css.py script in 1070 // 3. Run the update_use_counter_css.py script in
1071 // chromium/src/tools/metrics/histograms to update the UMA histogram names. 1071 // chromium/src/tools/metrics/histograms to update the UMA histogram names.
1072 1072
1073 case CSSPropertyInvalid: 1073 case CSSPropertyInvalid:
1074 ASSERT_NOT_REACHED(); 1074 ASSERT_NOT_REACHED();
1075 return 0; 1075 return 0;
1076 } 1076 }
(...skipping 269 matching lines...) Expand 10 before | Expand all | Expand 10 after
1346 } 1346 }
1347 } 1347 }
1348 1348
1349 if (needsPagesMeasuredUpdate) 1349 if (needsPagesMeasuredUpdate)
1350 cssPropertiesHistogram.count(totalPagesMeasuredCSSSampleId()); 1350 cssPropertiesHistogram.count(totalPagesMeasuredCSSSampleId());
1351 1351
1352 m_CSSBits.clearAll(); 1352 m_CSSBits.clearAll();
1353 } 1353 }
1354 1354
1355 } // namespace blink 1355 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698