Commit Graph
1356 Commits
Author SHA1 Message Date
Paul Lewis 75090cfd93 Reland "Updates node_modules and update script"
This is a reland of 4df552c652

Original change's description:
> Updates node_modules and update script
> 
> Change-Id: I3fcf49bc416301a030d298cfc48c448bfeba4335
> Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/1878808
> Reviewed-by: Tim van der Lippe <tvanderlippe@chromium.org>
> Reviewed-by: Yang Guo <yangguo@chromium.org>
> Commit-Queue: Paul Lewis <aerotwist@chromium.org>

Change-Id: I97d1442c21420488fadde3f17f67cd4e3b959be6
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/1880030
Commit-Queue: Paul Lewis <aerotwist@chromium.org>
Reviewed-by: Yang Guo <yangguo@chromium.org>
2019-10-25 13:19:06 +00:00
Sigurd Schneider d3ddd33257 [bindings] Fix location translation for inline script with #sourceURL=
Translation between source locations of inline scripts with #sourceURL=
did not work correctly, because the SourceFormatter handled them like
inline scripts. DevTools opens them in its own window, and then
continues to refer to locations in the file by the original positions
in the containing document; however, the line endings used for
formatting are line endings for the script only (in contrast to line
endings for other inline scripts, which just reuse the line endings
of the containing document).

This CL adds a hack to handle inline scripts with #sourceURL= separately
which entails that the SourceFormatter now also needs to know that
such scripts are displayed in their own frame (as it is supposed to
produce valid uiLocations). A redesign at some point in the future must
clean this up; at the moment only fragmental knowledge about how this is
supposed to work exists.

Bug: chromium:1003497, chromium:1005789
Fixes: chromium:1017738
Change-Id: I3e13c6bc76b8692ce6badc09880c41d1a7e444c4
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/1875713
Commit-Queue: Sigurd Schneider <sigurds@chromium.org>
Reviewed-by: Benedikt Meurer <bmeurer@chromium.org>
2019-10-25 09:06:15 +00:00
Yang Guo 821269c8f7 Roll protocol changes
- extend enum Security.SecurityState by insecure-broken

TBR=bmeurer@chromium.org

Change-Id: I0d915e995c533af864c48a5dcb4b05d65c6bb1f8
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/1880028
Reviewed-by: Yang Guo <yangguo@chromium.org>
Commit-Queue: Yang Guo <yangguo@chromium.org>
2019-10-25 05:38:35 +00:00
Paul Irish 33455d1c48 Restore OWNERS for audits folders
Added in crrev.com/680690, but lost in the move

Bug: none
Change-Id: I77260b15817999e95b4f2a0c1b01228b94fd799c
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/1880293
Auto-Submit: Paul Irish <paulirish@chromium.org>
Reviewed-by: Yang Guo <yangguo@chromium.org>
Commit-Queue: Yang Guo <yangguo@chromium.org>
2019-10-25 03:31:45 +00:00
Michael Liao 5be6234e05 DevTools [Console]: Refocus create live expression button after removing pin
Re-upload of https://chromium-review.googlesource.com/c/chromium/src/+/1865615 to new repository

Issue:
- Focus disappears after removing an expression in the "Create Live Expression" field

Changes:
- Passing in the "Create Live Expression" button to the console pin pane
- Auto-focusing the create live expression button upon deleting a live expression

GIF:
https://imgur.com/irtTu6s

Bug: 963183
Change-Id: I2a827ea364785e4a660434f764dccf96f99767c6
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/1872448
Commit-Queue: Michael Liao <michael.liao@microsoft.com>
Reviewed-by: Lorne Mitchell <lomitch@microsoft.com>
2019-10-24 22:54:30 +00:00
Michael Liao 80bf08892e DevTools [Network]: Restoring focus on search toggle button after closing Network search sidepanel
Issue:
- Focus is lost after closing the Network search sidepanel

Changes:
- After closing the network sidepanel, focus is restored to the search toggle toolbar button

GIF:
https://imgur.com/rGWuNZS

Bug: 963183
Change-Id: I520df0ef0e93d1beb70885ef205ef6f230ee43be
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/1876842
Commit-Queue: Michael Liao <michael.liao@microsoft.com>
Reviewed-by: Lorne Mitchell <lomitch@microsoft.com>
Reviewed-by: Brian Cui <brcui@microsoft.com>
2019-10-24 22:53:25 +00:00
Lorne Mitchell db3885dd80 Revert "Updates node_modules and update script"
This reverts commit 4df552c652.

Reason for revert: Breaks esprima.

