Commit 2c3b223b authored by Charlie Harrison's avatar Charlie Harrison Committed by Commit Bot

Add one more cursor size to UseCounter / UKM

Bug: 880863
Change-Id: I90983adf6d7ebd3ead1652c85b7c65a04b142a99
Reviewed-on: https://chromium-review.googlesource.com/c/1313510
Commit-Queue: Charlie Harrison <csharrison@chromium.org>
Reviewed-by: default avatarBryan McQuade <bmcquade@chromium.org>
Reviewed-by: default avatarNate Chapin <japhet@chromium.org>
Cr-Commit-Position: refs/heads/master@{#606079}
parent 9ca6d9b1
...@@ -61,6 +61,7 @@ bool IsAllowedUkmFeature(blink::mojom::WebFeature feature) { ...@@ -61,6 +61,7 @@ bool IsAllowedUkmFeature(blink::mojom::WebFeature feature) {
WebFeature::kSuppressHistoryEntryWithoutUserGesture, WebFeature::kSuppressHistoryEntryWithoutUserGesture,
WebFeature::kCursorImageGT32x32, WebFeature::kCursorImageLE32x32, WebFeature::kCursorImageGT32x32, WebFeature::kCursorImageLE32x32,
WebFeature::kHistoryPushState, WebFeature::kHistoryReplaceState, WebFeature::kHistoryPushState, WebFeature::kHistoryReplaceState,
WebFeature::kCursorImageGT64x64,
})); }));
return opt_in_features->count(feature); return opt_in_features->count(feature);
} }
...@@ -2069,6 +2069,7 @@ enum WebFeature { ...@@ -2069,6 +2069,7 @@ enum WebFeature {
kHistoryPushState = 2617, kHistoryPushState = 2617,
kHistoryReplaceState = 2618, kHistoryReplaceState = 2618,
kGetDisplayMedia = 2619, kGetDisplayMedia = 2619,
kCursorImageGT64x64 = 2620,
// Add new features immediately above this line. Don't change assigned // Add new features immediately above this line. Don't change assigned
// numbers of any item, and don't reuse removed slots. // numbers of any item, and don't reuse removed slots.
// Also, run update_use_counter_feature_enum.py in // Also, run update_use_counter_feature_enum.py in
......
...@@ -182,7 +182,9 @@ void LogCursorSizeCounter(LocalFrame* frame, const Cursor& cursor) { ...@@ -182,7 +182,9 @@ void LogCursorSizeCounter(LocalFrame* frame, const Cursor& cursor) {
// whether the cursor exceeds its maximum size (see event_handler.cc). // whether the cursor exceeds its maximum size (see event_handler.cc).
IntSize scaled_size = image->Size(); IntSize scaled_size = image->Size();
scaled_size.Scale(1 / cursor.ImageScaleFactor()); scaled_size.Scale(1 / cursor.ImageScaleFactor());
if (scaled_size.Width() > 32 || scaled_size.Height() > 32) { if (scaled_size.Width() > 64 || scaled_size.Height() > 64) {
UseCounter::Count(frame, WebFeature::kCursorImageGT64x64);
} else if (scaled_size.Width() > 32 || scaled_size.Height() > 32) {
UseCounter::Count(frame, WebFeature::kCursorImageGT32x32); UseCounter::Count(frame, WebFeature::kCursorImageGT32x32);
} else { } else {
UseCounter::Count(frame, WebFeature::kCursorImageLE32x32); UseCounter::Count(frame, WebFeature::kCursorImageLE32x32);
......
...@@ -20655,6 +20655,7 @@ Called by update_net_error_codes.py.--> ...@@ -20655,6 +20655,7 @@ Called by update_net_error_codes.py.-->
<int value="2617" label="HistoryPushState"/> <int value="2617" label="HistoryPushState"/>
<int value="2618" label="HistoryReplaceState"/> <int value="2618" label="HistoryReplaceState"/>
<int value="2619" label="GetDisplayMedia"/> <int value="2619" label="GetDisplayMedia"/>
<int value="2620" label="CursorImageGT64x64"/>
</enum> </enum>
<enum name="FeaturePolicyFeature"> <enum name="FeaturePolicyFeature">
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment