Changeset 201142 in webkit


Ignore:
Timestamp:
May 19, 2016, 1:40:29 AM (9 years ago)
Author:
bshafiei@apple.com
Message:

Merge r200959. rdar://problem/26298247

Location:
branches/safari-602.1.32-branch/Source/WebKit2
Files:
6 edited

Legend:

Unmodified
Added
Removed
  • branches/safari-602.1.32-branch/Source/WebKit2/ChangeLog

    r201141 r201142  
     12016-05-19  Babak Shafiei  <bshafiei@apple.com>
     2
     3        Merge r200959. rdar://problem/26298247
     4
     5    2016-05-16  Brian Burg  <bburg@apple.com>
     6
     7            Web Automation: Automation.inspectBrowsingContext should automatically start page profiling
     8            https://bugs.webkit.org/show_bug.cgi?id=157739
     9
     10            Reviewed by Timothy Hatcher.
     11
     12            * UIProcess/API/C/WKInspector.cpp:
     13            (WKInspectorTogglePageProfiling):
     14            Implicitly show the Web Inspector in the C API command to preserve existing behavior.
     15
     16            * UIProcess/Automation/WebAutomationSession.cpp:
     17            (WebKit::WebAutomationSession::inspectorFrontendLoaded):
     18            If the frontend loaded, it was either because the user opened Web Inspector (and
     19            turning on page profiling is harmless), or it was loaded but not shown by the
     20            inspectBrowsingContext command. For the latter, we want to start page profiling
     21            before processing any additional commands so subsequent execution is captured.
     22
     23            * UIProcess/WebInspectorProxy.cpp:
     24            (WebKit::WebInspectorProxy::togglePageProfiling):
     25            Send the start/stop profiling messages directly to the WebInspectorUI process instead of
     26            bouncing through the inspected page's process, which does an implicit show() we don't want.
     27
     28            * UIProcess/WebPageProxy.cpp:
     29            (WebKit::WebPageProxy::inspector): Make it const.
     30            * UIProcess/WebPageProxy.h:
     31
    1322016-05-19  Babak Shafiei  <bshafiei@apple.com>
    233
  • branches/safari-602.1.32-branch/Source/WebKit2/UIProcess/API/C/WKInspector.cpp

    r199380 r201142  
    118118void WKInspectorTogglePageProfiling(WKInspectorRef inspectorRef)
    119119{
     120    toImpl(inspectorRef)->show();
    120121    toImpl(inspectorRef)->togglePageProfiling();
    121122}
  • branches/safari-602.1.32-branch/Source/WebKit2/UIProcess/Automation/WebAutomationSession.cpp

    r201132 r201142  
    460460    if (auto callback = m_pendingInspectorCallbacksPerPage.take(page.pageID()))
    461461        callback->sendSuccess(InspectorObject::create());
     462
     463    // Start collecting profile information immediately so the entire session is captured.
     464    page.inspector()->togglePageProfiling();
    462465}
    463466
  • branches/safari-602.1.32-branch/Source/WebKit2/UIProcess/WebInspectorProxy.cpp

    r201132 r201142  
    297297
    298298    if (m_isProfilingPage)
    299         m_inspectedPage->process().send(Messages::WebInspector::StopPageProfiling(), m_inspectedPage->pageID());
     299        m_inspectorPage->process().send(Messages::WebInspectorUI::StopPageProfiling(), m_inspectorPage->pageID());
    300300    else
    301         m_inspectedPage->process().send(Messages::WebInspector::StartPageProfiling(), m_inspectedPage->pageID());
     301        m_inspectorPage->process().send(Messages::WebInspectorUI::StartPageProfiling(), m_inspectorPage->pageID());
    302302
    303303    // FIXME: have the WebProcess notify us on state changes.
  • branches/safari-602.1.32-branch/Source/WebKit2/UIProcess/WebPageProxy.cpp

    r200330 r201142  
    40314031
    40324032// Inspector
    4033 WebInspectorProxy* WebPageProxy::inspector()
     4033WebInspectorProxy* WebPageProxy::inspector() const
    40344034{
    40354035    if (isClosed() || !isValid())
  • branches/safari-602.1.32-branch/Source/WebKit2/UIProcess/WebPageProxy.h

    r200470 r201142  
    311311    void didExitFullscreen();
    312312
    313     WebInspectorProxy* inspector();
     313    WebInspectorProxy* inspector() const;
    314314
    315315    bool isControlledByAutomation() const { return m_controlledByAutomation; }
Note: See TracChangeset for help on using the changeset viewer.