Original change's description:
> Updates node_modules and update script
> 
> Change-Id: I3fcf49bc416301a030d298cfc48c448bfeba4335
> Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/1878808
> Reviewed-by: Tim van der Lippe <tvanderlippe@chromium.org>
> Reviewed-by: Yang Guo <yangguo@chromium.org>
> Commit-Queue: Paul Lewis <aerotwist@chromium.org>

TBR=yangguo@chromium.org,aerotwist@chromium.org,tvanderlippe@chromium.org

Change-Id: Iad2bcdf98a486476715d1e829cdce450c5f218af
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/1880098
Reviewed-by: Lorne Mitchell <lomitch@microsoft.com>
Commit-Queue: Lorne Mitchell <lomitch@microsoft.com>
2019-10-24 21:53:24 +00:00
Paul Lewis 4df552c652 Updates node_modules and update script
Change-Id: I3fcf49bc416301a030d298cfc48c448bfeba4335
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/1878808
Reviewed-by: Tim van der Lippe <tvanderlippe@chromium.org>
Reviewed-by: Yang Guo <yangguo@chromium.org>
Commit-Queue: Paul Lewis <aerotwist@chromium.org>
2019-10-24 14:48:04 +00:00
Yang Guo 28ce546431 Roll protocol changes
- Make CacheStorage.requestEntries params optional

TBR=janscheffler@chromium.org

Change-Id: If520df797687656fa17d5314fe60ad91796507a4
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/1878807
Reviewed-by: Yang Guo <yangguo@chromium.org>
Commit-Queue: Yang Guo <yangguo@chromium.org>
2019-10-24 14:15:33 +00:00
Yang Guo fa871b62c0 Introduce script to roll into Chromium
R=machenbach@chromium.org

Change-Id: I12095ad6c5232314537d63edf5fffecc2e9fcb06
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/1876814
Commit-Queue: Yang Guo <yangguo@chromium.org>
Auto-Submit: Yang Guo <yangguo@chromium.org>
Reviewed-by: Michael Achenbach <machenbach@chromium.org>
2019-10-24 14:07:48 +00:00
Simon Zünd 910988b619 Evaluating snippets should use V8's REPL mode
This CL sets the 'replMode' flag of the 'Runtime.evaluate' CDP command
to true when evaluating snippets. The flag is currently ignored by V8.

R=petermarshall@chromium.org

Bug: chromium:1004193
Change-Id: Ia4101310593ee13d874d96aaa67c3c2c4e37a8c8
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/1876808
Reviewed-by: Peter Marshall <petermarshall@chromium.org>
Reviewed-by: Benedikt Meurer <bmeurer@chromium.org>
Commit-Queue: Benedikt Meurer <bmeurer@chromium.org>
Auto-Submit: Simon Zünd <szuend@chromium.org>
2019-10-24 09:50:58 +00:00
Michael Liao b186cfaa74 DevTools [Common - Infobar]: Making infobars SR accessible
Reupload of https://chromium-review.googlesource.com/c/chromium/src/+/1824277 to DevTools repository

Changes:
- Wrapping infobar in infobar div and setting element as an alert

Bug: 963183
Change-Id: I442f709bbdd3b6b9c6d3ff6cc801a7e4398e480f
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/1873140
Reviewed-by: Lorne Mitchell <lomitch@microsoft.com>
Commit-Queue: Michael Liao <michael.liao@microsoft.com>
2019-10-23 23:19:18 +00:00
Mandy Chen 1d6fff9e96 Reland "Localize Service Worker Version Status"
This is a reland of b34f300245
The issue is SDK was converted to esm and the old CL was out of date.
Built locally and verified that it worked.
Screenshot: https://imgur.com/Vf0cvNX

Original change's description:
> Localize Service Worker Version Status
>
> Service worker version status is sent through CDP and displayed directly
> to the user in DT. This CL localizes the status strings in the frontend.
>
> Location of the status string: https://imgur.com/X37F84p
> ServiceWorkerVersionStatus: https://chromedevtools.github.io/devtools-protocol/tot/ServiceWorker#type-ServiceWorkerVersionStatus
>
> Bug: 941561
> Change-Id: Id9a548cd9ae8a7c1ca9bca08647d75f94ea4145d
> Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/1874768
> Reviewed-by: Lorne Mitchell <lomitch@microsoft.com>
> Commit-Queue: Mandy Chen <mandy.chen@microsoft.com>

