Bug 179365

Summary: REGRESSION(r223773): [GTK] WebKitWebInspector bring-to-front signal is emitted right after open-window
Product: WebKit Reporter: Carlos Garcia Campos <cgarcia>
Component: WebKitGTKAssignee: Nobody <webkit-unassigned>
Status: RESOLVED FIXED    
Severity: Normal CC: bburg, bugs-noreply, joepeck, mcatanzaro
Priority: P2 Keywords: Gtk, Regression
Version: WebKit Nightly Build   
Hardware: Unspecified   
OS: Unspecified   
Attachments:
Description Flags
Patch
mcatanzaro: review+
Patch for landing none

Carlos Garcia Campos
Reported 2017-11-07 00:19:19 PST
In the GTK+ API, open-window already implies presenting the window to bring it to the front, so it's not expected that bring-to-front is emitted on open. This is happening since r223773 that moved common code from platform specific inspector files to the main file, but in the case of open the mac implementation was not exactly the same as the GTK+ one. This broke /webkit2/WebKitWebInspector/default and /webkit2/WebKitWebInspector/manual-attach-detach.
Attachments
Patch (1.69 KB, patch)
2017-11-07 00:23 PST, Carlos Garcia Campos
mcatanzaro: review+
Patch for landing (3.11 KB, patch)
2017-11-07 23:46 PST, Carlos Garcia Campos
no flags
Carlos Garcia Campos
Comment 1 2017-11-07 00:23:57 PST
Created attachment 326198 [details] Patch I'm not happy adding a platform ifdef to WebInspectorProxy.cpp after a refactoring to share code, but in this case I don't see a better way. Going back to platformOpen() when only one line differs is not better.
Michael Catanzaro
Comment 2 2017-11-07 06:19:32 PST
Comment on attachment 326198 [details] Patch OK, unless Brian or Joe want to take a different approach.
Blaze Burg
Comment 3 2017-11-07 08:49:15 PST
Comment on attachment 326198 [details] Patch If there is some way to check this inside platformBringToFront() and do nothing in this case, that would be better. Having a platform guard around a virtual platform method seems nonsensical.
Carlos Garcia Campos
Comment 4 2017-11-07 23:45:58 PST
(In reply to Brian Burg from comment #3) > Comment on attachment 326198 [details] > Patch > > If there is some way to check this inside platformBringToFront() and do > nothing in this case, that would be better. Having a platform guard around a > virtual platform method seems nonsensical. Yes I can add a m_isOpening and check it from GTK specific impl, I discarded that because it's adding a member just for that and only used by GTK+.
Carlos Garcia Campos
Comment 5 2017-11-07 23:46:32 PST
Created attachment 326309 [details] Patch for landing Removed the platform ifdef in cross-platform file.
Carlos Garcia Campos
Comment 6 2017-11-08 04:55:31 PST
Note You need to log in before you can comment on or make changes to this bug.