Changeset 249751 in webkit


Ignore:
Timestamp:
Sep 10, 2019 9:01:40 PM (5 years ago)
Author:
Joseph Pecoraro
Message:

Web Inspector: Remove legacy CodeMirror based pretty printers
https://bugs.webkit.org/show_bug.cgi?id=201624

Reviewed by Devin Rousso.

Source/WebInspectorUI:

  • Tools/PrettyPrinting/FormatterDebug.js: Removed.
  • Tools/PrettyPrinting/Utilities.js: Removed.
  • Tools/PrettyPrinting/codemirror-additions.css: Removed.
  • Tools/PrettyPrinting/index.html: Removed.
  • Tools/PrettyPrinting/populate/apple.css: Removed.
  • UserInterface/Controllers/Formatter.js: Removed.
  • UserInterface/Main.html:
  • UserInterface/Test.html:
  • UserInterface/Views/CodeMirrorFormatters.js: Removed.
  • UserInterface/Views/TextEditor.js:

(WI.TextEditor.prototype.prettyPrint):
(WI.TextEditor.prototype._canUseFormatterWorker): Deleted.
(WI.TextEditor.prototype._startCodeMirrorPrettyPrint): Deleted.

  • WebInspectorUI.vcxproj/WebInspectorUI.vcxproj:
  • WebInspectorUI.vcxproj/WebInspectorUI.vcxproj.filters:

LayoutTests:

  • inspector/codemirror/prettyprinting-css-expected.txt: Removed.
  • inspector/codemirror/prettyprinting-css.html: Removed.
  • inspector/codemirror/prettyprinting-javascript-expected.txt: Removed.
  • inspector/codemirror/prettyprinting-javascript.html: Removed.
  • inspector/codemirror/resources/prettyprinting/css-tests/basic-expected.css: Removed.
  • inspector/codemirror/resources/prettyprinting/css-tests/basic.css: Removed.
  • inspector/codemirror/resources/prettyprinting/css-tests/calc-expected.css: Removed.
  • inspector/codemirror/resources/prettyprinting/css-tests/calc.css: Removed.
  • inspector/codemirror/resources/prettyprinting/css-tests/gradient-expected.css: Removed.
  • inspector/codemirror/resources/prettyprinting/css-tests/gradient.css: Removed.
  • inspector/codemirror/resources/prettyprinting/css-tests/keyframes-expected.css: Removed.
  • inspector/codemirror/resources/prettyprinting/css-tests/keyframes.css: Removed.
  • inspector/codemirror/resources/prettyprinting/css-tests/media-query-expected.css: Removed.
  • inspector/codemirror/resources/prettyprinting/css-tests/media-query.css: Removed.
  • inspector/codemirror/resources/prettyprinting/css-tests/selectors-expected.css: Removed.
  • inspector/codemirror/resources/prettyprinting/css-tests/selectors.css: Removed.
  • inspector/codemirror/resources/prettyprinting/css-tests/wrapping-expected.css: Removed.
  • inspector/codemirror/resources/prettyprinting/css-tests/wrapping.css: Removed.
  • inspector/codemirror/resources/prettyprinting/javascript-tests/block-comment-expected.js: Removed.
  • inspector/codemirror/resources/prettyprinting/javascript-tests/block-comment.js: Removed.
  • inspector/codemirror/resources/prettyprinting/javascript-tests/do-while-loop-expected.js: Removed.
  • inspector/codemirror/resources/prettyprinting/javascript-tests/do-while-loop.js: Removed.
  • inspector/codemirror/resources/prettyprinting/javascript-tests/do-while-within-if-expected.js: Removed.
  • inspector/codemirror/resources/prettyprinting/javascript-tests/do-while-within-if.js: Removed.
  • inspector/codemirror/resources/prettyprinting/javascript-tests/if-followed-by-while-expected.js: Removed.
  • inspector/codemirror/resources/prettyprinting/javascript-tests/if-followed-by-while.js: Removed.
  • inspector/codemirror/resources/prettyprinting/javascript-tests/if-while-within-do-while-expected.js: Removed.
  • inspector/codemirror/resources/prettyprinting/javascript-tests/if-while-within-do-while.js: Removed.
  • inspector/codemirror/resources/prettyprinting/javascript-tests/single-statement-blocks-expected.js: Removed.
  • inspector/codemirror/resources/prettyprinting/javascript-tests/single-statement-blocks.js: Removed.
  • inspector/codemirror/resources/prettyprinting/javascript-tests/switch-case-default-expected.js: Removed.
  • inspector/codemirror/resources/prettyprinting/javascript-tests/switch-case-default.js: Removed.
  • inspector/codemirror/resources/prettyprinting/javascript-tests/unary-binary-operators-expected.js: Removed.
  • inspector/codemirror/resources/prettyprinting/javascript-tests/unary-binary-operators.js: Removed.
  • inspector/codemirror/resources/prettyprinting/javascript-tests/while-within-do-while-expected.js: Removed.
  • inspector/codemirror/resources/prettyprinting/javascript-tests/while-within-do-while.js: Removed.
  • inspector/codemirror/resources/prettyprinting/utilities.js: Removed.
