Bug 27263 - WebInspector: show last opened panel when invoking inspector.
Summary: WebInspector: show last opened panel when invoking inspector.
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Web Inspector (Deprecated) (show other bugs)
Version: 528+ (Nightly build)
Hardware: All All
: P2 Normal
Assignee: Nobody
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2009-07-14 08:40 PDT by Pavel Feldman
Modified: 2009-07-20 15:04 PDT (History)
3 users (show)

See Also:


Attachments
patch (6.41 KB, patch)
2009-07-14 08:52 PDT, Pavel Feldman
timothy: review+
Details | Formatted Diff | Diff
patch (1.53 KB, patch)
2009-07-14 22:47 PDT, Pavel Feldman
no flags Details | Formatted Diff | Diff
patch (2.29 KB, text/plain)
2009-07-14 22:53 PDT, Pavel Feldman
no flags Details
patch (2.29 KB, patch)
2009-07-14 22:54 PDT, Pavel Feldman
timothy: review+
Details | Formatted Diff | Diff
patch (1.75 KB, patch)
2009-07-16 02:34 PDT, Pavel Feldman
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Pavel Feldman 2009-07-14 08:40:54 PDT
Currently Elements panel is being shown on open, no matter which one user was using before.
Comment 1 Pavel Feldman 2009-07-14 08:52:35 PDT
Created attachment 32715 [details]
patch
Comment 2 Timothy Hatcher 2009-07-14 09:01:47 PDT
Comment on attachment 32715 [details]
patch

> +          if (lastActivePanelSetting.type() == Setting::StringType) {
> +              m_showAfterVisible = specialPanelForJSName(lastActivePanelSetting.string());
> +          }

No need for the curly braces.
Comment 3 Pavel Feldman 2009-07-14 09:30:16 PDT
Sending        WebCore/ChangeLog
Sending        WebCore/inspector/InspectorController.cpp
Sending        WebCore/inspector/InspectorController.h
Sending        WebCore/inspector/InspectorController.idl
Sending        WebCore/inspector/front-end/inspector.js
Transmitting file data .....
Committed revision 45861.
Comment 4 Joseph Pecoraro 2009-07-14 17:11:38 PDT
After this was applied I got a small error when I open the Inspector with the ⌥⌘C shortcut that opens the console.

TypeError: Result of expression 'WebInspector.currentPanel' [undefined] is not a valid argument for 'in'.

That comes from Console.js, at approx line 87:
http://trac.webkit.org/browser/trunk/WebCore/inspector/front-end/Console.js#L59

  function animationFinished()
  {
      if ("updateStatusBarItems" in WebInspector.currentPanel)
          WebInspector.currentPanel.updateStatusBarItems();
      WebInspector.currentFocusElement = this.promptElement;
      delete this._animating;
  }

I think that has to do with the fact that a "this.currentPanel" was deleted in this patch.
Comment 5 Joseph Pecoraro 2009-07-14 17:19:49 PDT
Eek, opening with ⌥⌘I I am getting an empty error messages from:
InspectorController.storeLastActivePanel(panelName);
Comment 6 Pavel Feldman 2009-07-14 22:47:28 PDT
Created attachment 32766 [details]
patch
Comment 7 Pavel Feldman 2009-07-14 22:53:31 PDT
Created attachment 32767 [details]
patch
Comment 8 Pavel Feldman 2009-07-14 22:54:07 PDT
Created attachment 32768 [details]
patch
Comment 9 Pavel Feldman 2009-07-15 01:11:39 PDT
Sending        WebCore/ChangeLog
Sending        WebCore/inspector/InspectorController.cpp
Sending        WebCore/inspector/InspectorController.idl
Transmitting file data ...
Committed revision 45899.
Comment 10 Keishi Hattori 2009-07-15 20:22:14 PDT
This error seems to happen because [WebInspector showConsole] firing before m_frontend is set causes m_showAfterVisible to be overridden from CurrentPanel to ConsolePanel. I'm not sure but maybe adding m_showConsoleAfterVisible would be a fix?
Comment 11 Pavel Feldman 2009-07-16 02:34:58 PDT
Created attachment 32847 [details]
patch

Special case ConsolePanel opening.
Comment 12 Eric Seidel (no email) 2009-07-20 15:04:01 PDT
Comment on attachment 32847 [details]
patch

If this is closed as fixed, nothing should be marked for review.