Commit Graph
991 Commits
Author SHA1 Message Date
Jack Franklin fc495906c3 Enforce no TS non-null bang assertions
This CL bans the TS `!` operator which is used to assert not null.

Typically when we use this we are making errors harder to track down
should the value actually end up being null. Checking it takes more work
but will give nicer errors.

Fixed: 1154182
Change-Id: I11599541c199204e4ca21c9fd81a256614d70389
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2566804
Commit-Queue: Jack Franklin <jacktfranklin@chromium.org>
Reviewed-by: Alex Rudenko <alexrudenko@chromium.org>
Reviewed-by: Paul Lewis <aerotwist@chromium.org>
2020-12-02 14:46:50 +00:00
Simon Zünd 7ba7696cf1 Prepare Trust Token report view for result section
This CL adds the trust token operation result to NetworkRequest and
forwards the data to the Trust Token tab in the Network panel.
As the operation result can arrive after the report was initially
rendered, this CL adds a new event to trigger a re-render as
necessary.

The CL doesn't yet add the rendering for the result itself, just
prepares the component to have the necessary data.

R=jacktfranklin@chromium.org

Bug: chromium:1126824
Change-Id: I9c6c080de9268219cd8b4b12804a7ca7c4de39a8
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2567783
Reviewed-by: Jack Franklin <jacktfranklin@chromium.org>
Commit-Queue: Simon Zünd <szuend@chromium.org>
2020-12-02 12:48:49 +00:00
Philip Pfaffe e0f6048d5a Wait explicitely for expected number of scope values
Bug: chromium:1154188
Change-Id: Ia1336bda2e6ce7327062629053f823bef966b7c1
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2567786
Commit-Queue: Philip Pfaffe <pfaffe@chromium.org>
Auto-Submit: Philip Pfaffe <pfaffe@chromium.org>
Reviewed-by: Alex Rudenko <alexrudenko@chromium.org>
2020-12-02 10:01:57 +00:00
Alex Rudenko 9c8adb72dd Disable flaky recorder test
Bug: 1154575
Change-Id: Ia13da28f270b202fe0a7c35288c83e21e2ea88aa
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2567784
Auto-Submit: Alex Rudenko <alexrudenko@chromium.org>
Reviewed-by: Jan Scheffler <janscheffler@chromium.org>
Commit-Queue: Alex Rudenko <alexrudenko@chromium.org>
2020-12-02 09:59:17 +00:00
Philip Pfaffe f2c25cd3bf [wasm-debug] Less eagerly start typing watch expressions
The new debugger language plugins error messages test is flaking. One
possible reason could be that we're trying to type into the watch
expression window too eagerly.

Bug: chromium:1154188
Change-Id: I9f6e1868cdb94f1536399b0da51544e0e3180b64
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2566797
Commit-Queue: Philip Pfaffe <pfaffe@chromium.org>
Auto-Submit: Philip Pfaffe <pfaffe@chromium.org>
Reviewed-by: Alex Rudenko <alexrudenko@chromium.org>
2020-12-02 09:26:47 +00:00
Alex Rudenko 71d19252cc Remove obsolete global types in overlay tests
Change-Id: Ia00f2073049d9caac096f07623f2cadf002dfe0c
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2567114
Reviewed-by: Changhao Han <changhaohan@chromium.org>
Commit-Queue: Alex Rudenko <alexrudenko@chromium.org>
2020-12-02 09:01:17 +00:00
Alfonso Castaño 256c919c0d E2E Tests for CSP Violations tab
Apart from the actual tests, it introduces a helper to get the content of the cells of a Datagrid.

Bug: chromium:1137837
Change-Id: I167507d932a633d6f5d92c9ca59e99106d73935f
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2563822
Commit-Queue: Alfonso Castaño <alcastano@google.com>
Reviewed-by: Jack Franklin <jacktfranklin@chromium.org>
2020-12-02 08:54:47 +00:00
Alex Rudenko d5071440f3 Disable flaky font editor e2e tests
Bug: 1154560
Change-Id: I67f4a2719f7bbd9e7bd0f1fdb7672ac9cddb4be5
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2567780
Commit-Queue: Alex Rudenko <alexrudenko@chromium.org>
Commit-Queue: Simon Zünd <szuend@chromium.org>
Auto-Submit: Alex Rudenko <alexrudenko@chromium.org>
Reviewed-by: Simon Zünd <szuend@chromium.org>
2020-12-02 08:16:47 +00:00
Michael Liao 6035f4a583 [Font Editor Prototype]: Implements Experimental Typography CSS Editor in Styles Pane
Reference Document: https://docs.google.com/document/d/1zvmKDfdgVgL-QX2W4nKfgoeG_69YDF0AsLerIzL3rPE/edit?usp=sharing