Bug: 941561
Change-Id: Id5a4f4a9821e66e21802599d036eb6a73310321d
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/1876987
Reviewed-by: Lorne Mitchell <lomitch@microsoft.com>
Commit-Queue: Mandy Chen <mandy.chen@microsoft.com>
2019-10-23 20:31:38 +00:00
Michael Liao ebb539c3b2 DevTools [Search]: making search tool keyboard navigable
Re-upload of https://chromium-review.googlesource.com/c/chromium/src/+/1819493 to the DevTools repository

Issue:
- Search tool is not keyboard accessible

Changes:
- First search result is selected by default
- Pressing enter on a search result will perform the navigation

Bug: 963183
Change-Id: I4fdaf44ed6aec75cac4a92ff163e1d3ea38058d8
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/1873129
Reviewed-by: Lorne Mitchell <lomitch@microsoft.com>
Commit-Queue: Michael Liao <michael.liao@microsoft.com>
2019-10-23 20:29:22 +00:00
Michael Liao f2ae96f53c DevTools [Layers]: Adding paint profiler link for sidepanel nodes
Re-upload of https://chromium-review.googlesource.com/c/chromium/src/+/1626027 to new repository

Issue:
- Paint profiler link is only available when selecting a node on the 3D canvas
- 3D canvas is only cursor accessible
Changes:
- Made Paint Profile tab keyboard accessible (via link and sidebar context menu)

Changing PaintProfilerLink from padding to margin (focus indicator):
https://imgur.com/a/B6kATQS

Bug: 963183
Change-Id: I79498b210539f9c2c8a114ef323f66f8baf61b92
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/1872877
Reviewed-by: Benedikt Meurer <bmeurer@chromium.org>
Commit-Queue: Michael Liao <michael.liao@microsoft.com>
2019-10-23 20:28:17 +00:00
Michael Liao 57c1e2466d DevTools [Layers]: 3D Canvas - Removing toggling and adding focus indicators
Re-upload of https://chromium-review.googlesource.com/c/chromium/src/+/1832734 to new repository

Changes:
- Removed "Shift" Pan/Rotate toggling functionality
- Adding focus indicators to 3D Canvas View
- Removed extraneous tab stop on toolbar/canvas view
- Removing focus shift when setting modes (provides better focus logic)

