Skip to content

Commit

Permalink
Bug 1694847 - Remove the expired SCROLL_INPUT_METHODS telemetry probe…
Browse files Browse the repository at this point in the history
…. r=botond

Differential Revision: https://phabricator.services.mozilla.com/D116320
  • Loading branch information
staktrace committed May 31, 2021
1 parent d9b335e commit 0cd36f6
Show file tree
Hide file tree
Showing 12 changed files with 0 additions and 235 deletions.
8 changes: 0 additions & 8 deletions dom/base/Selection.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,6 @@
#include "mozilla/EventStates.h"
#include "mozilla/HTMLEditor.h"
#include "mozilla/Logging.h"
#include "mozilla/layers/ScrollInputMethods.h"
#include "mozilla/PresShell.h"
#include "mozilla/RangeBoundary.h"
#include "mozilla/RangeUtils.h"
Expand Down Expand Up @@ -79,7 +78,6 @@

using namespace mozilla;
using namespace mozilla::dom;
using mozilla::layers::ScrollInputMethod;

static LazyLogModule sSelectionLog("Selection");

Expand Down Expand Up @@ -3004,12 +3002,6 @@ nsresult Selection::ScrollIntoView(SelectionRegion aRegion,
scrollFlags |= ScrollFlags::ScrollOverflowHidden;
}

if (aFlags & Selection::SCROLL_FOR_CARET_MOVE) {
mozilla::Telemetry::Accumulate(
mozilla::Telemetry::SCROLL_INPUT_METHODS,
(uint32_t)ScrollInputMethod::MainThreadScrollCaretIntoView);
}