Explainer: https://docs.google.com/document/d/1TmvbZuJR4fHuViE0X23y_1kUT43qt98mdj5GZxWf_W0/edit

Bug: 1093229
Change-Id: I0a8d049bd564a5ba547466067a12185565af7820
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2305613
Commit-Queue: Michael Liao <michael.liao@microsoft.com>
Reviewed-by: Paul Lewis <aerotwist@chromium.org>
Reviewed-by: Mathias Bynens <mathias@chromium.org>
Reviewed-by: Changhao Han <changhaohan@chromium.org>
Reviewed-by: Alex Rudenko <alexrudenko@chromium.org>
Reviewed-by: Songtao Xia <soxia@microsoft.com>
Reviewed-by: Tony Ross <tross@microsoft.com>
Reviewed-by: Shane Clifford <shanejc@microsoft.com>
2020-12-01 19:54:05 +00:00
Changhao Han 225d4f420c Sort HAR exported logs by startedDateTime
This CL ensures that the exported HAR logs are sorted by startedDateTime
both for requests and for pages.

Fixed: chromium:1116462
Change-Id: I1f47d598462d8ad3e8e66e8a0d7874f603f3dfd5
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2564873
Reviewed-by: Jack Franklin <jacktfranklin@chromium.org>
Reviewed-by: Jan Scheffler <janscheffler@chromium.org>
Reviewed-by: Peter Marshall <petermarshall@chromium.org>
Commit-Queue: Changhao Han <changhaohan@chromium.org>
2020-12-01 17:49:45 +00:00
Jack Franklin 3425b19038 Fix missing DEP to CSS files from unit tests
This fixes a bug where on an empty build `npm run auto-unittest` would fail with errors about loading CSS files. There were two problems:

- in the build graph, the unit tests did not have an explicit dep to the
  legacy_css group
- the legacy_css group was missing some deps itself, so some modules did
  not have their CSS put into the right place.

Fixed: 1153625
Change-Id: Ib08f14a3d61ee0e55e492cc824ddf806d751e787
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2567116
Reviewed-by: Tim van der Lippe <tvanderlippe@chromium.org>
Commit-Queue: Jack Franklin <jacktfranklin@chromium.org>
2020-12-01 16:03:35 +00:00
Kim-Anh Tran b11a912940 [LMI] Bind lifetime of Uint8Array to Linear Memory Inspector
This binds the lifetime of the remote object that represents
the Uint8Array to an object group corresponding to the
linear memory inspector. This allows the user to step and finish
execution, and still inspect the same object.

Also-By: bmeurer@chromium.org
Bug: chromium:1110202
Change-Id: I1489f01ab30aee4ce87b995a7e23a19c8acce941
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2564862
Commit-Queue: Kim-Anh Tran <kimanh@chromium.org>
Reviewed-by: Jack Franklin <jacktfranklin@chromium.org>
2020-12-01 13:46:35 +00:00
Tim van der Lippe 75c2c9cff5 Disable @typescript-eslint/no-unused-vars
The newest version of @typescript-eslint errors on declare globals.
While this is usually good to point out, we have legitimate usages
of these statements. Based on the discussion in
https://github.com/typescript-eslint/typescript-eslint/issues/2519
it seems unlikely this will be fixed anytime soon. Therefore, let's
disable these specific lines to unblock our upgrade of the linter.

R=jacktfranklin@chromium.org

Change-Id: Iee6339428eef0d5496783850a9026fed00942bcb
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2566807
Commit-Queue: Tim van der Lippe <tvanderlippe@chromium.org>
Commit-Queue: Jack Franklin <jacktfranklin@chromium.org>
Auto-Submit: Tim van der Lippe <tvanderlippe@chromium.org>
Reviewed-by: Jack Franklin <jacktfranklin@chromium.org>
Reviewed-by: Alex Rudenko <alexrudenko@chromium.org>
2020-12-01 13:18:25 +00:00
Simon Zünd 9cfe927efc Add Trust Token tab for requests in the network panel
The tab currently shows only the passed parameters to the Trust Token
API. Future CLs will extend the tab to also contain the result of
the Trust Token operation in a seperate section.

Screenshots: https://imgur.com/a/FmI0pIR

R=jacktfranklin@chromium.org, sigurds@chromium.org

Bug: chromium:1126824
Change-Id: Ib189c080965cac7264fab3fb965bc1cade51d3c0
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2564871
Commit-Queue: Simon Zünd <szuend@chromium.org>
Reviewed-by: Jack Franklin <jacktfranklin@chromium.org>
2020-12-01 10:43:35 +00:00
Alex Rudenko 0d1b77b298 Use deviceEmulationFactor to position grid labels
To properly support the device emulation mode, grid label
helpers have to make use of the deviceEmulationFactor parameter when
placing grid labels.

