This CL add new metrics enums to allow measuring when an issue in the
issue panel is expanded and when a resource is opened.
The corresponding chromium CL is at https://crrev.com/c/2305018
Design doc: https://docs.google.com/document/d/1XfVyiQAe9sT9hj0EigQ2skmJP4gCrrnUJVLd-qpFk7A
There are two elements that we can't track the telemetry because
they are stopping the propagation of the event for "click" and
"keydown" if the key is the enter key.
I have open two issues to track them separately.
- Learn More link: https://crbug.com/1108501
- Source link: https://crbug.com/1108503
Summary:
This CL purpose is to answer the question "Which issues are
useful for developers?"
For that purpose this will track when an user expand an issue and
when a resource inside the issue is clicked.
Tracking this two things can help us to answer the previous
question. i.e: "if we see users clicking an issue
but *not* clicking on a resource, that may tell us
the issue needs to be changed or removed"
Bug: 1100658
Change-Id: I4a6f86f107dc710bc64edbf21670a4a3bd2a3d60
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2303882
Commit-Queue: Jesus David Garcia Gomez <jegarc@microsoft.com>
Reviewed-by: Yang Guo <yangguo@chromium.org>
Reviewed-by: Sigurd Schneider <sigurds@chromium.org>
This CL creates a new CSS grid setting histogram to replace the previous
one, which was firing multiple times per setting change. Previously,
the histogram could fire once per target on the debug target page
when a setting changed.
This new histogram fires once on devtools launch, allowing us to
gain insight on user's settings preferences while also filtering
out several events from users quickly trying different settings
before settling on a prefered option
Backend CL: https://crrev.com/c/2304166
Bug: 1106888
Change-Id: I929befb8997ac0908e6c9aa90af509582b77ae49
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2308256
Reviewed-by: Alex Rudenko <alexrudenko@chromium.org>
Reviewed-by: Shane Clifford <shanejc@microsoft.com>
Commit-Queue: Brandon Goddard <brgoddar@microsoft.com>
The DevTools renderer crashes if it receives a request to record
histogram data {sample, boundary} where sample is not a non-negative
integer smaller than boundary, or where boundary is larger than the
actual boundary of the histogram in the back-end.
The first call that gets removed falls in to the latter category,
the boundary 100 is way too large. The second call is likely to
trigger the former category, as we currently have ~40 panel codes,
and the hard-coded boundary is 20.
Bug: chromium:1098736
Change-Id: If9c2f13978c130aa8ff5ebe7b421da0c3026c838
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2274511
Reviewed-by: Tim van der Lippe <tvanderlippe@chromium.org>
Commit-Queue: Sigurd Schneider <sigurds@chromium.org>
This patch adds support for emulating locales through the Sensors
drawer. Similar to timezone emulation, it’s tied to geolocation
emulation, completing the “user location emulation” feature set.
Locale emulation affects:
- *.prototype.toLocaleString
e.g. `123_456..toLocaleString()`
- Intl.* APIs
e.g. `new Intl.NumberFormat().resolvedOptions().locale`
- navigator.language
- navigator.languages
- the Accept-Language HTTP header
Note that until chromium:1057096 gets fixed, updates to
`navigator.language` and `navigator.languages` are not visible
immediately, but only after the next navigation/page reload.
Changes to the `Accept-Language` HTTP header are only reflected
for subsequent requests (but that’s unsurprising).
Once chromium:1051186 is fixed, we can simplify the implementation
by dropping the call to Emulation.setUserAgentOverride.
Boring but useful test/demo pages:
- https://mathiasbynens.be/demo/locale
- https://mathiasbynens.be/demo/locale#includeExtras
Demo video: https://www.youtube.com/watch?v=lZEFwACYPo0
Design doc: https://goo.gle/devtools-locale-emulation
Bug: chromium:1051186, chromium:1051822, chromium:1057096
Change-Id: I0371f450ed23511816941f3a59c14236aea64408
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2082371
Commit-Queue: Mathias Bynens <mathias@chromium.org>
Reviewed-by: Changhao Han <changhaohan@chromium.org>
To implement this, we reattach the DevToolsUIBindings for the current
DevToolsWindow to the RenderFrameDevToolsAgentHost for the activated
WebContents and reset the main connection in the frontend to reconnect
with and enable the new agents.
Bug: 992887
Change-Id: I0ca4e6cc7a6c633680bfd03d574a4030ab65d7b1
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1788122
Reviewed-by: Avi Drissman <avi@chromium.org>
Reviewed-by: Dmitry Gozman <dgozman@chromium.org>
Reviewed-by: Lucas Gadani <lfg@chromium.org>
Commit-Queue: Adithya Srinivasan <adithyas@chromium.org>
Cr-Original-Commit-Position: refs/heads/master@{#703973}
Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src
Cr-Mirrored-Commit: 5d50d1e0bf22d0474cfc31f63b867706a3e7590f
The Chromium/Google style guides does not enforce curly braces for
single-line if-statements, but does strongly recommend doing so. Adding
braces will improve code readability, by visually separating code
blocks. This will also prevent issues where accidental additions are
pushed to the "else"-clause instead of in the if-block.
This CL also updates the presubmit `eslint` to run the fix with the
correct configuration. It will now fix all issues it can fix.
Change-Id: I4b616f21a99393f168dec743c0bcbdc7f5db04a9
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1821526
Commit-Queue: Tim Van der Lippe <tvanderlippe@chromium.org>
Reviewed-by: Yang Guo <yangguo@chromium.org>
Reviewed-by: Jeff Fisher <jeffish@microsoft.com>
Cr-Original-Commit-Position: refs/heads/master@{#701070}
Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src
Cr-Mirrored-Commit: 7e0bdbe2d7f9fc2386bfaefda3cc29c66ccc18f9
This patch simplifies some utility methods by applying the following
changes:
1) `type=text/css` is the implicit default for <style> elements and for
<link rel=stylesheet>. Thus, we should omit it in those cases.
This additionally reduces visual clutter in various places,
including the elements pane when inspecting DevTools using DevTools.
2) Prefer `const` over `let` even in dynamically generated scripts,
matching Google's JS style guide.
3) Simplify `leadZero` by leveraging `String.prototype.padStart`, which
shipped in Chrome 51.
BUG=v8:9396
Change-Id: I50d0b88ff9c9c2791a194d2f50445e4a561e3a23
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1803929
Reviewed-by: Yang Guo <yangguo@chromium.org>
Commit-Queue: Mathias Bynens <mathias@chromium.org>
Cr-Original-Commit-Position: refs/heads/master@{#697104}
Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src
Cr-Mirrored-Commit: afee7cddcb990475607d0bfe9d8f2c0afc899e5e
The new compiler caught a lot of pre-existing issues in the codebase.
Sadly, the old compiler version was not smart enough to understand the
new changes. Therefore, the changes have be included in the same CL as
the compiler update.
Most of the changes are related to better handling of prototype and
class inheritance, as well as handling of null/undefined tracking.
Change-Id: I3941a3a240a4d09c4945e1e20d2521090ef837c9
Bug: 991710
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1762081
Reviewed-by: Yang Guo <yangguo@chromium.org>
Commit-Queue: Tim van der Lippe <tvanderlippe@google.com>
Auto-Submit: Tim van der Lippe <tvanderlippe@google.com>
Cr-Original-Commit-Position: refs/heads/master@{#696761}
Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src
Cr-Mirrored-Commit: ca93474213278e32e36d6ace1474c56884030757
During frontend load, there are a couple async points after
DOMContentLoaded before the UI can finish initializing. The first
is waiting for all modules to load. The second is waiting for
preferences to be retrieved.
The event for DevTools extensions was being fired on window
load, but it was possible for the above async work to take too long
and the event listener would not be subscribed in time.
This patch addresses this race condition by caching the event info
inside devtools_compatibility and using a callback instead of relying
on Extensions.ExtensionsServer to be constructed before window load.
Bug: 973701
Change-Id: I638a6915f7b7c37a32cebe3d876cbca4f94e9f49
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1658433
Commit-Queue: Jeff Fisher <jeffish@microsoft.com>
Reviewed-by: Andrey Kosyakov <caseq@chromium.org>
Reviewed-by: Joel Einbinder <einbinder@chromium.org>
Cr-Original-Commit-Position: refs/heads/master@{#672273}
Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src
Cr-Mirrored-Commit: 185ff99913e08916b261ef4a37c40d2df9860fb4
This patch adds a new dispatcher function to the devtools embedder
which allows the front_end javascript to call into
InspectorFrontendHost.recordUserMetricsAction() to record a user
metrics action.
The implementation is similar to the recordPerformanceHistogram()
function that we added recently, in that it uses the dynamic version of
the UMA helper. This allows the string name of the action to be provided
directly from the javascript without needing a hard-coded native value.
The change also updates the extract_actions.py script so that the
devtools files can be correctly parsed for new UMA calls. Any new ones
will then be correctly added to the actions.xml file by the script.
This change makes it simple to add new UMA calls into the devtools
frontend code so that we can gather actionable, order based telemetry
for new features.
Change-Id: Iaa0882f1862129a10f178df0a71f749e2995bc40
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1584921
Commit-Queue: James Lissiak <jalissia@microsoft.com>
Reviewed-by: Pavel Feldman OOO <pfeldman@chromium.org>
Reviewed-by: Brian White <bcwhite@chromium.org>
Reviewed-by: Tom Sepez <tsepez@chromium.org>
Cr-Original-Commit-Position: refs/heads/master@{#654902}
Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src
Cr-Mirrored-Commit: adb8ed7c36a18718ba165917c0188b7c0e625a7f
Accessibility testing revealed that there are tab traps in all of the text editors including read only ones. Once keyboard users tab into the editor, they cannot tab out the editor.
This change adds a shortcut to disable/re-enable tab for indentation, which allows keyboard users continue to use tab to navigate to next UI component.
Settings Shortcuts page screenshot: https://imgur.com/a/qeOjGoB
Change-Id: I026a5a9c47407634a78c2ccf1a0bc532baa39e07
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1545200
Reviewed-by: Joel Einbinder <einbinder@chromium.org>
Commit-Queue: Junyi Xiao <juxiao@microsoft.com>
Cr-Original-Commit-Position: refs/heads/master@{#649901}
Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src
Cr-Mirrored-Commit: 27ff38b767bc1659a596830b864acf60850e6bd0
This change adds 4 new performance histograms for the DevTools using the
prefix 'DevTools.Launch':
- DevTools.Launch.Console
- DevTools.Launch.Elements
- DevTools.Launch.Network
- DevTools.Launch.Sources
These histograms measure the time between the DevTools window being
shown during 'DevToolsWindow::ToggleDevToolsWindow' and a point in each
tool that corresponds to the 'ready' state as seen by a user. These end
points are unique to each tool but are as follows:
- Console: At the end of the ConsolePrompt constructor
- Elements: At the end of _updateMetrics when the styles panel has
been populated for the initially selected node
- Network: After the panel is shown
- Sources: After the NetworkNavigatorView has been loaded
These tools were chosen as they represent the most popular in terms of
usage and will allow us to identify any significant performance impact
in the time taken to launch the DevTools when these panels open by
default.
To see time captured by the histograms in terms of a perf trace for
each tool please take a look at the following screenshots:
https://imgur.com/a/rcAgQ8h
In the traces you can see that the end marker for each load is at the
end of the trace near first meaningful paint, and just as the user
will see the content of the tool render fully.
To accomplish the histograms, a new native function has been added to
the DevTools ui bindings/embedder classes called
'recordPerformanceHistogram'. Along with the plumbing and a new helper
function in the frontend javascript Host.UserMetrics file called
'panelLoaded'
When the frontend javascript loads, it will store the initial panel to
be loaded from the preferences. Once that panel has been created and
the appropriate loaded marker has been hit, the duration of the launch
will be calculated using performance.now(). That duration is then sent
to the native code which will fire the appropriate histogram via the
'UMA_HISTOGRAM_TIMES' macros.
The mechanism is similar to the existing one used for enumerated
histograms and can be expanded to fire additional performance histograms
in the future.
Also added a new test for user-metrics to ensure that the panelLoaded
function will correctly record the histograms.
Change-Id: Ib9f0bf80c651231d6d2e308bee36c1a1223f04db
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1506388
Reviewed-by: Tom Sepez <tsepez@chromium.org>
Reviewed-by: Ilya Sherman <isherman@chromium.org>
Reviewed-by: Pavel Feldman <pfeldman@chromium.org>
Commit-Queue: James Lissiak <jalissia@microsoft.com>
Cr-Original-Commit-Position: refs/heads/master@{#644407}
Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src
Cr-Mirrored-Commit: 296f6b12650bd5e38eaf1fe0987c46910fe2d6eb
This reverts commit 82ef33772f758883cda6379610b24f27e7ff3bbe.
Implements this change:
https://github.com/w3c/csswg-drafts/commit/5b5db39d21f3658ae2f4d7992daaf822aca178d8
external/wpt/css/css-flexbox/percentage-heights-003.html ostensibly tests
this, but I don't think the test is correct (and we don't pass it)
To fix the regression from the original change, I updated the devtools code
to specify a flex-basis of auto. It previously defaulted to 0%, which
used to be resolved to auto, but with this change resolves to 0px,
which is not what the code wants.
TESTED=css3/flexbox/definite-main-size.html
Bug: 784059,900459
Change-Id: I773877f34b281dd6bfe4ac02b9aad90451c3acf9
Reviewed-on: https://chromium-review.googlesource.com/c/1247184
Reviewed-by: Joel Einbinder <einbinder@chromium.org>
Reviewed-by: Emil A Eklund <eae@chromium.org>
Commit-Queue: Christian Biesinger <cbiesinger@chromium.org>
Cr-Original-Commit-Position: refs/heads/master@{#605553}
Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src
Cr-Mirrored-Commit: d519ce9b1818139c082ff339c7c5d3af18b1baa7
This patch uses the remoteVersion of the devtools being run to apply
only the fixes that are needed.
Additionally, use of the /deep/ selector is swapped out for injecting
a stylesheet in every shadow root.
Bug: 898245
Change-Id: I311ab48d88434d821fedb279d81b2ab9a7f8c94d
Reviewed-on: https://chromium-review.googlesource.com/c/1299914
Reviewed-by: Dmitry Gozman <dgozman@chromium.org>
Commit-Queue: Joel Einbinder <einbinder@chromium.org>
Cr-Original-Commit-Position: refs/heads/master@{#603733}
Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src
Cr-Mirrored-Commit: 89ed1da2c8dde2a5c415fb5688c05b7bcfc7cf94