<?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>144212</bug_id>
          
          <creation_ts>2015-04-25 20:33:19 -0700</creation_ts>
          <short_desc>Web Inspector: Elements tab details sidebar becomes non-expandable after using Console tab</short_desc>
          <delta_ts>2015-04-27 14:32:14 -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>528+ (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="Joseph Pecoraro">joepeck</reporter>
          <assigned_to name="Timothy Hatcher">timothy</assigned_to>
          <cc>commit-queue</cc>
    
    <cc>graouts</cc>
    
    <cc>joepeck</cc>
    
    <cc>jonowells</cc>
    
    <cc>mattbaker</cc>
    
    <cc>nvasilyev</cc>
    
    <cc>timothy</cc>
    
    <cc>webkit-bug-importer</cc>
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>1088677</commentid>
    <comment_count>0</comment_count>
    <who name="Joseph Pecoraro">joepeck</who>
    <bug_when>2015-04-25 20:33:19 -0700</bug_when>
    <thetext>* SUMMARY
Elements tab details sidebar becomes non-expandable after using Console tab

* STEPS TO REPRODUCE
1. Inspect &lt;http://bogojoker.com/shell/&gt;
2. Show Elements Tab with Details sidebar collapsed
3. Show Console Tab
4. Reload
5. Show Elements Tab
  =&gt; Details Sidebar cannot be expanded, button is disabled

* NOTES
- Apparently at the end of WebInspector.ContentBrowserTabContentView.prototype._contentBrowserRepresentedObjectsDidChange, WebInspector.detailsSidebar.sidebarPanels.length is 0 even though this.detailsSidebarPanels.length is 3. Somehow the sidebar panels were not added to WebInspector.detailsSidebar correctly.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1088678</commentid>
    <comment_count>1</comment_count>
    <who name="Radar WebKit Bug Importer">webkit-bug-importer</who>
    <bug_when>2015-04-25 20:33:29 -0700</bug_when>
    <thetext>&lt;rdar://problem/20700543&gt;</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1088679</commentid>
    <comment_count>2</comment_count>
    <who name="Joseph Pecoraro">joepeck</who>
    <bug_when>2015-04-25 20:40:04 -0700</bug_when>
    <thetext>Apparently in this case, the currentRepresentedObjects is an empty list despite the DOM Tree appearing to have a selected node. Selecting a different node fixes the UI.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1088683</commentid>
    <comment_count>3</comment_count>
    <who name="Joseph Pecoraro">joepeck</who>
    <bug_when>2015-04-25 20:44:23 -0700</bug_when>
    <thetext>Indeed, in this scenario the Path Components are also empty.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1088684</commentid>
    <comment_count>4</comment_count>
    <who name="Joseph Pecoraro">joepeck</who>
    <bug_when>2015-04-25 20:55:08 -0700</bug_when>
    <thetext>I don&apos;t even see WebInspector.FrameResourceManager.Event.MainFrameDidChange getting dispatched at all. I wonder what is broken as a result?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1088685</commentid>
    <comment_count>5</comment_count>
    <who name="Joseph Pecoraro">joepeck</who>
    <bug_when>2015-04-25 20:58:45 -0700</bug_when>
    <thetext>(In reply to comment #4)
&gt; I don&apos;t even see WebInspector.FrameResourceManager.Event.MainFrameDidChange
&gt; getting dispatched at all. I wonder what is broken as a result?

Hmm, maybe that is fine. Maybe the frame isn&apos;t changing just the main resource. Something updates the DOM Tree and its selection, whatever does should be updating the current selected represented objects. Just don&apos;t know what updates that yet.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1088696</commentid>
    <comment_count>6</comment_count>
    <who name="Joseph Pecoraro">joepeck</who>
    <bug_when>2015-04-25 22:24:51 -0700</bug_when>
    <thetext>Well this is very weird.

DOMTreeContentView selected node changes trigger the right things. However, during the last of these events, the DOMTreeOutline.selectedTreeElement is null, which of course leads to what we have.

The DOMTreeContentView updates the selected node multiples times, ending up with:

  - &lt;html&gt; (root node?)
  - null (removing all nodes)
  - &lt;body&gt; (restoring selection)

But in the process of revealAndSelect for &lt;body&gt; it fails to create a tree element for it. It looks like during creation it walks up the DOMNode hierarchy, trying to find a DOMTreeElement parent (which should be the DOMTreeElement for the &lt;html&gt; node) and doesn&apos;t find one, so it doesn&apos;t create a tree element.

I don&apos;t know what is different here.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1088733</commentid>
    <comment_count>7</comment_count>
    <who name="Timothy Hatcher">timothy</who>
    <bug_when>2015-04-26 05:51:47 -0700</bug_when>
    <thetext>I&apos;m seeing &quot;Error during DOMAgent operation: No node with given path found&quot;.

Looks like we might be asking to push the node path for the last selected path component too soon.

Having ElementsTabContentView close and open a new DOMTreeContentView for each main frame main resource change fixes the sidebar issue, but the last DOM node still ins&apos;t restored on reload.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1088734</commentid>
    <comment_count>8</comment_count>
    <who name="Timothy Hatcher">timothy</who>
    <bug_when>2015-04-26 05:58:12 -0700</bug_when>
    <thetext>Delaying the call to _restoreSelectedNodeAfterUpdate for 1.5-2 seconds makes it work. But I&apos;m not sure what changed here. There is likely two bugs going on.

1) Even when _restoreSelectedNodeAfterUpdate fails, it should still have a selectedTreeElement. The details sidebars work if you reload with Elements tab showing. And a selected element is visible even when switching from Console.

2) InspectorDOMAgent::pushNodeByPathToFrontend is giving an error when pushing a path. The DOM might not be done being built after the load when we call for the push?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1088780</commentid>
    <comment_count>9</comment_count>
      <attachid>251698</attachid>
    <who name="Timothy Hatcher">timothy</who>
    <bug_when>2015-04-26 11:06:13 -0700</bug_when>
    <thetext>Created attachment 251698