Bug: 1151864
Change-Id: Iefa17be6e376f08cb2760bf747782d13487a2edf
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2565373
Reviewed-by: Patrick Brosset <patrick.brosset@microsoft.com>
Reviewed-by: Mathias Bynens <mathias@chromium.org>
Commit-Queue: Alex Rudenko <alexrudenko@chromium.org>
2020-12-01 09:07:55 +00:00
Alice Boxhall 56dbd799f5 Move AccessibilityModel to sdk/
Bug: 887173
Change-Id: Iebcec97202cf1a08e703f1cace9208f8df7c9234
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2557825
Commit-Queue: Alice Boxhall <aboxhall@chromium.org>
Reviewed-by: Paul Lewis <aerotwist@chromium.org>
Reviewed-by: Tim van der Lippe <tvanderlippe@chromium.org>
2020-12-01 07:20:05 +00:00
Michael Liao 97404598b1 [Sources- Accessibility]: Fix keyboard navigation for breakpoint sidebar
Issue:
- breakpoints are not keyboard accessible in the sources sidebar pane

Changes:
- automatically selects the first breakpoint so that the breakpoint list is enter tabbable
- change DOM breakpoints to match focus patterns as JS and XHR breakpoints
- fix indexing for JS breakpoints when toggling on/off

GIFs:

Broken keyboard nav: https://imgur.com/EzmZaLu
Fixed keyboard nav: https://imgur.com/AmT8q2j

Broken breakpoint toggle focus: https://imgur.com/nhJH65W
Fixed breakpoint toggle focus: https://imgur.com/i4DNaHO

Bug: 1147743
Change-Id: I6351b8e8b3a4f395c88c61cfe135d97423bea33d
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2531637
Commit-Queue: Michael Liao <michael.liao@microsoft.com>
Reviewed-by: Jack Lynch <jalyn@microsoft.com>
Reviewed-by: Songtao Xia <soxia@microsoft.com>
Reviewed-by: Mathias Bynens <mathias@chromium.org>
2020-11-30 18:28:31 +00:00
Jack Franklin c4492956ad Remove component bridges generation
Now Closure is gone we don't need bridges and this removes all the code
and tests for them.

All relevant checks we wanted to keep around have been moved to ESLint
rules (see attached bug).

Fixed: 1130536
Change-Id: I82a7b8e5e7b047b36f42c5c76ddb9dfbd0742d45
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2565377
Reviewed-by: Paul Lewis <aerotwist@chromium.org>
Reviewed-by: Tim van der Lippe <tvanderlippe@chromium.org>
Commit-Queue: Jack Franklin <jacktfranklin@chromium.org>
2020-11-30 17:33:11 +00:00
Philip Pfaffe 7426b000e3 [wasm debug] Fix propagating debug evaluate errors in language plugins
When debug evaluation hits exceptions in wasm debugging, the
LanguagePluginManager incorrectly propagated those errors, causing weird
warnings in the wrong places or warnings that are missing altogether.
This CL hooks up the plugin manager with the existing error reporting
mechanisms and includes a test to make sure the errors show up.

Drive-by: In the watch window, when evaluation failed, we previously
swallowed the actual exception. That's probably because most of the time
that exception is a reference error because variables aren't valid in
the current scope. This CL adds a tooltip that shows the exception.


Bug: chromium:1137514, chromium:1153315
Change-Id: Ia1ec81ce95598adf7abab8c4e31c3310e3669fb7
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2565376
Commit-Queue: Philip Pfaffe <pfaffe@chromium.org>
Commit-Queue: Benedikt Meurer <bmeurer@chromium.org>
Auto-Submit: Philip Pfaffe <pfaffe@chromium.org>
Reviewed-by: Benedikt Meurer <bmeurer@chromium.org>
2020-11-30 16:34:10 +00:00
Jack Franklin 8d634c2cdf Update all enums to be const enums
We will land a rule soon that enforces const enums in the codebase. This
updates any non-const enums to be const enums and updates the tests
accordingly.

R=andoli@chromium.org

Bug: 1130536
Change-Id: I2221a948a88ec7328e7abc2b33f044d14aef73fb
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2562853
Commit-Queue: Jack Franklin <jacktfranklin@chromium.org>
Auto-Submit: Jack Franklin <jacktfranklin@chromium.org>
Reviewed-by: Andres Olivares <andoli@chromium.org>
Reviewed-by: Alex Rudenko <alexrudenko@chromium.org>
2020-11-30 15:23:42 +00:00
Tim van der Lippe 6184af2e90 Use import.meta.url in heap_snapshot_worker
R=aerotwist@chromium.org

