Bug 179365 - REGRESSION(r223773): [GTK] WebKitWebInspector bring-to-front signal is emitted right after open-window
Summary: REGRESSION(r223773): [GTK] WebKitWebInspector bring-to-front signal is emitte...
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: WebKitGTK (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Nobody
URL:
Keywords: Gtk, Regression
Depends on:
Blocks:
 
Reported: 2017-11-07 00:19 PST by Carlos Garcia Campos
Modified: 2017-11-08 04:55 PST (History)
4 users (show)

See Also:


Attachments
Patch (1.69 KB, patch)
2017-11-07 00:23 PST, Carlos Garcia Campos
mcatanzaro: review+
Details | Formatted Diff | Diff
Patch for landing (3.11 KB, patch)
2017-11-07 23:46 PST, Carlos Garcia Campos
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Carlos Garcia Campos 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.
Comment 1 Carlos Garcia Campos 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.
Comment 2 Michael Catanzaro 2017-11-07 06:19:32 PST
Comment on attachment 326198 [details]
Patch

OK, unless Brian or Joe want to take a different approach.
Comment 3 BJ Burg 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.
Comment 4 Carlos Garcia Campos 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+.
Comment 5 Carlos Garcia Campos 2017-11-07 23:46:32 PST
Created attachment 326309 [details]
Patch for landing

Removed the platform ifdef in cross-platform file.
Comment 6 Carlos Garcia Campos 2017-11-08 04:55:31 PST
Committed r224575: <https://trac.webkit.org/changeset/224575>