Title: [116780] trunk
Revision
116780
Author
[email protected]
Date
2012-05-11 09:46:02 -0700 (Fri, 11 May 2012)

Log Message

Web Inspector: move breakpoint manager from debuggerPresentationModel to WebInspector.
https://bugs.webkit.org/show_bug.cgi?id=86220

Reviewed by Yury Semikhatsky.

Source/WebCore:

Now that breakpoint manager does not depend on the source mapping instance from the
debugger presentation model, it can be moved out.

* inspector/front-end/DebuggerPresentationModel.js:
(WebInspector.DebuggerPresentationModel):
* inspector/front-end/_javascript_Source.js:
(WebInspector._javascript_Source):
(WebInspector._javascript_Source.prototype.setFormatted.didGetContent.didFormatContent):
(WebInspector._javascript_Source.prototype.setFormatted.didGetContent):
(WebInspector._javascript_Source.prototype.setFormatted):
* inspector/front-end/_javascript_SourceFrame.js:
(WebInspector._javascript_SourceFrame):
* inspector/front-end/ScriptsPanel.js:
* inspector/front-end/inspector.js:

LayoutTests:

* inspector/debugger/scripts-panel.html:

Modified Paths

Diff

Modified: trunk/LayoutTests/ChangeLog (116779 => 116780)


--- trunk/LayoutTests/ChangeLog	2012-05-11 16:41:53 UTC (rev 116779)
+++ trunk/LayoutTests/ChangeLog	2012-05-11 16:46:02 UTC (rev 116780)
@@ -1,3 +1,12 @@
+2012-05-11  Pavel Feldman  <[email protected]>
+
+        Web Inspector: move breakpoint manager from debuggerPresentationModel to WebInspector.
+        https://bugs.webkit.org/show_bug.cgi?id=86220
+
+        Reviewed by Yury Semikhatsky.
+
+        * inspector/debugger/scripts-panel.html:
+
 2012-05-11  Christophe Dumez  <[email protected]>
 
         [GTK] LayoutTests/svg/batik/text/verticalText.svg fails to display Chinese characters

Modified: trunk/LayoutTests/inspector/debugger/scripts-panel.html (116779 => 116780)


--- trunk/LayoutTests/inspector/debugger/scripts-panel.html	2012-05-11 16:41:53 UTC (rev 116779)
+++ trunk/LayoutTests/inspector/debugger/scripts-panel.html	2012-05-11 16:46:02 UTC (rev 116780)
@@ -45,7 +45,6 @@
             var data = { oldUISourceCodeList: oldUISourceCodeList, uiSourceCodeList: newUISourceCodeList };
             this.dispatchEventToListeners(WebInspector.DebuggerPresentationModel.Events.UISourceCodeReplaced, data);
         }
-        model.breakpointManager = new WebInspector.BreakpointManager(breakpointStorage, WebInspector.debuggerModel, null);
         return model;
     }
     function createUISouceCode(url)

Modified: trunk/Source/WebCore/ChangeLog (116779 => 116780)


--- trunk/Source/WebCore/ChangeLog	2012-05-11 16:41:53 UTC (rev 116779)
+++ trunk/Source/WebCore/ChangeLog	2012-05-11 16:46:02 UTC (rev 116780)
@@ -1,3 +1,25 @@
+2012-05-11  Pavel Feldman  <[email protected]>
+
+        Web Inspector: move breakpoint manager from debuggerPresentationModel to WebInspector.
+        https://bugs.webkit.org/show_bug.cgi?id=86220
+
+        Reviewed by Yury Semikhatsky.
+
+        Now that breakpoint manager does not depend on the source mapping instance from the
+        debugger presentation model, it can be moved out.
+
+        * inspector/front-end/DebuggerPresentationModel.js:
+        (WebInspector.DebuggerPresentationModel):
+        * inspector/front-end/_javascript_Source.js:
+        (WebInspector._javascript_Source):
+        (WebInspector._javascript_Source.prototype.setFormatted.didGetContent.didFormatContent):
+        (WebInspector._javascript_Source.prototype.setFormatted.didGetContent):
+        (WebInspector._javascript_Source.prototype.setFormatted):
+        * inspector/front-end/_javascript_SourceFrame.js:
+        (WebInspector._javascript_SourceFrame):
+        * inspector/front-end/ScriptsPanel.js:
+        * inspector/front-end/inspector.js:
+
 2012-05-11  David Reveman  <[email protected]>
 
         [Chromium] Move instantiation of texture uploader to LayerRendererChromium.

Modified: trunk/Source/WebCore/inspector/front-end/DebuggerPresentationModel.js (116779 => 116780)


--- trunk/Source/WebCore/inspector/front-end/DebuggerPresentationModel.js	2012-05-11 16:41:53 UTC (rev 116779)
+++ trunk/Source/WebCore/inspector/front-end/DebuggerPresentationModel.js	2012-05-11 16:46:02 UTC (rev 116780)
@@ -37,10 +37,6 @@
     this._scriptMapping = new WebInspector.MainScriptMapping();
     this._scriptMapping.addEventListener(WebInspector.MainScriptMapping.Events.UISourceCodeListChanged, this._handleUISourceCodeListChanged, this);
 
