Commit Graph
19 Commits
Author SHA1 Message Date
Tim van der Lippe 2e38eeaf9f Remove all comments with only the unrestricted annotation
The unrestricted annotation is Closure-specific and can be removed.
This patch removes all comments with only the unrestricted annotation
in them.

R=szuend@chromium.org

No-Presubmit: True
Bug: 1011811
Change-Id: Iba0723644f53f5307c3077d341271af86becc32a
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2569758
Commit-Queue: Tim van der Lippe <tvanderlippe@chromium.org>
Reviewed-by: Simon Zünd <szuend@chromium.org>
Auto-Submit: Tim van der Lippe <tvanderlippe@chromium.org>
2020-12-02 15:25:32 +00:00
Tim van der Lippe 3fa8654ce6 [DarkMode] Migrate files without color definitions
For all of these files, there was no occurrence of the word "color"
in them. Therefore, most of these files were complete noops.

There were two exceptions: some white backgrounds and a box shadow
used for image previews in the sources panel. For the latter, a new
CSS variable is extracted into themeColors.css

R=jacktfranklin@chromium.org

Bug: 1152736
Change-Id: I40f2f1e28cc3c7038b831003f1eb32cc923b411a
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2567113
Reviewed-by: Jack Franklin <jacktfranklin@chromium.org>
Commit-Queue: Tim van der Lippe <tvanderlippe@chromium.org>
2020-12-02 14:52:49 +00:00
Simon Zünd e3a936941c TypeScript-ify ui/SearchableView.js
R=tvanderlippe@chromium.org

Bug: chromium:1011811
Change-Id: I29fa6cfa60cf2dc23a5a6ba96c5a0ce9e6336ebe
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2549600
Reviewed-by: Tim van der Lippe <tvanderlippe@chromium.org>
Commit-Queue: Simon Zünd <szuend@chromium.org>
2020-11-19 10:59:53 +00:00
Jack Franklin 71519f8efb Introduce enableLegacyPatching flag for CSS patching
As part of the dark mode migration we are adding
`enableLegacyPatching:true` to all call sites of `appendStyle` (and
related methods). If a user passes `false` for that flag, no CSS colour
patching will occur.

This CL is therefore a no-op from a user's perspective as we pass `true`
on every call to maintain existing behaviour, but once we start
migrating we will turn the option to `false`. Long term, once all code
is migrated and the old patching is removed, we will remove this flag
entirely once again.

Bug: 1122511
Change-Id: I76b818e83b7d5ee0175e1548759373f53481e0ab
No-Presubmit: True
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2516345
Commit-Queue: Jack Franklin <jacktfranklin@chromium.org>
Reviewed-by: Tim van der Lippe <tvanderlippe@chromium.org>
2020-11-03 14:11:46 +00:00
Anthony Xie c11c15ecbf Fix search index for JSON sources when no match found
Previously the search index was being incorrectly set for
JSON sources with no match. It was being set to 0. This
resulted in search results showing "1 of 0". This was
fixed by setting the search index to -1 for no matches.

Before fix screenshot: https://imgur.com/a/yNzXNAV
After fix screenshot: https://imgur.com/a/Zc1ZyZq

Bug: 838311
Change-Id: I84bae4a639a001adc12eb13b2a96447562c60fba
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2499388
Reviewed-by: Changhao Han <changhaohan@chromium.org>
Commit-Queue: Changhao Han <changhaohan@chromium.org>
2020-10-26 21:30:36 +00:00
Alex Rudenko 521ef76d33 Migrate JSONView.js to TypeScript
Bug: 1011811
Change-Id: I879b5b1eef741d11ace2befc4f90995cccca5dc4
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2442610
Reviewed-by: Paul Lewis <aerotwist@chromium.org>
Commit-Queue: Alex Rudenko <alexrudenko@chromium.org>
2020-10-01 12:08:24 +00:00
Jan Scheffler 4a89ed360b [TypeScript] Migrate front_end/source_frame to devtools_entrypoint
R=aerotwist@chromium.org, jacktfranklin@chromium.org

