<?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>194254</bug_id>
          
          <creation_ts>2019-02-04 16:36:20 -0800</creation_ts>
          <short_desc>Web Inspector: REGRESSION (r240947): Resources tab: can&apos;t select main frame after refreshing page</short_desc>
          <delta_ts>2019-02-05 15:33:12 -0800</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></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="Matt Baker">mattbaker</reporter>
          <assigned_to name="Matt Baker">mattbaker</assigned_to>
          <cc>commit-queue</cc>
    
    <cc>hi</cc>
    
    <cc>inspector-bugzilla-changes</cc>
    
    <cc>webkit-bug-importer</cc>
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>1502105</commentid>
    <comment_count>0</comment_count>
    <who name="Matt Baker">mattbaker</who>
    <bug_when>2019-02-04 16:36:20 -0800</bug_when>
    <thetext>Summary:
Can&apos;t select main frame after refreshing page.

Steps to Reproduce:
1. Inspect webkit.org
2. Open Resource tab
3. In the sidebar, select a child of the main resource
4. Reload page
5. The child should be re-selected after reload
6. Try to select the main resource using the mouse
  =&gt; Cannot click to select

Note:
Hitting the up arrow key to select the main resource from the child works fine.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1502106</commentid>
    <comment_count>1</comment_count>
    <who name="Radar WebKit Bug Importer">webkit-bug-importer</who>
    <bug_when>2019-02-04 16:36:49 -0800</bug_when>
    <thetext>&lt;rdar://problem/47805023&gt;</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1502150</commentid>
    <comment_count>2</comment_count>
    <who name="Matt Baker">mattbaker</who>
    <bug_when>2019-02-04 17:16:16 -0800</bug_when>
    <thetext>Regressed in https://trac.webkit.org/changeset/240947.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1502180</commentid>
    <comment_count>3</comment_count>
      <attachid>361142</attachid>
    <who name="Matt Baker">mattbaker</who>
    <bug_when>2019-02-04 17:47:33 -0800</bug_when>
    <thetext>Created attachment 361142
