Changeset 109323 in webkit


Ignore:
Timestamp:
Mar 1, 2012 12:22:20 AM (12 years ago)
Author:
podivilov@chromium.org
Message:

Web Inspector: add UISourceCode.isEditable property.
https://bugs.webkit.org/show_bug.cgi?id=79909

Reviewed by Vsevolod Vlasov.

  • inspector/front-end/DebuggerPresentationModel.js:

(WebInspector.DebuggerPresentationModel.prototype.canEditScriptSource):

  • inspector/front-end/RawSourceCode.js:

(WebInspector.RawSourceCode.prototype._createUISourceCode):

  • inspector/front-end/UISourceCode.js:

(WebInspector.UISourceCode):

Location:
trunk/Source/WebCore
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebCore/ChangeLog

    r109321 r109323  
     12012-02-29  Pavel Podivilov  <podivilov@chromium.org>
     2
     3        Web Inspector: add UISourceCode.isEditable property.
     4        https://bugs.webkit.org/show_bug.cgi?id=79909
     5
     6        Reviewed by Vsevolod Vlasov.
     7
     8        * inspector/front-end/DebuggerPresentationModel.js:
     9        (WebInspector.DebuggerPresentationModel.prototype.canEditScriptSource):
     10        * inspector/front-end/RawSourceCode.js:
     11        (WebInspector.RawSourceCode.prototype._createUISourceCode):
     12        * inspector/front-end/UISourceCode.js:
     13        (WebInspector.UISourceCode):
     14
    1152012-02-29  Shinya Kawanaka  <shinyak@chromium.org>
    216
  • trunk/Source/WebCore/inspector/front-end/DebuggerPresentationModel.js

    r108971 r109323  
    265265    canEditScriptSource: function(uiSourceCode)
    266266    {
    267         if (!WebInspector.debuggerModel.canSetScriptSource() || this._formatSource)
    268             return false;
    269         var rawSourceCode = uiSourceCode.rawSourceCode;
    270         var script = this._scriptForRawSourceCode(rawSourceCode);
    271         return script && !script.lineOffset && !script.columnOffset;
     267        return WebInspector.debuggerModel.canSetScriptSource() && uiSourceCode.isEditable;
    272268    },
    273269
  • trunk/Source/WebCore/inspector/front-end/RawSourceCode.js

    r108971 r109323  
    260260        var uiSourceCode = new WebInspector.UISourceCode(id, url, this, contentProvider);
    261261        uiSourceCode.isContentScript = this.isContentScript;
     262        uiSourceCode.isEditable = this._scripts.length === 1 && !this._scripts[0].lineOffset && !this._scripts[0].columnOffset
     263                                  && !this._formatted && !this._compilerSourceMapping;
    262264        return uiSourceCode;
    263265    },
  • trunk/Source/WebCore/inspector/front-end/UISourceCode.js

    r103812 r109323  
    4444    this._contentProvider = contentProvider;
    4545    this.isContentScript = false;
     46    this.isEditable = false;
    4647    /**
    4748     * @type Array.<function(string,string)>
Note: See TracChangeset for help on using the changeset viewer.