Skip to content
  • apavlov@chromium.org's avatar
    Web Inspector: [Elements] Syntax-highlight the "Edit as HTML" editor · 537ce695
    apavlov@chromium.org authored
    https://bugs.webkit.org/show_bug.cgi?id=113306
    
    Reviewed by Vsevolod Vlasov.
    
    Source/WebCore:
    
    Use CodeMirror as the raw HTML editor for the "Edit as HTML" menu item
    (and all multiline editors for WebInspector.startEditing()).
    Drive-by fix for handling the editing when the editor has been invoked on the closing tag.
    
    * inspector/front-end/ElementsTreeOutline.js:
    (WebInspector.ElementsTreeElement.prototype.commit):
    (WebInspector.ElementsTreeElement.prototype._startEditingAsHTML):
    * inspector/front-end/UIUtils.js:
    (WebInspector.EditingConfig.prototype.setMultiline):
    (WebInspector.startEditing):
    (WebInspector.CodeMirrorCSSLoadView): A bogus view to load-unload CodeMirror-related CSS on demand.
    * inspector/front-end/elementsPanel.css:
    (#elements-content .CodeMirror):
    (#elements-content .CodeMirror pre):
    (#elements-content .CodeMirror-lines):
    * inspector/front-end/elementsPanel.css: CodeMirror styles for the "Edit as HTML" editor.
    * inspector/front-end/externs.js: Declare CodeMirror type with some members, as it is third-party code.
    * inspector/front-end/inspector.html: Fix script order (UIUtils.js requires View.js).
    
    LayoutTests:
    
    * inspector/elements/edit-dom-actions.html:
    
    
    git-svn-id: http://svn.webkit.org/repository/webkit/trunk@147117 268f45cc-cd09-0410-ab3c-d52691b4dbfc
    537ce695