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

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

Issue 2884423003: Use scroll-boundary-behavior to control overscroll-refresh/glow on android. (Closed)
Patch Set: Update the test Created 3 years, 6 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
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 28 matching lines...) Expand all
39 #include "platform/instrumentation/tracing/TraceEvent.h" 39 #include "platform/instrumentation/tracing/TraceEvent.h"
40 #include "platform/weborigin/SchemeRegistry.h" 40 #include "platform/weborigin/SchemeRegistry.h"
41 41
42 namespace { 42 namespace {
43 43
44 int totalPagesMeasuredCSSSampleId() { 44 int totalPagesMeasuredCSSSampleId() {
45 return 1; 45 return 1;
46 } 46 }
47 47
48 // Make sure update_use_counter_css.py was run which updates histograms.xml. 48 // Make sure update_use_counter_css.py was run which updates histograms.xml.
49 constexpr int kMaximumCSSSampleId = 560; 49 constexpr int kMaximumCSSSampleId = 563;
50 50
51 } // namespace 51 } // namespace
52 52
53 namespace blink { 53 namespace blink {
54 54
55 int UseCounter::MapCSSPropertyIdToCSSSampleIdForHistogram( 55 int UseCounter::MapCSSPropertyIdToCSSSampleIdForHistogram(
56 CSSPropertyID css_property_id) { 56 CSSPropertyID css_property_id) {
57 switch (css_property_id) { 57 switch (css_property_id) {
58 // Begin at 2, because 1 is reserved for totalPagesMeasuredCSSSampleId. 58 // Begin at 2, because 1 is reserved for totalPagesMeasuredCSSSampleId.
59 case CSSPropertyColor: 59 case CSSPropertyColor:
(...skipping 1017 matching lines...) Expand 10 before | Expand all | Expand 10 after
1077 case CSSPropertyAliasLineBreak: 1077 case CSSPropertyAliasLineBreak:
1078 return 556; 1078 return 556;
1079 case CSSPropertyPlaceContent: 1079 case CSSPropertyPlaceContent:
1080 return 557; 1080 return 557;
1081 case CSSPropertyPlaceItems: 1081 case CSSPropertyPlaceItems:
1082 return 558; 1082 return 558;
1083 case CSSPropertyTransformBox: 1083 case CSSPropertyTransformBox:
1084 return 559; 1084 return 559;
1085 case CSSPropertyPlaceSelf: 1085 case CSSPropertyPlaceSelf:
1086 return 560; 1086 return 560;
1087 case CSSPropertyScrollBoundaryBehavior:
1088 return 561;
1089 case CSSPropertyScrollBoundaryBehaviorX:
1090 return 562;
1091 case CSSPropertyScrollBoundaryBehaviorY:
1092 return 563;
1087 // 1. Add new features above this line (don't change the assigned numbers of 1093 // 1. Add new features above this line (don't change the assigned numbers of
1088 // the existing items). 1094 // the existing items).
1089 // 2. Update kMaximumCSSSampleId with the new maximum value. 1095 // 2. Update kMaximumCSSSampleId with the new maximum value.
1090 // 3. Run the update_use_counter_css.py script in 1096 // 3. Run the update_use_counter_css.py script in
1091 // chromium/src/tools/metrics/histograms to update the UMA histogram names. 1097 // chromium/src/tools/metrics/histograms to update the UMA histogram names.
1092 1098
1093 case CSSPropertyInvalid: 1099 case CSSPropertyInvalid:
1094 NOTREACHED(); 1100 NOTREACHED();
1095 return 0; 1101 return 0;
1096 } 1102 }
(...skipping 336 matching lines...) Expand 10 before | Expand all | Expand 10 after
1433 } 1439 }
1434 } 1440 }
1435 1441
1436 if (needs_pages_measured_update) 1442 if (needs_pages_measured_update)
1437 css_properties_histogram.Count(totalPagesMeasuredCSSSampleId()); 1443 css_properties_histogram.Count(totalPagesMeasuredCSSSampleId());
1438 1444
1439 css_bits_.ClearAll(); 1445 css_bits_.ClearAll();
1440 } 1446 }
1441 1447
1442 } // namespace blink 1448 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698