Changeset 66730 in webkit
- Timestamp:
- Sep 3, 2010 7:01:33 AM (14 years ago)
- Location:
- trunk
- Files:
-
- 16 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/LayoutTests/ChangeLog
r66728 r66730 1 2010-09-03 Pavel Podivilov <podivilov@chromium.org> 2 3 Reviewed by Yury Semikhatsky. 4 5 Web Inspector: provide more information to front-end when breaking on DOM event 6 https://bugs.webkit.org/show_bug.cgi?id=44679 7 8 * http/tests/inspector/debugger-test2.js: 9 (initialize_DebuggerTest.InspectorTest._pausedScript): 10 1 11 2010-09-03 Jeremy Orlow <jorlow@chromium.org> 2 12 -
trunk/LayoutTests/http/tests/inspector/debugger-test2.js
r66596 r66730 90 90 }; 91 91 92 InspectorTest._pausedScript = function( callFrames)92 InspectorTest._pausedScript = function(details) 93 93 { 94 94 InspectorTest.addResult("Script execution paused."); 95 InspectorTest._callFrames = callFrames;95 InspectorTest._callFrames = details.callFrames; 96 96 if (InspectorTest._waitUntilPausedCallback) { 97 97 var callback = InspectorTest._waitUntilPausedCallback; -
trunk/WebCore/ChangeLog
r66726 r66730 1 2010-09-03 Pavel Podivilov <podivilov@chromium.org> 2 3 Reviewed by Yury Semikhatsky. 4 5 Web Inspector: provide more information to front-end when breaking on DOM event 6 https://bugs.webkit.org/show_bug.cgi?id=44679 7 8 * dom/ContainerNode.cpp: 9 (WebCore::ContainerNode::insertBefore): 10 (WebCore::ContainerNode::parserInsertBefore): 11 (WebCore::ContainerNode::replaceChild): 12 (WebCore::ContainerNode::appendChild): 13 (WebCore::ContainerNode::parserAddChild): 14 (WebCore::notifyChildInserted): 15 (WebCore::dispatchChildRemovalEvents): 16 * dom/Element.cpp: 17 (WebCore::Element::setAttribute): 18 (WebCore::Element::removeAttribute): 19 * inspector/Inspector.idl: 20 * inspector/InspectorController.cpp: 21 (WebCore::InspectorController::willInsertDOMNodeImpl): 22 (WebCore::InspectorController::didInsertDOMNodeImpl): 23 (WebCore::InspectorController::willRemoveDOMNodeImpl): 24 (WebCore::InspectorController::didRemoveDOMNodeImpl): 25 (WebCore::InspectorController::willModifyDOMAttrImpl): 26 (WebCore::InspectorController::didModifyDOMAttrImpl): 27 * inspector/InspectorController.h: 28 (WebCore::InspectorController::willInsertDOMNode): 29 (WebCore::InspectorController::didInsertDOMNode): 30 (WebCore::InspectorController::willRemoveDOMNode): 31 (WebCore::InspectorController::willModifyDOMAttr): 32 (WebCore::InspectorController::didModifyDOMAttr): 33 (WebCore::InspectorController::inspectorControllerForNode): 34 * inspector/InspectorDOMAgent.cpp: 35 (WebCore::InspectorDOMAgent::~InspectorDOMAgent): 36 (WebCore::InspectorDOMAgent::shouldBreakOnNodeInsertion): 37 (WebCore::InspectorDOMAgent::shouldBreakOnNodeRemoval): 38 (WebCore::InspectorDOMAgent::shouldBreakOnAttributeModification): 39 (WebCore::InspectorDOMAgent::didInsertDOMNode): 40 (WebCore::InspectorDOMAgent::didRemoveDOMNode): 41 (WebCore::InspectorDOMAgent::didModifyDOMAttr): 42 (WebCore::InspectorDOMAgent::createBreakpoint): 43 * inspector/InspectorDOMAgent.h: 44 * inspector/InspectorDebuggerAgent.cpp: 45 (WebCore::InspectorDebuggerAgent::InspectorDebuggerAgent): 46 (WebCore::InspectorDebuggerAgent::~InspectorDebuggerAgent): 47 (WebCore::InspectorDebuggerAgent::didPause): 48 (WebCore::InspectorDebuggerAgent::breakProgram): 49 * inspector/InspectorDebuggerAgent.h: 50 * inspector/InspectorValues.h: 51 (WebCore::InspectorValue::isNull): 52 * inspector/front-end/BreakpointsSidebarPane.js: 53 (WebInspector.BreakpointItem): 54 (WebInspector.BreakpointItem.prototype._enableChanged): 55 * inspector/front-end/Script.js: 56 (WebInspector.Script.prototype.get linesCount): 57 * inspector/front-end/inspector.js: 58 (WebInspector.pausedScript): 59 1 60 2010-08-31 Jeremy Orlow <jorlow@chromium.org> 2 61 -
trunk/WebCore/dom/ContainerNode.cpp
r66658 r66730 152 152 break; 153 153 154 InspectorController::willInsertDOMNode(child, this); 155 154 156 insertBeforeCommon(next.get(), child); 155 157 … … 219 221 Node* child = it->get(); 220 222 223 InspectorController::willInsertDOMNode(child, this); 224 221 225 insertBeforeCommon(next.get(), child); 222 226 … … 291 295 ASSERT(!child->nextSibling()); 292 296 ASSERT(!child->previousSibling()); 297 298 InspectorController::willInsertDOMNode(child.get(), this); 293 299 294 300 // Add child after "prev". … … 573 579 } 574 580 581 InspectorController::willInsertDOMNode(child, this); 582 575 583 // Append child to the end of the list 576 584 forbidEventDispatch(); … … 610 618 ASSERT(newChild); 611 619 ASSERT(!newChild->parent()); // Use appendChild if you need to handle reparenting (and want DOM mutation events). 620 621 InspectorController::willInsertDOMNode(newChild.get(), this); 612 622 613 623 forbidEventDispatch(); … … 982 992 ASSERT(!eventDispatchForbidden()); 983 993 984 #if ENABLE(INSPECTOR) 985 if (Page* page = child->document()->page()) { 986 if (InspectorController* inspectorController = page->inspectorController()) 987 inspectorController->didInsertDOMNode(child); 988 } 989 #endif 994 InspectorController::didInsertDOMNode(child); 990 995 991 996 RefPtr<Node> c = child; … … 1021 1026 ASSERT(!eventDispatchForbidden()); 1022 1027 1023 #if ENABLE(INSPECTOR) 1024 if (Page* page = child->document()->page()) { 1025 if (InspectorController* inspectorController = page->inspectorController()) 1026 inspectorController->didRemoveDOMNode(child); 1027 } 1028 #endif 1028 InspectorController::willRemoveDOMNode(child); 1029 1029 1030 1030 RefPtr<Node> c = child; -
trunk/WebCore/dom/Element.cpp
r66647 r66730 541 541 } 542 542 543 #if ENABLE(INSPECTOR) 544 if (!isSynchronizingStyleAttribute()) 545 InspectorController::willModifyDOMAttr(this); 546 #endif 547 543 548 const AtomicString& localName = shouldIgnoreAttributeCase(this) ? name.lower() : name; 544 549 … … 564 569 565 570 #if ENABLE(INSPECTOR) 566 if (Page* page = document()->page()) { 567 if (InspectorController* inspectorController = page->inspectorController()) { 568 if (!isSynchronizingStyleAttribute()) 569 inspectorController->didModifyDOMAttr(this); 570 } 571 } 571 if (!isSynchronizingStyleAttribute()) 572 InspectorController::didModifyDOMAttr(this); 572 573 #endif 573 574 } … … 575 576 void Element::setAttribute(const QualifiedName& name, const AtomicString& value, ExceptionCode&) 576 577 { 578 #if ENABLE(INSPECTOR) 579 if (!isSynchronizingStyleAttribute()) 580 InspectorController::willModifyDOMAttr(this); 581 #endif 582 577 583 document()->incDOMTreeVersion(); 578 584 … … 593 599 594 600 #if ENABLE(INSPECTOR) 595 if (Page* page = document()->page()) { 596 if (InspectorController* inspectorController = page->inspectorController()) { 597 if (!isSynchronizingStyleAttribute()) 598 inspectorController->didModifyDOMAttr(this); 599 } 600 } 601 if (!isSynchronizingStyleAttribute()) 602 InspectorController::didModifyDOMAttr(this); 601 603 #endif 602 604 } … … 1229 1231 void Element::removeAttribute(const String& name, ExceptionCode& ec) 1230 1232 { 1233 InspectorController::willModifyDOMAttr(this); 1234 1231 1235 String localName = shouldIgnoreAttributeCase(this) ? name.lower() : name; 1232 1236 … … 1237 1241 } 1238 1242 1239 #if ENABLE(INSPECTOR) 1240 if (Page* page = document()->page()) { 1241 if (InspectorController* inspectorController = page->inspectorController()) 1242 inspectorController->didModifyDOMAttr(this); 1243 } 1244 #endif 1245 1243 InspectorController::didModifyDOMAttr(this); 1246 1244 } 1247 1245 -
trunk/WebCore/inspector/Inspector.idl
r66720 r66730 73 73 [notify] void failedToParseScriptSource(out String url, out String data, out int firstLine, out int errorLine, out String errorMessage); 74 74 [notify] void parsedScriptSource(out String sourceID, out String url, out String data, out int firstLine, out int scriptWorldType); 75 [notify] void pausedScript(out Value callFrames);75 [notify] void pausedScript(out Object details); 76 76 [notify] void profilerWasEnabled(); 77 77 [notify] void profilerWasDisabled(); -
trunk/WebCore/inspector/InspectorController.cpp
r66720 r66730 60 60 #include "InspectorCSSStore.h" 61 61 #include "InspectorClient.h" 62 #include "InspectorFrontend.h" 63 #include "InspectorFrontendClient.h" 62 #include "InspectorDOMAgent.h" 64 63 #include "InspectorDOMStorageResource.h" 65 64 #include "InspectorDatabaseResource.h" 66 65 #include "InspectorDebuggerAgent.h" 66 #include "InspectorFrontend.h" 67 #include "InspectorFrontendClient.h" 67 68 #include "InspectorProfilerAgent.h" 68 69 #include "InspectorResource.h" … … 1845 1846 } 1846 1847 1848 void InspectorController::willInsertDOMNodeImpl(Node* node, Node* parent) 1849 { 1850 #if ENABLE(JAVASCRIPT_DEBUGGER) 1851 if (!m_debuggerAgent || !m_domAgent) 1852 return; 1853 PassRefPtr<InspectorValue> details; 1854 if (m_domAgent->shouldBreakOnNodeInsertion(node, parent, &details)) 1855 m_debuggerAgent->breakProgram(details); 1856 #endif 1857 } 1858 1859 void InspectorController::didInsertDOMNodeImpl(Node* node) 1860 { 1861 if (m_domAgent) 1862 m_domAgent->didInsertDOMNode(node); 1863 } 1864 1865 void InspectorController::willRemoveDOMNodeImpl(Node* node) 1866 { 1867 #if ENABLE(JAVASCRIPT_DEBUGGER) 1868 if (!m_debuggerAgent || !m_domAgent) 1869 return; 1870 PassRefPtr<InspectorValue> details; 1871 if (m_domAgent->shouldBreakOnNodeRemoval(node, &details)) 1872 m_debuggerAgent->breakProgram(details); 1873 #endif 1874 } 1875 1876 void InspectorController::didRemoveDOMNodeImpl(Node* node) 1877 { 1878 if (m_domAgent) 1879 m_domAgent->didRemoveDOMNode(node); 1880 } 1881 1882 void InspectorController::willModifyDOMAttrImpl(Element* element) 1883 { 1884 #if ENABLE(JAVASCRIPT_DEBUGGER) 1885 if (!m_debuggerAgent || !m_domAgent) 1886 return; 1887 PassRefPtr<InspectorValue> details; 1888 if (m_domAgent->shouldBreakOnAttributeModification(element, &details)) 1889 m_debuggerAgent->breakProgram(details); 1890 #endif 1891 } 1892 1893 void InspectorController::didModifyDOMAttrImpl(Element* element) 1894 { 1895 if (m_domAgent) 1896 m_domAgent->didModifyDOMAttr(element); 1897 } 1898 1899 1847 1900 } // namespace WebCore 1848 1901 -
trunk/WebCore/inspector/InspectorController.h
r66012 r66730 32 32 #include "Console.h" 33 33 #include "Cookie.h" 34 #include "InspectorDOMAgent.h" 34 #include "Element.h" 35 #include "Page.h" 35 36 #include "PlatformString.h" 36 37 #include "ScriptState.h" … … 59 60 class InspectorClient; 60 61 class InspectorCSSStore; 62 class InspectorDOMAgent; 61 63 class InspectorDOMStorageResource; 62 64 class InspectorDatabaseResource; … … 184 186 void mainResourceFiredDOMContentEvent(DocumentLoader*, const KURL&); 185 187 186 void didInsertDOMNode(Node*); 187 void didRemoveDOMNode(Node*); 188 void didModifyDOMAttr(Element*); 188 static void willInsertDOMNode(Node* node, Node* parent); 189 static void didInsertDOMNode(Node*); 190 static void willRemoveDOMNode(Node*); 191 static void willModifyDOMAttr(Element*); 192 static void didModifyDOMAttr(Element*); 193 189 194 #if ENABLE(WORKERS) 190 195 enum WorkerAction { WorkerCreated, WorkerDestroyed }; … … 307 312 void didEvaluateForTestInFrontend(long callId, const String& jsonResult); 308 313 314 static InspectorController* inspectorControllerForNode(Node*); 315 void willInsertDOMNodeImpl(Node* node, Node* parent); 316 void didInsertDOMNodeImpl(Node*); 317 void willRemoveDOMNodeImpl(Node*); 318 void didRemoveDOMNodeImpl(Node*); 319 void willModifyDOMAttrImpl(Element*); 320 void didModifyDOMAttrImpl(Element*); 321 309 322 #if ENABLE(JAVASCRIPT_DEBUGGER) 310 323 friend class InspectorDebuggerAgent; … … 377 390 }; 378 391 392 inline void InspectorController::willInsertDOMNode(Node* node, Node* parent) 393 { 394 #if ENABLE(INSPECTOR) 395 if (InspectorController* inspectorController = inspectorControllerForNode(parent)) 396 inspectorController->willInsertDOMNodeImpl(node, parent); 397 #endif 398 } 399 379 400 inline void InspectorController::didInsertDOMNode(Node* node) 380 401 { 381 402 #if ENABLE(INSPECTOR) 382 if (m_domAgent) 383 m_domAgent->didInsertDOMNode(node); 384 #endif 385 } 386 387 inline void InspectorController::didRemoveDOMNode(Node* node) 388 { 389 #if ENABLE(INSPECTOR) 390 if (m_domAgent) 391 m_domAgent->didRemoveDOMNode(node); 403 if (InspectorController* inspectorController = inspectorControllerForNode(node)) 404 inspectorController->didInsertDOMNodeImpl(node); 405 #endif 406 } 407 408 inline void InspectorController::willRemoveDOMNode(Node* node) 409 { 410 #if ENABLE(INSPECTOR) 411 if (InspectorController* inspectorController = inspectorControllerForNode(node)) { 412 inspectorController->willRemoveDOMNodeImpl(node); 413 inspectorController->didRemoveDOMNodeImpl(node); 414 } 415 #endif 416 } 417 418 inline void InspectorController::willModifyDOMAttr(Element* element) 419 { 420 #if ENABLE(INSPECTOR) 421 if (InspectorController* inspectorController = inspectorControllerForNode(element)) 422 inspectorController->willModifyDOMAttrImpl(element); 392 423 #endif 393 424 } … … 396 427 { 397 428 #if ENABLE(INSPECTOR) 398 if (m_domAgent) 399 m_domAgent->didModifyDOMAttr(element); 400 #endif 429 if (InspectorController* inspectorController = inspectorControllerForNode(element)) 430 inspectorController->didModifyDOMAttrImpl(element); 431 #endif 432 } 433 434 inline InspectorController* InspectorController::inspectorControllerForNode(Node* node) 435 { 436 if (Page* page = node->document()->page()) { 437 if (InspectorController* inspectorController = page->inspectorController()) { 438 if (inspectorController->hasFrontend()) 439 return inspectorController; 440 } 441 } 442 return 0; 401 443 } 402 444 -
trunk/WebCore/inspector/InspectorDOMAgent.cpp
r66334 r66730 65 65 #include "RenderStyle.h" 66 66 #include "RenderStyleConstants.h" 67 #include "ScriptDebugServer.h"68 67 #include "ScriptEventListener.h" 69 68 #include "StyleSheetList.h" … … 211 210 } 212 211 213 InspectorDOMAgent* InspectorDOMAgent::s_domAgentOnBreakpoint = 0;214 215 212 InspectorDOMAgent::InspectorDOMAgent(InspectorCSSStore* cssStore, InspectorFrontend* frontend) 216 213 : EventListener(InspectorDOMAgentType) … … 225 222 { 226 223 reset(); 227 228 if (this == s_domAgentOnBreakpoint)229 s_domAgentOnBreakpoint = 0;230 224 } 231 225 … … 781 775 } 782 776 777 bool InspectorDOMAgent::shouldBreakOnNodeInsertion(Node*, Node* parent, PassRefPtr<InspectorValue>* details) 778 { 779 if (!hasBreakpoint(parent, SubtreeModified)) 780 return false; 781 RefPtr<InspectorObject> detailsObject = InspectorObject::create(); 782 detailsObject->setObject("breakpoint", createBreakpoint(parent, SubtreeModified)); 783 *details = detailsObject; 784 return true; 785 } 786 787 bool InspectorDOMAgent::shouldBreakOnNodeRemoval(Node* node, PassRefPtr<InspectorValue>* details) 788 { 789 bool hasNodeRemovedBreakpoint = hasBreakpoint(node, NodeRemoved); 790 bool hasAnyBreakpoint = hasNodeRemovedBreakpoint || hasBreakpoint(innerParentNode(node), SubtreeModified); 791 if (!hasAnyBreakpoint) 792 return false; 793 794 RefPtr<InspectorObject> detailsObject = InspectorObject::create(); 795 if (hasNodeRemovedBreakpoint) 796 detailsObject->setObject("breakpoint", createBreakpoint(node, NodeRemoved)); 797 else 798 detailsObject->setObject("breakpoint", createBreakpoint(innerParentNode(node), SubtreeModified)); 799 *details = detailsObject; 800 return true; 801 } 802 803 bool InspectorDOMAgent::shouldBreakOnAttributeModification(Element* element, PassRefPtr<InspectorValue>* details) 804 { 805 if (!hasBreakpoint(element, AttributeModified)) 806 return false; 807 RefPtr<InspectorObject> detailsObject = InspectorObject::create(); 808 detailsObject->setObject("breakpoint", createBreakpoint(element, AttributeModified)); 809 *details = detailsObject; 810 return true; 811 } 812 783 813 String InspectorDOMAgent::documentURLString(Document* document) const 784 814 { … … 986 1016 987 1017 if (m_breakpoints.size()) { 988 Node* parent = innerParentNode(node); 989 if (hasBreakpoint(parent, SubtreeModified)) { 990 if (!pauseOnBreakpoint()) 991 return; 992 } 993 uint32_t mask = m_breakpoints.get(parent); 1018 uint32_t mask = m_breakpoints.get(innerParentNode(node)); 994 1019 uint32_t inheritableTypesMask = (mask | (mask >> domBreakpointDerivedTypeShift)) & inheritableDOMBreakpointTypesMask; 995 1020 if (inheritableTypesMask) … … 1024 1049 1025 1050 if (m_breakpoints.size()) { 1026 if (hasBreakpoint(node, NodeRemoved) || hasBreakpoint(innerParentNode(node), SubtreeModified)) {1027 if (!pauseOnBreakpoint())1028 return;1029 }1030 1051 // Remove subtree breakpoints. 1031 1052 m_breakpoints.remove(node); … … 1064 1085 return; 1065 1086 1066 if (hasBreakpoint(element, AttributeModified)) {1067 if (!pauseOnBreakpoint())1068 return;1069 }1070 1071 1087 m_frontend->attributesUpdated(id, buildArrayForElementAttributes(element)); 1088 } 1089 1090 PassRefPtr<InspectorObject> InspectorDOMAgent::createBreakpoint(Node* node, long type) 1091 { 1092 RefPtr<InspectorObject> breakpoint = InspectorObject::create(); 1093 1094 // Find breakpoint owner. 1095 while (!(m_breakpoints.get(node) & (1 << type))) { 1096 node = innerParentNode(node); 1097 ASSERT(node); 1098 } 1099 long nodeId = m_documentNodeToIdMap.get(node); 1100 ASSERT(nodeId); 1101 1102 breakpoint->setNumber("nodeId", nodeId); 1103 breakpoint->setNumber("type", type); 1104 return breakpoint.release(); 1072 1105 } 1073 1106 … … 1077 1110 uint32_t derivedBit = rootBit << domBreakpointDerivedTypeShift; 1078 1111 return m_breakpoints.get(node) & (rootBit | derivedBit); 1079 }1080 1081 bool InspectorDOMAgent::pauseOnBreakpoint()1082 {1083 #if ENABLE(JAVASCRIPT_DEBUGGER)1084 s_domAgentOnBreakpoint = this;1085 ScriptDebugServer::shared().breakProgram();1086 bool deleted = !s_domAgentOnBreakpoint;1087 s_domAgentOnBreakpoint = 0;1088 return !deleted;1089 #else1090 return true;1091 #endif1092 1112 } 1093 1113 -
trunk/WebCore/inspector/InspectorDOMAgent.h
r65942 r66730 37 37 #include "InspectorValues.h" 38 38 #include "NodeList.h" 39 #include "ScriptState.h"40 39 #include "Timer.h" 41 40 … … 115 114 void setDOMBreakpoint(long nodeId, long type); 116 115 void removeDOMBreakpoint(long nodeId, long type); 116 bool shouldBreakOnNodeInsertion(Node* node, Node* parent, PassRefPtr<InspectorValue>* details); 117 bool shouldBreakOnNodeRemoval(Node* node, PassRefPtr<InspectorValue>* details); 118 bool shouldBreakOnAttributeModification(Element* element, PassRefPtr<InspectorValue>* details); 117 119 118 120 // Methods called from the frontend for CSS styles inspection. … … 161 163 162 164 bool hasBreakpoint(Node* node, long type); 163 bool pauseOnBreakpoint();165 PassRefPtr<InspectorObject> createBreakpoint(Node* node, long type); 164 166 void updateSubtreeBreakpoints(Node* root, uint32_t rootMask, bool value); 165 167 … … 218 220 Vector<long> m_inspectedNodes; 219 221 HashMap<Node*, uint32_t> m_breakpoints; 220 221 static InspectorDOMAgent* s_domAgentOnBreakpoint;222 222 }; 223 223 -
trunk/WebCore/inspector/InspectorDebuggerAgent.cpp
r66013 r66730 57 57 } 58 58 59 InspectorDebuggerAgent* InspectorDebuggerAgent::s_debuggerAgentOnBreakpoint = 0; 60 59 61 InspectorDebuggerAgent::InspectorDebuggerAgent(InspectorController* inspectorController, InspectorFrontend* frontend) 60 62 : m_inspectorController(inspectorController) … … 62 64 , m_pausedScriptState(0) 63 65 , m_breakpointsLoaded(false) 66 , m_breakProgramReason(InspectorValue::null()) 64 67 { 65 68 } … … 69 72 ScriptDebugServer::shared().removeListener(this, m_inspectorController->inspectedPage()); 70 73 m_pausedScriptState = 0; 74 75 if (this == s_debuggerAgentOnBreakpoint) 76 s_debuggerAgentOnBreakpoint = 0; 71 77 } 72 78 … … 283 289 { 284 290 ASSERT(scriptState && !m_pausedScriptState); 291 ASSERT(m_breakProgramReason); 285 292 m_pausedScriptState = scriptState; 286 RefPtr<InspectorValue> callFrames = currentCallFrames(); 287 m_frontend->pausedScript(callFrames.get()); 293 RefPtr<InspectorObject> details = InspectorObject::create(); 294 details->setValue("callFrames", currentCallFrames()); 295 details->setValue("reason", m_breakProgramReason); 296 m_frontend->pausedScript(details); 288 297 } 289 298 … … 294 303 } 295 304 305 void InspectorDebuggerAgent::breakProgram(PassRefPtr<InspectorValue> reason) 306 { 307 s_debuggerAgentOnBreakpoint = this; 308 m_breakProgramReason = reason; 309 310 ScriptDebugServer::shared().breakProgram(); 311 if (!s_debuggerAgentOnBreakpoint) 312 return; 313 314 s_debuggerAgentOnBreakpoint = 0; 315 m_breakProgramReason = InspectorValue::null(); 316 } 317 296 318 } // namespace WebCore 297 319 -
trunk/WebCore/inspector/InspectorDebuggerAgent.h
r65891 r66730 62 62 63 63 void pause(); 64 void breakProgram(PassRefPtr<InspectorValue> reason); 64 65 void resume(); 65 66 void stepOverStatement(); … … 94 95 HashMap<String, unsigned> m_breakpointsMapping; 95 96 bool m_breakpointsLoaded; 97 static InspectorDebuggerAgent* s_debuggerAgentOnBreakpoint; 98 RefPtr<InspectorValue> m_breakProgramReason; 96 99 }; 97 100 -
trunk/WebCore/inspector/InspectorValues.h
r66098 r66730 68 68 Type type() const { return m_type; } 69 69 70 bool isNull() const { return m_type == TypeNull; } 71 70 72 virtual bool asBoolean(bool* output) const; 71 73 virtual bool asNumber(double* output) const; -
trunk/WebCore/inspector/front-end/BreakpointsSidebarPane.js
r66712 r66730 107 107 108 108 this._breakpoint.addEventListener("enable-changed", this._enableChanged, this); 109 this._breakpoint.addEventListener("removed", this. _removed, this);109 this._breakpoint.addEventListener("removed", this.dispatchEventToListeners.bind(this, "removed")); 110 110 } 111 111 … … 129 129 }, 130 130 131 _enableChanged: function( )131 _enableChanged: function(event) 132 132 { 133 133 var checkbox = this._element.firstChild; 134 134 checkbox.checked = this._breakpoint.enabled; 135 },136 137 _removed: function()138 {139 this.dispatchEventToListeners("removed");140 135 } 141 136 } -
trunk/WebCore/inspector/front-end/Script.js
r60843 r66730 63 63 if (!this.source) 64 64 return 0; 65 if (this._linesCount) 66 return this._linesCount; 65 67 this._linesCount = 0; 66 68 var lastIndex = this.source.indexOf("\n"); … … 69 71 this._linesCount++; 70 72 } 73 return this._linesCount; 71 74 } 72 75 } -
trunk/WebCore/inspector/front-end/inspector.js
r66720 r66730 1446 1446 } 1447 1447 1448 WebInspector.pausedScript = function( callFrames)1449 { 1450 this.panels.scripts.debuggerPaused( callFrames);1448 WebInspector.pausedScript = function(details) 1449 { 1450 this.panels.scripts.debuggerPaused(details.callFrames); 1451 1451 InspectorFrontendHost.bringToFront(); 1452 1452 }
Note: See TracChangeset
for help on using the changeset viewer.