Bug: 1101738
Change-Id: Id6d460cd1e37ee2b4096e90ab02a8c797343171e
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2318385
Commit-Queue: Jan Scheffler <janscheffler@chromium.org>
Reviewed-by: Paul Lewis <aerotwist@chromium.org>
2020-07-29 16:42:54 +00:00
Tim van der Lippe 77e0c895b2 Remove RelaxedJSONParser
We should not be parsing our own JSON. Instead, we should be using
`JSON.parse`. However, `JSON.parse` is of course spec-compliant and
not "relaxed". Thus, it would fail on invalid JSON. But, we do show
invalid JSON as plain text. E.g., if you were to inspect an invalid
JSON response in the network tab and it is actually not valid JSON,
we don't show the fancy object-tree-view, but instead the raw content.

Given that having our own JSON parser is not ideal and we still
gracefully fall back to a usable JSON preview, we should remove the
RelaxedJSONParser.

After this change, we can handle valid JSON, valid JSONP and show a text
preview for invalid JSON(P).

R=aerotwist@chromium.org

Bug: 1098730
Change-Id: I3c0513518e36b29f35124b2810a119fd3828ff93
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2264560
Commit-Queue: Tim van der Lippe <tvanderlippe@chromium.org>
Reviewed-by: Paul Lewis <aerotwist@chromium.org>
2020-06-29 16:55:23 +00:00
Jack Franklin 1cb3421614 Move self.mod into NumberUtilities
Bug:  1050549
Change-Id: I44047c605adf3dfd4fc9e971671d7abfc7841cb7
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2094118
Reviewed-by: Tim van der Lippe <tvanderlippe@chromium.org>
Commit-Queue: Jack Franklin <jacktfranklin@chromium.org>
2020-03-09 17:15:58 +00:00
Tim van der Lippe 2543c5cbff Migrate source_frame/ to import cross-module
Bug: 1006759
Change-Id: I4e81d6c4f3e75646b5fbd6fb8cfb3df3babed87a
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2035940
Reviewed-by: Paul Lewis <aerotwist@chromium.org>
Commit-Queue: Tim van der Lippe <tvanderlippe@chromium.org>
2020-02-04 13:06:21 +00:00
Paul Lewis aa437a5f71 Migrates source_frame/ to ESM internally
Bug: 1006759
Change-Id: Ie0c5a2a815806f49e40d089ed8bae729c3846b20
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2002594
Reviewed-by: Tim van der Lippe <tvanderlippe@chromium.org>
Commit-Queue: Paul Lewis <aerotwist@chromium.org>
2020-01-15 17:01:54 +00:00
Ted Meyer de0b62559d Rolled MediaTable into EventDisplayTable
Also cleaned up some the table elements to get json views - this
required a small change to the constructor for the JSONView class
which allows the collapsible viewer to start collapsed instead of
expanded. Since it's an optional arg, it shouldn't doesn't affect
any other uses of the class.

Here are some screenshots:
https://files.tedm.io/dtss/ev/1.png
https://files.tedm.io/dtss/ev/2.png

Bug: 794255
Change-Id: Ib83636a358e5eeeb47f958fd8046e80b0896a424
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/1996026
Reviewed-by: Jan Scheffler <janscheffler@chromium.org>
Commit-Queue: Ted Meyer <tmathmeyer@chromium.org>
2020-01-15 01:37:16 +00:00
Tim van der Lippe b88663fc59 Migrate source_frame/ to ESM
Bug: 1006759
Change-Id: Ibcff1093ef7b7a4a9f4a94a1d75f900b8ab2d88f
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/1903473
Commit-Queue: Tim van der Lippe <tvanderlippe@chromium.org>
Reviewed-by: Paul Lewis <aerotwist@chromium.org>
2019-11-09 19:29:23 +00:00
Tim van der Lippe 1d6e57a0e3 Always add braces to single-line if-statements
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
2019-09-30 11:55:34 +00:00
Amanda Baker 10e95dbb5a DevTools: Make Preview Pane Accessible
This is a reland of 58040a832bb68a52529638518de36be17c65547f

