Changeset 116237 in webkit
- Timestamp:
- May 6, 2012 7:54:10 AM (12 years ago)
- Location:
- trunk/Source
- Files:
-
- 13 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebCore/ChangeLog
r116236 r116237 1 2012-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 1 35 2012-05-06 Antti Koivisto <antti@apple.com> 2 36 -
trunk/Source/WebCore/inspector/Inspector.json
r116210 r116237 2156 2156 "hidden": true, 2157 2157 "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." 2158 2166 } 2159 2167 ], -
trunk/Source/WebCore/inspector/InspectorClient.h
r113709 r116237 58 58 59 59 virtual bool canOverrideDeviceMetrics() { return false; } 60 60 61 virtual void overrideDeviceMetrics(int /*width*/, int /*height*/, float /*fontScaleFactor*/, bool /*fitWindow*/) 61 62 { … … 67 68 } 68 69 70 virtual bool supportsFrameInstrumentation() { return false; } 71 69 72 bool doDispatchMessageOnFrontendPage(Page* frontendPage, const String& message); 70 73 }; -
trunk/Source/WebCore/inspector/InspectorController.cpp
r111529 r116237 113 113 m_agents.append(domStorageAgentPtr.release()); 114 114 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)); 116 117 m_agents.append(InspectorApplicationCacheAgent::create(m_instrumentingAgents.get(), m_state.get(), pageAgent)); 117 118 -
trunk/Source/WebCore/inspector/InspectorTimelineAgent.cpp
r113440 r116237 37 37 #include "Event.h" 38 38 #include "IdentifiersFactory.h" 39 #include "InspectorClient.h" 39 40 #include "InspectorCounters.h" 40 41 #include "InspectorFrontend.h" … … 172 173 { 173 174 m_state->setBoolean(TimelineAgentState::includeMemoryDetails, value); 175 } 176 177 void InspectorTimelineAgent::supportsFrameInstrumentation(ErrorString*, bool* result) 178 { 179 *result = m_frameInstrumentationSupport == FrameInstrumentationSupported; 174 180 } 175 181 … … 438 444 } 439 445 440 InspectorTimelineAgent::InspectorTimelineAgent(InstrumentingAgents* instrumentingAgents, InspectorState* state, InspectorType type )446 InspectorTimelineAgent::InspectorTimelineAgent(InstrumentingAgents* instrumentingAgents, InspectorState* state, InspectorType type, FrameInstrumentationSupport frameInstrumentationSupport) 441 447 : InspectorBaseAgent<InspectorTimelineAgent>("Timeline", instrumentingAgents, state) 442 448 , m_frontend(0) … … 445 451 , m_maxCallStackDepth(5) 446 452 , m_inspectorType(type) 453 , m_frameInstrumentationSupport(frameInstrumentationSupport) 447 454 { 448 455 } -
trunk/Source/WebCore/inspector/InspectorTimelineAgent.h
r110872 r116237 45 45 namespace WebCore { 46 46 class Event; 47 class InspectorClient; 47 48 class InspectorFrontend; 48 49 class InspectorState; … … 58 59 public: 59 60 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) 61 64 { 62 return adoptPtr(new InspectorTimelineAgent(instrumentingAgents, state, type ));65 return adoptPtr(new InspectorTimelineAgent(instrumentingAgents, state, type, frameInstrumentationSupport)); 63 66 } 64 67 … … 72 75 virtual void stop(ErrorString*); 73 76 virtual void setIncludeMemoryDetails(ErrorString*, bool); 77 virtual void supportsFrameInstrumentation(ErrorString*, bool*); 74 78 75 79 int id() const { return m_id; } … … 146 150 }; 147 151 148 InspectorTimelineAgent(InstrumentingAgents*, InspectorState*, InspectorType );152 InspectorTimelineAgent(InstrumentingAgents*, InspectorState*, InspectorType, FrameInstrumentationSupport); 149 153 150 154 void pushCurrentRecord(PassRefPtr<InspectorObject>, const String& type, bool captureCallStack); … … 184 188 int m_maxCallStackDepth; 185 189 InspectorType m_inspectorType; 190 FrameInstrumentationSupport m_frameInstrumentationSupport; 186 191 }; 187 192 -
trunk/Source/WebCore/inspector/WorkerInspectorController.cpp
r111529 r116237 103 103 m_profilerAgent = InspectorProfilerAgent::create(m_instrumentingAgents.get(), m_consoleAgent.get(), workerContext, m_state.get(), m_injectedScriptManager.get()); 104 104 #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); 106 106 107 107 m_injectedScriptManager->injectedScriptHost()->init(0 -
trunk/Source/WebCore/inspector/front-end/Settings.js
r115447 r116237 54 54 nativeInstrumentationEnabled: false, 55 55 heapProfilerPresent: false, 56 canOverrideDeviceMetrics: false 56 canOverrideDeviceMetrics: false, 57 timelineSupportsFrameInstrumentation: false, 57 58 } 58 59 … … 180 181 181 182 // Add currently running experiments here. 182 this.timelineVerticalOverview = this._createExperiment("timelineStartAtZero", "Enable vertical overview mode in the Timeline panel");183 183 this.showShadowDOM = this._createExperiment("showShadowDOM", "Show shadow DOM"); 184 184 this.snippetsSupport = this._createExperiment("snippetsSupport", "Snippets support"); -
trunk/Source/WebCore/inspector/front-end/TimelineOverviewPane.js
r116220 r116237 61 61 eventsOverviewItem.onselect = this._showEvents.bind(this); 62 62 63 if ( WebInspector.experimentsSettings.timelineVerticalOverview.isEnabled()) {63 if (Capabilities.timelineSupportsFrameInstrumentation) { 64 64 var framesOverviewItem = new WebInspector.SidebarTreeElement("timeline-overview-sidebar-frames", WebInspector.UIString("Frames")); 65 65 topPaneSidebarTree.appendChild(framesOverviewItem); -
trunk/Source/WebCore/inspector/front-end/inspector.js
r116222 r116237 394 394 ProfilerAgent.isSampling(WebInspector._initializeCapability.bind(WebInspector, "samplingCPUProfiler", null)); 395 395 ProfilerAgent.hasHeapProfiler(WebInspector._initializeCapability.bind(WebInspector, "heapProfilerPresent", null)); 396 TimelineAgent.supportsFrameInstrumentation(WebInspector._initializeCapability.bind(WebInspector, "timelineSupportsFrameInstrumentation", null)); 396 397 PageAgent.canOverrideDeviceMetrics(WebInspector._initializeCapability.bind(WebInspector, "canOverrideDeviceMetrics", WebInspector._doLoadedDoneWithCapabilities.bind(WebInspector))); 397 398 } -
trunk/Source/WebKit/chromium/ChangeLog
r116204 r116237 1 2012-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 1 17 2012-05-04 Kent Tamura <tkent@chromium.org> 2 18 -
trunk/Source/WebKit/chromium/src/InspectorClientImpl.cpp
r113709 r116237 146 146 } 147 147 148 bool InspectorClientImpl::supportsFrameInstrumentation() 149 { 150 return true; 151 } 152 148 153 WebDevToolsAgentImpl* InspectorClientImpl::devToolsAgent() 149 154 { -
trunk/Source/WebKit/chromium/src/InspectorClientImpl.h
r113709 r116237 69 69 virtual void autoZoomPageToFitWidth(); 70 70 71 virtual bool supportsFrameInstrumentation(); 72 71 73 private: 72 74 WebDevToolsAgentImpl* devToolsAgent();
Note: See TracChangeset
for help on using the changeset viewer.