Bug: 1011811
Change-Id: I0704837b8eee12409629434a8abb0d487fd23055
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2562352
Commit-Queue: Tim van der Lippe <tvanderlippe@chromium.org>
Reviewed-by: Paul Lewis <aerotwist@chromium.org>
2020-11-30 14:25:59 +00:00
Raphael Kubo da Costa 8f49182178 Sensors: Fix Device Orientation Euler angle calculation and allowed ranges.
The Device Orientation emulation code had a few bugs since its
introduction at the end of 2013 and the redesign from 2016:
1. Angles outside the intervals allowed by the Device Orientation spec
   were allowed and could be entered or produced by dragging the phone
   model. These invalid angels were also reported to API users.
2. Some of the presets also used angles outside valid intervals.
3. Gamma in the CSS transformation used to rotate the phone model was
   wrong. It depended on the value of beta, and was essentially always
   rotating around the original Y axis in the Device Orientation
   coordinate space, which is parallel to the fixed Z axis in the CSS
   coordinate space. This means that if some angles were entered in the
   input boxes, the rotation produced on the phone model could be
   completely different from what it should correspond to.
4. All of the above together led to situations such as:
   a. Load the (wrong) landscape left preset
   b. Shift-drag to the left to see the values suddenly go from
      alpha=0, beta=90, gamma=-90 to e.g. alpha=-180, beta=-90 and
      gamma=-89.6.

There are a few causes for these, mostly caused by the fact that the
CSS and Device Orientation coordinate systems differ:
- The CSS coordinate system is left-handed, X and Y are parallel to the
  screen (X is positive to the right and Y is positive to the bottom),
  and Z is perpendicular to the screen (positive towards the viewer).
- The Device Orientation coordinate system is right-handed, X and Y are
  parallel to the screen (X is positive to the right and Y is positive
  to the top), and Z is perpendicular to the screen (positive towards
  the viewer).
- Additionally, the phone model is rotated +90 degrees in the X axis in
  the CSS coordinate system (i.e. with alpha=0, beta=0, gamma=0 we are
  looking at the bottom of the phone, not its screen), which further
  complicates the transformations we have to do.

The explanations about what fixes are being landed in this CL are
almost bigger than the changes themselves:
- Add further validation to the Euler angles allowed in the UI. Per the
  Device Orientation spec, alpha must be in the [0, 360) degrees
  interval, beta must be in the [-180, 180) degrees interval and gamma
  must be in the [-90, 90) degrees interval.
- Fix the angles used in the preset orientations so that they are all
  within the ranges allowed by the spec.
- Rework the UI.Geometry.EulerAngles class:
  * Remove the toRotate3DString() method. The transformation it
    generates is very specific to the layout used in SensorsView and is
    easily represented by a simpler and more correct sequence of CSS
    transformations in SensorsView directly.
  * Rewrite the rotation matrix -> Euler angle calculations. The
    previous code only worked with the Z-Y'-X'' rotations we used to do
    in _setBoxOrientation(), and it led to some of the bugs outlined
    above. The new code is imported from Chromium
    itself (orientation_util.cc at commit 1be837b6f142). It expects a
    rotation matrix with operations performed in the right (Z-X'-Y'')
    order, returns angles within the ranges allowed by the spec and
    handles Gimbal locks (which happen when beta=+90 or -90 degrees).
    The method has been renamed to better indicate that it handles one
    specific type of rotation matrix.
- Replace the DOMMatrix.rotate() call with separate rotations around
  the Z, X and Y axes in the right order. CSS operations such as the
  rotate() transformation follow a Z-Y'-X'' order that leads to a
  different rotation from what we expect from a Device Orientation
  perspective.
- Most importantly, document all the math we are doing here more
  thoroughly so that the next person working on this code does not get
  lost in it :-)

The new code does have a few caveats:
1. Angle canonicalization can cause entering some angles and then
   dragging the phone model to produce very different angles. For
   example:
   a. Entering 45/90/45 and dragging will automatically avoid a Gimbal
      lock and result in 90/90/0 (plus the change caused by dragging).
   b. Entering 0/0/89 and shift-dragging to the left will cause the
      angles to become 180/-180/-89 (plus whatever extra change caused
      by dragging).
2. Like the old code, the rotation matrix -> Euler algorithm includes
   floating-point math. Very large rotations will produce a lot of
   imprecision (e.g. 360 * 20000000000), but angles in the ranges we
   use (i.e. around the allowed intervals) are handled very well.
