Changeset 206091 in webkit


Ignore:
Timestamp:
Sep 19, 2016 2:39:56 AM (8 years ago)
Author:
commit-queue@webkit.org
Message:

Web Inspector: Bring the inspected page's window forward when activating element search
https://bugs.webkit.org/show_bug.cgi?id=162114
<rdar://problem/28349357>

Patch by Joseph Pecoraro <Joseph Pecoraro> on 2016-09-19
Reviewed by Brian Burg.

Source/WebKit/mac:

  • WebCoreSupport/WebInspectorClient.mm:

(WebInspectorClient::didSetSearchingForNode):
When element search is activated bring the window
containing the inspected page to the foreground.

Source/WebKit2:

  • UIProcess/WebInspectorProxy.h:
  • UIProcess/WebInspectorProxy.cpp:

(WebKit::WebInspectorProxy::elementSelectionChanged):
When element search is activated allow the platform to bring
the window containing the inspected page to the foreground.

(WebKit::WebInspectorProxy::platformBringInspectedPageToFront):

  • UIProcess/efl/WebInspectorProxyEfl.cpp:

(WebKit::WebInspectorProxy::platformBringInspectedPageToFront):

  • UIProcess/gtk/WebInspectorProxyGtk.cpp:

(WebKit::WebInspectorProxy::platformBringInspectedPageToFront):
Default empty implementation for ports.

  • UIProcess/mac/WebInspectorProxyMac.mm:

(WebKit::WebInspectorProxy::platformBringInspectedPageToFront):
Bring the window containing the inspected page to the foreground.

Location:
trunk/Source
Files:
8 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebKit/mac/ChangeLog

    r206006 r206091  
     12016-09-19  Joseph Pecoraro  <pecoraro@apple.com>
     2
     3        Web Inspector: Bring the inspected page's window forward when activating element search
     4        https://bugs.webkit.org/show_bug.cgi?id=162114
     5        <rdar://problem/28349357>
     6
     7        Reviewed by Brian Burg.
     8
     9        * WebCoreSupport/WebInspectorClient.mm:
     10        (WebInspectorClient::didSetSearchingForNode):
     11        When element search is activated bring the window
     12        containing the inspected page to the foreground.
     13
    1142016-09-15  Brady Eidson  <beidson@apple.com>
    215
  • trunk/Source/WebKit/mac/WebCoreSupport/WebInspectorClient.mm

    r200119 r206091  
    161161    ASSERT(isMainThread());
    162162
    163     if (enabled)
     163    if (enabled) {
     164        [[m_inspectedWebView window] makeKeyAndOrderFront:nil];
     165        [[m_inspectedWebView window] makeFirstResponder:m_inspectedWebView];
    164166        [[NSNotificationCenter defaultCenter] postNotificationName:WebInspectorDidStartSearchingForNode object:inspector];
    165     else
     167    } else
    166168        [[NSNotificationCenter defaultCenter] postNotificationName:WebInspectorDidStopSearchingForNode object:inspector];
    167169}
  • trunk/Source/WebKit2/ChangeLog

    r206086 r206091  
     12016-09-19  Joseph Pecoraro  <pecoraro@apple.com>
     2
     3        Web Inspector: Bring the inspected page's window forward when activating element search
     4        https://bugs.webkit.org/show_bug.cgi?id=162114
     5        <rdar://problem/28349357>
     6
     7        Reviewed by Brian Burg.
     8
     9        * UIProcess/WebInspectorProxy.h:
     10        * UIProcess/WebInspectorProxy.cpp:
     11        (WebKit::WebInspectorProxy::elementSelectionChanged):
     12        When element search is activated allow the platform to bring
     13        the window containing the inspected page to the foreground.
     14
     15        (WebKit::WebInspectorProxy::platformBringInspectedPageToFront):
     16        * UIProcess/efl/WebInspectorProxyEfl.cpp:
     17        (WebKit::WebInspectorProxy::platformBringInspectedPageToFront):
     18        * UIProcess/gtk/WebInspectorProxyGtk.cpp:
     19        (WebKit::WebInspectorProxy::platformBringInspectedPageToFront):
     20        Default empty implementation for ports.
     21
     22        * UIProcess/mac/WebInspectorProxyMac.mm:
     23        (WebKit::WebInspectorProxy::platformBringInspectedPageToFront):
     24        Bring the window containing the inspected page to the foreground.
     25
    1262016-09-18  Michael Catanzaro  <mcatanzaro@igalia.com>
    227
  • trunk/Source/WebKit2/UIProcess/WebInspectorProxy.cpp

    r205370 r206091  
    599599    }
    600600
    601     if (!active && isConnected())
     601    if (active)
     602        platformBringInspectedPageToFront();
     603    else if (isConnected())
    602604        bringToFront();
    603605}
     
    661663}
    662664
     665void WebInspectorProxy::platformBringInspectedPageToFront()
     666{
     667    notImplemented();
     668}
     669
    663670void WebInspectorProxy::platformHide()
    664671{
  • trunk/Source/WebKit2/UIProcess/WebInspectorProxy.h

    r205403 r206091  
    180180    void platformInvalidate();
    181181    void platformBringToFront();
     182    void platformBringInspectedPageToFront();
    182183    void platformHide();
    183184    bool platformIsFront();
  • trunk/Source/WebKit2/UIProcess/efl/WebInspectorProxyEfl.cpp

    r205370 r206091  
    165165}
    166166
     167void WebInspectorProxy::platformBringInspectedPageToFront()
     168{
     169    notImplemented();
     170}
     171
    167172bool WebInspectorProxy::platformIsFront()
    168173{
  • trunk/Source/WebKit2/UIProcess/gtk/WebInspectorProxyGtk.cpp

    r205561 r206091  
    238238}
    239239
     240void WebInspectorProxy::platformBringInspectedPageToFront()
     241{
     242    notImplemented();
     243}
     244
    240245bool WebInspectorProxy::platformIsFront()
    241246{
  • trunk/Source/WebKit2/UIProcess/mac/WebInspectorProxyMac.mm

    r205370 r206091  
    395395}
    396396
     397void WebInspectorProxy::platformBringInspectedPageToFront()
     398{
     399    [inspectedPage()->platformWindow() makeKeyAndOrderFront:nil];
     400}
     401
    397402bool WebInspectorProxy::platformIsFront()
    398403{
Note: See TracChangeset for help on using the changeset viewer.