Bug 136965

Summary: Web Inspector: Option+Click on CSS url(...) should jump to resource view
Product: WebKit Reporter: Joseph Pecoraro <joepeck>
Component: Web InspectorAssignee: Joseph Pecoraro <joepeck>
Status: RESOLVED FIXED    
Severity: Normal CC: commit-queue, graouts, joepeck, jonowells, timothy, webkit-bug-importer
Priority: P2 Keywords: InRadar
Version: 528+ (Nightly build)   
Hardware: All   
OS: All   
Attachments:
Description Flags
[PATCH] Proposed Fix none

Description Joseph Pecoraro 2014-09-19 15:40:09 PDT
Option+Click on CSS url(...) should jump to resource view.

* TEST (test with an x.png)
<style>body { background: url(x.png) }</style>
<body>Test</body>

* STEPS TO REPRODUCE
1. Inspect test page
2. Select <body>
3. Show Styles sidebar
4. Option+Click "x.png"
  => should go to x.png resource view
5. Open html source code
6. Option+Click "x.png" in the <style>
  => should go to x.png resource view
Comment 1 Radar WebKit Bug Importer 2014-09-19 15:40:48 PDT
<rdar://problem/18400129>
Comment 2 Joseph Pecoraro 2014-09-19 15:43:08 PDT
Tools/PrettyPrinting CSS test:
Source/WebInspectorUI/Tools/PrettyPrinting/index.html?mode=text%2Fcss&content=body%20%7B%0A%20%20background%3A%20url(x.png)%3B%0A%20%20background%3A%20url(%22x.png%22)%3B%0A%7D

The contents inside url(...) are "string" token types not "atom".

---

    body {
        background: url(x.png);
        background: url("x.png");
    }

---

    Token: 'tag'         Position: '0'       Current: 'body'
    Token: null          Position: '4'       Current: ' '
    Token: null          Position: '5'       Current: '{'
    Token: null          Position: '0'       Current: '  '
    Token: 'property'    Position: '2'       Current: 'background'
    Token: null          Position: '12'      Current: ':'
    Token: null          Position: '13'      Current: ' '
>   Token: 'atom'        Position: '14'      Current: 'url'
    Token: null          Position: '17'      Current: '('
>   Token: 'string'      Position: '18'      Current: 'x.png'
    Token: null          Position: '23'      Current: ')'
    Token: null          Position: '24'      Current: ';'
    Token: null          Position: '0'       Current: '  '
    Token: 'property'    Position: '2'       Current: 'background'
    Token: null          Position: '12'      Current: ':'
    Token: null          Position: '13'      Current: ' '
>   Token: 'atom'        Position: '14'      Current: 'url'
    Token: null          Position: '17'      Current: '('
>   Token: 'string'      Position: '18'      Current: '"x.png"'
    Token: null          Position: '25'      Current: ')'
    Token: null          Position: '26'      Current: ';'
    Token: null          Position: '0'       Current: '}'
Comment 3 Joseph Pecoraro 2014-09-19 15:56:44 PDT
Created attachment 238395 [details]
[PATCH] Proposed Fix
Comment 4 WebKit Commit Bot 2014-09-20 08:34:16 PDT
Comment on attachment 238395 [details]
[PATCH] Proposed Fix

Clearing flags on attachment: 238395

Committed r173792: <http://trac.webkit.org/changeset/173792>
Comment 5 WebKit Commit Bot 2014-09-20 08:34:18 PDT
All reviewed patches have been landed.  Closing bug.