3. The "Shift+drag to rotate around the y-axis" hint text only made
   sense in the buggy code, when changing gamma like this feature did
   always rotated around the original Y axis. The behavior has been
   preserved though, as it felt intuitive in configurations like the
   preset orientation ones. It can look a bit odd with other angles
   though.

Bug: chromium:1137281
Change-Id: I461d2fa237f33fb7b5e240a6376f24f126ccd317
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2562673
Commit-Queue: Raphael Kubo da Costa <raphael.kubo.da.costa@intel.com>
Reviewed-by: Paul Lewis <aerotwist@chromium.org>
2020-11-30 14:21:34 +00:00
Tim van der Lippe b736005f57 Remove HTMLElement title prototype override
All of the setters/getters have been migrated to
UI.Tooltip.Tooltip.{install/getContent} respectively.

R=jacktfranklin@chromium.org

Fixed: 1150762
Change-Id: I229bd9fbecd71b94d053e7325693e519de6a3897
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2562343
Commit-Queue: Tim van der Lippe <tvanderlippe@chromium.org>
Reviewed-by: Jack Franklin <jacktfranklin@chromium.org>
2020-11-30 13:07:48 +00:00
Jan Scheffler 89ad6d4b94 [Recorder] Add support for window.open
Bug: chromium:1152405
Change-Id: I443384c30838ab7c26f783898a5aa2c7cf4498c8
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2560938
Reviewed-by: Mathias Bynens <mathias@chromium.org>
Commit-Queue: Jan Scheffler <janscheffler@chromium.org>
2020-11-30 10:13:42 +00:00
Paul Lewis 295d63fe19 [unit test] Add debouncer test
R=jacktfranklin@chromium.org

Bug: 1153323
Change-Id: I5b642519a483680a80d2ba8e37b760ac245e4bc4
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2563623
Commit-Queue: Paul Lewis <aerotwist@chromium.org>
Reviewed-by: Jack Franklin <jacktfranklin@chromium.org>
2020-11-30 10:08:28 +00:00
Simon Zünd 8243768ee0 Introduce 'Report' component, intended to replace 'ReportView.js'
Screenshot for basic.html: https://imgur.com/a/HKlHFGh

R=jacktfranklin@chromium.org

Change-Id: Idd47a0978fbcba63fb847355032e6142e4145165
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2560754
Commit-Queue: Simon Zünd <szuend@chromium.org>
Reviewed-by: Jack Franklin <jacktfranklin@chromium.org>
2020-11-30 07:12:48 +00:00
Jack Franklin 37a96e449c Fix Linkifier opening example.com tab in unit tests
Turns out that naming it `-click` causes the event to not be prevented
default. Not sure exactly why, and can't really explain if this is
deliberate behaviour or a bug in something, but this fixes it.

Fixed: 1153344
Change-Id: I32336a1bd2f8d0b0592b788df8590b328a3a60ca
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2563821
Reviewed-by: Tim van der Lippe <tvanderlippe@chromium.org>
Commit-Queue: Jack Franklin <jacktfranklin@chromium.org>
2020-11-27 17:05:25 +00:00
Paul Lewis 97722fb574 [unit test] Add Base64 tests
R=tvanderlippe@chromium.org

Bug: 1153323
Change-Id: I11eb888780d1878065e7a92be858bd780d18c9f0
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2563622
Reviewed-by: Tim van der Lippe <tvanderlippe@chromium.org>
Reviewed-by: Benedikt Meurer <bmeurer@chromium.org>
Commit-Queue: Paul Lewis <aerotwist@chromium.org>
2020-11-27 15:56:15 +00:00
Jack Franklin b70fe2a000 Remove all existing _bridge.js files
Follow-up CL will remove the bridge generation code completely!

Bug: 1130536
Change-Id: Ie0a3a5a647e5f786c91205d1198f1b1b90fdb6ff
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2562711
Reviewed-by: Jack Franklin <jacktfranklin@chromium.org>
Reviewed-by: Paul Lewis <aerotwist@chromium.org>
Commit-Queue: Jack Franklin <jacktfranklin@chromium.org>
Auto-Submit: Jack Franklin <jacktfranklin@chromium.org>
2020-11-27 12:21:36 +00:00
Changhao Han 45d8473c1a Remove deprecated CSS Grid UMAs
The removed UMAs include:
CSSGridSettings
GridOverlayOpenedFrom
HighlightedPersistentCSSGridCount

