Bug 156278

Summary: Web Inspector: Do not create CodeMirror color/gradient markers in JavaScript resources
Product: WebKit Reporter: Joseph Pecoraro <joepeck>
Component: Web InspectorAssignee: Joseph Pecoraro <joepeck>
Status: RESOLVED FIXED    
Severity: Normal CC: bburg, commit-queue, graouts, joepeck, mattbaker, nvasilyev, timothy, webkit-bug-importer
Priority: P2 Keywords: InRadar
Version: WebKit Nightly Build   
Hardware: All   
OS: All   
Attachments:
Description Flags
[PATCH] Proposed Fix none

Description Joseph Pecoraro 2016-04-05 21:47:30 PDT
* SUMMARY
Do not create CodeMirror color/gradient markers in JavaScript resources.

* TEST
var red = "foo";

* STEPS TO REPRODUCE
1. Inspect test page
2. Show JavaScript resource with a variable name that is a CSS color name
3. Hover variable name
  => Get color marker

* NOTES
Performance is poor. Creating markers for JavaScript resources doesn't make sense either.

Logging time it took to generate markers on the JavaScript resources on apple.com:

    MARKERS 43ms
    MARKERS 807ms
    MARKERS 58ms
    MARKERS 285ms
    MARKERS 824ms
    MARKERS 134ms

This can be completely eliminated.
Comment 1 Radar WebKit Bug Importer 2016-04-05 21:47:41 PDT
<rdar://problem/25570404>
Comment 2 Joseph Pecoraro 2016-04-05 21:48:40 PDT
Created attachment 275751 [details]
[PATCH] Proposed Fix
Comment 3 WebKit Commit Bot 2016-04-05 22:45:16 PDT
Comment on attachment 275751 [details]
[PATCH] Proposed Fix

Clearing flags on attachment: 275751

Committed r199095: <http://trac.webkit.org/changeset/199095>
Comment 4 WebKit Commit Bot 2016-04-05 22:45:21 PDT
All reviewed patches have been landed.  Closing bug.
Comment 5 Joseph Pecoraro 2016-06-04 23:51:40 PDT
*** Bug 129629 has been marked as a duplicate of this bug. ***