New issue
Advanced search Search tips

Issue 890736 link

Starred by 1 user

Issue metadata

Status: Available
Owner: ----
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: ----
Pri: 2
Type: Bug



Sign in to add a comment

The new viewer should use non-selectable whitespaces to allow selecting raw content of the log

Project Member Reported by serg...@chromium.org, Oct 1

Issue description

What steps will reproduce the problem?
(1) open https://logs.chromium.org/logs/v8/buildbucket/cr-buildbucket.appspot.com/8933871228991373984/+/steps/generate_build_files/0/logs/swarming-targets-file.txt/0
(2) try to select the content of the file to paste into a local file by clicking on the clicking just before "b" in "benchmarks" and moving the cursor just after "t" in webkit
(3) copy the content, e.g. via Ctrl+c

What is the expected result?

The copied content should not include any whitespace other than newline, i.e. should be equal to this Python string: 'benchmarks\nbot_default\ncheck-static-initializers\nmjsunit\nmozilla\noptimize_for_size\nperf\ntest262\nwebkit'

What happens instead?
Additional whitespace before each line is copied even  though it was not present in the original log: 'benchmarks\n  bot_default\n  check-static-initializers\n  mjsunit\n  mozilla\n  optimize_for_size\n  perf\n  test262\n  webkit'.

Workaround: switch to the old viewer - there whitespace is not added.
 
Status: Available (was: Untriaged)
Thanks for the report, I didn't notice this.  This is because of the whitespaces inbetween tags (added for code readability).  We'll need to do something clever to get rid of them but keep selection natural.
You can use margins to create unselectable whitespace. As for code readability, you may have to just keep all tags on the same line or add some special tags with postprocessing that removes whitespace around them. But IMHO, keeping all on the same line is a lot easier and implementing special tags and postprocessing is not worth the effort.

Sign in to add a comment