Changeset 116237 in webkit


Ignore:
Timestamp:
May 6, 2012 7:54:10 AM (12 years ago)
Author:
caseq@chromium.org
Message:

Web Inspector: take timeline frame mode out of experimental
https://bugs.webkit.org/show_bug.cgi?id=85707

Reviewed by Pavel Feldman.

Source/WebCore:

  • remove "Vertical timeline overview" experiment;
  • add supportsFrameInstrumentation capability to InspectorTimelineAgent;
  • show frame mode selector conditionally on supportsFrameInstrumentation capability.
  • inspector/Inspector.json: Add Timeline.supportsFrameInstrumentation capability;
  • inspector/InspectorClient.h: Add supportsFrameInstrumentation();

(InspectorClient):
(WebCore::InspectorClient::supportsFrameInstrumentation):

  • inspector/InspectorController.cpp:

(WebCore::InspectorController::InspectorController):

  • inspector/InspectorTimelineAgent.cpp:

(WebCore::InspectorTimelineAgent::supportsFrameInstrumentation):
(WebCore):
(WebCore::InspectorTimelineAgent::InspectorTimelineAgent): Added FrameInstrumentationSupport parameter.

  • inspector/InspectorTimelineAgent.h:

(WebCore):
(WebCore::InspectorTimelineAgent::create): ditto.
(InspectorTimelineAgent):

  • inspector/WorkerInspectorController.cpp: Updated call site for InspectorTimelineAgent::create() to indicate frame instrumentation not supported.

(WebCore::WorkerInspectorController::WorkerInspectorController):

  • inspector/front-end/Settings.js:

(WebInspector.ExperimentsSettings): Removed "Vertical Overview" experiment.

  • inspector/front-end/TimelineOverviewPane.js: Expose frame mode conditionally on capability, not the experiment.

(WebInspector.TimelineOverviewPane):

  • inspector/front-end/inspector.js: Added initialization for Capabilities.timelineSupportsFrameInstrumentation;

(WebInspector.doLoadedDone):

Source/WebKit/chromium:

  • exposed supportFrameInstrumentation method to InspectorClient. Client must return true iff the platform will call InspectorInstrumentation::instrumentBeginFrame() upon beginning of frame rendering;
  • src/InspectorClientImpl.cpp:

(WebKit::InspectorClientImpl::supportsFrameInstrumentation):
(WebKit):

  • src/InspectorClientImpl.h:

(InspectorClientImpl):

