Changeset 93415 in webkit


Ignore:
Timestamp:
Aug 19, 2011 8:50:19 AM (13 years ago)
Author:
podivilov@chromium.org
Message:

Web Inspector: extract breakpoint management code to a separate class and add tests.
https://bugs.webkit.org/show_bug.cgi?id=66224

Reviewed by Pavel Feldman.

Source/WebCore:

Test: inspector/debugger/breakpoint-manager.html

  • WebCore.gypi:
  • WebCore.vcproj/WebCore.vcproj:
  • inspector/front-end/BreakpointManager.js: Added.

(WebInspector.BreakpointManager):
(WebInspector.BreakpointManager.prototype.uiSourceCodeAdded):
(WebInspector.BreakpointManager.prototype.breakpointsForUISourceCode):
(WebInspector.BreakpointManager.prototype.setBreakpoint):
(WebInspector.BreakpointManager.prototype.removeBreakpoint):
(WebInspector.BreakpointManager.prototype._materializeBreakpoint):
(WebInspector.BreakpointManager.prototype._breakpointDebuggerLocationChanged):
(WebInspector.BreakpointManager.prototype._addBreakpointToUI):
(WebInspector.BreakpointManager.prototype._deleteBreakpointFromUI):
(WebInspector.BreakpointManager.prototype._moveBreakpointInUI):
(WebInspector.BreakpointManager.prototype._breakpoints):
(WebInspector.BreakpointManager.prototype._breakpoint):
(WebInspector.BreakpointManager.prototype._forEachBreakpoint):
(WebInspector.BreakpointManager.prototype._setBreakpointInDebugger):
(WebInspector.BreakpointManager.prototype._removeBreakpointFromDebugger):
(WebInspector.BreakpointManager.prototype._breakpointResolved):
(WebInspector.BreakpointManager.prototype.serializeBreakpoints):
(WebInspector.BreakpointManager.prototype.reset):
(WebInspector.BreakpointManager.prototype.debuggerReset):
(WebInspector.Breakpoint):
(WebInspector.Breakpoint.prototype.serialize):
(WebInspector.Breakpoint.deserialize):

  • inspector/front-end/DebuggerModel.js:

(WebInspector.DebuggerModel.prototype.setBreakpointByScriptLocation):

  • inspector/front-end/SourceFile.js:

(WebInspector.RawSourceCode.prototype.get rawSourceCode):

  • inspector/front-end/WebKit.qrc:
  • inspector/front-end/inspector.html:

LayoutTests:

  • inspector/debugger/breakpoint-manager-expected.txt: Added.
  • inspector/debugger/breakpoint-manager.html: Added.
Location:
trunk
Files:
3 added
8 edited

Legend:

