Changeset 225280 in webkit


Ignore:
Timestamp:
Nov 29, 2017 11:07:11 AM (6 years ago)
Author:
Joseph Pecoraro
Message:

Web Inspector: Console Tab navigation bar sometimes does not include filter bar, clear console sometimes does not work
https://bugs.webkit.org/show_bug.cgi?id=180124
<rdar://problem/35740353>

Reviewed by Brian Burg.

  • UserInterface/Views/LogContentView.js:

(WI.LogContentView.prototype.closed):
Avoid removing event listeners if this LogContentView singleton is ever closed.
The singleton will always be alive so we don't want to remove the event listeners
without a way to add them back.

  • UserInterface/Base/Main.js:

(WI.showSplitConsole):

  • UserInterface/Views/ConsoleTabContentView.js:

(WI.ConsoleTabContentView.prototype.shown):
When showing the ConsoleTab immediately collapse the split console so that any
following code that checks WI.isShowingSplitConsole will get the expected value.
It is also now possible to share a ContentView across ContentBrowsers via
tombstones, so remove the old code that would frequently close the LogContentView.

Location:
trunk/Source/WebInspectorUI
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebInspectorUI/ChangeLog

    r225261 r225280  
     12017-11-29  Joseph Pecoraro  <pecoraro@apple.com>
     2
     3        Web Inspector: Console Tab navigation bar sometimes does not include filter bar, clear console sometimes does not work
     4        https://bugs.webkit.org/show_bug.cgi?id=180124
     5        <rdar://problem/35740353>
     6
     7        Reviewed by Brian Burg.
     8
     9        * UserInterface/Views/LogContentView.js:
     10        (WI.LogContentView.prototype.closed):
     11        Avoid removing event listeners if this LogContentView singleton is ever closed.
     12        The singleton will always be alive so we don't want to remove the event listeners
     13        without a way to add them back.
     14
     15        * UserInterface/Base/Main.js:
     16        (WI.showSplitConsole):
     17        * UserInterface/Views/ConsoleTabContentView.js:
     18        (WI.ConsoleTabContentView.prototype.shown):
     19        When showing the ConsoleTab immediately collapse the split console so that any
     20        following code that checks WI.isShowingSplitConsole will get the expected value.
     21        It is also now possible to share a ContentView across ContentBrowsers via
     22        tombstones, so remove the old code that would frequently close the LogContentView.
     23
    1242017-11-28  Devin Rousso  <webkit@devinrousso.com>
    225
  • trunk/Source/WebInspectorUI/UserInterface/Base/Main.js

    r225244 r225280  
    887887        return;
    888888
    889     // Be sure to close the view in the tab content browser before showing it in the
    890     // split content browser. We can only show a content view in one browser at a time.
    891     if (this.consoleContentView.parentContainer)
    892         this.consoleContentView.parentContainer.closeContentView(this.consoleContentView);
    893889    this.consoleDrawer.showContentView(this.consoleContentView);
    894890};
  • trunk/Source/WebInspectorUI/UserInterface/Views/ConsoleTabContentView.js

    r220119 r225280  
    5353        super.shown();
    5454
    55         WI.consoleContentView.prompt.focus();
    56 
    57         if (this.contentBrowser.currentContentView === WI.consoleContentView)
    58             return;
    59 
    60         // Be sure to close the view in the split content browser before showing it in the
    61         // tab content browser. We can only show a content view in one browser at a time.
    62         if (WI.consoleContentView.parentContainer)
    63             WI.consoleContentView.parentContainer.closeContentView(WI.consoleContentView);
     55        WI.hideSplitConsole();
    6456
    6557        this.contentBrowser.showContentView(WI.consoleContentView);
     58        WI.consoleContentView.dispatchEventToListeners(WI.ContentView.Event.NavigationItemsDidChange);
     59
     60        WI.consoleContentView.prompt.focus();
    6661
    6762        console.assert(this.contentBrowser.currentContentView === WI.consoleContentView);
  • trunk/Source/WebInspectorUI/UserInterface/Views/LogContentView.js

    r225257 r225280  
    171171    closed()
    172172    {
    173         WI.logManager.removeEventListener(null, null, this);
    174         WI.Frame.removeEventListener(null, null, this);
     173        // While it may be possible to get here, this is a singleton ContentView instance
     174        // that is often re-inserted back into different ContentBrowsers, so we shouldn't
     175        // remove the event listeners. The singleton will never go away anyways.
     176        console.assert(this === WI.consoleContentView);
    175177
    176178        super.closed();
Note: See TracChangeset for help on using the changeset viewer.