<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<!DOCTYPE bugzilla SYSTEM "https://bugs.webkit.org/page.cgi?id=bugzilla.dtd">

<bugzilla version="5.0.4.1"
          urlbase="https://bugs.webkit.org/"
          
          maintainer="admin@webkit.org"
>

    <bug>
          <bug_id>171569</bug_id>
          
          <creation_ts>2017-05-02 14:02:36 -0700</creation_ts>
          <short_desc>REGRESSION (r215630): Web Inspector: Option-Click on URL in Styles sidebar does not work</short_desc>
          <delta_ts>2017-05-03 18:39:50 -0700</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>1</classification_id>
          <classification>Unclassified</classification>
          <product>WebKit</product>
          <component>Web Inspector</component>
          <version>WebKit Nightly Build</version>
          <rep_platform>All</rep_platform>
          <op_sys>All</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>FIXED</resolution>
          
          
          <bug_file_loc>https://webkit.org/</bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords>InRadar</keywords>
          <priority>P2</priority>
          <bug_severity>Normal</bug_severity>
          <target_milestone>---</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Nikita Vasilyev">nvasilyev</reporter>
          <assigned_to name="Devin Rousso">hi</assigned_to>
          <cc>commit-queue</cc>
    
    <cc>hi</cc>
    
    <cc>inspector-bugzilla-changes</cc>
    
    <cc>joepeck</cc>
    
    <cc>webkit-bug-importer</cc>
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>1303800</commentid>
    <comment_count>0</comment_count>
    <who name="Nikita Vasilyev">nvasilyev</who>
    <bug_when>2017-05-02 14:02:36 -0700</bug_when>
    <thetext>-------
Inspected URL:        https://webkit.org/
Loading completed:    true
Frontend User Agent:  Mozilla/5.0 (Macintosh; Intel Mac OS X 10_12_4) AppleWebKit/604.1.21+ (KHTML, like Gecko)

Uncaught Exceptions:
 - TypeError: frame.resourceForURL is not a function. (In &apos;frame.resourceForURL(simplifiedURL, searchChildFrames)&apos;, &apos;frame.resourceForURL&apos; is undefined) (at Main.js:856:91)
    openURL @ Main.js:856:91
    tokenTrackingControllerHighlightedRangeWasClicked @ CSSStyleDeclarationTextEditor.js:1717:33
    _mouseButtonWasReleasedOverEditor @ CodeMirrorTokenTrackingController.js:425:89
    handleEvent @ CodeMirrorTokenTrackingController.js:253:51
-------

* STEPS TO REPRODUCE
1. Open https://webkit.org/.
2. Inspect the WebKit logo in top left corner (h1.logo).
3. In the Styles sidebar, find &quot;background-image: url(&apos;images/webkit.svg&apos;);&quot; and option-click on the image URL.

