mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-28 15:23:51 +00:00
Bug 1528676 - Remove telemetry probes for HTMLEditors which have shown Gecko build-in editing UIs and if they are operated r=m_kato,Ehsan
Those probes are now expired and we got enough data: - Almost no user uses the grip to move absolute positioned element - There were over one thousand users using the inline table editor and the object resizers. - Such users keep using even after we disabled the UIs by default. Perhaps, such small number of users keep using the UIs, i.e., I guess the number won't become smaller in short term. Therefore, this patch removes the telemetry probes and members of HTMLEditor which are necessary to call Telemetry API. Differential Revision: https://phabricator.services.mozilla.com/D20609 --HG-- extra : moz-landing-system : lando
This commit is contained in:
parent
67efae6a76
commit
f4e8c4a068
@ -343,8 +343,6 @@ nsresult HTMLEditor::ShowGrabberInternal(Element& aElement) {
|
||||
// called yet. So, mAbsolutelyPositionedObject should be non-nullptr.
|
||||
MOZ_ASSERT(mAbsolutelyPositionedObject);
|
||||
|
||||
mHasShownGrabber = true;
|
||||
|
||||
// Finally, move the grabber to proper position.
|
||||
rv = RefreshGrabberInternal();
|
||||
if (NS_WARN_IF(NS_FAILED(rv))) {
|
||||
|
@ -12,7 +12,6 @@
|
||||
#include "mozilla/EditorDOMPoint.h"
|
||||
#include "mozilla/EventStates.h"
|
||||
#include "mozilla/mozInlineSpellChecker.h"
|
||||
#include "mozilla/Telemetry.h"
|
||||
#include "mozilla/TextEvents.h"
|
||||
|
||||
#include "nsCRT.h"
|
||||
@ -145,7 +144,6 @@ HTMLEditor::HTMLEditor()
|
||||
: mCRInParagraphCreatesParagraph(false),
|
||||
mCSSAware(false),
|
||||
mSelectedCellIndex(0),
|
||||
mHasShownResizers(false),
|
||||
mIsObjectResizingEnabled(HTMLEditorPrefs::IsResizingUIEnabledByDefault()),
|
||||
mIsResizing(false),
|
||||
mPreserveRatio(false),
|
||||
@ -153,11 +151,9 @@ HTMLEditor::HTMLEditor()
|
||||
mIsAbsolutelyPositioningEnabled(
|
||||
HTMLEditorPrefs::IsAbsolutePositioningUIEnabledByDefault()),
|
||||
mResizedObjectIsAbsolutelyPositioned(false),
|
||||
mHasShownGrabber(false),
|
||||
mGrabberClicked(false),
|
||||
mIsMoving(false),
|
||||
mSnapToGridEnabled(false),
|
||||
mHasShownInlineTableEditor(false),
|
||||
mIsInlineTableEditingEnabled(
|
||||
HTMLEditorPrefs::IsInlineTableEditingUIEnabledByDefault()),
|
||||
mOriginalX(0),
|
||||
@ -174,9 +170,6 @@ HTMLEditor::HTMLEditor()
|
||||
mYIncrementFactor(0),
|
||||
mWidthIncrementFactor(0),
|
||||
mHeightIncrementFactor(0),
|
||||
mResizerUsedCount(0),
|
||||
mGrabberUsedCount(0),
|
||||
mInlineTableEditorUsedCount(0),
|
||||
mInfoXIncrement(20),
|
||||
mInfoYIncrement(20),
|
||||
mPositionedObjectX(0),
|
||||
@ -213,27 +206,6 @@ HTMLEditor::~HTMLEditor() {
|
||||
RemoveEventListeners();
|
||||
|
||||
HideAnonymousEditingUIs();
|
||||
|
||||
Telemetry::Accumulate(Telemetry::HTMLEDITORS_WITH_RESIZERS,
|
||||
mHasShownResizers ? 1 : 0);
|
||||
if (mHasShownResizers) {
|
||||
Telemetry::Accumulate(Telemetry::HTMLEDITORS_WHOSE_RESIZERS_USED_BY_USER,
|
||||
mResizerUsedCount);
|
||||
}
|
||||
Telemetry::Accumulate(Telemetry::HTMLEDITORS_WITH_ABSOLUTE_POSITIONER,
|
||||
mHasShownGrabber ? 1 : 0);
|
||||
if (mHasShownGrabber) {
|
||||
Telemetry::Accumulate(
|
||||
Telemetry::HTMLEDITORS_WHOSE_ABSOLUTE_POSITIONER_USED_BY_USER,
|
||||
mGrabberUsedCount);
|
||||
}
|
||||
Telemetry::Accumulate(Telemetry::HTMLEDITORS_WITH_INLINE_TABLE_EDITOR,
|
||||
mHasShownInlineTableEditor ? 1 : 0);
|
||||
if (mHasShownInlineTableEditor) {
|
||||
Telemetry::Accumulate(
|
||||
Telemetry::HTMLEDITORS_WHOSE_INLINE_TABLE_EDITOR_USED_BY_USER,
|
||||
mInlineTableEditorUsedCount);
|
||||
}
|
||||
}
|
||||
|
||||
NS_IMPL_CYCLE_COLLECTION_CLASS(HTMLEditor)
|
||||
|
@ -2356,9 +2356,6 @@ class HTMLEditor final : public TextEditor,
|
||||
nsTArray<RefPtr<StyleSheet>> mStyleSheets;
|
||||
|
||||
// resizing
|
||||
// If the instance has shown resizers at least once, mHasShownResizers is
|
||||
// set to true.
|
||||
bool mHasShownResizers;
|
||||
bool mIsObjectResizingEnabled;
|
||||
bool mIsResizing;
|
||||
bool mPreserveRatio;
|
||||
@ -2367,18 +2364,12 @@ class HTMLEditor final : public TextEditor,
|
||||
// absolute positioning
|
||||
bool mIsAbsolutelyPositioningEnabled;
|
||||
bool mResizedObjectIsAbsolutelyPositioned;
|
||||
// If the instance has shown grabber at least once, mHasShownGrabber is
|
||||
// set to true.
|
||||
bool mHasShownGrabber;
|
||||
bool mGrabberClicked;
|
||||
bool mIsMoving;
|
||||
|
||||
bool mSnapToGridEnabled;
|
||||
|
||||
// inline table editing
|
||||
// If the instance has shown inline table editor at least once,
|
||||
// mHasShownInlineTableEditor is set to true.
|
||||
bool mHasShownInlineTableEditor;
|
||||
bool mIsInlineTableEditingEnabled;
|
||||
|
||||
// resizing
|
||||
@ -2416,12 +2407,6 @@ class HTMLEditor final : public TextEditor,
|
||||
int32_t mWidthIncrementFactor;
|
||||
int32_t mHeightIncrementFactor;
|
||||
|
||||
// When resizers, grabber and/or inline table editor are operated by user
|
||||
// actually, the following counters are increased.
|
||||
uint32_t mResizerUsedCount;
|
||||
uint32_t mGrabberUsedCount;
|
||||
uint32_t mInlineTableEditorUsedCount;
|
||||
|
||||
int8_t mInfoXIncrement;
|
||||
int8_t mInfoYIncrement;
|
||||
|
||||
|
@ -413,8 +413,6 @@ nsresult HTMLEditor::ShowResizersInternal(Element& aResizedElement) {
|
||||
|
||||
MOZ_ASSERT(mResizedObject == &aResizedElement);
|
||||
|
||||
mHasShownResizers = true;
|
||||
|
||||
// XXX Even when it failed to add event listener, should we need to set
|
||||
// _moz_resizing attribute?
|
||||
aResizedElement.SetAttr(kNameSpaceID_None, nsGkAtoms::_moz_resizing,
|
||||
@ -622,7 +620,6 @@ nsresult HTMLEditor::OnMouseDown(int32_t aClientX, int32_t aClientY,
|
||||
// If we have an anonymous element and that element is a resizer,
|
||||
// let's start resizing!
|
||||
aEvent->PreventDefault();
|
||||
mResizerUsedCount++;
|
||||
mOriginalX = aClientX;
|
||||
mOriginalY = aClientY;
|
||||
return StartResizing(aTarget);
|
||||
@ -636,7 +633,6 @@ nsresult HTMLEditor::OnMouseDown(int32_t aClientX, int32_t aClientY,
|
||||
|
||||
// If we have an anonymous element and that element is a grabber,
|
||||
// let's start moving the element!
|
||||
mGrabberUsedCount++;
|
||||
mOriginalX = aClientX;
|
||||
mOriginalY = aClientY;
|
||||
return GrabberClicked();
|
||||
|
@ -145,8 +145,6 @@ nsresult HTMLEditor::ShowInlineTableEditingUIInternal(Element& aCellElement) {
|
||||
AddMouseClickListener(mRemoveRowButton);
|
||||
AddMouseClickListener(mAddRowAfterButton);
|
||||
|
||||
mHasShownInlineTableEditor = true;
|
||||
|
||||
nsresult rv = RefreshInlineTableEditingUIInternal();
|
||||
if (NS_WARN_IF(NS_FAILED(rv))) {
|
||||
return rv;
|
||||
@ -278,8 +276,6 @@ nsresult HTMLEditor::DoInlineTableEditingAction(const Element& aElement) {
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
++mInlineTableEditorUsedCount;
|
||||
|
||||
// InsertTableRowsWithTransaction() might causes reframe.
|
||||
if (Destroyed()) {
|
||||
return NS_OK;
|
||||
|
@ -14289,66 +14289,6 @@
|
||||
"kind": "exponential",
|
||||
"description": "Age of files scanned in profile directory in days when determining initial profile age."
|
||||
},
|
||||
"HTMLEDITORS_WITH_RESIZERS": {
|
||||
"record_in_processes": ["content"],
|
||||
"alert_emails": ["mnakano@mozilla.com"],
|
||||
"bug_numbers": [1452538,1449564],
|
||||
"expires_in_version": "65",
|
||||
"kind": "boolean",
|
||||
"releaseChannelCollection": "opt-out",
|
||||
"description": "Number of HTML editors which has shown object resizers."
|
||||
},
|
||||
"HTMLEDITORS_WHOSE_RESIZERS_USED_BY_USER": {
|
||||
"record_in_processes": ["content"],
|
||||
"alert_emails": ["mnakano@mozilla.com"],
|
||||
"bug_numbers": [1452538,1449564],
|
||||
"expires_in_version": "65",
|
||||
"kind": "linear",
|
||||
"high": 50,
|
||||
"n_buckets": 20,
|
||||
"releaseChannelCollection": "opt-out",
|
||||
"description": "Number of HTML editors whose object resizers are actually used by users."
|
||||
},
|
||||
"HTMLEDITORS_WITH_ABSOLUTE_POSITIONER": {
|
||||
"record_in_processes": ["content"],
|
||||
"alert_emails": ["mnakano@mozilla.com"],
|
||||
"bug_numbers": [1452538,1449564],
|
||||
"expires_in_version": "65",
|
||||
"kind": "boolean",
|
||||
"releaseChannelCollection": "opt-out",
|
||||
"description": "Number of HTML editors which has shown grabber to move absolute positioned elements."
|
||||
},
|
||||
"HTMLEDITORS_WHOSE_ABSOLUTE_POSITIONER_USED_BY_USER": {
|
||||
"record_in_processes": ["content"],
|
||||
"alert_emails": ["mnakano@mozilla.com"],
|
||||
"bug_numbers": [1452538,1449564],
|
||||
"expires_in_version": "65",
|
||||
"kind": "linear",
|
||||
"high": 50,
|
||||
"n_buckets": 20,
|
||||
"releaseChannelCollection": "opt-out",
|
||||
"description": "Number of HTML editors whose grabber to move absolute positioned elements is actually used by users."
|
||||
},
|
||||
"HTMLEDITORS_WITH_INLINE_TABLE_EDITOR": {
|
||||
"record_in_processes": ["content"],
|
||||
"alert_emails": ["mnakano@mozilla.com"],
|
||||
"bug_numbers": [1452538,1449564],
|
||||
"expires_in_version": "65",
|
||||
"kind": "boolean",
|
||||
"releaseChannelCollection": "opt-out",
|
||||
"description": "Number of HTML editors which has shown inline table editing UI."
|
||||
},
|
||||
"HTMLEDITORS_WHOSE_INLINE_TABLE_EDITOR_USED_BY_USER": {
|
||||
"record_in_processes": ["content"],
|
||||
"alert_emails": ["mnakano@mozilla.com"],
|
||||
"bug_numbers": [1452538,1449564],
|
||||
"expires_in_version": "65",
|
||||
"kind": "linear",
|
||||
"high": 50,
|
||||
"n_buckets": 20,
|
||||
"releaseChannelCollection": "opt-out",
|
||||
"description": "Number of HTML editors whose inline table editing UI is actually used by users."
|
||||
},
|
||||
"ACTIVE_HTTP_DOCGROUPS_PER_TABGROUP": {
|
||||
"record_in_processes": ["content"],
|
||||
"alert_emails": ["farre@mozilla.com"],
|
||||
|
Loading…
Reference in New Issue
Block a user