Patch</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1088792</commentid>
    <comment_count>10</comment_count>
    <who name="Timothy Hatcher">timothy</who>
    <bug_when>2015-04-26 11:19:40 -0700</bug_when>
    <thetext>Filed the DOMAgent error as bug 144231.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1089165</commentid>
    <comment_count>11</comment_count>
      <attachid>251698</attachid>
    <who name="Joseph Pecoraro">joepeck</who>
    <bug_when>2015-04-27 13:43:18 -0700</bug_when>
    <thetext>Comment on attachment 251698
Patch

NicE! R=ME</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1089166</commentid>
    <comment_count>12</comment_count>
    <who name="Joseph Pecoraro">joepeck</who>
    <bug_when>2015-04-27 13:43:37 -0700</bug_when>
    <thetext>&gt; NicE! R=ME

I apparently triggered caps lock while typing this =P</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1089194</commentid>
    <comment_count>13</comment_count>
      <attachid>251698</attachid>
    <who name="WebKit Commit Bot">commit-queue</who>
    <bug_when>2015-04-27 14:32:11 -0700</bug_when>
    <thetext>Comment on attachment 251698
Patch

Clearing flags on attachment: 251698

Committed r183423: &lt;http://trac.webkit.org/changeset/183423&gt;</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1089195</commentid>
    <comment_count>14</comment_count>
    <who name="WebKit Commit Bot">commit-queue</who>
    <bug_when>2015-04-27 14:32:14 -0700</bug_when>
    <thetext>All reviewed patches have been landed.  Closing bug.</thetext>
  </long_desc>
      
          <attachment
              isobsolete="0"
              ispatch="1"
              isprivate="0"
          >
            <attachid>251698</attachid>
            <date>2015-04-26 11:06:13 -0700</date>
            <delta_ts>2015-04-27 14:32:11 -0700</delta_ts>
            <desc>Patch</desc>
            <filename>bug-144212-20150426110504.patch</filename>
            <type>text/plain</type>
            <size>3778</size>
            <attacher name="Timothy Hatcher">timothy</attacher>
            
              <data encoding="base64">U3VidmVyc2lvbiBSZXZpc2lvbjogMTgzMzQ3CmRpZmYgLS1naXQgYS9Tb3VyY2UvV2ViSW5zcGVj