Location:
trunk/Source
Files:
13 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebCore/ChangeLog

    r116236 r116237  
     12012-05-06  Andrey Kosyakov  <caseq@chromium.org>
     2
     3        Web Inspector: take timeline frame mode out of experimental
     4        https://bugs.webkit.org/show_bug.cgi?id=85707
     5
     6        Reviewed by Pavel Feldman.
     7
     8        - remove "Vertical timeline overview" experiment;
     9        - add supportsFrameInstrumentation capability to InspectorTimelineAgent;
     10        - show frame mode selector conditionally on supportsFrameInstrumentation capability.
     11
     12        * inspector/Inspector.json: Add Timeline.supportsFrameInstrumentation capability;
     13        * inspector/InspectorClient.h: Add supportsFrameInstrumentation();
     14        (InspectorClient):
     15        (WebCore::InspectorClient::supportsFrameInstrumentation):
     16        * inspector/InspectorController.cpp:
     17        (WebCore::InspectorController::InspectorController):
     18        * inspector/InspectorTimelineAgent.cpp:
     19        (WebCore::InspectorTimelineAgent::supportsFrameInstrumentation):
     20        (WebCore):
     21        (WebCore::InspectorTimelineAgent::InspectorTimelineAgent): Added FrameInstrumentationSupport parameter.
     22        * inspector/InspectorTimelineAgent.h:
     23        (WebCore):
     24        (WebCore::InspectorTimelineAgent::create): ditto.
     25        (InspectorTimelineAgent):
     26        * inspector/WorkerInspectorController.cpp: Updated call site for InspectorTimelineAgent::create() to indicate frame instrumentation not supported.
     27        (WebCore::WorkerInspectorController::WorkerInspectorController):
     28        * inspector/front-end/Settings.js:
     29        (WebInspector.ExperimentsSettings): Removed "Vertical Overview" experiment.
     30        * inspector/front-end/TimelineOverviewPane.js: Expose frame mode conditionally on capability, not the experiment.
     31        (WebInspector.TimelineOverviewPane):
     32        * inspector/front-end/inspector.js: Added initialization for Capabilities.timelineSupportsFrameInstrumentation;
     33        (WebInspector.doLoadedDone):
     34
    1352012-05-06  Antti Koivisto  <antti@apple.com>
    236
  • trunk/Source/WebCore/inspector/Inspector.json

    r116210 r116237  
    21562156                "hidden": true,
    21572157                "description": "Starts calculating various DOM statistics and sending them as part of timeline events."
     2158            },
     2159            {
     2160                "name": "supportsFrameInstrumentation",
     2161                "returns": [
     2162                    { "name": "result", "type": "boolean", "description": "True if timeline supports frame instrumentation." }
     2163                ],
     2164                "hidden": true,
     2165                "description": "Tells whether timeline agent supports frame instrumentation."
    21582166            }
    21592167        ],
  • trunk/Source/WebCore/inspector/InspectorClient.h

    r113709 r116237  
    5858
    5959    virtual bool canOverrideDeviceMetrics() { return false; }
     60
    6061    virtual void overrideDeviceMetrics(int /*width*/, int /*height*/, float /*fontScaleFactor*/, bool /*fitWindow*/)
    6162    {
     
    6768    }
    6869
     70    virtual bool supportsFrameInstrumentation() { return false; }
     71
    6972    bool doDispatchMessageOnFrontendPage(Page* frontendPage, const String& message);
    7073};
  • trunk/Source/WebCore/inspector/InspectorController.cpp

    r111529 r116237  
    113113    m_agents.append(domStorageAgentPtr.release());
    114114    m_agents.append(InspectorMemoryAgent::create(m_instrumentingAgents.get(), m_state.get(), m_page, m_domAgent));
    115     m_agents.append(InspectorTimelineAgent::create(m_instrumentingAgents.get(), m_state.get(), InspectorTimelineAgent::PageInspector));
     115    m_agents.append(InspectorTimelineAgent::create(m_instrumentingAgents.get(), m_state.get(), InspectorTimelineAgent::PageInspector,
     116       inspectorClient->supportsFrameInstrumentation() ? InspectorTimelineAgent::FrameInstrumentationSupported : InspectorTimelineAgent::FrameInstrumentationNotSupported));
    116117    m_agents.append(InspectorApplicationCacheAgent::create(m_instrumentingAgents.get(), m_state.get(), pageAgent));
    117118
  • trunk/Source/WebCore/inspector/InspectorTimelineAgent.cpp

    r113440 r116237  
    3737#include "Event.h"
    3838#include "IdentifiersFactory.h"
     39#include "InspectorClient.h"
    3940#include "InspectorCounters.h"
    4041#include "InspectorFrontend.h"
     
    172173{
    173174    m_state->setBoolean(TimelineAgentState::includeMemoryDetails, value);
     175}
     176
     177void InspectorTimelineAgent::supportsFrameInstrumentation(ErrorString*, bool* result)
     178{
     179    *result = m_frameInstrumentationSupport == FrameInstrumentationSupported;
    174180}
    175181
     
    438444}
    439445
    440 InspectorTimelineAgent::InspectorTimelineAgent(InstrumentingAgents* instrumentingAgents, InspectorState* state, InspectorType type)
     446InspectorTimelineAgent::InspectorTimelineAgent(InstrumentingAgents* instrumentingAgents, InspectorState* state, InspectorType type, FrameInstrumentationSupport frameInstrumentationSupport)
    441447    : InspectorBaseAgent<InspectorTimelineAgent>("Timeline", instrumentingAgents, state)
    442448    , m_frontend(0)
     
    445451    , m_maxCallStackDepth(5)
    446452    , m_inspectorType(type)
     453    , m_frameInstrumentationSupport(frameInstrumentationSupport)
    447454{
    448455}
  • trunk/Source/WebCore/inspector/InspectorTimelineAgent.h

    r110872 r116237  
    4545namespace WebCore {
    4646class Event;
     47class InspectorClient;
    4748class InspectorFrontend;
    4849class InspectorState;
     
    5859public:
    5960    enum InspectorType { PageInspector, WorkerInspector };
    60     static PassOwnPtr<InspectorTimelineAgent> create(InstrumentingAgents* instrumentingAgents, InspectorState* state, InspectorType type)
     61    enum FrameInstrumentationSupport { FrameInstrumentationNotSupported, FrameInstrumentationSupported };
     62
     63    static PassOwnPtr<InspectorTimelineAgent> create(InstrumentingAgents* instrumentingAgents, InspectorState* state, InspectorType type, FrameInstrumentationSupport frameInstrumentationSupport)
    6164    {
    62         return adoptPtr(new InspectorTimelineAgent(instrumentingAgents, state, type));
     65        return adoptPtr(new InspectorTimelineAgent(instrumentingAgents, state, type, frameInstrumentationSupport));
    6366    }
    6467
     
    7275    virtual void stop(ErrorString*);
    7376    virtual void setIncludeMemoryDetails(ErrorString*, bool);
     77    virtual void supportsFrameInstrumentation(ErrorString*, bool*);
    7478
    7579    int id() const { return m_id; }
     
    146150    };
    147151       
    148     InspectorTimelineAgent(InstrumentingAgents*, InspectorState*, InspectorType);
     152    InspectorTimelineAgent(InstrumentingAgents*, InspectorState*, InspectorType, FrameInstrumentationSupport);
    149153
    150154    void pushCurrentRecord(PassRefPtr<InspectorObject>, const String& type, bool captureCallStack);
     
    184188    int m_maxCallStackDepth;
    185189    InspectorType m_inspectorType;
     190    FrameInstrumentationSupport m_frameInstrumentationSupport;
    186191};
    187192
  • trunk/Source/WebCore/inspector/WorkerInspectorController.cpp

    r111529 r116237  
    103103    m_profilerAgent = InspectorProfilerAgent::create(m_instrumentingAgents.get(), m_consoleAgent.get(), workerContext, m_state.get(), m_injectedScriptManager.get());
    104104#endif
    105     m_timelineAgent = InspectorTimelineAgent::create(m_instrumentingAgents.get(), m_state.get(), InspectorTimelineAgent::WorkerInspector);
     105    m_timelineAgent = InspectorTimelineAgent::create(m_instrumentingAgents.get(), m_state.get(), InspectorTimelineAgent::WorkerInspector, InspectorTimelineAgent::FrameInstrumentationNotSupported);
    106106
    107107    m_injectedScriptManager->injectedScriptHost()->init(0
  • trunk/Source/WebCore/inspector/front-end/Settings.js

    r115447 r116237  
    5454    nativeInstrumentationEnabled: false,
    5555    heapProfilerPresent: false,
    56     canOverrideDeviceMetrics: false
     56    canOverrideDeviceMetrics: false,
     57    timelineSupportsFrameInstrumentation: false,
    5758}
    5859
     
    180181   
    181182    // Add currently running experiments here.
    182     this.timelineVerticalOverview = this._createExperiment("timelineStartAtZero", "Enable vertical overview mode in the Timeline panel");
    183183    this.showShadowDOM = this._createExperiment("showShadowDOM", "Show shadow DOM");
    184184    this.snippetsSupport = this._createExperiment("snippetsSupport", "Snippets support");
  • trunk/Source/WebCore/inspector/front-end/TimelineOverviewPane.js

    r116220 r116237  
    6161    eventsOverviewItem.onselect = this._showEvents.bind(this);
    6262
    63     if (WebInspector.experimentsSettings.timelineVerticalOverview.isEnabled()) {
     63    if (Capabilities.timelineSupportsFrameInstrumentation) {
    6464        var framesOverviewItem = new WebInspector.SidebarTreeElement("timeline-overview-sidebar-frames", WebInspector.UIString("Frames"));
    6565        topPaneSidebarTree.appendChild(framesOverviewItem);
  • trunk/Source/WebCore/inspector/front-end/inspector.js

    r116222 r116237  
    394394    ProfilerAgent.isSampling(WebInspector._initializeCapability.bind(WebInspector, "samplingCPUProfiler", null));
    395395    ProfilerAgent.hasHeapProfiler(WebInspector._initializeCapability.bind(WebInspector, "heapProfilerPresent", null));
     396    TimelineAgent.supportsFrameInstrumentation(WebInspector._initializeCapability.bind(WebInspector, "timelineSupportsFrameInstrumentation", null));
    396397    PageAgent.canOverrideDeviceMetrics(WebInspector._initializeCapability.bind(WebInspector, "canOverrideDeviceMetrics", WebInspector._doLoadedDoneWithCapabilities.bind(WebInspector)));
    397398}
  • trunk/Source/WebKit/chromium/ChangeLog

    r116204 r116237  
     12012-05-06  Andrey Kosyakov  <caseq@chromium.org>
     2
     3        Web Inspector: take timeline frame mode out of experimental
     4        https://bugs.webkit.org/show_bug.cgi?id=85707
     5
     6        Reviewed by Pavel Feldman.
     7
     8        - exposed supportFrameInstrumentation method to InspectorClient. Client must return true iff the platform will call
     9          InspectorInstrumentation::instrumentBeginFrame() upon beginning of frame rendering;
     10
     11        * src/InspectorClientImpl.cpp:
     12        (WebKit::InspectorClientImpl::supportsFrameInstrumentation):
     13        (WebKit):
     14        * src/InspectorClientImpl.h:
     15        (InspectorClientImpl):
     16
    1172012-05-04  Kent Tamura  <tkent@chromium.org>
    218
  • trunk/Source/WebKit/chromium/src/InspectorClientImpl.cpp

    r113709 r116237  
    146146}
    147147
     148bool InspectorClientImpl::supportsFrameInstrumentation()
     149{
     150    return true;
     151}
     152
    148153WebDevToolsAgentImpl* InspectorClientImpl::devToolsAgent()
    149154{
  • trunk/Source/WebKit/chromium/src/InspectorClientImpl.h

    r113709 r116237  
    6969    virtual void autoZoomPageToFitWidth();
    7070
     71    virtual bool supportsFrameInstrumentation();
     72
    7173private:
    7274    WebDevToolsAgentImpl* devToolsAgent();
Note: See TracChangeset for help on using the changeset viewer.