Bug 173986 - Web Inspector: Remove unnecessary hasChildren from TreeOutline
Summary: Web Inspector: Remove unnecessary hasChildren from TreeOutline
Status: RESOLVED WONTFIX
Alias: None
Product: WebKit
Classification: Unclassified
Component: Web Inspector (show other bugs)
Version: WebKit Nightly Build
Hardware: All All
: P2 Normal
Assignee: Devin Rousso
URL:
Keywords:
Depends on: 174042
Blocks:
  Show dependency treegraph
 
Reported: 2017-06-29 12:54 PDT by Devin Rousso
Modified: 2017-07-06 17:00 PDT (History)
5 users (show)

See Also:


Attachments
Patch (2.16 KB, patch)
2017-06-29 14:37 PDT, Devin Rousso
no flags Details | Formatted Diff | Diff
Patch (2.23 KB, patch)
2017-06-29 14:39 PDT, Devin Rousso
no flags Details | Formatted Diff | Diff
Patch (2.23 KB, patch)
2017-06-29 14:39 PDT, Devin Rousso
no flags Details | Formatted Diff | Diff
Patch (5.81 KB, patch)
2017-06-29 16:02 PDT, Devin Rousso
joepeck: review+
joepeck: commit-queue-
Details | Formatted Diff | Diff
Patch (5.34 KB, patch)
2017-06-29 18:48 PDT, Devin Rousso
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Devin Rousso 2017-06-29 12:54:22 PDT
.
Comment 1 Devin Rousso 2017-06-29 14:37:09 PDT
Created attachment 314170 [details]
Patch
Comment 2 Build Bot 2017-06-29 14:38:16 PDT
Attachment 314170 [details] did not pass style-queue:


ERROR: Source/WebInspectorUI/ChangeLog:3:  ChangeLog entry has no bug number  [changelog/bugnumber] [5]
Total errors found: 1 in 2 files


If any of these errors are false positives, please file a bug against check-webkit-style.
Comment 3 Devin Rousso 2017-06-29 14:39:10 PDT
Created attachment 314172 [details]
Patch

Oops.  Forgot bug :P
Comment 4 Devin Rousso 2017-06-29 14:39:35 PDT
Created attachment 314173 [details]
Patch

Oops.  Forgot bug :P
Comment 5 Devin Rousso 2017-06-29 16:02:53 PDT
Created attachment 314180 [details]
Patch
Comment 6 Joseph Pecoraro 2017-06-29 17:21:44 PDT
Comment on attachment 314180 [details]
Patch

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

> Source/WebInspectorUI/ChangeLog:24
> +2017-06-29  Devin Rousso  <drousso@apple.com>
> +
> +        Web Inspector: TreeOutlines should mark hasChildren as false when calling removeChildren
> +        https://bugs.webkit.org/show_bug.cgi?id=173986

Double changelog.

Seems fine. r=me
Comment 7 Devin Rousso 2017-06-29 18:48:50 PDT
Created attachment 314205 [details]
Patch
Comment 8 WebKit Commit Bot 2017-06-29 19:16:09 PDT
Comment on attachment 314205 [details]
Patch

Clearing flags on attachment: 314205

Committed r218983: <http://trac.webkit.org/changeset/218983>
Comment 9 WebKit Commit Bot 2017-06-29 19:16:10 PDT
All reviewed patches have been landed.  Closing bug.
Comment 10 WebKit Commit Bot 2017-06-30 14:44:52 PDT
Re-opened since this is blocked by bug 174042
Comment 11 Joseph Pecoraro 2017-06-30 14:51:04 PDT
This transitively affected TreeElement, because some TreeElement operations were TreeOutline operations:

    appendChild() { return WebInspector.TreeOutline.prototype.appendChild.apply(this, arguments); }
    insertChild() { return WebInspector.TreeOutline.prototype.insertChild.apply(this, arguments); }
    removeChild() { return WebInspector.TreeOutline.prototype.removeChild.apply(this, arguments); }
    removeChildAtIndex() { return WebInspector.TreeOutline.prototype.removeChildAtIndex.apply(this, arguments); }
    removeChildren() { return WebInspector.TreeOutline.prototype.removeChildren.apply(this, arguments); }
    removeChildrenRecursive() { return WebInspector.TreeOutline.prototype.removeChildrenRecursive.apply(this, arguments); }
    selfOrDescendant() { return WebInspector.TreeOutline.prototype.selfOrDescendant.apply(this, arguments); }

So this was not the right change. It is being rolled out.

Ultimately the underlying issue "TreeOutline's hasChildren doesn't match children.length" still exists. The "hasChildren" property is misleading. It may mean "Doesn't have children yet but needs to populate and will have children", so it is unclear. Lets leave this the way it is and correct any individual issues as needed.
Comment 12 Geoffrey Garen 2017-07-06 17:00:19 PDT
Seems like a good idea to add a test case for the backtraces we temporarily broke. That's a pretty significant regression not to catch by automated testing.