dG9yVUkvQ2hhbmdlTG9nIGIvU291cmNlL1dlYkluc3BlY3RvclVJL0NoYW5nZUxvZwppbmRleCBl
ZDBjMWQ1ZWVjZjNkYzY2Mzk0OWE0ODg0NzVmMTQ4Y2M0YmMxMDFkLi4wNjEwNTE0YmI0MjA5MTdk
YmE1YjQ1NWEyNWQ2MzM4OTJhZTBjMTY4IDEwMDY0NAotLS0gYS9Tb3VyY2UvV2ViSW5zcGVjdG9y
VUkvQ2hhbmdlTG9nCisrKyBiL1NvdXJjZS9XZWJJbnNwZWN0b3JVSS9DaGFuZ2VMb2cKQEAgLTEs
NSArMSwyMyBAQAogMjAxNS0wNC0yNiAgVGltb3RoeSBIYXRjaGVyICA8dGltb3RoeUBhcHBsZS5j
b20+CiAKKyAgICAgICAgV2ViIEluc3BlY3RvcjogRWxlbWVudHMgdGFiIGRldGFpbHMgc2lkZWJh
ciBiZWNvbWVzIG5vbi1leHBhbmRhYmxlIGFmdGVyIHVzaW5nIENvbnNvbGUgdGFiCisgICAgICAg
IGh0dHBzOi8vYnVncy53ZWJraXQub3JnL3Nob3dfYnVnLmNnaT9pZD0xNDQyMTIKKworICAgICAg
ICBTaG93IHRoZSBET00gdHJlZSBjb250ZW50IHZpZXcgYWdhaW4gb24gbWFpbiByZXNvdXJjZSBj
aGFuZ2UuIFRoaXMgYmV0dGVyIG1hdGNoZXMgd2hhdCB3ZSBkaWQKKyAgICAgICAgaW4gdGhlIHBy
ZSB0YWIgdXNlciBpbnRlcmZhY2Ugd2l0aCB0aGUgRE9NIGJlaW5nIG9mZiB0aGUgbWFpbiByZXNv
dXJjZSB0cmVlIGVsZW1lbnQuCisKKyAg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zKTsKICAgICB9LAogCiAgICAg
Ly8gUHJpdmF0ZQogCi0gICAgX21haW5GcmFtZURpZENoYW5nZTogZnVuY3Rpb24oZXZlbnQpCisg
ICAgX3Nob3dET01UcmVlQ29udGVudFZpZXc6IGZ1bmN0aW9uKCkKICAgICB7CiAgICAgICAgIHRo
aXMuY29udGVudEJyb3dzZXIuY29udGVudFZpZXdDb250YWluZXIuY2xvc2VBbGxDb250ZW50Vmll
d3MoKTsKIAogICAgICAgICB2YXIgbWFpbkZyYW1lID0gV2ViSW5zcGVjdG9yLmZyYW1lUmVzb3Vy
Y2VNYW5hZ2VyLm1haW5GcmFtZTsKICAgICAgICAgaWYgKG1haW5GcmFtZSkKICAgICAgICAgICAg
IHRoaXMuY29udGVudEJyb3dzZXIuc2hvd0NvbnRlbnRWaWV3Rm9yUmVwcmVzZW50ZWRPYmplY3Qo
bWFpbkZyYW1lLmRvbVRyZWUpOworICAgIH0sCisKKyAgICBfbWFpbkZyYW1lRGlkQ2hhbmdlOiBm
dW5jdGlvbihldmVudCkKKyAgICB7CisgICAgICAgIHRoaXMuX3Nob3dET01UcmVlQ29udGVudFZp
ZXcoKTsKKyAgICB9LAorCisgICAgX21haW5SZXNvdXJjZURpZENoYW5nZTogZnVuY3Rpb24oZXZl
bnQpCisgICAgeworICAgICAgICBpZiAoIWV2ZW50LnRhcmdldC5pc01haW5GcmFtZSgpKQorICAg
ICAgICAgICAgcmV0dXJuOworCisgICAgICAgIHRoaXMuX3Nob3dET01UcmVlQ29udGVudFZpZXco
KTsKICAgICB9CiB9OwogCg==
</data>

          </attachment>
      

    </bug>

</bugzilla>