Location:
trunk
Files:
4 deleted
7 edited

Legend:

Unmodified
Added
Removed
  • trunk/LayoutTests/ChangeLog

    r249746 r249751  
     12019-09-10  Joseph Pecoraro  <pecoraro@apple.com>
     2
     3        Web Inspector: Remove legacy CodeMirror based pretty printers
     4        https://bugs.webkit.org/show_bug.cgi?id=201624
     5
     6        Reviewed by Devin Rousso.
     7
     8        * inspector/codemirror/prettyprinting-css-expected.txt: Removed.
     9        * inspector/codemirror/prettyprinting-css.html: Removed.
     10        * inspector/codemirror/prettyprinting-javascript-expected.txt: Removed.
     11        * inspector/codemirror/prettyprinting-javascript.html: Removed.
     12        * inspector/codemirror/resources/prettyprinting/css-tests/basic-expected.css: Removed.
     13        * inspector/codemirror/resources/prettyprinting/css-tests/basic.css: Removed.
     14        * inspector/codemirror/resources/prettyprinting/css-tests/calc-expected.css: Removed.
     15        * inspector/codemirror/resources/prettyprinting/css-tests/calc.css: Removed.
     16        * inspector/codemirror/resources/prettyprinting/css-tests/gradient-expected.css: Removed.
     17        * inspector/codemirror/resources/prettyprinting/css-tests/gradient.css: Removed.
     18        * inspector/codemirror/resources/prettyprinting/css-tests/keyframes-expected.css: Removed.
     19        * inspector/codemirror/resources/prettyprinting/css-tests/keyframes.css: Removed.
     20        * inspector/codemirror/resources/prettyprinting/css-tests/media-query-expected.css: Removed.
     21        * inspector/codemirror/resources/prettyprinting/css-tests/media-query.css: Removed.
     22        * inspector/codemirror/resources/prettyprinting/css-tests/selectors-expected.css: Removed.
     23        * inspector/codemirror/resources/prettyprinting/css-tests/selectors.css: Removed.
     24        * inspector/codemirror/resources/prettyprinting/css-tests/wrapping-expected.css: Removed.
     25        * inspector/codemirror/resources/prettyprinting/css-tests/wrapping.css: Removed.
     26        * inspector/codemirror/resources/prettyprinting/javascript-tests/block-comment-expected.js: Removed.
     27        * inspector/codemirror/resources/prettyprinting/javascript-tests/block-comment.js: Removed.
     28        * inspector/codemirror/resources/prettyprinting/javascript-tests/do-while-loop-expected.js: Removed.
     29        * inspector/codemirror/resources/prettyprinting/javascript-tests/do-while-loop.js: Removed.
     30        * inspector/codemirror/resources/prettyprinting/javascript-tests/do-while-within-if-expected.js: Removed.
     31        * inspector/codemirror/resources/prettyprinting/javascript-tests/do-while-within-if.js: Removed.
     32        * inspector/codemirror/resources/prettyprinting/javascript-tests/if-followed-by-while-expected.js: Removed.
     33        * inspector/codemirror/resources/prettyprinting/javascript-tests/if-followed-by-while.js: Removed.
     34        * inspector/codemirror/resources/prettyprinting/javascript-tests/if-while-within-do-while-expected.js: Removed.
     35        * inspector/codemirror/resources/prettyprinting/javascript-tests/if-while-within-do-while.js: Removed.
     36        * inspector/codemirror/resources/prettyprinting/javascript-tests/single-statement-blocks-expected.js: Removed.
     37        * inspector/codemirror/resources/prettyprinting/javascript-tests/single-statement-blocks.js: Removed.
     38        * inspector/codemirror/resources/prettyprinting/javascript-tests/switch-case-default-expected.js: Removed.
     39        * inspector/codemirror/resources/prettyprinting/javascript-tests/switch-case-default.js: Removed.
     40        * inspector/codemirror/resources/prettyprinting/javascript-tests/unary-binary-operators-expected.js: Removed.
     41        * inspector/codemirror/resources/prettyprinting/javascript-tests/unary-binary-operators.js: Removed.
     42        * inspector/codemirror/resources/prettyprinting/javascript-tests/while-within-do-while-expected.js: Removed.
     43        * inspector/codemirror/resources/prettyprinting/javascript-tests/while-within-do-while.js: Removed.
     44        * inspector/codemirror/resources/prettyprinting/utilities.js: Removed.
     45
    1462019-09-10  Chris Dumez  <cdumez@apple.com>
    247
  • trunk/Source/WebInspectorUI/ChangeLog

    r249655 r249751  
     12019-09-10  Joseph Pecoraro  <pecoraro@apple.com>
     2
     3        Web Inspector: Remove legacy CodeMirror based pretty printers
     4        https://bugs.webkit.org/show_bug.cgi?id=201624
     5
     6        Reviewed by Devin Rousso.
     7
     8        * Tools/PrettyPrinting/FormatterDebug.js: Removed.
     9        * Tools/PrettyPrinting/Utilities.js: Removed.
     10        * Tools/PrettyPrinting/codemirror-additions.css: Removed.
     11        * Tools/PrettyPrinting/index.html: Removed.
     12        * Tools/PrettyPrinting/populate/apple.css: Removed.
     13        * UserInterface/Controllers/Formatter.js: Removed.
     14        * UserInterface/Main.html:
     15        * UserInterface/Test.html:
     16        * UserInterface/Views/CodeMirrorFormatters.js: Removed.
     17        * UserInterface/Views/TextEditor.js:
     18        (WI.TextEditor.prototype.prettyPrint):
     19        (WI.TextEditor.prototype._canUseFormatterWorker): Deleted.
     20        (WI.TextEditor.prototype._startCodeMirrorPrettyPrint): Deleted.
     21        * WebInspectorUI.vcxproj/WebInspectorUI.vcxproj:
     22        * WebInspectorUI.vcxproj/WebInspectorUI.vcxproj.filters:
     23
    1242019-09-09  Joseph Pecoraro  <pecoraro@apple.com>
    225
  • trunk/Source/WebInspectorUI/UserInterface/Main.html

    r249504 r249751  
    626626    <script src="Views/CodeMirrorAdditions.js"></script>
    627627    <script src="Views/CodeMirrorEditor.js"></script>
    628     <script src="Views/CodeMirrorFormatters.js"></script>
    629628    <script src="Views/CodeMirrorLocalOverrideURLMode.js"></script>
    630629    <script src="Views/CodeMirrorRegexMode.js"></script>
     
    880879    <script src="Controllers/DebuggerManager.js"></script>
    881880    <script src="Controllers/DragToAdjustController.js"></script>
    882     <script src="Controllers/Formatter.js"></script>
    883881    <script src="Controllers/FormatterSourceMap.js"></script>
    884882    <script src="Controllers/HARBuilder.js"></script>
  • trunk/Source/WebInspectorUI/UserInterface/Test.html

    r249504 r249751  
    258258    <script src="Controllers/WorkerManager.js"></script>
    259259
    260     <script src="Controllers/Formatter.js"></script>
    261260    <script src="Controllers/ResourceQueryController.js"></script>
    262261    <script src="Controllers/SelectionController.js"></script>
    263262    <script src="Workers/Formatter/FormatterContentBuilder.js"></script>
    264263    <script src="Views/CodeMirrorAdditions.js"></script>
    265     <script src="Views/CodeMirrorFormatters.js"></script>
    266264    <script src="Views/EditingSupport.js"></script>
    267265    <script src="Views/View.js"></script>
  • trunk/Source/WebInspectorUI/UserInterface/Views/TextEditor.js

    r246419 r249751  
    854854            if (!pretty)
    855855                this._undoFormatting(beforePrettyPrintState, resolve);
    856             else if (this._canUseFormatterWorker())
     856            else
    857857                this._startWorkerPrettyPrint(beforePrettyPrintState, resolve);
    858             else
    859                 this._startCodeMirrorPrettyPrint(beforePrettyPrintState, resolve);
    860858        });
    861     }
    862 
    863     _canUseFormatterWorker()
    864     {
    865         let mode = this._codeMirror.getMode().name;
    866         return mode === "javascript" || mode === "css";
    867859    }
    868860
     
    908900        } else if (mode === "css")
    909901            workerProxy.formatCSS(sourceText, indentString, includeSourceMapData, formatCallback);
    910     }
    911 
    912     _startCodeMirrorPrettyPrint(beforePrettyPrintState, callback)
    913     {
    914         let indentString = WI.indentString();
    915         let start = {line: 0, ch: 0};
    916         let end = {line: this._codeMirror.lineCount() - 1};
    917         let builder = new FormatterContentBuilder(indentString);
    918         let formatter = new WI.Formatter(this._codeMirror, builder);
    919         formatter.format(start, end);
    920 
    921         let formattedText = builder.formattedContent;
    922         let sourceMapData = builder.sourceMapData;
    923         this._finishPrettyPrint(beforePrettyPrintState, formattedText, sourceMapData, callback);
    924902    }
    925903
  • trunk/Source/WebInspectorUI/WebInspectorUI.vcxproj/WebInspectorUI.vcxproj

    r239530 r249751  
    307307    <None Include="..\UserInterface\CodeMirrorDragToAlterNumberController.css" />
    308308    <None Include="..\UserInterface\CodeMirrorDragToAlterNumberController.js" />
    309     <None Include="..\UserInterface\CodeMirrorFormatters.js" />
    310309    <None Include="..\UserInterface\CodeMirrorOverrides.css" />
    311310    <None Include="..\UserInterface\CodeMirrorTokenTrackingController.css" />
     
    442441    <None Include="..\UserInterface\FontResourceContentView.css" />
    443442    <None Include="..\UserInterface\FontResourceContentView.js" />
    444     <None Include="..\UserInterface\Formatter.js" />
    445443    <None Include="..\UserInterface\FormatterContentBuilder.js" />
    446444    <None Include="..\UserInterface\FormatterSourceMap.js" />
  • trunk/Source/WebInspectorUI/WebInspectorUI.vcxproj/WebInspectorUI.vcxproj.filters

    r239530 r249751  
    169169      <Filter>UserInterface</Filter>
    170170    </None>
    171     <None Include="..\UserInterface\CodeMirrorFormatters.js">
    172       <Filter>UserInterface</Filter>
    173     </None>
    174171    <None Include="..\UserInterface\CodeMirrorOverrides.css">
    175172      <Filter>UserInterface</Filter>
     
    509506    </None>
    510507    <None Include="..\UserInterface\FontResourceContentView.js">
    511       <Filter>UserInterface</Filter>
    512     </None>
    513     <None Include="..\UserInterface\Formatter.js">
    514508      <Filter>UserInterface</Filter>
    515509    </None>
Note: See TracChangeset for help on using the changeset viewer.