Bug: chromium:1138261, chromium:1138260, chromium:1138259
Change-Id: Ic17695b2b5efaff1e5e52d4d0a4e81309c282146
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2562700
Reviewed-by: Jack Franklin <jacktfranklin@chromium.org>
Reviewed-by: Alex Rudenko <alexrudenko@chromium.org>
Reviewed-by: Patrick Brosset <patrick.brosset@microsoft.com>
Commit-Queue: Changhao Han <changhaohan@chromium.org>
2020-11-27 12:18:16 +00:00
Jack Franklin 086ccd5a7a Enable test_suite to take a configurable server type.
As part of the work to enable Puppeteer component tests, we need to
configure the test suite to run either the hosted mode server or the
component docs server. This CL updates it to take a flag, and makes some
updates to the component docs server, which now has to run either
directly or in the out/Default/gen directory depending on how it is run.

I suspect I'll make a follow up CL to always run the component server in
out/Default/gen, but for now enabling it to detect its context is the
quickest way to unblock running it in tests. The next CL will add a
component test suite that can run a basic test against the component doc
server, but I have manually verified locally that I can run tests
against that server.

Bug: 1153281
Change-Id: I55bda4edd0a983d03bfecff0446b0f3e3a008b52
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2562707
Reviewed-by: Paul Lewis <aerotwist@chromium.org>
Commit-Queue: Jack Franklin <jacktfranklin@chromium.org>
2020-11-27 12:00:26 +00:00
Paul Lewis ae637c4969 Add support for Sinon in Karma
R=jacktfranklin@chromium.org

Change-Id: I88f21fd8e3533e0066d8a2a901be7d7c6c6cbb90
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2562710
Commit-Queue: Paul Lewis <aerotwist@chromium.org>
Reviewed-by: Jack Franklin <jacktfranklin@chromium.org>
2020-11-27 11:58:34 +00:00
Paul Lewis ab73c6f594 [unit test] Improve watcher & karma multirun
To date the Karma singleRun option has been set based on whether the
developer sets the DEBUG environment variable. This CL adds support for
an additional REPEAT environment variable, such that someone can run
multiple, non-debug (i.e., headless) test runs.

In order to make this more convenient, this CL also improves the watcher
script (`npm run watch`) such that it restarts autoninja whenever files
are changed.

Therefore a developer can now run:

`REPEAT=1 npm run auto-unittest` and `npm run watch` in conjunction, and
have the code be recompiled automatically, and the unit tests
(re)started.

R=jacktfranklin@chromium.org

Change-Id: I8cff9eb7d223a5325e952413ddd5c1f55dd8aec2
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2562709
Reviewed-by: Jack Franklin <jacktfranklin@chromium.org>
Commit-Queue: Paul Lewis <aerotwist@chromium.org>
2020-11-27 11:51:19 +00:00
Benedikt Meurer caac7f008d [refactor] Allow undefined for UI location columns.
Currently the devtools-frontend doesn't really distinguish between
UI locations that point to the first column (represented as column
number 0) and UI locations that refer to the whole line, and somehow
we managed to get away with this mixed state. But for the language
plugins to really provide a consistent stepping / breakpoint experience
we need to preserve the information of whether a location refers to the
whole line or to the first column.

The communication to the language plugin continues to pass numbers
for backwards compatibility, using `-1` to state the absence of
column information (i.e. indicating that the location refers to the
line as a whole).

Also-By: pfaffe@chromium.org
Bug: chromium:1153123, chromium:1055327
Change-Id: I030da16e34ac02c259bfd9539e50b77ca18347db
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2562350
Commit-Queue: Benedikt Meurer <bmeurer@chromium.org>
Auto-Submit: Benedikt Meurer <bmeurer@chromium.org>
Reviewed-by: Philip Pfaffe <pfaffe@chromium.org>
2020-11-27 09:21:44 +00:00
Alex Rudenko ae8a3322ee Merge grid & flex highlighers in one
Some logic requires the state of both the flex and
grid highlighters (setShowViewportSizeOnResize) so it
makes sense to combine the implementation in one class
given they are very similar. Additionally:

- extracted the new class into a separate file.
- added a basic unit test.
- enabled colors for flex containers.

Bug: 1150294
Change-Id: I84ae3dddcc758a3a55f849fa668c30c90e6075b3
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2560749
Commit-Queue: Alex Rudenko <alexrudenko@chromium.org>
Reviewed-by: Mathias Bynens <mathias@chromium.org>
Reviewed-by: Patrick Brosset <patrick.brosset@microsoft.com>
2020-11-27 08:52:24 +00:00
Jack Franklin aba88003dc [ESLint] enforce enum members are explicitly initialized
As per the DevTools style guide; this was a rule enforced previously by
the component bridges.

