Commit 01a4ebe3 authored by Allison Pastewka's avatar Allison Pastewka Committed by Commit Bot

Removed UseCounters to avoid redundancy in metrics.

Removed the UseCounters kScrollbarUseVerticalScrollbarThumb and
kScrollbarUseHorizontalScrollbarThumb to avoid redundancy in metrics
with the 4 UseCounters that were added here:
https://chromium-review.googlesource.com/c/chromium/src/+/1575822/7

Bug: 954359
Change-Id: I1f9552b38bb86fb97c617e55bbfd9e72fe03a248
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1663039Reviewed-by: default avatarDavid Bokan <bokan@chromium.org>
Commit-Queue: Allison Pastewka <alpastew@microsoft.com>
Cr-Commit-Position: refs/heads/master@{#670196}
parent 9762d4da
...@@ -1260,10 +1260,8 @@ enum WebFeature { ...@@ -1260,10 +1260,8 @@ enum WebFeature {
kV8PromiseConstructorReturnedUndefined = 1766, kV8PromiseConstructorReturnedUndefined = 1766,
kFormSubmittedWithUnclosedFormControl = 1767, kFormSubmittedWithUnclosedFormControl = 1767,
kScrollbarUseVerticalScrollbarButton = 1777, kScrollbarUseVerticalScrollbarButton = 1777,
kScrollbarUseVerticalScrollbarThumb = 1778,
kScrollbarUseVerticalScrollbarTrack = 1779, kScrollbarUseVerticalScrollbarTrack = 1779,
kScrollbarUseHorizontalScrollbarButton = 1780, kScrollbarUseHorizontalScrollbarButton = 1780,
kScrollbarUseHorizontalScrollbarThumb = 1781,
kScrollbarUseHorizontalScrollbarTrack = 1782, kScrollbarUseHorizontalScrollbarTrack = 1782,
kHTMLTableCellElementColspan = 1783, kHTMLTableCellElementColspan = 1783,
kHTMLTableCellElementColspanGreaterThan1000 = 1784, kHTMLTableCellElementColspanGreaterThan1000 = 1784,
......
...@@ -2842,10 +2842,17 @@ void PaintLayerScrollableArea::DidScrollWithScrollbar( ...@@ -2842,10 +2842,17 @@ void PaintLayerScrollableArea::DidScrollWithScrollbar(
: WebFeature::kScrollbarUseHorizontalScrollbarButton); : WebFeature::kScrollbarUseHorizontalScrollbarButton);
break; break;
case kThumbPart: case kThumbPart:
scrollbar_use_uma = if (orientation == kVerticalScrollbar) {
(orientation == kVerticalScrollbar scrollbar_use_uma =
? WebFeature::kScrollbarUseVerticalScrollbarThumb (WebInputEvent::IsMouseEventType(type)
: WebFeature::kScrollbarUseHorizontalScrollbarThumb); ? WebFeature::kVerticalScrollbarThumbScrollingWithMouse
: WebFeature::kVerticalScrollbarThumbScrollingWithTouch);
} else {
scrollbar_use_uma =
(WebInputEvent::IsMouseEventType(type)
? WebFeature::kHorizontalScrollbarThumbScrollingWithMouse
: WebFeature::kHorizontalScrollbarThumbScrollingWithTouch);
}
break; break;
case kBackTrackPart: case kBackTrackPart:
case kForwardTrackPart: case kForwardTrackPart:
...@@ -2860,24 +2867,7 @@ void PaintLayerScrollableArea::DidScrollWithScrollbar( ...@@ -2860,24 +2867,7 @@ void PaintLayerScrollableArea::DidScrollWithScrollbar(
Document& document = GetLayoutBox()->GetDocument(); Document& document = GetLayoutBox()->GetDocument();
// TODO(alpastew): Remove the UseCounters kScrollbarUseVerticalScrollbarThumb
// and kScrollbarUseHorizontalScrollbarThumb to avoid redundancy in metrics.
UseCounter::Count(document, scrollbar_use_uma); UseCounter::Count(document, scrollbar_use_uma);
if (scrollbar_use_uma == WebFeature::kScrollbarUseVerticalScrollbarThumb) {
WebFeature input_specific_uma =
(WebInputEvent::IsMouseEventType(type)
? WebFeature::kVerticalScrollbarThumbScrollingWithMouse
: WebFeature::kVerticalScrollbarThumbScrollingWithTouch);
UseCounter::Count(document, input_specific_uma);
} else if (scrollbar_use_uma ==
WebFeature::kScrollbarUseHorizontalScrollbarThumb) {
WebFeature input_specific_uma =
(WebInputEvent::IsMouseEventType(type)
? WebFeature::kHorizontalScrollbarThumbScrollingWithMouse
: WebFeature::kHorizontalScrollbarThumbScrollingWithTouch);
UseCounter::Count(document, input_specific_uma);
}
} }
CompositorElementId PaintLayerScrollableArea::GetCompositorElementId() const { CompositorElementId PaintLayerScrollableArea::GetCompositorElementId() const {
......
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