Reasoning for removing toggling functionality:
- It is buggy (https://imgur.com/uzjL1Rh)
- Need to account for edge cases (holding down shift with focus on another window, then releasing shift on the layers tool will result changing the Pan/Rotate mode)
- "X" (Pan) and "V" (Rotate) already provide the same functionality as toggling

Focus Indicators:
https://imgur.com/IMPdIME

Bug: 963183
Change-Id: I0c0a4eea065f466c9de69a2134339dd87197d4c5
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/1873126
Reviewed-by: Robert Paveza <Rob.Paveza@microsoft.com>
Reviewed-by: Lorne Mitchell <lomitch@microsoft.com>
Commit-Queue: Michael Liao <michael.liao@microsoft.com>
2019-10-23 20:25:57 +00:00
Michael Liao 9c1e0ce471 DevTools [Network Conditions]: adding error text for network condition tool custom user agent text input
Re-upload of https://chromium-review.googlesource.com/c/chromium/src/+/1730131 to DevTools repository

Changes:
- added error text div and needed css
- adding value length checks on creation and input

**Note: the text now reads "Custom user agent field is required"
Image of error text:
https://imgur.com/8PI75T3

GIF of error text behavior:
https://imgur.com/o8oZvcW

New error element spacing:
https://imgur.com/hE3Xmli

Bug: 963183
Change-Id: Ib5776ae72d4abaabf03efce5838ddb731283c0ab
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/1871820
Reviewed-by: Lorne Mitchell <lomitch@microsoft.com>
Commit-Queue: Michael Liao <michael.liao@microsoft.com>
2019-10-23 20:24:47 +00:00
Michael Liao b40436cf16 DevTools [Performance]: making the timeline history button accessible
Re-upload of https://chromium-review.googlesource.com/c/chromium/src/+/1658590 to new repository

Changes:
- Adding focus indicator to Timeline History dropdown button
- Labelling Timeline History dropdown as a menu button
- Can now tab to cancel out of dropdown menu

Button Focus in Light and Dark themes:
Before:
https://imgur.com/a/LMhRSQp
After:
https://imgur.com/a/dOuq6hC

.content margin before/after:
https://imgur.com/a/wHCyWOT

Button Focus left/right change before/after:
https://imgur.com/jE8sasz

Bug: 963183
Change-Id: I7453946c7688fb885a9745ef12c1f4ae3eae95f9
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/1871818
Commit-Queue: Michael Liao <michael.liao@microsoft.com>
Reviewed-by: Lorne Mitchell <lomitch@microsoft.com>
2019-10-23 20:22:17 +00:00
Lorne Mitchell d45051a43c Revert "Localize Service Worker Version Status"
This reverts commit b34f300245.

Reason for revert: <INSERT REASONING HERE>

Original change's description:
> Localize Service Worker Version Status
> 
> Service worker version status is sent through CDP and displayed directly
> to the user in DT. This CL localizes the status strings in the frontend.
> 
> Location of the status string: https://imgur.com/X37F84p
> ServiceWorkerVersionStatus: https://chromedevtools.github.io/devtools-protocol/tot/ServiceWorker#type-ServiceWorkerVersionStatus
> 
> Bug: 941561
> Change-Id: Id9a548cd9ae8a7c1ca9bca08647d75f94ea4145d
> Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/1874768
> Reviewed-by: Lorne Mitchell <lomitch@microsoft.com>
> Commit-Queue: Mandy Chen <mandy.chen@microsoft.com>

TBR=lomitch@microsoft.com,mandy.chen@microsoft.com

Change-Id: Ibdc7754eb2643cf04c252ff056d539ea125490b4
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: 941561
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/1876827
Reviewed-by: Lorne Mitchell <lomitch@microsoft.com>
Commit-Queue: Lorne Mitchell <lomitch@microsoft.com>
2019-10-23 17:30:43 +00:00
Mandy Chen b34f300245 Localize Service Worker Version Status
Service worker version status is sent through CDP and displayed directly
to the user in DT. This CL localizes the status strings in the frontend.

Location of the status string: https://imgur.com/X37F84p
ServiceWorkerVersionStatus: https://chromedevtools.github.io/devtools-protocol/tot/ServiceWorker#type-ServiceWorkerVersionStatus

Bug: 941561
Change-Id: Id9a548cd9ae8a7c1ca9bca08647d75f94ea4145d
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/1874768
Reviewed-by: Lorne Mitchell <lomitch@microsoft.com>
Commit-Queue: Mandy Chen <mandy.chen@microsoft.com>
2019-10-23 16:47:10 +00:00
Paul Lewis 8b6f305d27 Fixes builds for Mac
The gn gen out/Default command currently fails on Mac, because it does
not get the use_system_xcode value by default. This arg is only used
for iOS dev in Chromium AFAICT, so this CL defaults it to true.

Change-Id: I4a2f407ab29adedcd849001d91cbb34b8a1c6992
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/1875712
Reviewed-by: Tim van der Lippe <tvanderlippe@chromium.org>
Commit-Queue: Paul Lewis <aerotwist@chromium.org>
2019-10-23 15:50:00 +00:00
Paul Lewis 12bc63edcd [CSS Overview] Adds support for fill and border colors.
Change-Id: Iea5c20d1a7b6c3ae6673053e05ff52faee48e69f
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/1875709
Reviewed-by: Tim van der Lippe <tvanderlippe@chromium.org>
Commit-Queue: Paul Lewis <aerotwist@chromium.org>
2019-10-23 12:00:20 +00:00
Jan Scheffler eea0c81298 [network] Improve sorting by waterfall for network
This patch adds the waterfall column to the sort by context menu
and forces the waterfall column to start sorting ascending when
on first click.

Fixed: chromium:887880
Change-Id: Ic352cd4c6dae0372dd69f22405067ccaa94a34c5
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/1871564
Commit-Queue: Jan Scheffler <janscheffler@chromium.org>
Reviewed-by: Jan Scheffler <janscheffler@chromium.org>
Reviewed-by: Benedikt Meurer <bmeurer@chromium.org>
2019-10-23 11:49:10 +00:00
Simon Zünd f9215f693b Rebaseline a11y-axe-core layout tests
The a11y-axe-core layout tests in test/webtests are currently failing
when run with an up-to-date chromium checkout. The reason are missing
newlines. This CL fixes that.

Change-Id: I20cb84bc02dbbfd4c58dd3b3fa0bfb30a3a039f5
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/1875708
Auto-Submit: Simon Zünd <szuend@chromium.org>
Commit-Queue: Yang Guo <yangguo@chromium.org>
Reviewed-by: Yang Guo <yangguo@chromium.org>
2019-10-23 11:29:10 +00:00
Jan Scheffler 7dfab7e9be [devtools] Add Url and Path Column to Network Log
This patch allows removing the name column from the network
pane as long as one of (name,path,url) columns is still
visible.

This patch also adds a columnIndex parameter to DataGrid Cells
to make them aware of their column index. This is needed for
the group by frame toggle in the network pane to be able to add
the groups header to the first visible column.

Bug: chromium:993366
Change-Id: I864bdae899bba14514105095ebccbe732d1f9427
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/1872030
Commit-Queue: Jan Scheffler <janscheffler@chromium.org>
Reviewed-by: Yang Guo <yangguo@chromium.org>
2019-10-23 11:28:00 +00:00
Paul Lewis de0224ccdd [CSS Overview] Uses snapshot; adds element highlight
Change-Id: If58dd20c6f4b3c8f730b39c48c14826e402018a0
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/1873759
Reviewed-by: Tim van der Lippe <tvanderlippe@chromium.org>
Commit-Queue: Paul Lewis <aerotwist@chromium.org>
2019-10-23 09:55:00 +00:00
Jan Scheffler 3c77a59376 [network] Highlight selected request in overview
The selected request will be rendered slightly larger
and with a border around it.

Screenshot: https://imgur.com/a/kpbsQ9p
(The selected request can be found between 800ms and 900ms)

Fixed: 988253
Change-Id: I55755ebc650e858f2990f45423fe4a2440f4d4a5
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/1875707
Reviewed-by: Benedikt Meurer <bmeurer@chromium.org>
Commit-Queue: Jan Scheffler <janscheffler@chromium.org>
2019-10-23 09:09:57 +00:00
Paul Irish 17dac028e6 Update .npmignore post-repo-move
Change-Id: I4d7053150f5df015c88bdb3cadd3921a2f2fb613
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/1874672
Auto-Submit: Paul Irish <paulirish@chromium.org>
Reviewed-by: Mathias Bynens <mathias@chromium.org>
Reviewed-by: Yang Guo <yangguo@chromium.org>
Commit-Queue: Yang Guo <yangguo@chromium.org>
2019-10-23 08:51:49 +00:00
Yang Guo ef7c70f411 Roll protocol changes
- Runtime.evaluate adds optional replMode parameter

R=szuend@chromium.org

Change-Id: I0f12108ebbfe1620457cb718424d19b5d966192c
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/1875727
Auto-Submit: Yang Guo <yangguo@chromium.org>
Commit-Queue: Simon Zünd <szuend@chromium.org>
Reviewed-by: Simon Zünd <szuend@chromium.org>
2019-10-23 08:06:57 +00:00
Simon Zünd 53a8548ce0 Console command evaluation should use V8's REPL mode
This CL sets the 'replMode' flag in the CDP 'evaluate' command when
evaluating console expressions. The 'replMode' is not yet implemented
and the 'replMode' flag is currently ignored by V8.

This CL is a re-upload of https://crrev.com/c/1864990.

R=petermarshall@chromium.org

Bug: chromium:1004193
Change-Id: I5db6981d7df7ce8a30748313bf4a78d3ceeb3d93
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/1872591
Auto-Submit: Simon Zünd <szuend@chromium.org>
Reviewed-by: Peter Marshall <petermarshall@chromium.org>
Reviewed-by: Benedikt Meurer <bmeurer@chromium.org>
Commit-Queue: Benedikt Meurer <bmeurer@chromium.org>
2019-10-23 07:14:27 +00:00
Mike Jackson 2060e72751 Harden Common.ResourceType.fromMimeType
In cases where a network request is blocked or cancelled,
the mimeType field remains 'undefined' because the
'responseReceived' event is never raised.

Common.ResourceType.fromMimeType requires that a valid
string is passed in, but there are instances where that
is not true. Instead of propagating logic like this:

  Common.ResourceType.fromMimeType(mimeType || '')

this change proposes that we harden the function to
handle this case.

Change-Id: Ieee1152e8a45aff24c90da7095413f816b83850c
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/1874335
Commit-Queue: Mike Jackson <mjackson@microsoft.com>
Reviewed-by: Benedikt Meurer <bmeurer@chromium.org>
2019-10-23 06:03:57 +00:00
Christy Chen af5fdf3a96 DevTools: Update Snippets context menu text
Ported from CL
https://chromium-review.googlesource.com/c/chromium/src/+/1854244

Update Snippets menu text from "New" to "Create new snippet" to improve
the context of the action and localizability.

https://imgur.com/a/2rbupBD

Bug: 941561
Change-Id: I4dbfc2307c83e5714d81364c6b4e55402583dcdf
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/1874338
Reviewed-by: Lorne Mitchell <lomitch@microsoft.com>
Commit-Queue: Christy Chen <chrche@microsoft.com>
2019-10-23 00:03:22 +00:00
Junyi Xiao 57f033561f Devtools: Add aria-label for tab panel view container
Issue: tab panel relies on its view container to set the default focus on initial
load or capture focus in the case of losing focus, since it doesn't have an aria
label, screen reader reads out the whole content of the tab panel.

This change add an aria-label for each view container as "${tab-title} panel".


Bug: 963183
Change-Id: Id17b9c259b35c61a1f6cf0035ef206b2c2f2e2d1
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/1871822
Reviewed-by: Lorne Mitchell <lomitch@microsoft.com>
Commit-Queue: Junyi Xiao <juxiao@microsoft.com>
2019-10-22 18:17:22 +00:00
Rob Paveza ff7f57bab9 DevTools: Elements renderer shouldn't raise errors
Occasionally, the DevTools frontend will attempt to render an
element which has gone away in between the initial notification
and a later render (such as an expansion to show that element).
In cases like these, the renderer will throw an exception (it will
actually return a rejected promise, but these are functionally
equivalent). However, the render function contract already does
not guarantee that it will return a concrete value, and the only
two call sites that care about it already check for that case.

Because these error cases are unobserved, these cases are ignored,
and so the code paths should be removed.

Change-Id: I9ad444b130ab80779daa41edd9fcf03815a6a720
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/1872432
Commit-Queue: Lorne Mitchell <lomitch@microsoft.com>
Reviewed-by: Lorne Mitchell <lomitch@microsoft.com>
Reviewed-by: Brandon Goddard <brgoddar@microsoft.com>
2019-10-22 17:35:32 +00:00
Yang Guo c39b45a505 Revert "[sources] Fix raw<->UI location mapping for formatted inline scripts."
This reverts commit 2c3fbc1c99.

Reason for revert: test failure: https://ci.chromium.org/p/devtools-frontend/builders/ci/DevTools%20Linux/b8898896189013659616

Original change's description:
> [sources] Fix raw<->UI location mapping for formatted inline scripts.
> 
> For formatted inline scripts we also need to take into account the
> script line and column offsets to get the mapping correct, otherwise
> stepping and breakpoints will not work correctly.
> 
> Bug: chromium:1003497
> Change-Id: I85caec550ce66823f7d48fdf3881c22cfc936b8b
> Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/1873745
> Reviewed-by: Yang Guo <yangguo@chromium.org>
> Commit-Queue: Benedikt Meurer <bmeurer@chromium.org>

TBR=yangguo@chromium.org,bmeurer@chromium.org

Change-Id: I49e37efbe291ff1c8db48ff114a0a10a044a0747
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: chromium:1003497
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/1873749
Reviewed-by: Yang Guo <yangguo@chromium.org>
Commit-Queue: Yang Guo <yangguo@chromium.org>
2019-10-22 13:21:04 +00:00
Benedikt Meurer 2c3fbc1c99 [sources] Fix raw<->UI location mapping for formatted inline scripts.
For formatted inline scripts we also need to take into account the
script line and column offsets to get the mapping correct, otherwise
stepping and breakpoints will not work correctly.

Bug: chromium:1003497
Change-Id: I85caec550ce66823f7d48fdf3881c22cfc936b8b
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/1873745
Reviewed-by: Yang Guo <yangguo@chromium.org>
Commit-Queue: Benedikt Meurer <bmeurer@chromium.org>
2019-10-22 12:40:44 +00:00
Ingvar Stepanyan b532f3f71f Fix ignoring files in PRESUBMIT on Windows
When comparing filenames, PRESUBMIT didn't exclude files listed in .eslintignore from formatting, because .eslintignore contains forward slashes, but all the files are using native OS-level slashes, so any comparisons failed.

This fixes it by normalising all paths found in .eslintignore.

Change-Id: I9f5cd3cbf15b4b27677968747cf349cde2aed1b3
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/1872596
Auto-Submit: Ingvar Stepanyan <rreverser@google.com>
Reviewed-by: Tim van der Lippe <tvanderlippe@chromium.org>
Reviewed-by: Yang Guo <yangguo@chromium.org>
Commit-Queue: Yang Guo <yangguo@chromium.org>
2019-10-22 12:23:44 +00:00
Michael Achenbach 1473de827c Whitespace change to test bots
This also makes the whitespace file a data deps to force running
swarming tests on whitespace changes.

Change-Id: Ib71180609efca36ff78bc4339c6cccf1e90c673e
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/1872589
Reviewed-by: Yang Guo <yangguo@chromium.org>
Commit-Queue: Michael Achenbach <machenbach@chromium.org>
2019-10-22 12:20:54 +00:00
Yang Guo 8b7e69e7eb Extend README.md by instructions to integrate standalone checkout
R=mathias@chromium.org

Change-Id: Ie112adac4045a23f922d2610e9d068c06dedbe3c
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/1872586
Reviewed-by: Mathias Bynens <mathias@chromium.org>
Commit-Queue: Yang Guo <yangguo@chromium.org>
2019-10-22 09:29:44 +00:00
Yang Guo bc28f9bda0 Remove test/webtests/PRESUBMIT.py
Most checks do not apply to devtools-frontend, or require dependencies

R=szuend@chromium.org

Change-Id: I8aa887b886856088697d9c2501bb851670db798b
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/1872588
Reviewed-by: Simon Zünd <szuend@chromium.org>
Commit-Queue: Yang Guo <yangguo@chromium.org>
2019-10-22 08:57:04 +00:00
Rob Paveza acb77af66d DevTools: Improper function call in Styles pane
A bug in the Styles pane exists due to un-followed typing within
the _setActiveProperty function. The line previous to the expression
in question goes through treeElement.property, which is a
StylePropertyTreeElement. Its property `ownerStyle` returns an
SDK.CSSStyleDeclaration. We can see that SDK.CSSStyleDeclaration is
initialized with a property `parentRule` of type SDK.CSSRule, which
is the inferred type of `rule` in the outcome of the line in question.
However, SDK.CSSRule does not contain a member function called
`selectorText()`; only SDK.CSSStyleRule does.

Ostensibly it's possible that this is of type CSSKeyframesRule or
CSSKeyframeRule, and neither of these contains meaningful definitions
of something that matches a "selector," so it isn't really practically
possible to address via polymorphism.

This corrects the value-check and only calls the function if the
rule in question is of type SDK.CSSStyleRule.

Change-Id: I960e2b49ce9734134b55007149a39a97861739dd
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/1872447
Reviewed-by: Lorne Mitchell <lomitch@microsoft.com>
Commit-Queue: Lorne Mitchell <lomitch@microsoft.com>
2019-10-21 23:22:14 +00:00
Rob Paveza 027399473a DevTools: Don't scrollIntoView non-Element nodes
During search in the Elements pane, it's possible and likely
common that users might enter some search term that would match nodes
which may not be scrolled-to, such as CDATA nodes, comments, or other
types. That's because, as opposed to the "Scroll Into View" context
menu item which guards on the types of nodes, the searcher just
indiscriminately tells the page to scroll the node in. Rather than
addressing that issue in the caller, this change guards that from
happening by calling to the page.

Also: Presubmit check wants newline at EOF.
Change-Id: I6c6501b7a88c7de894a97957029be268aaa43753
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/1871821
Reviewed-by: Lorne Mitchell <lomitch@microsoft.com>
Commit-Queue: Lorne Mitchell <lomitch@microsoft.com>
2019-10-21 23:20:24 +00:00
Rob Paveza f4ef6c7416 DevTools: Error for Tooltip in altered DOM
When the DOM is mutating and the user is hovering over the
DOM tree, because the tooltip to display is fetched and displayed
asynchronously, there is a race condition in which the tree
element may be removed from the DOM and the time the pop-over is
ready to display. In this case, the <li> in the DOM may fail to
be found, and therefore an exception may be raised. Although
the typings for this are indicated in the DOM Node prototype
addition (enclosingNodeOrSelfWithNodeName), in that the function
might return a null-value, that case wasn't previously handled
in this code path.

Change-Id: I0fcb3f13431b29894e3830ae801ec6a4a9305a26
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/1872444
Reviewed-by: Lorne Mitchell <lomitch@microsoft.com>
Reviewed-by: John Emau <John.Emau@microsoft.com>
Commit-Queue: John Emau <John.Emau@microsoft.com>
2019-10-21 22:56:24 +00:00
Rob Paveza 4bf2164e8d DevTools: Defensive guard of Elements search results
There is a race condition between dismissing search and stepping
search which occasionally results in an unhandled exception having
been raised. Most of the code paths dealing with search in Elements
panel already defensively code against this; this change adds similar
tests in the unguarded code paths to what already exists, and alters
the declaration of the search-results variable so that Closure would
have correctly detected this condition previously.

Change-Id: I929b0851a5770fb26b1f73c682b86a7686a7ee80
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/1872879
Reviewed-by: John Emau <John.Emau@microsoft.com>
Reviewed-by: Lorne Mitchell <lomitch@microsoft.com>
Commit-Queue: John Emau <John.Emau@microsoft.com>
2019-10-21 22:06:14 +00:00
Rob Paveza f660ead418 DevTools: Race condition crash on HTML edit/resize
In the Elements tool, there is a race condition that can occur
between the deletion of the HTML editor component and the resize
logic, the latter of which unconditionally accesses the HTML
editor without checking to see whether it's present.

This change adds a declaration of the HTML editor element as a
member of Elements.ElementsTreeElement (so that Closure will
typecheck it), and guards against this particular error from
occurring.

Bug: 1016391
Change-Id: I323fe5a14caebcc0dd05546045a0b08d9c5dc604
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/1872387
Commit-Queue: John Emau <John.Emau@microsoft.com>
Reviewed-by: John Emau <John.Emau@microsoft.com>
Reviewed-by: Lorne Mitchell <lomitch@microsoft.com>
2019-10-21 22:04:24 +00:00
Yang Guo 40160c594d Make ENG_REVIEW_OWNERS consistent with proposed review guidelines
Change-Id: I7388e0e9e286c34a7b8a3b86c11a9e7f74306891
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/1871561
Commit-Queue: Yang Guo <yangguo@chromium.org>
Auto-Submit: Yang Guo <yangguo@chromium.org>
Reviewed-by: Benedikt Meurer <bmeurer@chromium.org>
2019-10-21 18:13:43 +00:00
Jan Scheffler 3d970e3f33 Reland "[devtools] Add Url and Path Column to Network Log"
This is a reland of 12915a6957ebe9ca20ef30c0e5141ad1dee87a7d

Original change's description:
> [devtools] Add Url and Path Column to Network Log
>
> This patch adds url and path as available columns to
> the network log view and allows the name to be removed
> because it is not needed if the user decides to show
> the path or the whole url.
>
> Bug: chromium:993366
> Change-Id: Ib4600d1631bd436cb3c8b8e79b3709dddc38b166
> Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1809161
> Reviewed-by: Yang Guo <yangguo@chromium.org>
> Commit-Queue: Jan Scheffler <janscheffler@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#698891}

Bug: chromium:993366
Change-Id: I0061afbb7bdbc03cf3a7bd567530d21b66fa6d30
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1823859
Reviewed-by: Benedikt Meurer <bmeurer@chromium.org>
Commit-Queue: Benedikt Meurer <bmeurer@chromium.org>
Cr-Original-Commit-Position: refs/heads/master@{#707746}
Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src
Cr-Mirrored-Commit: 923cd866fb089619bbbd971ff16cd7d766c1fb67
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/1871557
Reviewed-by: Yang Guo <yangguo@chromium.org>
Commit-Queue: Sigurd Schneider <sigurds@chromium.org>
2019-10-21 15:25:43 +00:00
Sigurd Schneider 4a1e8c7288 [coverage] Only support coverage-on-reload
This CL removes the ability to toggle coverage recording without
a reload, as best-effort coverage is not reliable due to lite mode:
Functions may be reported as uncovered if their execution is was
some time ago, and GC cleaned them up.

Bug: chromium:1004203
Change-Id: Ie6dd50f7eff71a264486fcce88699b974df8c36c
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/1871558
Reviewed-by: Yang Guo <yangguo@chromium.org>
Commit-Queue: Sigurd Schneider <sigurds@chromium.org>
2019-10-21 14:23:52 +00:00
Mathias Bynens 032591d692 Fix formatting
Running `npm run format-py` on a fresh checkout results in some
changes. This patch commits those changes so that they do not
become part of unrelated CLs.

Change-Id: Ie8051c7907ac9624e9fe870e2137b9a9fe2769c3
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/1871869
Auto-Submit: Mathias Bynens <mathias@chromium.org>
Reviewed-by: Yang Guo <yangguo@chromium.org>
Commit-Queue: Mathias Bynens <mathias@chromium.org>
2019-10-21 13:02:51 +00:00
Mathias Bynens 544479c489 Remove broken link
beverloo@ is no longer maintaining the feeds. The link results in
a certificate error. This patch removes the broken link.

Change-Id: Id3d75ba1cfa1556b8305c03158f25fb0e950f85f
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/1871872
Commit-Queue: Mathias Bynens <mathias@chromium.org>
Reviewed-by: Yang Guo <yangguo@chromium.org>
Reviewed-by: Peter Beverloo <peter@chromium.org>
Auto-Submit: Mathias Bynens <mathias@chromium.org>
2019-10-21 12:59:51 +00:00