Skip to content
  • pfeldman@chromium.org's avatar
    Web Inspector: make CSS and JavaScript files editable by default. · f338a076
    pfeldman@chromium.org authored
    https://bugs.webkit.org/show_bug.cgi?id=81787
    
    Reviewed by Vsevolod Vlasov.
    
    This change removes cancelEditing and setReadOnly capabilities from source frame.
    It removes dblclick handler as well since one does not need to enter editing mode.
    It also establishes proper content dispatching so that views are updated with the
    resource content. All these are inter-dependent, need to be landed simultaneously.
    Drive-by follow up to the r111675 where range is modified prior to the exiting
    edit mode.
    
    * inspector/front-end/JavaScriptSourceFrame.js:
    (WebInspector.JavaScriptSourceFrame):
    (WebInspector.JavaScriptSourceFrame.prototype.requestContent):
    (WebInspector.JavaScriptSourceFrame.prototype.afterTextChanged):
    (WebInspector.JavaScriptSourceFrame.prototype.beforeTextChanged):
    (WebInspector.JavaScriptSourceFrame.prototype.didEditContent):
    (WebInspector.JavaScriptSourceFrame.prototype._lineNumberAfterEditing):
    * inspector/front-end/ResourceView.js:
    (WebInspector.ResourceSourceFrame):
    (WebInspector.ResourceSourceFrame.prototype.suggestedFileName):
    (WebInspector.ResourceSourceFrame.prototype._contentChanged):
    (WebInspector.EditableResourceSourceFrame.prototype.canEditSource):
    (WebInspector.EditableResourceSourceFrame.prototype.editContent.callbackWrapper):
    (WebInspector.EditableResourceSourceFrame.prototype.editContent):
    (WebInspector.EditableResourceSourceFrame.prototype._contentChanged):
    * inspector/front-end/ResourcesPanel.js:
    (WebInspector.ResourcesPanel.prototype._innerShowView):
    (WebInspector.FrameResourceTreeElement.prototype._appendRevision):
    * inspector/front-end/ScriptsPanel.js:
    (WebInspector.ScriptsPanel.prototype.setScriptSourceIsDirty):
    * inspector/front-end/Settings.js:
    (WebInspector.ExperimentsSettings):
    * inspector/front-end/SourceFrame.js:
    (WebInspector.SourceFrame):
    (WebInspector.SourceFrame.prototype.wasShown):
    (WebInspector.SourceFrame.prototype.willHide):
    (WebInspector.SourceFrame.prototype.beforeTextChanged):
    (WebInspector.SourceFrame.prototype.setContent):
    (WebInspector.SourceFrame.prototype.commitEditing):
    (WebInspector.SourceFrame.prototype.didEditContent):
    (WebInspector.SourceFrame.prototype.editContent):
    * inspector/front-end/TextPrompt.js:
    (WebInspector.TextPrompt.prototype._startEditing):
    (WebInspector.TextPrompt.prototype._stopEditing):
    * inspector/front-end/TextViewer.js:
    (WebInspector.TextViewer):
    (WebInspector.TextViewer.prototype._registerShortcuts):
    (WebInspector.TextEditorMainPanel.prototype.handleEnterKey):
    
    git-svn-id: http://svn.webkit.org/repository/webkit/trunk@111682 268f45cc-cd09-0410-ab3c-d52691b4dbfc
    f338a076