New issue
Advanced search Search tips
Note: Color blocks (like or ) mean that a user may not be available. Tooltip shows the reason.

Issue 748590 link

Starred by 2 users

Issue metadata

Status: Fixed
Owner:
Last visit > 30 days ago
Closed: Jul 2017
Components:
EstimatedDays: ----
NextAction: ----
OS: Linux , Windows , Mac
Pri: 3
Type: Bug



Sign in to add a comment

DevTools: Application > Cache Storage > syntax-highlighting edge-cases

Project Member Reported by addyo@chromium.org, Jul 25 2017

Issue description

Chrome Version       : 59.0.3071.115
OS Version: OS X 10.12.5
URLs (if applicable) : https://hnpwa.com

What steps will reproduce the problem?
1. Navigate to https://hnpwa.com/index.html with the DevTools open
2. Go to Application > Cache Storage and select the sw-precache-* entry
3. Select "https://hnpwa.com/index.html?_sw-precache=1ae4bd21581b65af275921071236461a"

The resource preview does not get syntax highlighted.

What is the expected result?

index.html gets syntax highlighted, similar to how it does in the network panel.


What happens instead of that?

It appears this is due to the string we're appending for hashing (?_sw-precache=1ae4bd21581b65af275921071236461a) but I would have expected our file-type 
detection to be a little more..forgiving here :)
 
Screen Shot 2017-07-25 at 10.21.25 AM.png
544 KB View Download
Screen Shot 2017-07-25 at 10.17.38 AM.png
799 KB View Download
Labels: Needs-Milestone
Owner: eostroukhov@chromium.org
Status: Assigned (was: Unconfirmed)
Project Member

Comment 3 by bugdroid1@chromium.org, Jul 28 2017

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/b7737f6aaebd48e3244e2aa3701e47160e23d01d

commit b7737f6aaebd48e3244e2aa3701e47160e23d01d
Author: Eugene Ostroukhov <eostroukhov@chromium.org>
Date: Fri Jul 28 23:08:33 2017

[DevTools] Strip charset for CodeMirror

CodeMirror accepts "highlighter type" and not the mime path. Charset
frightens and confuses the syntax highlighter.

Bug:  748590 
Change-Id: I98950aa050d907793daf36db1a93e871a509a7cc
Reviewed-on: https://chromium-review.googlesource.com/591693
Reviewed-by: Andrey Kosyakov <caseq@chromium.org>
Commit-Queue: Eugene Ostroukhov <eostroukhov@chromium.org>
Cr-Commit-Position: refs/heads/master@{#490536}
[modify] https://crrev.com/b7737f6aaebd48e3244e2aa3701e47160e23d01d/third_party/WebKit/Source/devtools/front_end/source_frame/PreviewFactory.js

Status: Fixed (was: Assigned)
Labels: TE-Verified-62.0.3172.0 TE-Verified-M62
Verified this issue on Ubuntu 14.04, Windows-10 and Mac OS 10.12.6 using chrome latest Dev #62.0.3172.0 by following steps mentioned in the original comment, After selecting the following link "https://hnpwa.com/index.html?_sw-precache=1ae4bd21581b65af275921071236461a" from cache storage observed the resource preview get's syntax highlighted. Hence adding TE-Verified label.

Thanks!
748590.png
327 KB View Download

Sign in to add a comment