* EXPECTED
Image opens in the Resources tab.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1303801</commentid>
    <comment_count>1</comment_count>
    <who name="Radar WebKit Bug Importer">webkit-bug-importer</who>
    <bug_when>2017-05-02 14:02:51 -0700</bug_when>
    <thetext>&lt;rdar://problem/31946367&gt;</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1303940</commentid>
    <comment_count>2</comment_count>
    <who name="Devin Rousso">hi</who>
    <bug_when>2017-05-02 19:56:23 -0700</bug_when>
    <thetext>I think this regressed in r215630 &lt;https://webkit.org/b/168709&gt;.  It looks like I forgot the `frame` parameter of `WebInspector.openURL` in CSSStyleDeclarationTextEditor.js:1717.  It should be:

        // Special case option-clicking url(...) links.
        if (token &amp;&amp; /\blink\b/.test(token.type)) {
            let url = token.string;
            let baseURL = sourceCodeLocation ? sourceCodeLocation.sourceCode.url : this._style.node.ownerDocument.documentURL;

            const frame = null;
            WebInspector.openURL(absoluteURL(url, baseURL), frame, options);
            return;
        }</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1304280</commentid>
    <comment_count>3</comment_count>
    <who name="Nikita Vasilyev">nvasilyev</who>
    <bug_when>2017-05-03 15:00:28 -0700</bug_when>
    <thetext>I confirm it regressed in https://trac.webkit.org/changeset/215630/webkit.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1304287</commentid>
    <comment_count>4</comment_count>
    <who name="Nikita Vasilyev">nvasilyev</who>
    <bug_when>2017-05-03 15:06:17 -0700</bug_when>
    <thetext>(In reply to Devin Rousso from comment #2)
&gt; I think this regressed in r215630 &lt;https://webkit.org/b/168709&gt;.  It looks
&gt; like I forgot the `frame` parameter of `WebInspector.openURL` in
&gt; CSSStyleDeclarationTextEditor.js:1717.  It should be:
&gt; 
&gt;         // Special case option-clicking url(...) links.
&gt;         if (token &amp;&amp; /\blink\b/.test(token.type)) {
&gt;             let url = token.string;
&gt;             let baseURL = sourceCodeLocation ?
&gt; sourceCodeLocation.sourceCode.url :
&gt; this._style.node.ownerDocument.documentURL;
&gt; 
&gt;             const frame = null;
&gt;             WebInspector.openURL(absoluteURL(url, baseURL), frame, options);
&gt;             return;
&gt;         }

Yes, this solves the problem. Since you just wrote the fix, do you want to post a patch?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1304436</commentid>
    <comment_count>5</comment_count>
      <attachid>308994</attachid>
    <who name="Devin Rousso">hi</who>
    <bug_when>2017-05-03 17:57:27 -0700</bug_when>
    <thetext>Created attachment 308994
Patch</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1304447</commentid>
    <comment_count>6</comment_count>
      <attachid>308994</attachid>
    <who name="Joseph Pecoraro">joepeck</who>
    <bug_when>2017-05-03 18:18:17 -0700</bug_when>
    <thetext>Comment on attachment 308994
Patch

r=me</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1304459</commentid>
    <comment_count>7</comment_count>
      <attachid>308994</attachid>
    <who name="WebKit Commit Bot">commit-queue</who>
    <bug_when>2017-05-03 18:39:49 -0700</bug_when>
    <thetext>Comment on attachment 308994
Patch

Clearing flags on attachment: 308994

Committed r216166: &lt;http://trac.webkit.org/changeset/216166&gt;</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1304460</commentid>
    <comment_count>8</comment_count>
    <who name="WebKit Commit Bot">commit-queue</who>
    <bug_when>2017-05-03 18:39:50 -0700</bug_when>
    <thetext>All reviewed patches have been landed.  Closing bug.</thetext>
  </long_desc>
      
          <attachment
              isobsolete="0"
              ispatch="1"
              isprivate="0"
          >
            <attachid>308994</attachid>
            <date>2017-05-03 17:57:27 -0700</date>
            <delta_ts>2017-05-03 18:39:49 -0700</delta_ts>
            <desc>Patch</desc>
            <filename>bug-171569-20170503175727.patch</filename>
            <type>text/plain</type>
            <size>1884</size>
            <attacher name="Devin Rousso">hi</attacher>
            
              <data encoding="base64">ZGlmZiAtLWdpdCBhL1NvdXJjZS9XZWJJbnNwZWN0b3JVSS9DaGFuZ2VMb2cgYi9Tb3VyY2UvV2Vi
SW5zcGVjdG9yVUkvQ2hhbmdlTG9nCmluZGV4IDkyNGRlZDYxNjBjNzExM2EyNzBiMTgzMjc4YzI3
NTI0MDM4NDE1ZTUuLjhjYmNkMmExYjg2OGUzNjNkYmMyMjM3YmViZGUzM2Y2YjA5NzAwYTggMTAw
NjQ0Ci0tLSBhL1NvdXJjZS9XZWJJbnNwZWN0b3JVSS9DaGFuZ2VMb2cKKysrIGIvU291cmNlL1dl
Ykluc3BlY3RvclVJL0NoYW5nZUxvZwpAQCAtMSwzICsxLDE0IEBACisyMDE3LTA1LTAzICBEZXZp
biBSb3Vzc28gIDx3ZWJraXRAZGV2aW5yb3Vzc28uY29tPgorCisgICAgICAgIFJFR1JFU1NJT04g
KHIyMTU2MzApOiBXZWIgSW5zcGVjdG9yOiBPcHRpb24tQ2xpY2sgb24gVVJMIGluIFN0eWxlcyBz
aWRlYmFyIGRvZXMgbm90IHdvcmsKKyAgICAgICAgaHR0cHM6Ly9idWdzLndlYmtpdC5vcmcvc2hv
d19idWcuY2dpP2lkPTE3MTU2OQorCisgICAgICAgIFJldmlld2VkIGJ5IE5PQk9EWSAoT09QUyEp
LgorCisgICAgICAgICogVXNlckludGVyZmFjZS9WaWV3cy9DU1NTdHlsZURlY2xhcmF0aW9uVGV4
dEVkaXRvci5qczoKKyAgICAgICAgKFdlYkluc3B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