mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 1238137 - Telemetry pings for main thread scrollbar-driven scroll input methods. r=kats
This commit is contained in:
parent
096fcf4562
commit
9a4e984984
@ -22,8 +22,11 @@
|
||||
#include "nsRepeatService.h"
|
||||
#include "mozilla/LookAndFeel.h"
|
||||
#include "mozilla/MouseEvents.h"
|
||||
#include "mozilla/Telemetry.h"
|
||||
#include "mozilla/layers/ScrollInputMethods.h"
|
||||
|
||||
using namespace mozilla;
|
||||
using mozilla::layers::ScrollInputMethod;
|
||||
|
||||
//
|
||||
// NS_NewToolbarFrame
|
||||
@ -167,6 +170,10 @@ nsScrollbarButtonFrame::HandleButtonPress(nsPresContext* aPresContext,
|
||||
if (!weakFrame.IsAlive()) {
|
||||
return false;
|
||||
}
|
||||
|
||||
mozilla::Telemetry::Accumulate(mozilla::Telemetry::SCROLL_INPUT_METHODS,
|
||||
(uint32_t) ScrollInputMethod::MainThreadScrollbarButtonClick);
|
||||
|
||||
if (!m) {
|
||||
sb->MoveToNewPosition();
|
||||
if (!weakFrame.IsAlive()) {
|
||||
|
@ -36,13 +36,16 @@
|
||||
#include "mozilla/Preferences.h"
|
||||
#include "mozilla/LookAndFeel.h"
|
||||
#include "mozilla/MouseEvents.h"
|
||||
#include "mozilla/Telemetry.h"
|
||||
#include "mozilla/layers/AsyncDragMetrics.h"
|
||||
#include "mozilla/layers/InputAPZContext.h"
|
||||
#include "mozilla/layers/ScrollInputMethods.h"
|
||||
#include <algorithm>
|
||||
|
||||
using namespace mozilla;
|
||||
using mozilla::layers::AsyncDragMetrics;
|
||||
using mozilla::layers::InputAPZContext;
|
||||
using mozilla::layers::ScrollInputMethod;
|
||||
|
||||
bool nsSliderFrame::gMiddlePref = false;
|
||||
int32_t nsSliderFrame::gSnapMultiplier;
|
||||
@ -513,6 +516,9 @@ nsSliderFrame::HandleEvent(nsPresContext* aPresContext,
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
mozilla::Telemetry::Accumulate(mozilla::Telemetry::SCROLL_INPUT_METHODS,
|
||||
(uint32_t) ScrollInputMethod::MainThreadScrollbarDrag);
|
||||
|
||||
// take our current position and subtract the start location
|
||||
pos -= mDragStart;
|
||||
bool isMouseOutsideThumb = false;
|
||||
@ -579,6 +585,9 @@ nsSliderFrame::HandleEvent(nsPresContext* aPresContext,
|
||||
nsSize thumbSize = thumbFrame->GetSize();
|
||||
nscoord thumbLength = isHorizontal ? thumbSize.width : thumbSize.height;
|
||||
|
||||
mozilla::Telemetry::Accumulate(mozilla::Telemetry::SCROLL_INPUT_METHODS,
|
||||
(uint32_t) ScrollInputMethod::MainThreadScrollbarTrackClick);
|
||||
|
||||
// set it
|
||||
nsWeakFrame weakFrame(this);
|
||||
// should aMaySnap be true here?
|
||||
|
Loading…
Reference in New Issue
Block a user