mirror of
https://github.com/mozilla/gecko-dev.git
synced 2025-02-25 20:01:50 +00:00
Bug 1694847 - Remove the expired SCROLL_INPUT_METHODS telemetry probe. r=botond
Differential Revision: https://phabricator.services.mozilla.com/D116320
This commit is contained in:
parent
d9b335e6b2
commit
0cd36f6974
@ -24,7 +24,6 @@
|
|||||||
#include "mozilla/EventStates.h"
|
#include "mozilla/EventStates.h"
|
||||||
#include "mozilla/HTMLEditor.h"
|
#include "mozilla/HTMLEditor.h"
|
||||||
#include "mozilla/Logging.h"
|
#include "mozilla/Logging.h"
|
||||||
#include "mozilla/layers/ScrollInputMethods.h"
|
|
||||||
#include "mozilla/PresShell.h"
|
#include "mozilla/PresShell.h"
|
||||||
#include "mozilla/RangeBoundary.h"
|
#include "mozilla/RangeBoundary.h"
|
||||||
#include "mozilla/RangeUtils.h"
|
#include "mozilla/RangeUtils.h"
|
||||||
@ -79,7 +78,6 @@
|
|||||||
|
|
||||||
using namespace mozilla;
|
using namespace mozilla;
|
||||||
using namespace mozilla::dom;
|
using namespace mozilla::dom;
|
||||||
using mozilla::layers::ScrollInputMethod;
|
|
||||||
|
|
||||||
static LazyLogModule sSelectionLog("Selection");
|
static LazyLogModule sSelectionLog("Selection");
|
||||||
|
|
||||||
@ -3004,12 +3002,6 @@ nsresult Selection::ScrollIntoView(SelectionRegion aRegion,
|
|||||||
scrollFlags |= ScrollFlags::ScrollOverflowHidden;
|
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,
|
presShell->ScrollFrameRectIntoView(frame, rect, nsMargin(), aVertical,
|
||||||
aHorizontal, scrollFlags);
|
aHorizontal, scrollFlags);
|
||||||
return NS_OK;
|
return NS_OK;
|
||||||
|
@ -40,7 +40,6 @@
|
|||||||
#include "mozilla/dom/HTMLInputElement.h"
|
#include "mozilla/dom/HTMLInputElement.h"
|
||||||
#include "mozilla/dom/HTMLTextAreaElement.h"
|
#include "mozilla/dom/HTMLTextAreaElement.h"
|
||||||
#include "mozilla/dom/Text.h"
|
#include "mozilla/dom/Text.h"
|
||||||
#include "mozilla/layers/ScrollInputMethods.h"
|
|
||||||
#include "mozilla/StaticPrefs_dom.h"
|
#include "mozilla/StaticPrefs_dom.h"
|
||||||
#include "nsFrameSelection.h"
|
#include "nsFrameSelection.h"
|
||||||
#include "mozilla/ErrorResult.h"
|
#include "mozilla/ErrorResult.h"
|
||||||
@ -53,7 +52,6 @@
|
|||||||
namespace mozilla {
|
namespace mozilla {
|
||||||
|
|
||||||
using namespace dom;
|
using namespace dom;
|
||||||
using layers::ScrollInputMethod;
|
|
||||||
using ValueSetterOption = TextControlState::ValueSetterOption;
|
using ValueSetterOption = TextControlState::ValueSetterOption;
|
||||||
using ValueSetterOptions = TextControlState::ValueSetterOptions;
|
using ValueSetterOptions = TextControlState::ValueSetterOptions;
|
||||||
|
|
||||||
@ -660,10 +658,6 @@ TextInputSelectionController::CompleteScroll(bool aForward) {
|
|||||||
return NS_ERROR_NOT_INITIALIZED;
|
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,
|
mScrollFrame->ScrollBy(nsIntPoint(0, aForward ? 1 : -1), ScrollUnit::WHOLE,
|
||||||
ScrollMode::Instant);
|
ScrollMode::Instant);
|
||||||
return NS_OK;
|
return NS_OK;
|
||||||
@ -717,10 +711,6 @@ TextInputSelectionController::ScrollPage(bool aForward) {
|
|||||||
return NS_ERROR_NOT_INITIALIZED;
|
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,
|
mScrollFrame->ScrollBy(nsIntPoint(0, aForward ? 1 : -1), ScrollUnit::PAGES,
|
||||||
ScrollMode::Smooth);
|
ScrollMode::Smooth);
|
||||||
return NS_OK;
|
return NS_OK;
|
||||||
@ -732,10 +722,6 @@ TextInputSelectionController::ScrollLine(bool aForward) {
|
|||||||
return NS_ERROR_NOT_INITIALIZED;
|
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,
|
mScrollFrame->ScrollBy(nsIntPoint(0, aForward ? 1 : -1), ScrollUnit::LINES,
|
||||||
ScrollMode::Smooth);
|
ScrollMode::Smooth);
|
||||||
return NS_OK;
|
return NS_OK;
|
||||||
@ -747,10 +733,6 @@ TextInputSelectionController::ScrollCharacter(bool aRight) {
|
|||||||
return NS_ERROR_NOT_INITIALIZED;
|
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,
|
mScrollFrame->ScrollBy(nsIntPoint(aRight ? 1 : -1, 0), ScrollUnit::LINES,
|
||||||
ScrollMode::Smooth);
|
ScrollMode::Smooth);
|
||||||
return NS_OK;
|
return NS_OK;
|
||||||
|
@ -71,7 +71,6 @@
|
|||||||
#include "mozilla/layers/DirectionUtils.h" // for GetAxis{Start,End,Length,Scale}
|
#include "mozilla/layers/DirectionUtils.h" // for GetAxis{Start,End,Length,Scale}
|
||||||
#include "mozilla/layers/LayerTransactionParent.h" // for LayerTransactionParent
|
#include "mozilla/layers/LayerTransactionParent.h" // for LayerTransactionParent
|
||||||
#include "mozilla/layers/MetricsSharingController.h" // for MetricsSharingController
|
#include "mozilla/layers/MetricsSharingController.h" // for MetricsSharingController
|
||||||
#include "mozilla/layers/ScrollInputMethods.h" // for ScrollInputMethod
|
|
||||||
#include "mozilla/mozalloc.h" // for operator new, etc
|
#include "mozilla/mozalloc.h" // for operator new, etc
|
||||||
#include "mozilla/Unused.h" // for unused
|
#include "mozilla/Unused.h" // for unused
|
||||||
#include "mozilla/FloatingPoint.h" // for FuzzyEquals*
|
#include "mozilla/FloatingPoint.h" // for FuzzyEquals*
|
||||||
@ -949,10 +948,6 @@ nsEventStatus AsyncPanZoomController::HandleDragEvent(
|
|||||||
if (aEvent.mType == MouseInput::MouseType::MOUSE_DOWN) {
|
if (aEvent.mType == MouseInput::MouseType::MOUSE_DOWN) {
|
||||||
APZC_LOG("%p starting scrollbar drag\n", this);
|
APZC_LOG("%p starting scrollbar drag\n", this);
|
||||||
SetState(SCROLLBAR_DRAG);
|
SetState(SCROLLBAR_DRAG);
|
||||||
|
|
||||||
mozilla::Telemetry::Accumulate(
|
|
||||||
mozilla::Telemetry::SCROLL_INPUT_METHODS,
|
|
||||||
(uint32_t)ScrollInputMethod::ApzScrollbarDrag);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if (aEvent.mType != MouseInput::MouseType::MOUSE_MOVE) {
|
if (aEvent.mType != MouseInput::MouseType::MOUSE_MOVE) {
|
||||||
@ -1229,9 +1224,6 @@ void AsyncPanZoomController::StartAutoscroll(const ScreenPoint& aPoint) {
|
|||||||
// Cancel any existing animation.
|
// Cancel any existing animation.
|
||||||
CancelAnimation();
|
CancelAnimation();
|
||||||
|
|
||||||
Telemetry::Accumulate(Telemetry::SCROLL_INPUT_METHODS,
|
|
||||||
(uint32_t)ScrollInputMethod::ApzAutoscrolling);
|
|
||||||
|
|
||||||
SetState(AUTOSCROLL);
|
SetState(AUTOSCROLL);
|
||||||
StartAnimation(new AutoscrollAnimation(*this, aPoint));
|
StartAnimation(new AutoscrollAnimation(*this, aPoint));
|
||||||
}
|
}
|
||||||
@ -1965,36 +1957,7 @@ ParentLayerPoint AsyncPanZoomController::GetScrollWheelDelta(
|
|||||||
return delta;
|
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) {
|
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
|
// Mark that this APZC has async key scrolled
|
||||||
mTestHasAsyncKeyScrolled = true;
|
mTestHasAsyncKeyScrolled = true;
|
||||||
|
|
||||||
@ -2311,23 +2274,6 @@ void AsyncPanZoomController::DoDelayedRequestContentRepaint() {
|
|||||||
mPinchPaintTimerSet = false;
|
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(
|
static void AdjustDeltaForAllowedScrollDirections(
|
||||||
ParentLayerPoint& aDelta,
|
ParentLayerPoint& aDelta,
|
||||||
const ScrollDirections& aAllowedScrollDirections) {
|
const ScrollDirections& aAllowedScrollDirections) {
|
||||||
@ -2412,10 +2358,6 @@ nsEventStatus AsyncPanZoomController::OnScrollWheel(
|
|||||||
return nsEventStatus_eIgnore;
|
return nsEventStatus_eIgnore;
|
||||||
}
|
}
|
||||||
|
|
||||||
mozilla::Telemetry::Accumulate(
|
|
||||||
mozilla::Telemetry::SCROLL_INPUT_METHODS,
|
|
||||||
(uint32_t)ScrollInputMethodForWheelDeltaType(aEvent.mDeltaType));
|
|
||||||
|
|
||||||
switch (aEvent.mScrollMode) {
|
switch (aEvent.mScrollMode) {
|
||||||
case ScrollWheelInput::SCROLLMODE_INSTANT: {
|
case ScrollWheelInput::SCROLLMODE_INSTANT: {
|
||||||
// Wheel events from "clicky" mouse wheels trigger scroll snapping to the
|
// Wheel events from "clicky" mouse wheels trigger scroll snapping to the
|
||||||
@ -2551,9 +2493,6 @@ nsEventStatus AsyncPanZoomController::OnPanBegin(
|
|||||||
|
|
||||||
StartTouch(aEvent.mLocalPanStartPoint, aEvent.mTimeStamp);
|
StartTouch(aEvent.mLocalPanStartPoint, aEvent.mTimeStamp);
|
||||||
|
|
||||||
mozilla::Telemetry::Accumulate(mozilla::Telemetry::SCROLL_INPUT_METHODS,
|
|
||||||
(uint32_t)ScrollInputMethod::ApzPanGesture);
|
|
||||||
|
|
||||||
if (GetAxisLockMode() == FREE) {
|
if (GetAxisLockMode() == FREE) {
|
||||||
SetState(PANNING);
|
SetState(PANNING);
|
||||||
return nsEventStatus_eConsumeNoDefault;
|
return nsEventStatus_eConsumeNoDefault;
|
||||||
@ -3351,8 +3290,6 @@ nsEventStatus AsyncPanZoomController::StartPanning(
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (IsInPanningState()) {
|
if (IsInPanningState()) {
|
||||||
mozilla::Telemetry::Accumulate(mozilla::Telemetry::SCROLL_INPUT_METHODS,
|
|
||||||
(uint32_t)ScrollInputMethod::ApzTouch);
|
|
||||||
mTouchStartRestingTimeBeforePan = aEventTime - mTouchStartTime;
|
mTouchStartRestingTimeBeforePan = aEventTime - mTouchStartTime;
|
||||||
mMinimumVelocityDuringPan = Nothing();
|
mMinimumVelocityDuringPan = Nothing();
|
||||||
|
|
||||||
|
@ -1,78 +0,0 @@
|
|||||||
/* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
|
|
||||||
/* vim: set ts=8 sts=2 et sw=2 tw=80: */
|
|
||||||
/* This Source Code Form is subject to the terms of the Mozilla Public
|
|
||||||
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
|
||||||
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
|
||||||
|
|
||||||
#ifndef mozilla_layers_ScrollInputMethods_h
|
|
||||||
#define mozilla_layers_ScrollInputMethods_h
|
|
||||||
|
|
||||||
namespace mozilla {
|
|
||||||
namespace layers {
|
|
||||||
|
|
||||||
/**
|
|
||||||
* An enumeration that lists various input methods used to trigger scrolling.
|
|
||||||
* Used as the values for the SCROLL_INPUT_METHODS telemetry histogram.
|
|
||||||
*/
|
|
||||||
enum class ScrollInputMethod {
|
|
||||||
|
|
||||||
// === Driven by APZ ===
|
|
||||||
|
|
||||||
ApzTouch, // touch events
|
|
||||||
ApzWheelPixel, // wheel events, pixel scrolling mode
|
|
||||||
ApzWheelLine, // wheel events, line scrolling mode
|
|
||||||
ApzWheelPage, // wheel events, page scrolling mode
|
|
||||||
ApzPanGesture, // pan gesture events (generally triggered by trackpad)
|
|
||||||
ApzScrollbarDrag, // dragging the scrollbar
|
|
||||||
|
|
||||||
// === Driven by the main thread ===
|
|
||||||
|
|
||||||
// Keyboard
|
|
||||||
MainThreadScrollLine, // line scrolling
|
|
||||||
// (generally triggered by up/down arrow keys)
|
|
||||||
MainThreadScrollCharacter, // character scrolling
|
|
||||||
// (generally triggered by left/right arrow keys)
|
|
||||||
MainThreadScrollPage, // page scrolling
|
|
||||||
// (generally triggered by PageUp/PageDown keys)
|
|
||||||
MainThreadCompleteScroll, // scrolling to the end of the scroll range
|
|
||||||
// (generally triggered by Home/End keys)
|
|
||||||
MainThreadScrollCaretIntoView, // scrolling to bring the caret into view
|
|
||||||
// after moving the caret via the keyboard
|
|
||||||
|
|
||||||
// Touch
|
|
||||||
MainThreadTouch, // touch events
|
|
||||||
|
|
||||||
// Scrollbar
|
|
||||||
MainThreadScrollbarDrag, // dragging the scrollbar
|
|
||||||
MainThreadScrollbarButtonClick, // clicking the buttons at the ends of the
|
|
||||||
// scrollback track
|
|
||||||
MainThreadScrollbarTrackClick, // clicking the scrollbar track above or
|
|
||||||
// below the thumb
|
|
||||||
|
|
||||||
// Autoscrolling
|
|
||||||
MainThreadAutoscrolling, // autoscrolling
|
|
||||||
|
|
||||||
// === Additional input methods implemented in APZ ===
|
|
||||||
|
|
||||||
// Async Keyboard
|
|
||||||
ApzScrollLine, // line scrolling
|
|
||||||
// (generally triggered by up/down arrow keys)
|
|
||||||
ApzScrollCharacter, // character scrolling
|
|
||||||
// (generally triggered by left/right arrow keys)
|
|
||||||
ApzScrollPage, // page scrolling
|
|
||||||
// (generally triggered by PageUp/PageDown keys)
|
|
||||||
ApzCompleteScroll, // scrolling to the end of the scroll range
|
|
||||||
// (generally triggered by Home/End keys)
|
|
||||||
|
|
||||||
// Autoscrolling
|
|
||||||
ApzAutoscrolling,
|
|
||||||
|
|
||||||
// New input methods can be added at the end, up to a maximum of 64.
|
|
||||||
// They should only be added at the end, to preserve the numerical values
|
|
||||||
// of the existing enumerators.
|
|
||||||
};
|
|
||||||
|
|
||||||
} // namespace layers
|
|
||||||
} // namespace mozilla
|
|
||||||
|
|
||||||
#endif /* mozilla_layers_ScrollInputMethods_h */
|
|
@ -121,7 +121,6 @@ EXPORTS.mozilla.layers += [
|
|||||||
"apz/util/ContentProcessController.h",
|
"apz/util/ContentProcessController.h",
|
||||||
"apz/util/DoubleTapToZoom.h",
|
"apz/util/DoubleTapToZoom.h",
|
||||||
"apz/util/InputAPZContext.h",
|
"apz/util/InputAPZContext.h",
|
||||||
"apz/util/ScrollInputMethods.h",
|
|
||||||
"apz/util/ScrollLinkedEffectDetector.h",
|
"apz/util/ScrollLinkedEffectDetector.h",
|
||||||
"apz/util/TouchActionHelper.h",
|
"apz/util/TouchActionHelper.h",
|
||||||
"apz/util/TouchCounter.h",
|
"apz/util/TouchCounter.h",
|
||||||
|
@ -190,7 +190,6 @@
|
|||||||
#include "nsQueryObject.h"
|
#include "nsQueryObject.h"
|
||||||
#include "mozilla/GlobalStyleSheetCache.h"
|
#include "mozilla/GlobalStyleSheetCache.h"
|
||||||
#include "mozilla/layers/InputAPZContext.h"
|
#include "mozilla/layers/InputAPZContext.h"
|
||||||
#include "mozilla/layers/ScrollInputMethods.h"
|
|
||||||
#include "mozilla/layers/FocusTarget.h"
|
#include "mozilla/layers/FocusTarget.h"
|
||||||
#include "mozilla/layers/WebRenderLayerManager.h"
|
#include "mozilla/layers/WebRenderLayerManager.h"
|
||||||
#include "mozilla/layers/WebRenderUserData.h"
|
#include "mozilla/layers/WebRenderUserData.h"
|
||||||
@ -2382,9 +2381,6 @@ PresShell::ScrollPage(bool aForward) {
|
|||||||
nsIScrollableFrame* scrollFrame =
|
nsIScrollableFrame* scrollFrame =
|
||||||
GetScrollableFrameToScroll(VerticalScrollDirection);
|
GetScrollableFrameToScroll(VerticalScrollDirection);
|
||||||
if (scrollFrame) {
|
if (scrollFrame) {
|
||||||
mozilla::Telemetry::Accumulate(
|
|
||||||
mozilla::Telemetry::SCROLL_INPUT_METHODS,
|
|
||||||
(uint32_t)ScrollInputMethod::MainThreadScrollPage);
|
|
||||||
scrollFrame->ScrollBy(
|
scrollFrame->ScrollBy(
|
||||||
nsIntPoint(0, aForward ? 1 : -1), ScrollUnit::PAGES, ScrollMode::Smooth,
|
nsIntPoint(0, aForward ? 1 : -1), ScrollUnit::PAGES, ScrollMode::Smooth,
|
||||||
nullptr, mozilla::ScrollOrigin::NotSpecified,
|
nullptr, mozilla::ScrollOrigin::NotSpecified,
|
||||||
@ -2398,9 +2394,6 @@ PresShell::ScrollLine(bool aForward) {
|
|||||||
nsIScrollableFrame* scrollFrame =
|
nsIScrollableFrame* scrollFrame =
|
||||||
GetScrollableFrameToScroll(VerticalScrollDirection);
|
GetScrollableFrameToScroll(VerticalScrollDirection);
|
||||||
if (scrollFrame) {
|
if (scrollFrame) {
|
||||||
mozilla::Telemetry::Accumulate(
|
|
||||||
mozilla::Telemetry::SCROLL_INPUT_METHODS,
|
|
||||||
(uint32_t)ScrollInputMethod::MainThreadScrollLine);
|
|
||||||
int32_t lineCount =
|
int32_t lineCount =
|
||||||
Preferences::GetInt("toolkit.scrollbox.verticalScrollDistance",
|
Preferences::GetInt("toolkit.scrollbox.verticalScrollDistance",
|
||||||
NS_DEFAULT_VERTICAL_SCROLL_DISTANCE);
|
NS_DEFAULT_VERTICAL_SCROLL_DISTANCE);
|
||||||
@ -2417,9 +2410,6 @@ PresShell::ScrollCharacter(bool aRight) {
|
|||||||
nsIScrollableFrame* scrollFrame =
|
nsIScrollableFrame* scrollFrame =
|
||||||
GetScrollableFrameToScroll(HorizontalScrollDirection);
|
GetScrollableFrameToScroll(HorizontalScrollDirection);
|
||||||
if (scrollFrame) {
|
if (scrollFrame) {
|
||||||
mozilla::Telemetry::Accumulate(
|
|
||||||
mozilla::Telemetry::SCROLL_INPUT_METHODS,
|
|
||||||
(uint32_t)ScrollInputMethod::MainThreadScrollCharacter);
|
|
||||||
int32_t h =
|
int32_t h =
|
||||||
Preferences::GetInt("toolkit.scrollbox.horizontalScrollDistance",
|
Preferences::GetInt("toolkit.scrollbox.horizontalScrollDistance",
|
||||||
NS_DEFAULT_HORIZONTAL_SCROLL_DISTANCE);
|
NS_DEFAULT_HORIZONTAL_SCROLL_DISTANCE);
|
||||||
@ -2436,9 +2426,6 @@ PresShell::CompleteScroll(bool aForward) {
|
|||||||
nsIScrollableFrame* scrollFrame =
|
nsIScrollableFrame* scrollFrame =
|
||||||
GetScrollableFrameToScroll(VerticalScrollDirection);
|
GetScrollableFrameToScroll(VerticalScrollDirection);
|
||||||
if (scrollFrame) {
|
if (scrollFrame) {
|
||||||
mozilla::Telemetry::Accumulate(
|
|
||||||
mozilla::Telemetry::SCROLL_INPUT_METHODS,
|
|
||||||
(uint32_t)ScrollInputMethod::MainThreadCompleteScroll);
|
|
||||||
scrollFrame->ScrollBy(
|
scrollFrame->ScrollBy(
|
||||||
nsIntPoint(0, aForward ? 1 : -1), ScrollUnit::WHOLE, ScrollMode::Smooth,
|
nsIntPoint(0, aForward ? 1 : -1), ScrollUnit::WHOLE, ScrollMode::Smooth,
|
||||||
nullptr, mozilla::ScrollOrigin::NotSpecified,
|
nullptr, mozilla::ScrollOrigin::NotSpecified,
|
||||||
|
@ -80,14 +80,12 @@ static NS_DEFINE_CID(kFrameTraversalCID, NS_FRAMETRAVERSAL_CID);
|
|||||||
#include "mozilla/dom/SelectionBinding.h"
|
#include "mozilla/dom/SelectionBinding.h"
|
||||||
#include "mozilla/AsyncEventDispatcher.h"
|
#include "mozilla/AsyncEventDispatcher.h"
|
||||||
#include "mozilla/Telemetry.h"
|
#include "mozilla/Telemetry.h"
|
||||||
#include "mozilla/layers/ScrollInputMethods.h"
|
|
||||||
|
|
||||||
#include "nsFocusManager.h"
|
#include "nsFocusManager.h"
|
||||||
#include "nsPIDOMWindow.h"
|
#include "nsPIDOMWindow.h"
|
||||||
|
|
||||||
using namespace mozilla;
|
using namespace mozilla;
|
||||||
using namespace mozilla::dom;
|
using namespace mozilla::dom;
|
||||||
using mozilla::layers::ScrollInputMethod;
|
|
||||||
|
|
||||||
static LazyLogModule sFrameSelectionLog("FrameSelection");
|
static LazyLogModule sFrameSelectionLog("FrameSelection");
|
||||||
|
|
||||||
@ -1915,10 +1913,6 @@ nsresult nsFrameSelection::PageMove(bool aForward, bool aExtend,
|
|||||||
|
|
||||||
// Then, scroll the given frame one page.
|
// Then, scroll the given frame one page.
|
||||||
if (scrollableFrame) {
|
if (scrollableFrame) {
|
||||||
mozilla::Telemetry::Accumulate(
|
|
||||||
mozilla::Telemetry::SCROLL_INPUT_METHODS,
|
|
||||||
(uint32_t)ScrollInputMethod::MainThreadScrollPage);
|
|
||||||
|
|
||||||
// If we'll call ScrollSelectionIntoView later and selection wasn't
|
// If we'll call ScrollSelectionIntoView later and selection wasn't
|
||||||
// changed and we scroll outside of selection limiter, we shouldn't use
|
// changed and we scroll outside of selection limiter, we shouldn't use
|
||||||
// smooth scroll here because nsIScrollableFrame uses normal runnable,
|
// smooth scroll here because nsIScrollableFrame uses normal runnable,
|
||||||
|
@ -26,10 +26,8 @@
|
|||||||
#include "mozilla/MouseEvents.h"
|
#include "mozilla/MouseEvents.h"
|
||||||
#include "mozilla/PresShell.h"
|
#include "mozilla/PresShell.h"
|
||||||
#include "mozilla/Telemetry.h"
|
#include "mozilla/Telemetry.h"
|
||||||
#include "mozilla/layers/ScrollInputMethods.h"
|
|
||||||
|
|
||||||
using namespace mozilla;
|
using namespace mozilla;
|
||||||
using mozilla::layers::ScrollInputMethod;
|
|
||||||
|
|
||||||
//
|
//
|
||||||
// NS_NewToolbarFrame
|
// NS_NewToolbarFrame
|
||||||
@ -168,10 +166,6 @@ bool nsScrollbarButtonFrame::HandleButtonPress(nsPresContext* aPresContext,
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
mozilla::Telemetry::Accumulate(
|
|
||||||
mozilla::Telemetry::SCROLL_INPUT_METHODS,
|
|
||||||
(uint32_t)ScrollInputMethod::MainThreadScrollbarButtonClick);
|
|
||||||
|
|
||||||
if (!m) {
|
if (!m) {
|
||||||
sb->MoveToNewPosition(nsScrollbarFrame::ImplementsScrollByUnit::No);
|
sb->MoveToNewPosition(nsScrollbarFrame::ImplementsScrollByUnit::No);
|
||||||
if (!weakFrame.IsAlive()) {
|
if (!weakFrame.IsAlive()) {
|
||||||
|
@ -47,7 +47,6 @@
|
|||||||
#include "mozilla/layers/APZCCallbackHelper.h"
|
#include "mozilla/layers/APZCCallbackHelper.h"
|
||||||
#include "mozilla/layers/AsyncDragMetrics.h"
|
#include "mozilla/layers/AsyncDragMetrics.h"
|
||||||
#include "mozilla/layers/InputAPZContext.h"
|
#include "mozilla/layers/InputAPZContext.h"
|
||||||
#include "mozilla/layers/ScrollInputMethods.h"
|
|
||||||
#include "mozilla/layers/WebRenderLayerManager.h"
|
#include "mozilla/layers/WebRenderLayerManager.h"
|
||||||
#include <algorithm>
|
#include <algorithm>
|
||||||
|
|
||||||
@ -59,7 +58,6 @@ using mozilla::layers::AsyncDragMetrics;
|
|||||||
using mozilla::layers::InputAPZContext;
|
using mozilla::layers::InputAPZContext;
|
||||||
using mozilla::layers::ScrollbarData;
|
using mozilla::layers::ScrollbarData;
|
||||||
using mozilla::layers::ScrollDirection;
|
using mozilla::layers::ScrollDirection;
|
||||||
using mozilla::layers::ScrollInputMethod;
|
|
||||||
|
|
||||||
bool nsSliderFrame::gMiddlePref = false;
|
bool nsSliderFrame::gMiddlePref = false;
|
||||||
int32_t nsSliderFrame::gSnapMultiplier;
|
int32_t nsSliderFrame::gSnapMultiplier;
|
||||||
@ -743,10 +741,6 @@ nsresult nsSliderFrame::HandleEvent(nsPresContext* aPresContext,
|
|||||||
nsSize thumbSize = thumbFrame->GetSize();
|
nsSize thumbSize = thumbFrame->GetSize();
|
||||||
nscoord thumbLength = isHorizontal ? thumbSize.width : thumbSize.height;
|
nscoord thumbLength = isHorizontal ? thumbSize.width : thumbSize.height;
|
||||||
|
|
||||||
mozilla::Telemetry::Accumulate(
|
|
||||||
mozilla::Telemetry::SCROLL_INPUT_METHODS,
|
|
||||||
(uint32_t)ScrollInputMethod::MainThreadScrollbarTrackClick);
|
|
||||||
|
|
||||||
// set it
|
// set it
|
||||||
AutoWeakFrame weakFrame(this);
|
AutoWeakFrame weakFrame(this);
|
||||||
// should aMaySnap be true here?
|
// should aMaySnap be true here?
|
||||||
@ -1245,19 +1239,6 @@ nsresult nsSliderFrame::StopDrag() {
|
|||||||
AddListener();
|
AddListener();
|
||||||
DragThumb(false);
|
DragThumb(false);
|
||||||
|
|
||||||
if (!mScrollingWithAPZ) {
|
|
||||||
// We record this one at the end of the drag rather than at the beginning
|
|
||||||
// because at the point that the main thread starts the drag (in StartDrag)
|
|
||||||
// it may not know for sure whether APZ or the main thread will end up
|
|
||||||
// handling the drag. Even if mScrollingWithAPZ is true initially, it
|
|
||||||
// may get set to false if APZ rejects the drag. But by the end of the drag
|
|
||||||
// the mScrollingWithAPZ flag should be correct and so we can use it here
|
|
||||||
// to determine if APZ or the main thread handled the drag.
|
|
||||||
mozilla::Telemetry::Accumulate(
|
|
||||||
mozilla::Telemetry::SCROLL_INPUT_METHODS,
|
|
||||||
(uint32_t)ScrollInputMethod::MainThreadScrollbarDrag);
|
|
||||||
}
|
|
||||||
|
|
||||||
mScrollingWithAPZ = false;
|
mScrollingWithAPZ = false;
|
||||||
|
|
||||||
UnsuppressDisplayport();
|
UnsuppressDisplayport();
|
||||||
@ -1437,10 +1418,6 @@ nsSliderFrame::HandlePress(nsPresContext* aPresContext, WidgetGUIEvent* aEvent,
|
|||||||
return NS_OK;
|
return NS_OK;
|
||||||
}
|
}
|
||||||
|
|
||||||
mozilla::Telemetry::Accumulate(
|
|
||||||
mozilla::Telemetry::SCROLL_INPUT_METHODS,
|
|
||||||
(uint32_t)ScrollInputMethod::MainThreadScrollbarTrackClick);
|
|
||||||
|
|
||||||
if (IsXULHorizontal() ? eventPoint.x < thumbRect.x
|
if (IsXULHorizontal() ? eventPoint.x < thumbRect.x
|
||||||
: eventPoint.y < thumbRect.y)
|
: eventPoint.y < thumbRect.y)
|
||||||
change = -1;
|
change = -1;
|
||||||
|
@ -235,11 +235,6 @@ class AutoScrollChild extends JSWindowActorChild {
|
|||||||
let content = this.document.defaultView;
|
let content = this.document.defaultView;
|
||||||
this._lastFrame = content.performance.now();
|
this._lastFrame = content.performance.now();
|
||||||
content.requestAnimationFrame(this.autoscrollLoop);
|
content.requestAnimationFrame(this.autoscrollLoop);
|
||||||
|
|
||||||
const kAutoscroll = 15; // defined in mozilla/layers/ScrollInputMethods.h
|
|
||||||
Services.telemetry
|
|
||||||
.getHistogramById("SCROLL_INPUT_METHODS")
|
|
||||||
.add(kAutoscroll);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
stopScroll() {
|
stopScroll() {
|
||||||
|
@ -13923,16 +13923,6 @@
|
|||||||
"releaseChannelCollection": "opt-out",
|
"releaseChannelCollection": "opt-out",
|
||||||
"description": "Graphics Crash Reason (...)"
|
"description": "Graphics Crash Reason (...)"
|
||||||
},
|
},
|
||||||
"SCROLL_INPUT_METHODS": {
|
|
||||||
"record_in_processes": ["main", "content", "gpu"],
|
|
||||||
"products": ["firefox"],
|
|
||||||
"alert_emails": ["botond@mozilla.com"],
|
|
||||||
"bug_numbers": [1670003, 1672576],
|
|
||||||
"expires_in_version": "89",
|
|
||||||
"kind": "enumerated",
|
|
||||||
"n_values": 64,
|
|
||||||
"description": "Count of scroll actions triggered by different input methods. See gfx/layers/apz/util/ScrollInputMethods.h for a list of possible values and their meanings."
|
|
||||||
},
|
|
||||||
"WEBFONT_DOWNLOAD_TIME": {
|
"WEBFONT_DOWNLOAD_TIME": {
|
||||||
"record_in_processes": ["main", "content"],
|
"record_in_processes": ["main", "content"],
|
||||||
"products": ["firefox", "fennec"],
|
"products": ["firefox", "fennec"],
|
||||||
|
@ -215,7 +215,6 @@
|
|||||||
#include "mozilla/layers/APZInputBridge.h"
|
#include "mozilla/layers/APZInputBridge.h"
|
||||||
#include "mozilla/layers/InputAPZContext.h"
|
#include "mozilla/layers/InputAPZContext.h"
|
||||||
#include "mozilla/layers/KnowsCompositor.h"
|
#include "mozilla/layers/KnowsCompositor.h"
|
||||||
#include "mozilla/layers/ScrollInputMethods.h"
|
|
||||||
#include "InputData.h"
|
#include "InputData.h"
|
||||||
|
|
||||||
#include "mozilla/TaskController.h"
|
#include "mozilla/TaskController.h"
|
||||||
@ -7251,9 +7250,6 @@ bool nsWindow::OnGesture(WPARAM wParam, LPARAM lParam) {
|
|||||||
bool endFeedback = true;
|
bool endFeedback = true;
|
||||||
|
|
||||||
if (mGesture.PanDeltaToPixelScroll(wheelEvent)) {
|
if (mGesture.PanDeltaToPixelScroll(wheelEvent)) {
|
||||||
mozilla::Telemetry::Accumulate(
|
|
||||||
mozilla::Telemetry::SCROLL_INPUT_METHODS,
|
|
||||||
(uint32_t)ScrollInputMethod::MainThreadTouch);
|
|
||||||
DispatchEvent(&wheelEvent, status);
|
DispatchEvent(&wheelEvent, status);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user