Bug 150409 - Web Inspector: srcset attributes should have hyperlinks to the resources
Summary: Web Inspector: srcset attributes should have hyperlinks to the resources
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Web Inspector (show other bugs)
Version: WebKit Local Build
Hardware: All All
: P2 Normal
Assignee: Joseph Pecoraro
URL: https://www.webkit.org/blog/3574/web-...
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2015-10-21 12:51 PDT by Timothy Hatcher
Modified: 2015-10-22 14:37 PDT (History)
8 users (show)

See Also:


Attachments
[PATCH] Proposed Fix (8.26 KB, patch)
2015-10-21 16:56 PDT, Joseph Pecoraro
no flags Details | Formatted Diff | Diff
[IMAGE] CodeMirror test case (366.18 KB, image/png)
2015-10-21 16:57 PDT, Joseph Pecoraro
no flags Details
[IMAGE] DOMTree test case (381.81 KB, image/png)
2015-10-21 16:57 PDT, Joseph Pecoraro
no flags Details
[PATCH] Follow-up Fixes for Multiline (3.52 KB, patch)
2015-10-22 11:47 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 Timothy Hatcher 2015-10-21 12:51:01 PDT
We link src and href, but we don't link the URLs inside srcset.

<img src="/blog-files/inspector-tab-bar.png" srcset="/blog-files/inspector-tab-bar.png 1x, /blog-files/inspector-tab-bar-2x.png 2x" alt="Web Inspector Tab Bar" width="1221" height="208">

This will require multiple links in an attribute, unlike src and href. We will need to parse the srcset microsyntax.
Comment 1 Radar WebKit Bug Importer 2015-10-21 12:51:21 PDT
<rdar://problem/23206394>
Comment 2 Joseph Pecoraro 2015-10-21 16:01:55 PDT
This affects both (1) CodeMirror content and (2) DOMTree content.
Comment 3 Joseph Pecoraro 2015-10-21 16:56:47 PDT
Created attachment 263762 [details]
[PATCH] Proposed Fix
Comment 4 Joseph Pecoraro 2015-10-21 16:57:08 PDT
Created attachment 263763 [details]
[IMAGE] CodeMirror test case
Comment 5 Joseph Pecoraro 2015-10-21 16:57:30 PDT
Created attachment 263764 [details]
[IMAGE] DOMTree test case
Comment 6 WebKit Commit Bot 2015-10-21 17:51:07 PDT
Comment on attachment 263762 [details]
[PATCH] Proposed Fix

Clearing flags on attachment: 263762

Committed r191421: <http://trac.webkit.org/changeset/191421>
Comment 7 WebKit Commit Bot 2015-10-21 17:51:11 PDT
All reviewed patches have been landed.  Closing bug.
Comment 8 Joseph Pecoraro 2015-10-22 11:44:22 PDT
I missed a `git add` for the better multi-line attribute handling. Reopening and adding a follow-up fixes patch.
Comment 9 Joseph Pecoraro 2015-10-22 11:47:24 PDT
Created attachment 263841 [details]
[PATCH] Follow-up Fixes for Multiline
Comment 10 Timothy Hatcher 2015-10-22 13:05:48 PDT
Image generators and vars are also supported. The following is from Web Inspector:
background-image: -webkit-canvas(foo);
background-image: linear-gradient(to bottom, hsl(0, 0%, 78%), hsl(0, 0%, 85%));

Yes, var would be a larger undertaking. Likely you would provide a menu selector for available variables.
Comment 11 WebKit Commit Bot 2015-10-22 13:48:49 PDT
Comment on attachment 263841 [details]
[PATCH] Follow-up Fixes for Multiline

Rejecting attachment 263841 [details] from commit-queue.

Failed to run "['/Volumes/Data/EWS/WebKit/Tools/Scripts/webkit-patch', '--status-host=webkit-queues.webkit.org', '--bot-id=webkit-cq-03', 'build', '--no-clean', '--no-update', '--build-style=release', '--port=mac']" exit_code: 2 cwd: /Volumes/Data/EWS/WebKit

Last 500 characters of output:
b)
  8  0x00007fff88a2628d _dispatch_client_callout (in libdispatch.dylib)
  9  0x00007fff88a28673 _dispatch_queue_drain (in libdispatch.dylib)
 10  0x00007fff88a299c1 _dispatch_queue_invoke (in libdispatch.dylib)
 11  0x00007fff88a27f87 _dispatch_root_queue_drain (in libdispatch.dylib)
 12  0x00007fff88a29177 _dispatch_worker_thread2 (in libdispatch.dylib)
 13  0x00007fff8db69ef8 _pthread_wqthread (in libsystem_pthread.dylib)
 14  0x00007fff8db6cfb9 start_wqthread (in libsystem_pthread.dylib)


Full output: http://webkit-queues.webkit.org/results/322872
Comment 12 WebKit Commit Bot 2015-10-22 14:37:47 PDT
Comment on attachment 263841 [details]
[PATCH] Follow-up Fixes for Multiline

Clearing flags on attachment: 263841

Committed r191478: <http://trac.webkit.org/changeset/191478>
Comment 13 WebKit Commit Bot 2015-10-22 14:37:51 PDT
All reviewed patches have been landed.  Closing bug.