-    this._presentationCallFrames = [];
-
-    this._breakpointManager = new WebInspector.BreakpointManager(WebInspector.settings.breakpoints, WebInspector.debuggerModel);
-
     this._pendingConsoleMessages = {};
     this._consoleMessageLiveLocations = [];
 
@@ -61,11 +57,6 @@
 }
 
 WebInspector.DebuggerPresentationModel.prototype = {
-    get breakpointManager()
-    {
-        return this._breakpointManager;
-    },
-
     /**
      * @param {DebuggerAgent.Location} rawLocation
      * @param {function(WebInspector.UILocation):(boolean|undefined)} updateDelegate

Modified: trunk/Source/WebCore/inspector/front-end/_javascript_Source.js (116779 => 116780)


--- trunk/Source/WebCore/inspector/front-end/_javascript_Source.js	2012-05-11 16:41:53 UTC (rev 116779)
+++ trunk/Source/WebCore/inspector/front-end/_javascript_Source.js	2012-05-11 16:46:02 UTC (rev 116780)
@@ -48,7 +48,7 @@
     // FIXME: postpone breakpoints restore to after the mapping has been established.
     setTimeout(function() {
         if (!this._formatted)
-            WebInspector.debuggerPresentationModel.breakpointManager.restoreBreakpoints(this);
+            WebInspector.breakpointManager.restoreBreakpoints(this);
     }.bind(this), 0);
 }
 
@@ -147,7 +147,7 @@
                 delete this._togglingFormatter;
                 this._formatterMapping = formatterMapping;
                 this.updateLiveLocations();
-                WebInspector.debuggerPresentationModel.breakpointManager.restoreBreakpoints(this);
+                WebInspector.breakpointManager.restoreBreakpoints(this);
                 callback();
             }
         }

Modified: trunk/Source/WebCore/inspector/front-end/_javascript_SourceFrame.js (116779 => 116780)


--- trunk/Source/WebCore/inspector/front-end/_javascript_SourceFrame.js	2012-05-11 16:41:53 UTC (rev 116779)
+++ trunk/Source/WebCore/inspector/front-end/_javascript_SourceFrame.js	2012-05-11 16:46:02 UTC (rev 116780)
@@ -39,7 +39,7 @@
 {
     this._scriptsPanel = scriptsPanel;
     this._model = model;
-    this._breakpointManager = this._model.breakpointManager;
+    this._breakpointManager = WebInspector.breakpointManager;
     this._uiSourceCode = uiSourceCode;
 
     var locations = this._breakpointManager.breakpointLocationsForUISourceCode(this._uiSourceCode);

Modified: trunk/Source/WebCore/inspector/front-end/ScriptsPanel.js (116779 => 116780)


--- trunk/Source/WebCore/inspector/front-end/ScriptsPanel.js	2012-05-11 16:41:53 UTC (rev 116779)
+++ trunk/Source/WebCore/inspector/front-end/ScriptsPanel.js	2012-05-11 16:46:02 UTC (rev 116780)
@@ -89,7 +89,7 @@
     this.sidebarPanes.watchExpressions = new WebInspector.WatchExpressionsSidebarPane();
     this.sidebarPanes.callstack = new WebInspector.CallStackSidebarPane();
     this.sidebarPanes.scopechain = new WebInspector.ScopeChainSidebarPane();
-    this.sidebarPanes.jsBreakpoints = new WebInspector._javascript_BreakpointsSidebarPane(this._presentationModel.breakpointManager, this._showSourceLine.bind(this));
+    this.sidebarPanes.jsBreakpoints = new WebInspector._javascript_BreakpointsSidebarPane(WebInspector.breakpointManager, this._showSourceLine.bind(this));
     if (Capabilities.nativeInstrumentationEnabled) {
         this.sidebarPanes.domBreakpoints = WebInspector.domBreakpointsSidebarPane;
         this.sidebarPanes.xhrBreakpoints = new WebInspector.XHRBreakpointsSidebarPane();
@@ -307,7 +307,7 @@
         } else {
             function didGetUILocation(uiLocation)
             {
-                var breakpoint = this._presentationModel.breakpointManager.findBreakpoint(uiLocation.uiSourceCode, uiLocation.lineNumber);
+                var breakpoint = WebInspector.breakpointManager.findBreakpoint(uiLocation.uiSourceCode, uiLocation.lineNumber);
                 if (!breakpoint)
                     return;
                 this.sidebarPanes.jsBreakpoints.highlightBreakpoint(breakpoint);

Modified: trunk/Source/WebCore/inspector/front-end/inspector.js (116779 => 116780)


--- trunk/Source/WebCore/inspector/front-end/inspector.js	2012-05-11 16:41:53 UTC (rev 116779)
+++ trunk/Source/WebCore/inspector/front-end/inspector.js	2012-05-11 16:46:02 UTC (rev 116780)
@@ -413,6 +413,7 @@
 
     this.debuggerModel = new WebInspector.DebuggerModel();
     this.snippetsModel = new WebInspector.SnippetsModel();
+    this.breakpointManager = new WebInspector.BreakpointManager(WebInspector.settings.breakpoints, this.debuggerModel);
     this.debuggerPresentationModel = new WebInspector.DebuggerPresentationModel();
 
     this.drawer = new WebInspector.Drawer();
_______________________________________________
webkit-changes mailing list
[email protected]
http://lists.webkit.org/mailman/listinfo.cgi/webkit-changes

Reply via email to