Bug: 1130536
Change-Id: I281f2d355a78dedd0433b7967f7b26e2e71c8791
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2562348
Commit-Queue: Jack Franklin <jacktfranklin@chromium.org>
Commit-Queue: Tim van der Lippe <tvanderlippe@chromium.org>
Auto-Submit: Jack Franklin <jacktfranklin@chromium.org>
Reviewed-by: Tim van der Lippe <tvanderlippe@chromium.org>
2020-11-26 17:03:13 +00:00
Kim-Anh Tran daebb8acce [LMI] Add dark theme support and other fixes
This adds support for the dark theme, and fixes a few issues in the
UX of the LinearMemoryViewer: alignment of addresses, font size of
addresses, and possibility to select the ascii values.

Before: https://imgur.com/a/6NxAPvP
After: https://imgur.com/a/kSquHMb

Bug: chromium:1110202
Change-Id: I43488447eec55c6c37762b5bd197196f79a6016c
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2557045
Commit-Queue: Kim-Anh Tran <kimanh@chromium.org>
Reviewed-by: Jack Franklin <jacktfranklin@chromium.org>
Reviewed-by: Benedikt Meurer <bmeurer@chromium.org>
2020-11-26 11:39:13 +00:00
Jack Franklin fb62f3e8a9 [New Linkifier] Add <devtools-linkifier> web component
This CL creates a new <devtools-linkifier> component that will eventually
replace the legacy linkifier code.

For now this component only supports taking a string URL, but in time (and as we
need) we can extend it to support all the inputs that the legacy Linkifier code
uses.

It works by emitting an event that is picked up by the legacy linkifier and
threaded through the legacy system.

Bug: 1149403
Change-Id: I76023052d818ab0f296db887fb03d6761ca4796b
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2558297
Commit-Queue: Jack Franklin <jacktfranklin@chromium.org>
Reviewed-by: Alfonso Castaño <alcastano@google.com>
Reviewed-by: Paul Lewis <aerotwist@chromium.org>
2020-11-26 09:48:03 +00:00
Sigurd Schneider 7b0711cb76 Show the initiator's network IP address space in the network panel
This is currently not showing up for all requests, as the back-end
implementation is WIP.

This helps debugging CORS RFC 1918 related problems.

Note for jec@: Don't include in what's new for M89.

Screenshot: https://imgur.com/a/Aa9nrxD
Bug: chromium:1128885
Change-Id: I3d63c3ef18b3d1f0b3eaad50373811a6d6df9544
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2557042
Commit-Queue: Sigurd Schneider <sigurds@chromium.org>
Reviewed-by: Wolfgang Beyer <wolfi@chromium.org>
2020-11-26 09:21:43 +00:00
Raphael Kubo da Costa 81585eced1 Rewrite some UI.Geometry.EulerAngles layout tests as unittests.
We already have some unittests in the tree; rewrite some layout tests that
are currently in Chromium in
third_party/blink/web_tests/http/tests/devtools/components/geometry.js so
that we can change the API more easily. This will make fixing bug 1137281
simpler.

Bug: chromium:1137281
Change-Id: I5d2a61f166b134ea53ab4094fa179efdb5d60a8d
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2560943
Auto-Submit: Raphael Kubo da Costa <raphael.kubo.da.costa@intel.com>
Reviewed-by: Paul Lewis <aerotwist@chromium.org>
Commit-Queue: Paul Lewis <aerotwist@chromium.org>
2020-11-25 19:16:40 +00:00
Benedikt Meurer 25e20494db [cleanup] Remove Gimli based DWARF prototype.
The `WasmSourceMap` approach was used as a proof of concept and served
us well, but hasn't been tested heavily lately, and is not functioning
properly anymore, so drop it in favor of the debugger language plugins.

Bug: chromium:1083146
Fixed: chromium:1152732
Tbr: aerotwist@chromium.org
Change-Id: If2191aa8a2f396136d332ed9b508168f3dc80e2c
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2560244
Commit-Queue: Benedikt Meurer <bmeurer@chromium.org>
Reviewed-by: Benedikt Meurer <bmeurer@chromium.org>
Reviewed-by: Philip Pfaffe <pfaffe@chromium.org>
2020-11-25 16:15:25 +00:00
Alex Rudenko c1b7aa6983 Extract OverlayColorGenerator to a separate file
Extracting OverlayColorGenerator to make the OverlayModel.js a bit
shorter + adding a test.

