Upstream version 5.34.104.0
[platform/framework/web/crosswalk.git] / src / third_party / WebKit / Source / devtools / front_end / BreakpointManager.js
index 5c15171..4b2e1d3 100644 (file)
@@ -31,9 +31,9 @@
 /**
  * @constructor
  * @extends {WebInspector.Object}
- * @param {WebInspector.Setting} breakpointStorage
- * @param {WebInspector.DebuggerModel} debuggerModel
- * @param {WebInspector.Workspace} workspace
+ * @param {!WebInspector.Setting} breakpointStorage
+ * @param {!WebInspector.DebuggerModel} debuggerModel
+ * @param {!WebInspector.Workspace} workspace
  */
 WebInspector.BreakpointManager = function(breakpointStorage, debuggerModel, workspace)
 {
@@ -68,13 +68,14 @@ WebInspector.BreakpointManager._sourceFileId = function(uiSourceCode)
 /**
  * @param {string} sourceFileId
  * @param {number} lineNumber
+ * @param {number} columnNumber
  * @return {string}
  */
-WebInspector.BreakpointManager._breakpointStorageId = function(sourceFileId, lineNumber)
+WebInspector.BreakpointManager._breakpointStorageId = function(sourceFileId, lineNumber, columnNumber)
 {
     if (!sourceFileId)
         return "";
-    return sourceFileId + ":" + lineNumber;
+    return sourceFileId + ":" + lineNumber + ":" + columnNumber;
 }
 
 WebInspector.BreakpointManager.prototype = {
@@ -93,7 +94,7 @@ WebInspector.BreakpointManager.prototype = {
     },
 
     /**
-     * @param {WebInspector.UISourceCode} uiSourceCode
+     * @param {!WebInspector.UISourceCode} uiSourceCode
      */
     _restoreBreakpoints: function(uiSourceCode)
     {
@@ -107,7 +108,7 @@ WebInspector.BreakpointManager.prototype = {
         var provisionalBreakpoints = this._provisionalBreakpointsForSourceFileId(sourceFileId);
         for (var i = 0; i < breakpointItems.length; ++i) {
             var breakpointItem = breakpointItems[i];
-            var itemStorageId = WebInspector.BreakpointManager._breakpointStorageId(breakpointItem.sourceFileId, breakpointItem.lineNumber);
+            var itemStorageId = WebInspector.BreakpointManager._breakpointStorageId(breakpointItem.sourceFileId, breakpointItem.lineNumber, breakpointItem.columnNumber);
             var provisionalBreakpoint = provisionalBreakpoints.get(itemStorageId);
             if (provisionalBreakpoint) {
                 if (!this._breakpointsForPrimaryUISourceCode.get(uiSourceCode))
@@ -115,18 +116,18 @@ WebInspector.BreakpointManager.prototype = {
                 this._breakpointsForPrimaryUISourceCode.get(uiSourceCode).push(provisionalBreakpoint);
                 provisionalBreakpoint._updateInDebugger();
             } else {
-                this._innerSetBreakpoint(uiSourceCode, breakpointItem.lineNumber, breakpointItem.condition, breakpointItem.enabled);
+                this._innerSetBreakpoint(uiSourceCode, breakpointItem.lineNumber, breakpointItem.columnNumber, breakpointItem.condition, breakpointItem.enabled);
             }
         }
         this._storage.unmute();
     },
 
     /**
-     * @param {WebInspector.Event} event
+     * @param {!WebInspector.Event} event
      */
     _uiSourceCodeAdded: function(event)
     {
-        var uiSourceCode = /** @type {WebInspector.UISourceCode} */ (event.data);
+        var uiSourceCode = /** @type {!WebInspector.UISourceCode} */ (event.data);
         this._restoreBreakpoints(uiSourceCode);
         if (uiSourceCode.contentType() === WebInspector.resourceTypes.Script || uiSourceCode.contentType() === WebInspector.resourceTypes.Document) {
             uiSourceCode.addEventListener(WebInspector.UISourceCode.Events.SourceMappingChanged, this._uiSourceCodeMappingChanged, this);
@@ -135,36 +136,36 @@ WebInspector.BreakpointManager.prototype = {
     },
 
     /**
-     * @param {WebInspector.Event} event
+     * @param {!WebInspector.Event} event
      */
     _uiSourceCodeFormatted: function(event)
     {
-        var uiSourceCode = /** @type {WebInspector.UISourceCode} */ (event.target);
+        var uiSourceCode = /** @type {!WebInspector.UISourceCode} */ (event.target);
         this._restoreBreakpoints(uiSourceCode);
     },
 
     /**
-     * @param {WebInspector.Event} event
+     * @param {!WebInspector.Event} event
      */
     _uiSourceCodeRemoved: function(event)
     {
-        var uiSourceCode = /** @type {WebInspector.UISourceCode} */ (event.data);
+        var uiSourceCode = /** @type {!WebInspector.UISourceCode} */ (event.data);
         this._removeUISourceCode(uiSourceCode);
     },
 
     /**
-     * @param {WebInspector.Event} event
+     * @param {!WebInspector.Event} event
      */
     _uiSourceCodeMappingChanged: function(event)
     {
-        var uiSourceCode = /** @type {WebInspector.UISourceCode} */ (event.target);
+        var uiSourceCode = /** @type {!WebInspector.UISourceCode} */ (event.target);
         var breakpoints = this._breakpointsForPrimaryUISourceCode.get(uiSourceCode) || [];
         for (var i = 0; i < breakpoints.length; ++i)
             breakpoints[i]._updateInDebugger();
     },
 
     /**
-     * @param {WebInspector.UISourceCode} uiSourceCode
+     * @param {!WebInspector.UISourceCode} uiSourceCode
      */
     _removeUISourceCode: function(uiSourceCode)
     {
@@ -179,28 +180,30 @@ WebInspector.BreakpointManager.prototype = {
     },
 
     /**
-     * @param {WebInspector.UISourceCode} uiSourceCode
+     * @param {!WebInspector.UISourceCode} uiSourceCode
      * @param {number} lineNumber
+     * @param {number} columnNumber
      * @param {string} condition
      * @param {boolean} enabled
-     * @return {WebInspector.BreakpointManager.Breakpoint}
+     * @return {!WebInspector.BreakpointManager.Breakpoint}
      */
-    setBreakpoint: function(uiSourceCode, lineNumber, condition, enabled)
+    setBreakpoint: function(uiSourceCode, lineNumber, columnNumber, condition, enabled)
     {
         this._debuggerModel.setBreakpointsActive(true);
-        return this._innerSetBreakpoint(uiSourceCode, lineNumber, condition, enabled);
+        return this._innerSetBreakpoint(uiSourceCode, lineNumber, columnNumber, condition, enabled);
     },
 
     /**
-     * @param {WebInspector.UISourceCode} uiSourceCode
+     * @param {!WebInspector.UISourceCode} uiSourceCode
      * @param {number} lineNumber
+     * @param {number} columnNumber
      * @param {string} condition
      * @param {boolean} enabled
-     * @return {WebInspector.BreakpointManager.Breakpoint}
+     * @return {!WebInspector.BreakpointManager.Breakpoint}
      */
-    _innerSetBreakpoint: function(uiSourceCode, lineNumber, condition, enabled)
+    _innerSetBreakpoint: function(uiSourceCode, lineNumber, columnNumber, condition, enabled)
     {
-        var breakpoint = this.findBreakpoint(uiSourceCode, lineNumber);
+        var breakpoint = this.findBreakpoint(uiSourceCode, lineNumber, columnNumber);
         if (breakpoint) {
             breakpoint._updateBreakpoint(condition, enabled);
             return breakpoint;
@@ -208,7 +211,7 @@ WebInspector.BreakpointManager.prototype = {
         var projectId = uiSourceCode.project().id();
         var path = uiSourceCode.path();
         var sourceFileId = WebInspector.BreakpointManager._sourceFileId(uiSourceCode);
-        breakpoint = new WebInspector.BreakpointManager.Breakpoint(this, projectId, path, sourceFileId, lineNumber, condition, enabled);
+        breakpoint = new WebInspector.BreakpointManager.Breakpoint(this, projectId, path, sourceFileId, lineNumber, columnNumber, condition, enabled);
         if (!this._breakpointsForPrimaryUISourceCode.get(uiSourceCode))
             this._breakpointsForPrimaryUISourceCode.put(uiSourceCode, []);
         this._breakpointsForPrimaryUISourceCode.get(uiSourceCode).push(breakpoint);
@@ -216,33 +219,50 @@ WebInspector.BreakpointManager.prototype = {
     },
 
     /**
-     * @param {WebInspector.UISourceCode} uiSourceCode
+     * @param {!WebInspector.UISourceCode} uiSourceCode
      * @param {number} lineNumber
+     * @param {number} columnNumber
      * @return {?WebInspector.BreakpointManager.Breakpoint}
      */
-    findBreakpoint: function(uiSourceCode, lineNumber)
+    findBreakpoint: function(uiSourceCode, lineNumber, columnNumber)
     {
         var breakpoints = this._breakpointsForUISourceCode.get(uiSourceCode);
-        var lineBreakpoints = breakpoints ? breakpoints[lineNumber] : null;
-        return lineBreakpoints ? lineBreakpoints[0] : null;
+        var lineBreakpoints = breakpoints ? breakpoints.get(String(lineNumber)) : null;
+        var columnBreakpoints = lineBreakpoints ? lineBreakpoints.get(String(columnNumber)) : null;
+        return columnBreakpoints ? columnBreakpoints[0] : null;
     },
 
     /**
-     * @param {WebInspector.UISourceCode} uiSourceCode
-     * @return {Array.<WebInspector.BreakpointManager.Breakpoint>}
+     * @param {!WebInspector.UISourceCode} uiSourceCode
+     * @param {number} lineNumber
+     * @return {?WebInspector.BreakpointManager.Breakpoint}
      */
-    breakpointsForUISourceCode: function(uiSourceCode)
+    findBreakpointOnLine: function(uiSourceCode, lineNumber)
     {
         var breakpoints = this._breakpointsForUISourceCode.get(uiSourceCode);
-        var allLineBreakpoints = breakpoints ? Object.values(breakpoints) : [];
+        var lineBreakpoints = breakpoints ? breakpoints.get(String(lineNumber)) : null;
+        return lineBreakpoints ? lineBreakpoints.values()[0][0] : null;
+    },
+
+    /**
+     * @param {!WebInspector.UISourceCode} uiSourceCode
+     * @return {!Array.<!WebInspector.BreakpointManager.Breakpoint>}
+     */
+    breakpointsForUISourceCode: function(uiSourceCode)
+    {
         var result = [];
-        for (var i = 0; i < allLineBreakpoints.length; ++i)
-            result = result.concat(allLineBreakpoints[i]);
+        var uiSourceCodeBreakpoints = this._breakpointsForUISourceCode.get(uiSourceCode);
+        var breakpoints = uiSourceCodeBreakpoints ? uiSourceCodeBreakpoints.values() : [];
+        for (var i = 0; i < breakpoints.length; ++i) {
+            var lineBreakpoints = breakpoints[i];
+            var columnBreakpointArrays = lineBreakpoints ? lineBreakpoints.values() : [];
+            result = result.concat.apply(result, columnBreakpointArrays);
+        }
         return result;
     },
 
     /**
-     * @return {Array.<WebInspector.BreakpointManager.Breakpoint>}
+     * @return {!Array.<!WebInspector.BreakpointManager.Breakpoint>}
      */
     allBreakpoints: function()
     {
@@ -254,30 +274,33 @@ WebInspector.BreakpointManager.prototype = {
     },
 
     /**
-     * @param {WebInspector.UISourceCode} uiSourceCode
-     * @return {Array.<{breakpoint: WebInspector.BreakpointManager.Breakpoint, uiLocation: WebInspector.UILocation}>}
+     * @param {!WebInspector.UISourceCode} uiSourceCode
+     * @return {!Array.<!{breakpoint: !WebInspector.BreakpointManager.Breakpoint, uiLocation: !WebInspector.UILocation}>}
      */
     breakpointLocationsForUISourceCode: function(uiSourceCode)
     {
-        var breakpoints = this._breakpointsForUISourceCode.get(uiSourceCode);
-        var breakpointLines = breakpoints ? Object.keys(breakpoints) : [];
+        var uiSourceCodeBreakpoints = this._breakpointsForUISourceCode.get(uiSourceCode);
+        var lineNumbers = uiSourceCodeBreakpoints ? uiSourceCodeBreakpoints.keys() : [];
         var result = [];
-        for (var i = 0; i < breakpointLines.length; ++i) {
-            var lineNumber = parseInt(breakpointLines[i], 10);
-            if (isNaN(lineNumber))
-                continue;
-            var lineBreakpoints = breakpoints[lineNumber];
-            for (var j = 0; j < lineBreakpoints.length; ++j) {
-                var breakpoint = lineBreakpoints[j];
-                var uiLocation = new WebInspector.UILocation(uiSourceCode, lineNumber, 0);
-                result.push({breakpoint: breakpoint, uiLocation: uiLocation});
+        for (var i = 0; i < lineNumbers.length; ++i) {
+            var lineBreakpoints = uiSourceCodeBreakpoints.get(lineNumbers[i]);
+            var columnNumbers = lineBreakpoints.keys();
+            for (var j = 0; j < columnNumbers.length; ++j) {
+                var columnBreakpoints = lineBreakpoints.get(columnNumbers[j]);
+                var lineNumber = parseInt(lineNumbers[i], 10);
+                var columnNumber = parseInt(columnNumbers[j], 10);
+                for (var k = 0; k < columnBreakpoints.length; ++k) {
+                    var breakpoint = columnBreakpoints[k];
+                    var uiLocation = new WebInspector.UILocation(uiSourceCode, lineNumber, columnNumber);
+                    result.push({breakpoint: breakpoint, uiLocation: uiLocation});
+                }
             }
         }
         return result;
     },
 
     /**
-     * @return {Array.<{breakpoint: WebInspector.BreakpointManager.Breakpoint, uiLocation: WebInspector.UILocation}>}
+     * @return {!Array.<!{breakpoint: !WebInspector.BreakpointManager.Breakpoint, uiLocation: !WebInspector.UILocation}>}
      */
     allBreakpointLocations: function()
     {
@@ -313,7 +336,7 @@ WebInspector.BreakpointManager.prototype = {
 
     _projectWillReset: function(event)
     {
-        var project = /** @type {WebInspector.Project} */ (event.data);
+        var project = /** @type {!WebInspector.Project} */ (event.data);
         var uiSourceCodes = project.uiSourceCodes();
         for (var i = 0; i < uiSourceCodes.length; ++i)
             this._removeUISourceCode(uiSourceCodes[i]);
@@ -321,8 +344,8 @@ WebInspector.BreakpointManager.prototype = {
 
     _breakpointResolved: function(event)
     {
-        var breakpointId = /** @type {DebuggerAgent.BreakpointId} */ (event.data.breakpointId);
-        var location = /** @type {WebInspector.DebuggerModel.Location} */ (event.data.location);
+        var breakpointId = /** @type {!DebuggerAgent.BreakpointId} */ (event.data.breakpointId);
+        var location = /** @type {!WebInspector.DebuggerModel.Location} */ (event.data.location);
         var breakpoint = this._breakpointForDebuggerId[breakpointId];
         if (!breakpoint)
             return;
@@ -330,7 +353,7 @@ WebInspector.BreakpointManager.prototype = {
     },
 
     /**
-     * @param {WebInspector.BreakpointManager.Breakpoint} breakpoint
+     * @param {!WebInspector.BreakpointManager.Breakpoint} breakpoint
      * @param {boolean} removeFromStorage
      */
     _removeBreakpoint: function(breakpoint, removeFromStorage)
@@ -346,30 +369,33 @@ WebInspector.BreakpointManager.prototype = {
     },
 
     /**
-     * @param {WebInspector.BreakpointManager.Breakpoint} breakpoint
-     * @param {WebInspector.UILocation} uiLocation
+     * @param {!WebInspector.BreakpointManager.Breakpoint} breakpoint
+     * @param {!WebInspector.UILocation} uiLocation
      */
     _uiLocationAdded: function(breakpoint, uiLocation)
     {
         var breakpoints = this._breakpointsForUISourceCode.get(uiLocation.uiSourceCode);
         if (!breakpoints) {
-            breakpoints = {};
+            breakpoints = new StringMap();
             this._breakpointsForUISourceCode.put(uiLocation.uiSourceCode, breakpoints);
         }
-
-        var lineBreakpoints = breakpoints[uiLocation.lineNumber];
+        var lineBreakpoints = breakpoints.get(String(uiLocation.lineNumber));
         if (!lineBreakpoints) {
-            lineBreakpoints = [];
-            breakpoints[uiLocation.lineNumber] = lineBreakpoints;
+            lineBreakpoints = new StringMap();
+            breakpoints.put(String(uiLocation.lineNumber), lineBreakpoints);
         }
-
-        lineBreakpoints.push(breakpoint);
+        var columnBreakpoints = lineBreakpoints.get(String(uiLocation.columnNumber));
+        if (!columnBreakpoints) {
+            columnBreakpoints = [];
+            lineBreakpoints.put(String(uiLocation.columnNumber), columnBreakpoints);
+        }
+        columnBreakpoints.push(breakpoint);
         this.dispatchEventToListeners(WebInspector.BreakpointManager.Events.BreakpointAdded, {breakpoint: breakpoint, uiLocation: uiLocation});
     },
 
     /**
-     * @param {WebInspector.BreakpointManager.Breakpoint} breakpoint
-     * @param {WebInspector.UILocation} uiLocation
+     * @param {!WebInspector.BreakpointManager.Breakpoint} breakpoint
+     * @param {!WebInspector.UILocation} uiLocation
      */
     _uiLocationRemoved: function(breakpoint, uiLocation)
     {
@@ -377,14 +403,18 @@ WebInspector.BreakpointManager.prototype = {
         if (!breakpoints)
             return;
 
-        var lineBreakpoints = breakpoints[uiLocation.lineNumber];
+        var lineBreakpoints = breakpoints.get(String(uiLocation.lineNumber));
         if (!lineBreakpoints)
             return;
-
-        lineBreakpoints.remove(breakpoint);
-        if (!lineBreakpoints.length)
-            delete breakpoints[uiLocation.lineNumber];
-        if (Object.keys(breakpoints).length === 0)
+        var columnBreakpoints = lineBreakpoints.get(String(uiLocation.columnNumber));
+        if (!columnBreakpoints)
+            return;
+        columnBreakpoints.remove(breakpoint);
+        if (!columnBreakpoints.length)
+            lineBreakpoints.remove(String(uiLocation.columnNumber));
+        if (!lineBreakpoints.size())
+            breakpoints.remove(String(uiLocation.lineNumber));
+        if (!breakpoints.size())
             this._breakpointsForUISourceCode.remove(uiLocation.uiSourceCode);
         this.dispatchEventToListeners(WebInspector.BreakpointManager.Events.BreakpointRemoved, {breakpoint: breakpoint, uiLocation: uiLocation});
     },
@@ -394,24 +424,26 @@ WebInspector.BreakpointManager.prototype = {
 
 /**
  * @constructor
- * @param {WebInspector.BreakpointManager} breakpointManager
+ * @param {!WebInspector.BreakpointManager} breakpointManager
  * @param {string} projectId
  * @param {string} path
  * @param {string} sourceFileId
  * @param {number} lineNumber
+ * @param {number} columnNumber
  * @param {string} condition
  * @param {boolean} enabled
  */
-WebInspector.BreakpointManager.Breakpoint = function(breakpointManager, projectId, path, sourceFileId, lineNumber, condition, enabled)
+WebInspector.BreakpointManager.Breakpoint = function(breakpointManager, projectId, path, sourceFileId, lineNumber, columnNumber, condition, enabled)
 {
     this._breakpointManager = breakpointManager;
     this._projectId = projectId;
     this._path = path;
     this._lineNumber = lineNumber;
+    this._columnNumber = columnNumber;
     this._sourceFileId = sourceFileId;
-    /** @type {Array.<WebInspector.Script.Location>} */
+    /** @type {!Array.<!WebInspector.Script.Location>} */
     this._liveLocations = [];
-    /** @type {!Object.<string, WebInspector.UILocation>} */
+    /** @type {!Object.<string, !WebInspector.UILocation>} */
     this._uiLocations = {};
 
     // Force breakpoint update.
@@ -446,7 +478,15 @@ WebInspector.BreakpointManager.Breakpoint.prototype = {
     },
 
     /**
-     * @return {WebInspector.UISourceCode}
+     * @return {number}
+     */
+    columnNumber: function()
+    {
+        return this._columnNumber;
+    },
+
+    /**
+     * @return {?WebInspector.UISourceCode}
      */
     uiSourceCode: function()
     {
@@ -454,7 +494,7 @@ WebInspector.BreakpointManager.Breakpoint.prototype = {
     },
 
     /**
-     * @param {WebInspector.DebuggerModel.Location} location
+     * @param {!WebInspector.DebuggerModel.Location} location
      */
     _addResolvedLocation: function(location)
     {
@@ -462,13 +502,13 @@ WebInspector.BreakpointManager.Breakpoint.prototype = {
     },
 
     /**
-     * @param {WebInspector.DebuggerModel.Location} location
-     * @param {WebInspector.UILocation} uiLocation
+     * @param {!WebInspector.DebuggerModel.Location} location
+     * @param {!WebInspector.UILocation} uiLocation
      */
     _locationUpdated: function(location, uiLocation)
     {
         var stringifiedLocation = location.scriptId + ":" + location.lineNumber + ":" + location.columnNumber;
-        var oldUILocation = /** @type {WebInspector.UILocation} */ (this._uiLocations[stringifiedLocation]);
+        var oldUILocation = /** @type {!WebInspector.UILocation} */ (this._uiLocations[stringifiedLocation]);
         if (oldUILocation)
             this._breakpointManager._uiLocationRemoved(this, oldUILocation);
         if (this._uiLocations[""]) {
@@ -555,18 +595,18 @@ WebInspector.BreakpointManager.Breakpoint.prototype = {
         var uiSourceCode = this._breakpointManager._workspace.uiSourceCode(this._projectId, this._path);
         if (!uiSourceCode)
             return;
-        var rawLocation = uiSourceCode.uiLocationToRawLocation(this._lineNumber, 0);
-        var debuggerModelLocation = /** @type {WebInspector.DebuggerModel.Location} */ (rawLocation);
+        var rawLocation = uiSourceCode.uiLocationToRawLocation(this._lineNumber, this._columnNumber);
+        var debuggerModelLocation = /** @type {!WebInspector.DebuggerModel.Location} */ (rawLocation);
         if (debuggerModelLocation)
             this._breakpointManager._debuggerModel.setBreakpointByScriptLocation(debuggerModelLocation, this._condition, this._didSetBreakpointInDebugger.bind(this));
         else if (uiSourceCode.url)
-            this._breakpointManager._debuggerModel.setBreakpointByURL(uiSourceCode.url, this._lineNumber, 0, this._condition, this._didSetBreakpointInDebugger.bind(this));
+            this._breakpointManager._debuggerModel.setBreakpointByURL(uiSourceCode.url, this._lineNumber, this._columnNumber, this._condition, this._didSetBreakpointInDebugger.bind(this));
     },
 
     /**
     * @this {WebInspector.BreakpointManager.Breakpoint}
     * @param {?DebuggerAgent.BreakpointId} breakpointId
-    * @param {Array.<WebInspector.DebuggerModel.Location>} locations
+    * @param {!Array.<!WebInspector.DebuggerModel.Location>} locations
     */
     _didSetBreakpointInDebugger: function(breakpointId, locations)
     {
@@ -588,7 +628,7 @@ WebInspector.BreakpointManager.Breakpoint.prototype = {
         for (var i = 0; i < locations.length; ++i) {
             var script = this._breakpointManager._debuggerModel.scriptForId(locations[i].scriptId);
             var uiLocation = script.rawLocationToUILocation(locations[i].lineNumber, locations[i].columnNumber);
-            if (this._breakpointManager.findBreakpoint(uiLocation.uiSourceCode, uiLocation.lineNumber)) {
+            if (this._breakpointManager.findBreakpoint(uiLocation.uiSourceCode, uiLocation.lineNumber, uiLocation.columnNumber)) {
                 // location clash
                 this.remove();
                 return;
@@ -612,11 +652,9 @@ WebInspector.BreakpointManager.Breakpoint.prototype = {
     {
         for (var stringifiedLocation in this._uiLocations)
             this._breakpointManager._uiLocationRemoved(this, this._uiLocations[stringifiedLocation]);
-
         for (var i = 0; i < this._liveLocations.length; ++i)
             this._liveLocations[i].dispose();
         this._liveLocations = [];
-
         this._uiLocations = {};
     },
 
@@ -625,7 +663,7 @@ WebInspector.BreakpointManager.Breakpoint.prototype = {
      */
     _breakpointStorageId: function()
     {
-        return WebInspector.BreakpointManager._breakpointStorageId(this._sourceFileId, this._lineNumber);
+        return WebInspector.BreakpointManager._breakpointStorageId(this._sourceFileId, this._lineNumber, this._columnNumber);
     },
 
     _fakeBreakpointAtPrimaryLocation: function()
@@ -634,7 +672,7 @@ WebInspector.BreakpointManager.Breakpoint.prototype = {
         var uiSourceCode = this._breakpointManager._workspace.uiSourceCode(this._projectId, this._path);
         if (!uiSourceCode)
             return;
-        var uiLocation = new WebInspector.UILocation(uiSourceCode, this._lineNumber, 0);
+        var uiLocation = new WebInspector.UILocation(uiSourceCode, this._lineNumber, this._columnNumber);
         this._uiLocations[""] = uiLocation;
         this._breakpointManager._uiLocationAdded(this, uiLocation);
     }
@@ -642,19 +680,20 @@ WebInspector.BreakpointManager.Breakpoint.prototype = {
 
 /**
  * @constructor
- * @param {WebInspector.BreakpointManager} breakpointManager
- * @param {WebInspector.Setting} setting
+ * @param {!WebInspector.BreakpointManager} breakpointManager
+ * @param {!WebInspector.Setting} setting
  */
 WebInspector.BreakpointManager.Storage = function(breakpointManager, setting)
 {
     this._breakpointManager = breakpointManager;
     this._setting = setting;
     var breakpoints = this._setting.get();
-    /** @type {Object.<string,WebInspector.BreakpointManager.Storage.Item>} */
+    /** @type {!Object.<string, !WebInspector.BreakpointManager.Storage.Item>} */
     this._breakpoints = {};
     for (var i = 0; i < breakpoints.length; ++i) {
-        var breakpoint = /** @type {WebInspector.BreakpointManager.Storage.Item} */ (breakpoints[i]);
-        this._breakpoints[breakpoint.sourceFileId + ":" + breakpoint.lineNumber] = breakpoint;
+        var breakpoint = /** @type {!WebInspector.BreakpointManager.Storage.Item} */ (breakpoints[i]);
+        breakpoint.columnNumber = breakpoint.columnNumber || 0;
+        this._breakpoints[breakpoint.sourceFileId + ":" + breakpoint.lineNumber + ":" + breakpoint.columnNumber] = breakpoint;
     }
 }
 
@@ -670,8 +709,8 @@ WebInspector.BreakpointManager.Storage.prototype = {
     },
 
     /**
-     * @param {WebInspector.UISourceCode} uiSourceCode
-     * @return {Array.<WebInspector.BreakpointManager.Storage.Item>}
+     * @param {!WebInspector.UISourceCode} uiSourceCode
+     * @return {!Array.<!WebInspector.BreakpointManager.Storage.Item>}
      */
     breakpointItems: function(uiSourceCode)
     {
@@ -686,7 +725,7 @@ WebInspector.BreakpointManager.Storage.prototype = {
     },
 
     /**
-     * @param {WebInspector.BreakpointManager.Breakpoint} breakpoint
+     * @param {!WebInspector.BreakpointManager.Breakpoint} breakpoint
      */
     _updateBreakpoint: function(breakpoint)
     {
@@ -697,7 +736,7 @@ WebInspector.BreakpointManager.Storage.prototype = {
     },
 
     /**
-     * @param {WebInspector.BreakpointManager.Breakpoint} breakpoint
+     * @param {!WebInspector.BreakpointManager.Breakpoint} breakpoint
      */
     _removeBreakpoint: function(breakpoint)
     {
@@ -718,15 +757,16 @@ WebInspector.BreakpointManager.Storage.prototype = {
 
 /**
  * @constructor
- * @param {WebInspector.BreakpointManager.Breakpoint} breakpoint
+ * @param {!WebInspector.BreakpointManager.Breakpoint} breakpoint
  */
 WebInspector.BreakpointManager.Storage.Item = function(breakpoint)
 {
     this.sourceFileId = breakpoint._sourceFileId;
     this.lineNumber = breakpoint.lineNumber();
+    this.columnNumber = breakpoint.columnNumber();
     this.condition = breakpoint.condition();
     this.enabled = breakpoint.enabled();
 }
 
-/** @type {WebInspector.BreakpointManager} */
-WebInspector.breakpointManager = null;
+/** @type {!WebInspector.BreakpointManager} */
+WebInspector.breakpointManager;