Patch</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1502181</commentid>
    <comment_count>4</comment_count>
    <who name="Matt Baker">mattbaker</who>
    <bug_when>2019-02-04 17:48:28 -0800</bug_when>
    <thetext>(In reply to Matt Baker from comment #2)
&gt; Regressed in https://trac.webkit.org/changeset/240947.

This patch actually just allowed the bug to manifest. It was a defect lurking in TreeOutline from before this change was made.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1502199</commentid>
    <comment_count>5</comment_count>
      <attachid>361142</attachid>
    <who name="Devin Rousso">hi</who>
    <bug_when>2019-02-04 18:34:20 -0800</bug_when>
    <thetext>Comment on attachment 361142
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=361142&amp;action=review

r-, can you write some sort of test for this?  I think we&apos;ve long passed the point where we need regression tests for our common UI classes.

&gt; Source/WebInspectorUI/UserInterface/Views/TreeOutline.js:825
&gt; +                const omitFocus = true;

This doesn&apos;t seem right.  If we try to select a `WI.TreeElement` via `_handleMouseDown`, we&apos;d never focus the parent.  Either provide a justification for this, or maybe be a bit more &quot;limiting&quot; (e.g. only `omitFocus` when there is more than one `selectedItems`).</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1502202</commentid>
    <comment_count>6</comment_count>
      <attachid>361142</attachid>
    <who name="Matt Baker">mattbaker</who>
    <bug_when>2019-02-04 18:43:03 -0800</bug_when>
    <thetext>Comment on attachment 361142
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=361142&amp;action=review

&gt;&gt; Source/WebInspectorUI/UserInterface/Views/TreeOutline.js:825
&gt;&gt; +                const omitFocus = true;
&gt; 
&gt; This doesn&apos;t seem right.  If we try to select a `WI.TreeElement` via `_handleMouseDown`, we&apos;d never focus the parent.  Either provide a justification for this, or maybe be a bit more &quot;limiting&quot; (e.g. only `omitFocus` when there is more than one `selectedItems`).

Actually that&apos;s not the case. The tree receives the focus by virtue of being clicked; the awful `omitFocus` flag is only for forcing the focus when selecting elements programmatically.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1502220</commentid>
    <comment_count>7</comment_count>
    <who name="Matt Baker">mattbaker</who>
    <bug_when>2019-02-04 19:32:25 -0800</bug_when>
    <thetext>(In reply to Devin Rousso from comment #5)
&gt; Comment on attachment 361142 [details]
&gt; Patch
&gt; 
&gt; View in context:
&gt; https://bugs.webkit.org/attachment.cgi?id=361142&amp;action=review
&gt; 
&gt; r-, can you write some sort of test for this?  I think we&apos;ve long passed the
&gt; point where we need regression tests for our common UI classes.

Added a comment to https://bugs.webkit.org/show_bug.cgi?id=192044.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1502501</commentid>
    <comment_count>8</comment_count>
      <attachid>361142</attachid>
    <who name="Devin Rousso">hi</who>
    <bug_when>2019-02-05 14:01:28 -0800</bug_when>
    <thetext>Comment on attachment 361142
Patch

rs=me, please don&apos;t forget to write tests :)</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1502549</commentid>
    <comment_count>9</comment_count>
      <attachid>361142</attachid>
    <who name="WebKit Commit Bot">commit-queue</who>
    <bug_when>2019-02-05 15:33:11 -0800</bug_when>
    <thetext>Comment on attachment 361142
Patch

Clearing flags on attachment: 361142

Committed r240997: &lt;https://trac.webkit.org/changeset/240997&gt;</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1502550</commentid>
    <comment_count>10</comment_count>
    <who name="WebKit Commit Bot">commit-queue</who>
    <bug_when>2019-02-05 15:33:12 -0800</bug_when>
    <thetext>All reviewed patches have been landed.  Closing bug.</thetext>
  </long_desc>
      
          <attachment
              isobsolete="0"
              ispatch="1"
              isprivate="0"
          >
            <attachid>361142</attachid>
            <date>2019-02-04 17:47:33 -0800</date>
            <delta_ts>2019-02-05 15:33:11 -0800</delta_ts>
            <desc>Patch</desc>
            <filename>bug-194254-20190204174732.patch</filename>
            <type>text/plain</type>
            <size>2363</size>
            <attacher name="Matt Baker">mattbaker</attacher>
            
              <data encoding="base64">U3VidmVyc2lvbiBSZXZpc2lvbjogMjQwOTUxCmRpZmYgLS1naXQgYS9Tb3VyY2UvV2ViSW5zcGVj
dG9yVUkvQ2hhbmdlTG9nIGIvU291cmNlL1dlYkluc3BlY3RvclVJL0NoYW5nZUxvZwppbmRleCAz
MTA2YzViNWExOTE2YzVlYmQwOWM2ZGYyN2E5YmQ4ZmVhNjc1NjYwLi44YTc5MzdkZWFkNzg5NDQz
YjQ1M2I5NjU1YWU4NWZjZDA3NGU2ZmFmIDEwMDY0NAotLS0gYS9Tb3VyY2UvV2ViSW5zcGVjdG9y
VUkvQ2hhbmdlTG9nCisrKyBiL1NvdXJjZS9XZWJJbnNwZWN0b3JVSS9DaGFuZ2VMb2cKQEAgLTEs
MyArMSwxOCBAQAorMjAxOS0wMi0wNCAgTWF0dCBCYWtlciAgPG1hdHRiYWtlckBhcHBsZS5jb20+
CisKKyAgICAgICAgV2ViIEluc3BlY3RvcjogUkVHUkVTU0lPTiAocjI0MDk0Nyk6IFJlc291cmNl
cyB0YWI6IGNhbid0IHNlbGVjdCBtYWluIGZyYW1lIGFmdGVyIHJlZnJlc2hpbmcgcGFnZQorICAg
ICAgICBodHRwczovL2J1Z3Mud2Via2l0Lm9yZy9zaG93X2J1Zy5j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RkKCJzZWxlY3RlZCIpOwotICAgICAgICAgICAgICAgIGlmICghdGhpcy5f
c3VwcHJlc3NOZXh0U2VsZWN0aW9uRGlkQ2hhbmdlRXZlbnQpCi0gICAgICAgICAgICAgICAgICAg
IHRyZWVFbGVtZW50LnNlbGVjdCgpOworICAgICAgICAgICAgICAgIGNvbnN0IG9taXRGb2N1cyA9
IHRydWU7CisgICAgICAgICAgICAgICAgdHJlZUVsZW1lbnQuc2VsZWN0KG9taXRGb2N1cyk7CiAg
ICAgICAgICAgICB9CiAgICAgICAgIH0KIAo=
</data>

          </attachment>
      

    </bug>

</bugzilla>