Unmodified
Added
Removed
  • trunk/LayoutTests/ChangeLog

    r93406 r93415  
     12011-08-18  Pavel Podivilov  <podivilov@chromium.org>
     2
     3        Web Inspector: extract breakpoint management code to a separate class and add tests.
     4        https://bugs.webkit.org/show_bug.cgi?id=66224
     5
     6        Reviewed by Pavel Feldman.
     7
     8        * inspector/debugger/breakpoint-manager-expected.txt: Added.
     9        * inspector/debugger/breakpoint-manager.html: Added.
     10
    1112011-08-19  Vitaly Repeshko  <vitalyr@chromium.org>
    212
  • trunk/Source/WebCore/ChangeLog

    r93411 r93415  
     12011-08-18  Pavel Podivilov  <podivilov@chromium.org>
     2
     3        Web Inspector: extract breakpoint management code to a separate class and add tests.
     4        https://bugs.webkit.org/show_bug.cgi?id=66224
     5
     6        Reviewed by Pavel Feldman.
     7
     8        Test: inspector/debugger/breakpoint-manager.html
     9
     10        * WebCore.gypi:
     11        * WebCore.vcproj/WebCore.vcproj:
     12        * inspector/front-end/BreakpointManager.js: Added.
     13        (WebInspector.BreakpointManager):
     14        (WebInspector.BreakpointManager.prototype.uiSourceCodeAdded):
     15        (WebInspector.BreakpointManager.prototype.breakpointsForUISourceCode):
     16        (WebInspector.BreakpointManager.prototype.setBreakpoint):
     17        (WebInspector.BreakpointManager.prototype.removeBreakpoint):
     18        (WebInspector.BreakpointManager.prototype._materializeBreakpoint):
     19        (WebInspector.BreakpointManager.prototype._breakpointDebuggerLocationChanged):
     20        (WebInspector.BreakpointManager.prototype._addBreakpointToUI):
     21        (WebInspector.BreakpointManager.prototype._deleteBreakpointFromUI):
     22        (WebInspector.BreakpointManager.prototype._moveBreakpointInUI):
     23        (WebInspector.BreakpointManager.prototype._breakpoints):
     24        (WebInspector.BreakpointManager.prototype._breakpoint):
     25        (WebInspector.BreakpointManager.prototype._forEachBreakpoint):
     26        (WebInspector.BreakpointManager.prototype._setBreakpointInDebugger):
     27        (WebInspector.BreakpointManager.prototype._removeBreakpointFromDebugger):
     28        (WebInspector.BreakpointManager.prototype._breakpointResolved):
     29        (WebInspector.BreakpointManager.prototype.serializeBreakpoints):
     30        (WebInspector.BreakpointManager.prototype.reset):
     31        (WebInspector.BreakpointManager.prototype.debuggerReset):
     32        (WebInspector.Breakpoint):
     33        (WebInspector.Breakpoint.prototype.serialize):
     34        (WebInspector.Breakpoint.deserialize):
     35        * inspector/front-end/DebuggerModel.js:
     36        (WebInspector.DebuggerModel.prototype.setBreakpointByScriptLocation):
     37        * inspector/front-end/SourceFile.js:
     38        (WebInspector.RawSourceCode.prototype.get rawSourceCode):
     39        * inspector/front-end/WebKit.qrc:
     40        * inspector/front-end/inspector.html:
     41
    1422011-08-19  Adam Roben  <aroben@apple.com>
    243
  • trunk/Source/WebCore/WebCore.gypi

    r93385 r93415  
    63316331            'inspector/front-end/BinarySearch.js',
    63326332            'inspector/front-end/BottomUpProfileDataGridTree.js',
     6333            'inspector/front-end/BreakpointManager.js',
    63336334            'inspector/front-end/BreakpointsSidebarPane.js',
    63346335            'inspector/front-end/CallStackSidebarPane.js',
  • trunk/Source/WebCore/WebCore.vcproj/WebCore.vcproj

    r93385 r93415  
    6873868738                                </File>
    6873968739                                <File
     68740                                        RelativePath="..\inspector\front-end\BreakpointManager.js"
     68741                                        >
     68742                                </File>
     68743                                <File
    6874068744                                        RelativePath="..\inspector\front-end\BreakpointsSidebarPane.js"
    6874168745                                        >
  • trunk/Source/WebCore/inspector/front-end/DebuggerModel.js

    r92371 r93415  
    7474    },
    7575
     76    setBreakpointByScriptLocation: function(location, condition, callback)
     77    {
     78        var script = this.scriptForSourceID(location.scriptId);
     79        if (script.sourceURL)
     80            this.setBreakpoint(script.sourceURL, location.lineNumber, location.columnNumber, condition, callback);
     81        else
     82            this.setBreakpointBySourceId(location, condition, callback);
     83    },
     84
    7685    setBreakpoint: function(url, lineNumber, columnNumber, condition, callback)
    7786    {
  • trunk/Source/WebCore/inspector/front-end/SourceFile.js

    r93308 r93415  
    6767    },
    6868
     69    get rawSourceCode()
     70    {
     71        // FIXME: extract UISourceCode from RawSourceCode (currently RawSourceCode implements methods from both interfaces).
     72        return this;
     73    },
     74
    6975    rawLocationToUILocation: function(rawLocation)
    7076    {
  • trunk/Source/WebCore/inspector/front-end/WebKit.qrc

    r93304 r93415  
    1111    <file>BinarySearch.js</file>
    1212    <file>BottomUpProfileDataGridTree.js</file>
     13    <file>BreakpointManager.js</file>
    1314    <file>BreakpointsSidebarPane.js</file>
    1415    <file>CallStackSidebarPane.js</file>
  • trunk/Source/WebCore/inspector/front-end/inspector.html

    r93308 r93415  
    156156    <script type="text/javascript" src="DebuggerModel.js"></script>
    157157    <script type="text/javascript" src="DebuggerPresentationModel.js"></script>
     158    <script type="text/javascript" src="BreakpointManager.js"></script>
    158159    <script type="text/javascript" src="UISourceCode.js"></script>
    159160    <script type="text/javascript" src="SourceFile.js"></script>
Note: See TracChangeset for help on using the changeset viewer.