Change-Id: I5d1d4472fbdbbf6ef41f2359da13bf14d53c965d
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2560940
Reviewed-by: Jan Scheffler <janscheffler@chromium.org>
Reviewed-by: Patrick Brosset <patrick.brosset@microsoft.com>
Commit-Queue: Alex Rudenko <alexrudenko@chromium.org>
2020-11-25 16:00:47 +00:00
Alex Rudenko b383a8e919 Change _previouslyRecordedGridCountNodeIds to be a Set
Change-Id: I2c7d57eafb5985e356e14a83bcba179e17a7aaf4
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2560939
Commit-Queue: Alex Rudenko <alexrudenko@chromium.org>
Reviewed-by: Mathias Bynens <mathias@chromium.org>
Reviewed-by: Jan Scheffler <janscheffler@chromium.org>
2020-11-25 15:06:47 +00:00
Jack Franklin 982e9db7e7 [DataGrid] support filter parser input
`TextUtils.FilterParser` is commonly used to parse user input into a
series of filters. This CL updates the new data-grid-controller so it
can take the result of parsing user input into an array of parsed
filters. This means we can hook it up to existing input boxes in
DevTools and unblocks us landing the new data grid into the protocol
monitor.

Bug: 1125968
Change-Id: I45896796d7e7cc720d22c48b65325fb099115da8
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2560237
Commit-Queue: Jack Franklin <jacktfranklin@chromium.org>
Reviewed-by: Paul Lewis <aerotwist@chromium.org>
2020-11-25 13:32:47 +00:00
Jack Franklin 9b379936ba [DarkMode]: rename patchThemeSupport to enableLegacyPatching
This aligns the flag with the changes we've made to appendStyle() and so
on which all use `enableLegacyPatching` to toggle the legacy color
patching functionality.

Bug: 1122511
Change-Id: I58b246c0652c429de92d72d50d11e2b19f7c56aa
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2560242
Reviewed-by: Paul Lewis <aerotwist@chromium.org>
Commit-Queue: Jack Franklin <jacktfranklin@chromium.org>
Auto-Submit: Jack Franklin <jacktfranklin@chromium.org>
2020-11-25 12:37:47 +00:00
Alex Rudenko 90f246f942 Allow expanding/collapsing details in the Layout panel using arrow keys
Fixed: 1151831
Change-Id: Ic1c7e61d4318e39fffae8a4a0f72aa256782ae95
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2560236
Commit-Queue: Alex Rudenko <alexrudenko@chromium.org>
Reviewed-by: Mathias Bynens <mathias@chromium.org>
Reviewed-by: Changhao Han <changhaohan@chromium.org>
2020-11-25 11:47:07 +00:00
Jan Scheffler f2697b185f [Storage] Only delete first party cookies by default
This cl changes the default behaviour of removing all cookies that are
somehow related to the current page when clicking the "Clear site data"
button in the Storage tab of the Application panel. This lead to people
unexpectedly removing their session cookies on third party websites like
Google or Facebook when resources from them were included in the page.

To go back to the previous behaviour, this cl adds a checkbox next to
the button to also clear 3rd party cookies.

Screenshot: https://imgur.com/a/2PCz2gi
Bug:chromium:1012337
Change-Id: I171a6e3e07d56d5cbeafb0b2b030e3a5e24aad3b
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2537954
Commit-Queue: Jan Scheffler <janscheffler@chromium.org>
Reviewed-by: Alex Rudenko <alexrudenko@chromium.org>
Reviewed-by: Mathias Bynens <mathias@chromium.org>
2020-11-24 12:34:27 +00:00
Jan Scheffler a0a6edf5d0 [Recorder] Add support for iframes
Bug: chromium:1149302
Change-Id: Iaaea2c427cc69feca449b281e814ebd13317fcbb
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2540347
Commit-Queue: Jan Scheffler <janscheffler@chromium.org>
Reviewed-by: Mathias Bynens <mathias@chromium.org>
2020-11-24 10:36:37 +00:00
Jan Scheffler 3269f83be4 [Cookies] Add option to show url decoded cookies
Screenshot: https://i.imgur.com/7F1HuAk.png
Bug: chromium:997625
Change-Id: Iddc79e634f3d7ad4d65ff140a6c5967d65da3153
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2534205
Commit-Queue: Jan Scheffler <janscheffler@chromium.org>
Reviewed-by: Sigurd Schneider <sigurds@chromium.org>
2020-11-24 09:09:07 +00:00
vidorteg db2ae52de1 Fixes i18n logs show on unit tests.
Issue:
Some i18n logs were showing up on unit tests(Karma) runs.

Root:
Karma infrastructure registers the locale but it does not consume the resource file.

Fix:
Karma test infrastucture needs to consume the resources file: en-US.json

Change-Id: Iaf69334bc8a16e850593c8a6e395b97c6014be53
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2551392
Reviewed-by: Jack Franklin <jacktfranklin@chromium.org>
Commit-Queue: Vidal Diazleal <vidorteg@microsoft.com>
2020-11-23 17:12:46 +00:00