Bug 136965 - Web Inspector: Option+Click on CSS url(...) should jump to resource view
Summary: Web Inspector: Option+Click on CSS url(...) should jump to resource view
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Web Inspector (show other bugs)
Version: 528+ (Nightly build)
Hardware: All All
: P2 Normal
Assignee: Joseph Pecoraro
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2014-09-19 15:40 PDT by Joseph Pecoraro
Modified: 2014-09-20 08:34 PDT (History)
6 users (show)

See Also:


Attachments
[PATCH] Proposed Fix (3.18 KB, patch)
2014-09-19 15:56 PDT, Joseph Pecoraro
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
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.