Changeset 64973 in webkit
- Timestamp:
- Aug 9, 2010 4:26:02 AM (14 years ago)
- Location:
- trunk
- Files:
-
- 19 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/LayoutTests/ChangeLog
r64970 r64973 1 2010-08-09 Ilya Tikhonovsky <loislo@chromium.org> 2 3 Reviewed by Yury Semikhatsky. 4 5 WebInspector: Current implementation of showPanel is a bit complicated. 6 It is using internal enum for all the panels and this is the problem because 7 we should change a lot of code for a new panel. 8 https://bugs.webkit.org/show_bug.cgi?id=43711 9 10 * inspector/debugger-breakpoints-not-activated-on-reload.html: 11 * inspector/debugger-cyclic-ref.html: 12 * inspector/debugger-eval-while-paused.html: 13 * inspector/debugger-no-nested-pause.html: 14 * inspector/debugger-pause-in-eval-script.html: 15 * inspector/debugger-pause-on-debugger-statement.html: 16 * inspector/debugger-proto-property.html: 17 * inspector/elements-panel-limited-children.html: 18 1 19 2010-08-09 Shinichiro Hamaji <hamaji@chromium.org> 2 20 -
trunk/LayoutTests/inspector/debugger-breakpoints-not-activated-on-reload.html
r64133 r64973 22 22 testController.waitUntilDone(); 23 23 24 WebInspector.show ScriptsPanel();24 WebInspector.showPanel("scripts"); 25 25 frontend_ensureDebuggerEnabled(debuggerWasEnabledCallback); 26 26 -
trunk/LayoutTests/inspector/debugger-cyclic-ref.html
r64747 r64973 22 22 testController.waitUntilDone(); 23 23 24 WebInspector.show ScriptsPanel();24 WebInspector.showPanel("scripts"); 25 25 frontend_ensureDebuggerEnabled(debuggerWasEnabledCallback); 26 26 -
trunk/LayoutTests/inspector/debugger-eval-while-paused.html
r62773 r64973 26 26 testController.waitUntilDone(); 27 27 28 WebInspector.show ScriptsPanel();28 WebInspector.showPanel("scripts"); 29 29 frontend_ensureDebuggerEnabled(debuggerWasEnabledCallback); 30 30 -
trunk/LayoutTests/inspector/debugger-no-nested-pause.html
r62772 r64973 21 21 testController.waitUntilDone(); 22 22 23 WebInspector.show ScriptsPanel();23 WebInspector.showPanel("scripts"); 24 24 frontend_ensureDebuggerEnabled(debuggerWasEnabledCallback); 25 25 -
trunk/LayoutTests/inspector/debugger-pause-in-eval-script.html
r63811 r64973 14 14 testController.waitUntilDone(); 15 15 16 WebInspector.show ScriptsPanel();16 WebInspector.showPanel("scripts"); 17 17 18 18 var scriptToEvaluate = "function testFunction() {\n" + -
trunk/LayoutTests/inspector/debugger-pause-on-debugger-statement.html
r62769 r64973 18 18 testController.waitUntilDone(); 19 19 20 WebInspector.show ScriptsPanel();20 WebInspector.showPanel("scripts"); 21 21 frontend_ensureDebuggerEnabled(debuggerWasEnabledCallback); 22 22 -
trunk/LayoutTests/inspector/debugger-proto-property.html
r62769 r64973 26 26 testController.waitUntilDone(); 27 27 28 WebInspector.show ScriptsPanel();28 WebInspector.showPanel("scripts"); 29 29 frontend_ensureDebuggerEnabled(debuggerWasEnabledCallback); 30 30 -
trunk/LayoutTests/inspector/elements-panel-limited-children.html
r61617 r64973 126 126 function frontend_loadDOM(testController) 127 127 { 128 WebInspector.showPanel("elements"); 128 129 testController.waitUntilDone(); 129 130 // Need test to be async to expand whole the tree first. -
trunk/WebCore/ChangeLog
r64971 r64973 1 2010-08-09 Ilya Tikhonovsky <loislo@chromium.org> 2 3 Reviewed by Yury Semikhatsky. 4 5 WebInspector: Current implementation of showPanel is a bit complicated. 6 It is using internal enum for all the panels and this is the problem because 7 we should change a lot of code for a new panel. 8 https://bugs.webkit.org/show_bug.cgi?id=43711 9 10 * WebCore.exp.in: 11 * inspector/Inspector.idl: 12 * inspector/InspectorController.cpp: 13 (WebCore::InspectorController::InspectorController): 14 (WebCore::InspectorController::storeLastActivePanel): 15 (WebCore::InspectorController::connectFrontend): 16 (WebCore::InspectorController::showPanel): 17 (WebCore::InspectorController::disconnectFrontend): 18 * inspector/InspectorController.h: 19 * inspector/InspectorFrontend.cpp: 20 * inspector/InspectorFrontend.h: 21 * inspector/front-end/ElementsTreeOutline.js: 22 (WebInspector.ElementsTreeElement.prototype.selectOnMouseDown): 23 * inspector/front-end/ExtensionServer.js: 24 (WebInspector.ExtensionServer.prototype._onRevealAndSelectResource): 25 * inspector/front-end/inspector.js: 26 (WebInspector.documentClick.followLink): 27 (WebInspector.documentClick): 28 (WebInspector.toggleSearchingForNode): 29 (WebInspector.showPanel): 30 (WebInspector.selectDatabase): 31 (WebInspector.selectDOMStorage): 32 (WebInspector.showProfileForURL): 33 1 34 2010-08-09 Ariya Hidayat <ariya@sencha.com> 2 35 -
trunk/WebCore/WebCore.exp.in
r64963 r64973 423 423 __ZN7WebCore19BackForwardListImplC1EPNS_4PageE 424 424 __ZN7WebCore19CSSStyleDeclaration11setPropertyERKNS_6StringES3_Ri 425 __ZN7WebCore19InspectorController12ConsolePanelE 426 __ZN7WebCore19InspectorController12ScriptsPanelE 427 __ZN7WebCore19InspectorController13ProfilesPanelE 425 428 __ZN7WebCore19InspectorController34inspectorStartsAttachedSettingNameEv 429 __ZN7WebCore19InspectorController9showPanelERKNS_6StringE 426 430 __ZN7WebCore19ResourceRequestBase11setHTTPBodyEN3WTF10PassRefPtrINS_8FormDataEEE 427 431 __ZN7WebCore19ResourceRequestBase13setHTTPMethodERKNS_6StringE … … 1201 1205 __ZN7WebCore19InspectorController5closeEv 1202 1206 __ZN7WebCore19InspectorController7inspectEPNS_4NodeE 1203 __ZN7WebCore19InspectorController9showPanelENS0_13SpecialPanelsE1204 1207 __ZN7WebCore28InspectorFrontendClientLocal12moveWindowByEff 1205 1208 __ZN7WebCore28InspectorFrontendClientLocal14frontendLoadedEv -
trunk/WebCore/inspector/Inspector.idl
r64951 r64973 61 61 [notify] void setDetachedRoot(out Object root); 62 62 [notify] void setDocument(out Value root); 63 [notify] void showPanel(out String panel); 63 64 [notify] void timelineProfilerWasStarted(); 64 65 [notify] void timelineProfilerWasStopped(); -
trunk/WebCore/inspector/InspectorController.cpp
r64951 r64973 120 120 static const char* const profilerEnabledSettingName = "profilerEnabled"; 121 121 static const char* const inspectorAttachedHeightName = "inspectorAttachedHeight"; 122 static const char* const lastActivePanelSettingName = "lastActivePanel"; 122 static const char* const lastActivePanel = "lastActivePanel"; 123 const char* const InspectorController::ElementsPanel = "elements"; 124 const char* const InspectorController::ConsolePanel = "console"; 125 const char* const InspectorController::ScriptsPanel = "scripts"; 126 const char* const InspectorController::ProfilesPanel = "profiles"; 127 123 128 static const char* const monitoringXHRSettingName = "xhrMonitor"; 124 129 … … 151 156 , m_cssStore(new InspectorCSSStore(this)) 152 157 , m_expiredConsoleMessageCount(0) 153 , m_showAfterVisible( CurrentPanel)158 , m_showAfterVisible(lastActivePanel) 154 159 , m_sessionSettings(InspectorObject::create()) 155 160 , m_groupLevel(0) … … 382 387 void InspectorController::storeLastActivePanel(const String& panelName) 383 388 { 384 setSetting(lastActivePanel SettingName, panelName);389 setSetting(lastActivePanel, panelName); 385 390 } 386 391 … … 498 503 #endif 499 504 500 if (m_showAfterVisible == CurrentPanel) { 501 String lastActivePanelSetting = setting(lastActivePanelSettingName); 502 m_showAfterVisible = specialPanelForJSName(lastActivePanelSetting); 503 } 505 if (m_showAfterVisible == lastActivePanel) 506 m_showAfterVisible = setting(lastActivePanel); 504 507 505 508 if (m_nodeToFocus) … … 532 535 } 533 536 534 void InspectorController::showPanel( SpecialPanelspanel)537 void InspectorController::showPanel(const String& panel) 535 538 { 536 539 if (!enabled()) … … 544 547 } 545 548 546 if (panel == CurrentPanel)547 return; 548 549 m_ frontend->showPanel(panel);549 if (panel == lastActivePanel) 550 return; 551 552 m_remoteFrontend->showPanel(panel); 550 553 } 551 554 … … 580 583 stopTimelineProfiler(); 581 584 582 m_showAfterVisible = CurrentPanel;585 m_showAfterVisible = lastActivePanel; 583 586 584 587 hideHighlight(); … … 1893 1896 } 1894 1897 1895 InspectorController::SpecialPanels InspectorController::specialPanelForJSName(const String& panelName)1896 {1897 if (panelName == "elements")1898 return ElementsPanel;1899 if (panelName == "resources")1900 return ResourcesPanel;1901 if (panelName == "scripts")1902 return ScriptsPanel;1903 if (panelName == "timeline")1904 return TimelinePanel;1905 if (panelName == "profiles")1906 return ProfilesPanel;1907 if (panelName == "storage" || panelName == "databases")1908 return StoragePanel;1909 if (panelName == "audits")1910 return AuditsPanel;1911 if (panelName == "console")1912 return ConsolePanel;1913 return ElementsPanel;1914 }1915 1916 1898 InjectedScript InspectorController::injectedScriptForNodeId(long id) 1917 1899 { -
trunk/WebCore/inspector/InspectorController.h
r64846 r64973 95 95 typedef HashMap<int, RefPtr<InspectorDOMStorageResource> > DOMStorageResourcesMap; 96 96 97 typedef enum { 98 AuditsPanel, 99 CurrentPanel, 100 ConsolePanel, 101 ElementsPanel, 102 ResourcesPanel, 103 ScriptsPanel, 104 TimelinePanel, 105 ProfilesPanel, 106 StoragePanel 107 } SpecialPanels; 97 static const char* const ConsolePanel; 98 static const char* const ElementsPanel; 99 static const char* const ProfilesPanel; 100 static const char* const ScriptsPanel; 108 101 109 102 InspectorController(Page*, InspectorClient*); … … 135 128 136 129 void show(); 137 void showPanel( SpecialPanels);130 void showPanel(const String&); 138 131 void close(); 139 132 … … 323 316 324 317 bool isMainResourceLoader(DocumentLoader* loader, const KURL& requestUrl); 325 326 SpecialPanels specialPanelForJSName(const String& panelName);327 318 328 319 void didEvaluateForTestInFrontend(long callId, const String& jsonResult); … … 364 355 DOMStorageResourcesMap m_domStorageResources; 365 356 #endif 366 S pecialPanelsm_showAfterVisible;357 String m_showAfterVisible; 367 358 RefPtr<Node> m_highlightedNode; 368 359 #if ENABLE(INSPECTOR) -
trunk/WebCore/inspector/InspectorFrontend.cpp
r64951 r64973 58 58 } 59 59 60 void InspectorFrontend::showPanel(int panel)61 {62 const char* showFunctionName;63 switch (panel) {64 case InspectorController::AuditsPanel:65 showFunctionName = "showAuditsPanel";66 break;67 case InspectorController::ConsolePanel:68 showFunctionName = "showConsolePanel";69 break;70 case InspectorController::ElementsPanel:71 showFunctionName = "showElementsPanel";72 break;73 case InspectorController::ResourcesPanel:74 showFunctionName = "showResourcesPanel";75 break;76 case InspectorController::TimelinePanel:77 showFunctionName = "showTimelinePanel";78 break;79 case InspectorController::ProfilesPanel:80 showFunctionName = "showProfilesPanel";81 break;82 case InspectorController::ScriptsPanel:83 showFunctionName = "showScriptsPanel";84 break;85 case InspectorController::StoragePanel:86 showFunctionName = "showStoragePanel";87 break;88 default:89 ASSERT_NOT_REACHED();90 showFunctionName = 0;91 }92 93 if (showFunctionName)94 callSimpleFunction(showFunctionName);95 }96 97 60 void InspectorFrontend::callSimpleFunction(const String& functionName) 98 61 { -
trunk/WebCore/inspector/InspectorFrontend.h
r64951 r64973 48 48 49 49 void close(); 50 void showPanel(int panel);51 50 ScriptState* scriptState() const { return m_webInspector.scriptState(); } 52 51 private: -
trunk/WebCore/inspector/front-end/ElementsTreeOutline.js
r64267 r64973 684 684 685 685 if (this.treeOutline.showInElementsPanelEnabled) { 686 WebInspector.show ElementsPanel();686 WebInspector.showPanel("elements"); 687 687 WebInspector.panels.elements.focusedDOMNode = this.representedObject; 688 688 } -
trunk/WebCore/inspector/front-end/ExtensionServer.js
r64558 r64973 214 214 return this._status.E_NOTFOUND(typeof id + ": " + id); 215 215 WebInspector.panels.resources.showResource(resource, message.line); 216 WebInspector.show ResourcesPanel();216 WebInspector.showPanel("resources"); 217 217 }, 218 218 -
trunk/WebCore/inspector/front-end/inspector.js
r64770 r64973 692 692 } 693 693 694 WebInspector.show ResourcesPanel();694 WebInspector.showPanel("resources"); 695 695 } 696 696 … … 1082 1082 { 1083 1083 if (this.panels.elements) { 1084 this.show ElementsPanel();1084 this.showPanel("elements"); 1085 1085 this.panels.elements.toggleSearchingForNode(); 1086 1086 } … … 1097 1097 } 1098 1098 1099 WebInspector.showElementsPanel = function() 1100 { 1101 this.currentPanel = this.panels.elements; 1102 } 1103 1104 WebInspector.showResourcesPanel = function() 1105 { 1106 this.currentPanel = this.panels.resources; 1107 } 1108 1109 WebInspector.showScriptsPanel = function() 1110 { 1111 this.currentPanel = this.panels.scripts; 1112 } 1113 1114 WebInspector.showTimelinePanel = function() 1115 { 1116 this.currentPanel = this.panels.timeline; 1117 } 1118 1119 WebInspector.showProfilesPanel = function() 1120 { 1121 this.currentPanel = this.panels.profiles; 1122 } 1123 1124 WebInspector.showStoragePanel = function() 1125 { 1126 this.currentPanel = this.panels.storage; 1127 } 1128 1129 WebInspector.showConsolePanel = function() 1130 { 1131 this.currentPanel = this.panels.console; 1132 } 1133 1134 WebInspector.showAuditsPanel = function() 1135 { 1136 this.currentPanel = this.panels.audits; 1099 WebInspector.showPanel = function(panel) 1100 { 1101 if (!(panel in this.panels)) { 1102 console.error("Unable to show %s panel.", panel); 1103 panel = "elements"; 1104 } 1105 this.currentPanel = this.panels[panel]; 1137 1106 } 1138 1107 1139 1108 WebInspector.selectDatabase = function(o) 1140 1109 { 1141 WebInspector.show StoragePanel();1110 WebInspector.showPanel("storage"); 1142 1111 WebInspector.panels.storage.selectDatabase(o); 1143 1112 } … … 1145 1114 WebInspector.selectDOMStorage = function(o) 1146 1115 { 1147 WebInspector.show StoragePanel();1116 WebInspector.showPanel("storage"); 1148 1117 WebInspector.panels.storage.selectDOMStorage(o); 1149 1118 } … … 1743 1712 WebInspector.showProfileForURL = function(url) 1744 1713 { 1745 WebInspector.showP rofilesPanel();1714 WebInspector.showPanel("profiles"); 1746 1715 WebInspector.panels.profiles.showProfileForURL(url); 1747 1716 }
Note: See TracChangeset
for help on using the changeset viewer.