presShell->ScrollFrameRectIntoView(frame, rect, nsMargin(), aVertical,
aHorizontal, scrollFlags);
return NS_OK;
Expand Down
18 changes: 0 additions & 18 deletions dom/html/TextControlState.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,6 @@
#include "mozilla/dom/HTMLInputElement.h"
#include "mozilla/dom/HTMLTextAreaElement.h"
#include "mozilla/dom/Text.h"
#include "mozilla/layers/ScrollInputMethods.h"
#include "mozilla/StaticPrefs_dom.h"
#include "nsFrameSelection.h"
#include "mozilla/ErrorResult.h"
Expand All @@ -53,7 +52,6 @@
namespace mozilla {

using namespace dom;
using layers::ScrollInputMethod;
using ValueSetterOption = TextControlState::ValueSetterOption;
using ValueSetterOptions = TextControlState::ValueSetterOptions;

Expand Down Expand Up @@ -660,10 +658,6 @@ TextInputSelectionController::CompleteScroll(bool aForward) {
return NS_ERROR_NOT_INITIALIZED;
}

mozilla::Telemetry::Accumulate(
mozilla::Telemetry::SCROLL_INPUT_METHODS,
(uint32_t)ScrollInputMethod::MainThreadCompleteScroll);

mScrollFrame->ScrollBy(nsIntPoint(0, aForward ? 1 : -1), ScrollUnit::WHOLE,
ScrollMode::Instant);
return NS_OK;
Expand Down Expand Up @@ -717,10 +711,6 @@ TextInputSelectionController::ScrollPage(bool aForward) {
return NS_ERROR_NOT_INITIALIZED;
}

mozilla::Telemetry::Accumulate(
mozilla::Telemetry::SCROLL_INPUT_METHODS,
(uint32_t)ScrollInputMethod::MainThreadScrollPage);

mScrollFrame->ScrollBy(nsIntPoint(0, aForward ? 1 : -1), ScrollUnit::PAGES,
ScrollMode::Smooth);
return NS_OK;
Expand All @@ -732,10 +722,6 @@ TextInputSelectionController::ScrollLine(bool aForward) {
return NS_ERROR_NOT_INITIALIZED;
}

mozilla::Telemetry::Accumulate(
mozilla::Telemetry::SCROLL_INPUT_METHODS,
(uint32_t)ScrollInputMethod::MainThreadScrollLine);

mScrollFrame->ScrollBy(nsIntPoint(0, aForward ? 1 : -1), ScrollUnit::LINES,
ScrollMode::Smooth);
return NS_OK;
Expand All @@ -747,10 +733,6 @@ TextInputSelectionController::ScrollCharacter(bool aRight) {
return NS_ERROR_NOT_INITIALIZED;
}

mozilla::Telemetry::Accumulate(
mozilla::Telemetry::SCROLL_INPUT_METHODS,
(uint32_t)ScrollInputMethod::MainThreadScrollCharacter);

mScrollFrame->ScrollBy(nsIntPoint(aRight ? 1 : -1, 0), ScrollUnit::LINES,
ScrollMode::Smooth);
return NS_OK;
Expand Down
63 changes: 0 additions & 63 deletions gfx/layers/apz/src/AsyncPanZoomController.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,6 @@
#include "mozilla/layers/DirectionUtils.h" // for GetAxis{Start,End,Length,Scale}
#include "mozilla/layers/LayerTransactionParent.h" // for LayerTransactionParent
#include "mozilla/layers/MetricsSharingController.h" // for MetricsSharingController
#include "mozilla/layers/ScrollInputMethods.h" // for ScrollInputMethod
#include "mozilla/mozalloc.h" // for operator new, etc
#include "mozilla/Unused.h" // for unused
#include "mozilla/FloatingPoint.h" // for FuzzyEquals*
Expand Down Expand Up @@ -949,10 +948,6 @@ nsEventStatus AsyncPanZoomController::HandleDragEvent(
if (aEvent.mType == MouseInput::MouseType::MOUSE_DOWN) {
APZC_LOG("%p starting scrollbar drag\n", this);
SetState(SCROLLBAR_DRAG);

mozilla::Telemetry::Accumulate(
mozilla::Telemetry::SCROLL_INPUT_METHODS,
(uint32_t)ScrollInputMethod::ApzScrollbarDrag);
}

if (aEvent.mType != MouseInput::MouseType::MOUSE_MOVE) {
Expand Down Expand Up @@ -1229,9 +1224,6 @@ void AsyncPanZoomController::StartAutoscroll(const ScreenPoint& aPoint) {
// Cancel any existing animation.
CancelAnimation();

Telemetry::Accumulate(Telemetry::SCROLL_INPUT_METHODS,
(uint32_t)ScrollInputMethod::ApzAutoscrolling);

SetState(AUTOSCROLL);
StartAnimation(new AutoscrollAnimation(*this, aPoint));
}
Expand Down Expand Up @@ -1965,36 +1957,7 @@ ParentLayerPoint AsyncPanZoomController::GetScrollWheelDelta(
return delta;
}

static void ReportKeyboardScrollAction(const KeyboardScrollAction& aAction) {
ScrollInputMethod scrollMethod;

switch (aAction.mType) {
case KeyboardScrollAction::eScrollLine: {
scrollMethod = ScrollInputMethod::ApzScrollLine;
break;
}
case KeyboardScrollAction::eScrollCharacter: {
scrollMethod = ScrollInputMethod::ApzScrollCharacter;
break;
}
case KeyboardScrollAction::eScrollPage: {
scrollMethod = ScrollInputMethod::ApzScrollPage;
break;
}
case KeyboardScrollAction::eScrollComplete: {
scrollMethod = ScrollInputMethod::ApzCompleteScroll;
break;
}
}

mozilla::Telemetry::Accumulate(mozilla::Telemetry::SCROLL_INPUT_METHODS,
(uint32_t)scrollMethod);
}

nsEventStatus AsyncPanZoomController::OnKeyboard(const KeyboardInput& aEvent) {
// Report the type of scroll action to telemetry
ReportKeyboardScrollAction(aEvent.mAction);

// Mark that this APZC has async key scrolled
mTestHasAsyncKeyScrolled = true;

Expand Down Expand Up @@ -2311,23 +2274,6 @@ void AsyncPanZoomController::DoDelayedRequestContentRepaint() {
mPinchPaintTimerSet = false;
}

static ScrollInputMethod ScrollInputMethodForWheelDeltaType(
ScrollWheelInput::ScrollDeltaType aDeltaType) {
switch (aDeltaType) {
case ScrollWheelInput::SCROLLDELTA_LINE: {
return ScrollInputMethod::ApzWheelLine;
}
case ScrollWheelInput::SCROLLDELTA_PAGE: {
return ScrollInputMethod::ApzWheelPage;
}
case ScrollWheelInput::SCROLLDELTA_PIXEL: {
return ScrollInputMethod::ApzWheelPixel;
}
}
MOZ_ASSERT_UNREACHABLE("Invalid value");
return ScrollInputMethod::ApzWheelLine;
}

static void AdjustDeltaForAllowedScrollDirections(
ParentLayerPoint& aDelta,
const ScrollDirections& aAllowedScrollDirections) {
Expand Down Expand Up @@ -2412,10 +2358,6 @@ nsEventStatus AsyncPanZoomController::OnScrollWheel(
return nsEventStatus_eIgnore;
}

mozilla::Telemetry::Accumulate(
mozilla::Telemetry::SCROLL_INPUT_METHODS,
(uint32_t)ScrollInputMethodForWheelDeltaType(aEvent.mDeltaType));

switch (aEvent.mScrollMode) {
case ScrollWheelInput::SCROLLMODE_INSTANT: {
// Wheel events from "clicky" mouse wheels trigger scroll snapping to the
Expand Down Expand Up @@ -2551,9 +2493,6 @@ nsEventStatus AsyncPanZoomController::OnPanBegin(

StartTouch(aEvent.mLocalPanStartPoint, aEvent.mTimeStamp);

mozilla::Telemetry::Accumulate(mozilla::Telemetry::SCROLL_INPUT_METHODS,
(uint32_t)ScrollInputMethod::ApzPanGesture);

if (GetAxisLockMode() == FREE) {
SetState(PANNING);
return nsEventStatus_eConsumeNoDefault;
Expand Down Expand Up @@ -3351,8 +3290,6 @@ nsEventStatus AsyncPanZoomController::StartPanning(
}

if (IsInPanningState()) {
mozilla::Telemetry::Accumulate(mozilla::Telemetry::SCROLL_INPUT_METHODS,
(uint32_t)ScrollInputMethod::ApzTouch);
mTouchStartRestingTimeBeforePan = aEventTime - mTouchStartTime;
mMinimumVelocityDuringPan = Nothing();

Expand Down
78 changes: 0 additions & 78 deletions gfx/layers/apz/util/ScrollInputMethods.h

This file was deleted.

1 change: 0 additions & 1 deletion gfx/layers/moz.build
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,6 @@ EXPORTS.mozilla.layers += [
"apz/util/ContentProcessController.h",
"apz/util/DoubleTapToZoom.h",
"apz/util/InputAPZContext.h",
"apz/util/ScrollInputMethods.h",
"apz/util/ScrollLinkedEffectDetector.h",
"apz/util/TouchActionHelper.h",
"apz/util/TouchCounter.h",
Expand Down
13 changes: 0 additions & 13 deletions layout/base/PresShell.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -190,7 +190,6 @@
#include "nsQueryObject.h"
#include "mozilla/GlobalStyleSheetCache.h"
#include "mozilla/layers/InputAPZContext.h"
#include "mozilla/layers/ScrollInputMethods.h"
#include "mozilla/layers/FocusTarget.h"
#include "mozilla/layers/WebRenderLayerManager.h"
#include "mozilla/layers/WebRenderUserData.h"
Expand Down Expand Up @@ -2382,9 +2381,6 @@ PresShell::ScrollPage(bool aForward) {
nsIScrollableFrame* scrollFrame =
GetScrollableFrameToScroll(VerticalScrollDirection);
if (scrollFrame) {
mozilla::Telemetry::Accumulate(
mozilla::Telemetry::SCROLL_INPUT_METHODS,
(uint32_t)ScrollInputMethod::MainThreadScrollPage);
scrollFrame->ScrollBy(
nsIntPoint(0, aForward ? 1 : -1), ScrollUnit::PAGES, ScrollMode::Smooth,
nullptr, mozilla::ScrollOrigin::NotSpecified,
Expand All @@ -2398,9 +2394,6 @@ PresShell::ScrollLine(bool aForward) {
nsIScrollableFrame* scrollFrame =
GetScrollableFrameToScroll(VerticalScrollDirection);
if (scrollFrame) {
mozilla::Telemetry::Accumulate(
mozilla::Telemetry::SCROLL_INPUT_METHODS,
(uint32_t)ScrollInputMethod::MainThreadScrollLine);
int32_t lineCount =
Preferences::GetInt("toolkit.scrollbox.verticalScrollDistance",
NS_DEFAULT_VERTICAL_SCROLL_DISTANCE);
Expand All @@ -2417,9 +2410,6 @@ PresShell::ScrollCharacter(bool aRight) {
nsIScrollableFrame* scrollFrame =
GetScrollableFrameToScroll(HorizontalScrollDirection);
if (scrollFrame) {
mozilla::Telemetry::Accumulate(
mozilla::Telemetry::SCROLL_INPUT_METHODS,
(uint32_t)ScrollInputMethod::MainThreadScrollCharacter);
int32_t h =
Preferences::GetInt("toolkit.scrollbox.horizontalScrollDistance",
NS_DEFAULT_HORIZONTAL_SCROLL_DISTANCE);
Expand All @@ -2436,9 +2426,6 @@ PresShell::CompleteScroll(bool aForward) {
nsIScrollableFrame* scrollFrame =
GetScrollableFrameToScroll(VerticalScrollDirection);
if (scrollFrame) {
mozilla::Telemetry::Accumulate(
mozilla::Telemetry::SCROLL_INPUT_METHODS,
(uint32_t)ScrollInputMethod::MainThreadCompleteScroll);
scrollFrame->ScrollBy(
nsIntPoint(0, aForward ? 1 : -1), ScrollUnit::WHOLE, ScrollMode::Smooth,
nullptr, mozilla::ScrollOrigin::NotSpecified,
Expand Down
6 changes: 0 additions & 6 deletions layout/generic/nsFrameSelection.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -80,14 +80,12 @@ static NS_DEFINE_CID(kFrameTraversalCID, NS_FRAMETRAVERSAL_CID);
#include "mozilla/dom/SelectionBinding.h"
#include "mozilla/AsyncEventDispatcher.h"
#include "mozilla/Telemetry.h"
#include "mozilla/layers/ScrollInputMethods.h"

#include "nsFocusManager.h"
#include "nsPIDOMWindow.h"

using namespace mozilla;
using namespace mozilla::dom;
using mozilla::layers::ScrollInputMethod;

static LazyLogModule sFrameSelectionLog("FrameSelection");

Expand Down Expand Up @@ -1915,10 +1913,6 @@ nsresult nsFrameSelection::PageMove(bool aForward, bool aExtend,

// Then, scroll the given frame one page.
if (scrollableFrame) {
mozilla::Telemetry::Accumulate(
mozilla::Telemetry::SCROLL_INPUT_METHODS,
(uint32_t)ScrollInputMethod::MainThreadScrollPage);

// If we'll call ScrollSelectionIntoView later and selection wasn't
// changed and we scroll outside of selection limiter, we shouldn't use
// smooth scroll here because nsIScrollableFrame uses normal runnable,
Expand Down
6 changes: 0 additions & 6 deletions layout/xul/nsScrollbarButtonFrame.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -26,10 +26,8 @@
#include "mozilla/MouseEvents.h"
#include "mozilla/PresShell.h"
#include "mozilla/Telemetry.h"
#include "mozilla/layers/ScrollInputMethods.h"

using namespace mozilla;
using mozilla::layers::ScrollInputMethod;

//
// NS_NewToolbarFrame
Expand Down Expand Up @@ -168,10 +166,6 @@ bool nsScrollbarButtonFrame::HandleButtonPress(nsPresContext* aPresContext,
return false;
}

mozilla::Telemetry::Accumulate(
mozilla::Telemetry::SCROLL_INPUT_METHODS,
(uint32_t)ScrollInputMethod::MainThreadScrollbarButtonClick);

if (!m) {
sb->MoveToNewPosition(nsScrollbarFrame::ImplementsScrollByUnit::No);
if (!weakFrame.IsAlive()) {
Expand Down
Loading

0 comments on commit 0cd36f6

Please sign in to comment.