The failing aXe tests were removed and will be added again after
invesigation

Original change's description:
> DevTools: Make Preview Pane Accessible
>
> The preview pane previously lacked keyboard controls for navigating
> through the JSON and XML views, the Font view unnecessarily read out the
> content of the view (the alphabet) when accessed via screen reader, and
> the Image view did not allow a screen reader user to access the size and
> mime type of the image.
>
> This patch fixes these issues by making the JSON and XML treeOutlines
> selectable so they can be accessed via keyboard and by displaying
> keyboard focus within the treeOutline. In the Font view, the element
> containing the sample text is marked so that a screen reader will not
> read the contents, but rather will read the source url of the font. In
> the Image view, a tab stop was moved from a parent element to the image
> itself and a label was added that reads the source url of the image.
>
> JSON view before: https://imgur.com/BWczsAL
> JSON view after, without keyboard focus: (same as before)
> JSON view after, with keyboard focus: https://imgur.com/gD0rNSB
>
> XML view before: https://imgur.com/Ec9b5kf
> XML view after, without focus: https://imgur.com/NEqUgpt
> XML view after, with focus: https://imgur.com/0csIpQ3
>
> Change-Id: Id8bacdc593a5b562069fddb70452902ebad934e0
> Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1551384
> Commit-Queue: Amanda Baker <ambake@microsoft.com>
> Reviewed-by: Erik Luo <luoe@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#663263}

