Bug 78064

Summary: Web Inspector: avoid making a window for the Inspector when docked
Product: WebKit Reporter: Timothy Hatcher <timothy>
Component: Web Inspector (Deprecated)Assignee: Timothy Hatcher <timothy>
Status: RESOLVED FIXED    
Severity: Normal CC: andersca, apavlov, bweinstein, darin, joepeck, keishi, loislo, pfeldman, pmuellr, rik, timothy, yurys
Priority: P2    
Version: 528+ (Nightly build)   
Hardware: All   
OS: All   
Attachments:
Description Flags
Proposed Change bweinstein: review+, timothy: commit-queue-

Description Timothy Hatcher 2012-02-07 17:54:55 PST
Right now WebKit2 always makes a window even if the Inspector is docked. We should not make a window in that case and destroy the window when docked.
Comment 1 Timothy Hatcher 2012-02-07 18:07:14 PST
Created attachment 125972 [details]
Proposed Change
Comment 2 Brian Weinstein 2012-02-07 18:20:51 PST
Comment on attachment 125972 [details]
Proposed Change

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

> Source/WebKit2/UIProcess/mac/WebInspectorProxyMac.mm:252
> +    }

Can this code be shared with the code in platformDidClose?

> Source/WebKit2/UIProcess/mac/WebInspectorProxyMac.mm:267
> +    [m_inspectorView.get() setHidden:NO];

How would it have been detached if it was hidden? I don't see how the undock button could have been pressed in this case.
Comment 3 Timothy Hatcher 2012-02-07 19:17:40 PST
(In reply to comment #2)
> (From update of attachment 125972 [details])
> View in context: https://bugs.webkit.org/attachment.cgi?id=125972&action=review
> 
> > Source/WebKit2/UIProcess/mac/WebInspectorProxyMac.mm:252
> > +    }
> 
> Can this code be shared with the code in platformDidClose?

It could, but it didn't see worth adding more plaform specific member functions.

> 
> > Source/WebKit2/UIProcess/mac/WebInspectorProxyMac.mm:267
> > +    [m_inspectorView.get() setHidden:NO];
> 
> How would it have been detached if it was hidden? I don't see how the undock button could have been pressed in this case.

I was just being cautious. But you are right, there is no way to currently cause it.
Comment 4 Timothy Hatcher 2012-02-07 19:20:27 PST
Fixed in r107028.