Bug 37946

Summary: Web Inspector: REGRESSION(56051) Docking the inspector is broken on Windows
Product: WebKit Reporter: Brian Weinstein <bweinstein>
Component: Web Inspector (Deprecated)Assignee: Yury Semikhatsky <yurys>
Status: RESOLVED FIXED    
Severity: Normal CC: ap, bweinstein, commit-queue, joepeck, keishi, mjs, pfeldman, pmuellr, rik, timothy, yurys
Priority: P1 Keywords: InRadar
Version: 528+ (Nightly build)   
Hardware: All   
OS: All   
Attachments:
Description Flags
Screenshot
none
patch none

Description Brian Weinstein 2010-04-21 13:34:42 PDT
STEPS TO REPRODUCE:
1) Have the inspector default to docked
2) Open www.google.com
3) Resize the window to 1024x768
4) Open the Web Inspector

EXPECTED RESULTS:
It should be opened docked

ACTUAL RESULTS:
It is opened not docked, but using the docked icons, and shorter titlebar.

<rdar://7728433>
Comment 1 Brian Weinstein 2010-04-21 13:37:43 PDT
Created attachment 53985 [details]
Screenshot
Comment 2 Timothy Hatcher 2010-04-21 13:40:09 PDT
I am not sure this is a bug. There is now a minimum height required to dock, and your window size might be below that minimum.
Comment 3 Brian Weinstein 2010-04-21 13:42:38 PDT
(In reply to comment #2)
> I am not sure this is a bug. There is now a minimum height required to dock,
> and your window size might be below that minimum.

If I hit the dock button twice, it does dock, so the height is not the issue here, the issue is with the initial loading of the inspector. It is a bug, it should dock. Also, 1024x768 docks on the Mac.
Comment 4 Yury Semikhatsky 2010-04-21 15:17:42 PDT
It appears to be the same as https://bugs.webkit.org/show_bug.cgi?id=36166 where preferences are not synced with file storage for some reason.
Comment 5 Brian Weinstein 2010-04-21 15:21:37 PDT
(In reply to comment #4)
> It appears to be the same as https://bugs.webkit.org/show_bug.cgi?id=36166
> where preferences are not synced with file storage for some reason.

Then why does it draw the docked icons? If the preferences were not stored, then I would think it would draw the normal undocked icons. Additionally, starting out attached is the default, so I would think that if the preferences weren't synced, then it would try to attach anyways.

I debugged this a little bit, and noticed canAttach is being called twice, the second time it is being called from showWindowWithoutNotifications, and the window height of the inspected page made it seem like the inspector was already attached, therefore canAttach returned false, causing this behavior. I don't think this has anything to do with CFPreferences.
Comment 6 Yury Semikhatsky 2010-04-23 08:22:12 PDT
Created attachment 54163 [details]
patch
Comment 7 Pavel Feldman 2010-04-23 08:27:49 PDT
Comment on attachment 54163 [details]
patch

WebKit/win/WebCoreSupport/WebInspectorClient.cpp:364
 +          if (shouldAttach && !canAttachWindow())
This check could be done early.
Comment 8 Maciej Stachowiak 2010-04-24 16:59:45 PDT
Will this patch be committed soon? It would be really helpful for Apple to have this fix in. Is it ok if I commit it, or at least mark it commit-queue+?
Comment 9 WebKit Commit Bot 2010-04-25 04:37:53 PDT
Comment on attachment 54163 [details]
patch

Clearing flags on attachment: 54163

Committed r58227: <http://trac.webkit.org/changeset/58227>
Comment 10 WebKit Commit Bot 2010-04-25 04:38:00 PDT
All reviewed patches have been landed.  Closing bug.