RESOLVED FIXED 61420
WebKit2: Web Inspector: Web Inspector opens a blank window when a breakpoint is hit when docked
https://bugs.webkit.org/show_bug.cgi?id=61420
Summary WebKit2: Web Inspector: Web Inspector opens a blank window when a breakpoint ...
Timothy Hatcher
Reported 2011-05-24 22:24:49 PDT
WebInspectorProxy::platformBringToFront orders the wrong window to the front.
Attachments
Proposed Change (3.29 KB, patch)
2011-05-24 22:28 PDT, Timothy Hatcher
bweinstein: review+
timothy: commit-queue-
Timothy Hatcher
Comment 1 2011-05-24 22:25:09 PDT
Timothy Hatcher
Comment 2 2011-05-24 22:28:09 PDT
Created attachment 94744 [details] Proposed Change
WebKit Review Bot
Comment 3 2011-05-24 22:32:16 PDT
Attachment 94744 [details] did not pass style-queue: Failed to run "['Tools/Scripts/check-webkit-style', '--diff-files', u'Source/WebKit2/ChangeLog', u'Source/WebKit..." exit_code: 1 Source/WebKit2/ChangeLog:1: ChangeLog entry has no bug number [changelog/bugnumber] [5] Total errors found: 1 in 3 files If any of these errors are false positives, please file a bug against check-webkit-style.
Brian Weinstein
Comment 4 2011-05-24 23:10:05 PDT
Comment on attachment 94744 [details] Proposed Change View in context: https://bugs.webkit.org/attachment.cgi?id=94744&action=review > Source/WebKit2/UIProcess/win/WebInspectorProxyWin.cpp:230 > + HWND parentWindow = m_isAttached ? ::GetParent(m_page->nativeWindow()) : m_inspectorWindow; Actually, I'm not sure if this is right in the non-attached case. We might want this to be - ::GetAncestor(m_page->nativeWindow(), GA_ROOT). We bring the root window to the front, which isn't necessarily the parent of the web view.
Brian Weinstein
Comment 5 2011-05-24 23:10:17 PDT
Comment on attachment 94744 [details] Proposed Change View in context: https://bugs.webkit.org/attachment.cgi?id=94744&action=review > Source/WebKit2/UIProcess/win/WebInspectorProxyWin.cpp:230 > + HWND parentWindow = m_isAttached ? ::GetParent(m_page->nativeWindow()) : m_inspectorWindow; Actually, I'm not sure if this is right in the non-attached case. We might want this to be - ::GetAncestor(m_page->nativeWindow(), GA_ROOT). We bring the root window to the front, which isn't necessarily the parent of the web view.
Brian Weinstein
Comment 6 2011-05-24 23:28:12 PDT
Comment on attachment 94744 [details] Proposed Change View in context: https://bugs.webkit.org/attachment.cgi?id=94744&action=review >>> Source/WebKit2/UIProcess/win/WebInspectorProxyWin.cpp:230 >>> + HWND parentWindow = m_isAttached ? ::GetParent(m_page->nativeWindow()) : m_inspectorWindow; >> >> Actually, I'm not sure if this is right in the non-attached case. We might want this to be - ::GetAncestor(m_page->nativeWindow(), GA_ROOT). We bring the root window to the front, which isn't necessarily the parent of the web view. > > Actually, I'm not sure if this is right in the non-attached case. We might want this to be - ::GetAncestor(m_page->nativeWindow(), GA_ROOT). We bring the root window to the front, which isn't necessarily the parent of the web view. This should be: HWND parentWindow = m_isAttached ? ::GetAncestor(m_page->nativeWindow(), GA_ROOT) : m_inspectorWindow; And it will need the same FIXME as the Mac code.
Timothy Hatcher
Comment 7 2011-05-24 23:38:18 PDT
Landed in r87275.
Darin Adler
Comment 8 2011-05-25 09:58:31 PDT
Comment on attachment 94744 [details] Proposed Change View in context: https://bugs.webkit.org/attachment.cgi?id=94744&action=review > Source/WebKit2/UIProcess/mac/WebInspectorProxyMac.mm:158 > + // FIXME: this will not bring a background tab in Safari to the front, only its window. > + [m_inspectorView.get().window makeKeyAndOrderFront:nil]; Might be worth mentioning the Chrome::focus function, which would do the right thing for both tabs and windows and would work cross-platform.
Note You need to log in before you can comment on or make changes to this bug.