Change-Id: If544cc7a83d031c42cb538f6e89b9df9d3ec1dc0
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1633989
Reviewed-by: Erik Luo <luoe@chromium.org>
Commit-Queue: Amanda Baker <ambake@microsoft.com>
Cr-Original-Commit-Position: refs/heads/master@{#666949}
Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src
Cr-Mirrored-Commit: ffc8de5717812a6e5803c9f005a4159a58ff0824
2019-06-07 00:58:13 +00:00
Mason Freed dfc020370c Revert "DevTools: Make Preview Pane Accessible"
This reverts commit 58040a832bb68a52529638518de36be17c65547f.

Reason for revert: New test in this CL is flaky or failing:

https://ci.chromium.org/p/chromium/builders/ci/WebKit%20Linux%20Trusty%20MSAN

https://test-results.appspot.com/data/layout_results/WebKit_Linux_Trusty_MSAN/14730/webkit_layout_tests/layout-test-results/results.html

Bug: 967064


Original change's description:
> DevTools: Make Preview Pane Accessible
> 
> The preview pane previously lacked keyboard controls for navigating
> through the JSON and XML views, the Font view unnecessarily read out the
> content of the view (the alphabet) when accessed via screen reader, and
> the Image view did not allow a screen reader user to access the size and
> mime type of the image.
> 
> This patch fixes these issues by making the JSON and XML treeOutlines
> selectable so they can be accessed via keyboard and by displaying
> keyboard focus within the treeOutline. In the Font view, the element
> containing the sample text is marked so that a screen reader will not
> read the contents, but rather will read the source url of the font. In
> the Image view, a tab stop was moved from a parent element to the image
> itself and a label was added that reads the source url of the image.
> 
> JSON view before: https://imgur.com/BWczsAL
> JSON view after, without keyboard focus: (same as before)
> JSON view after, with keyboard focus: https://imgur.com/gD0rNSB
> 
> XML view before: https://imgur.com/Ec9b5kf
> XML view after, without focus: https://imgur.com/NEqUgpt
> XML view after, with focus: https://imgur.com/0csIpQ3
> 
> Change-Id: Id8bacdc593a5b562069fddb70452902ebad934e0
> Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1551384
> Commit-Queue: Amanda Baker <ambake@microsoft.com>
> Reviewed-by: Erik Luo <luoe@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#663263}

TBR=einbinder@chromium.org,luoe@chromium.org,jeffish@microsoft.com,jalissia@microsoft.com,ambake@microsoft.com,juxiao@microsoft.com

Change-Id: I54ef03d14a548b61c15106a2c4ebcc710f1d3b62
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1629126
Reviewed-by: Mason Freed <masonfreed@chromium.org>
Commit-Queue: Mason Freed <masonfreed@chromium.org>
Cr-Original-Commit-Position: refs/heads/master@{#663321}
Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src
Cr-Mirrored-Commit: 5096882240befae3fd9188d668959629db3bf640
2019-05-24 23:40:55 +00:00
Amanda Baker ac668020e2 DevTools: Make Preview Pane Accessible
The preview pane previously lacked keyboard controls for navigating
through the JSON and XML views, the Font view unnecessarily read out the
content of the view (the alphabet) when accessed via screen reader, and
the Image view did not allow a screen reader user to access the size and
mime type of the image.

This patch fixes these issues by making the JSON and XML treeOutlines
selectable so they can be accessed via keyboard and by displaying
keyboard focus within the treeOutline. In the Font view, the element
containing the sample text is marked so that a screen reader will not
read the contents, but rather will read the source url of the font. In
the Image view, a tab stop was moved from a parent element to the image
itself and a label was added that reads the source url of the image.

JSON view before: https://imgur.com/BWczsAL
JSON view after, without keyboard focus: (same as before)
JSON view after, with keyboard focus: https://imgur.com/gD0rNSB

XML view before: https://imgur.com/Ec9b5kf
XML view after, without focus: https://imgur.com/NEqUgpt
XML view after, with focus: https://imgur.com/0csIpQ3

Change-Id: Id8bacdc593a5b562069fddb70452902ebad934e0
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1551384
Commit-Queue: Amanda Baker <ambake@microsoft.com>
Reviewed-by: Erik Luo <luoe@chromium.org>
Cr-Original-Commit-Position: refs/heads/master@{#663263}
Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src
Cr-Mirrored-Commit: 58040a832bb68a52529638518de36be17c65547f
2019-05-24 21:13:23 +00:00
Erik Luo dad3f07c92 DevTools: expanded Objects hide overflow
All ObjectPropertiesSections call 'hideOverflow()', to avoid overflow
in the OPS's title (to adress crbugs 571759,571767).

However, hideOverflow does not hide overflow due to children, which
causes horizontal scrolling in Console.  This CL makes hide overflow
in properties for all OPS except JSONView.

Screenshot: https://imgur.com/a/x51xJNJ

Bug: none
Change-Id: Ie78f48cd873fd1d61b27c17e76683a4f7031aee8
Reviewed-on: https://chromium-review.googlesource.com/1162913
Reviewed-by: Andrey Lushnikov <lushnikov@chromium.org>
Commit-Queue: Erik Luo <luoe@chromium.org>
Cr-Original-Commit-Position: refs/heads/master@{#580726}
Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src
Cr-Mirrored-Commit: ae67481a95eded5fc4e09cb4befebc71a4443ef4
2018-08-04 01:51:50 +00:00
Blink Reformat 4c46d0969f The Great Blink mv for source files, part 2.
Move and rename files.

NOAUTOREVERT=true
NOPRESUBMIT=true
NOTREECHECKS=true
Bug: 768828
TBR=darin@chromium.org
NOTRY=true

Change-Id: I66d3b155808bc5bdbf237b80208e1e552bcf7f28
Reviewed-on: https://chromium-review.googlesource.com/1001153
Reviewed-by: Blink Reformat <blink-reformat@chromium.org>
Commit-Queue: Blink Reformat <blink-reformat@chromium.org>
Cr-Original-Commit-Position: refs/heads/master@{#549061}
Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src
Cr-Mirrored-Commit: 0aee4434a4dba42a42abaea9bfbc0cd196a63bc1
2018-04-07 15:32:37 +00:00