Bug 1223035 - move output-parser.js to devtools/client/shared. r=jryans
authorTom Tromey <tom@tromey.com>
Wed, 11 Nov 2015 08:58:00 +0100
changeset 308694 b4d21d6aad0ab65e7caca8895619f3d01c12ff67
parent 308693 69777d63651913688cf28161a4636d983e7b4f72
child 308695 85afb22e5dcd9ac7209bf2a1be4d7480c0310ee0
push id7514
push users.kaspari@gmail.com
push dateFri, 13 Nov 2015 14:12:41 +0000
reviewersjryans
bugs1223035
milestone45.0a1
Bug 1223035 - move output-parser.js to devtools/client/shared. r=jryans
devtools/client/shared/moz.build
devtools/client/shared/output-parser.js
devtools/client/shared/test/browser_outputparser.js
devtools/client/styleinspector/computed-view.js
devtools/client/styleinspector/rule-view.js
devtools/client/styleinspector/test/browser_styleinspector_output-parser.js
devtools/shared/moz.build
devtools/shared/output-parser.js
--- a/devtools/client/shared/moz.build
+++ b/devtools/client/shared/moz.build
@@ -25,16 +25,17 @@ DevToolsModules(
     'doorhanger.js',
     'frame-script-utils.js',
     'getjson.js',
     'inplace-editor.js',
     'Jsbeautify.jsm',
     'node-attribute-parser.js',
     'observable-object.js',
     'options-view.js',
+    'output-parser.js',
     'poller.js',
     'source-utils.js',
     'SplitView.jsm',
     'telemetry.js',
     'theme-switching.js',
     'theme.js',
     'undo.js'
 )
rename from devtools/shared/output-parser.js
rename to devtools/client/shared/output-parser.js
--- a/devtools/shared/output-parser.js
+++ b/devtools/client/shared/output-parser.js
@@ -33,17 +33,17 @@ loader.lazyGetter(this, "DOMUtils", func
  * linking JS files with the debugger, CSS files with the style editor, JS
  * functions with the debugger, placing color swatches next to colors and
  * adding doorhanger previews where possible (images, angles, lengths,
  * border radius, cubic-bezier etc.).
  *
  * Usage:
  *   const {require} =
  *      Cu.import("resource://devtools/shared/Loader.jsm", {});
- *   const {OutputParser} = require("devtools/shared/output-parser");
+ *   const {OutputParser} = require("devtools/client/shared/output-parser");
  *
  *   let parser = new OutputParser(document);
  *
  *   parser.parseCssProperty("color", "red"); // Returns document fragment.
  */
 function OutputParser(document) {
   this.parsed = [];
   this.doc = document;
--- a/devtools/client/shared/test/browser_outputparser.js
+++ b/devtools/client/shared/test/browser_outputparser.js
@@ -1,16 +1,16 @@
 /* Any copyright is dedicated to the Public Domain.
    http://creativecommons.org/publicdomain/zero/1.0/ */
 
 "use strict";
 
 var {Loader} = Cu.import("resource://gre/modules/commonjs/toolkit/loader.js",
                          {});
-var {OutputParser} = require("devtools/shared/output-parser");
+var {OutputParser} = require("devtools/client/shared/output-parser");
 
 add_task(function*() {
   yield addTab("about:blank");
   yield performTest();
   gBrowser.removeCurrentTab();
 });
 
 function* performTest() {
--- a/devtools/client/styleinspector/computed-view.js
+++ b/devtools/client/styleinspector/computed-view.js
@@ -10,17 +10,17 @@
 
 const {Cc, Ci, Cu} = require("chrome");
 
 const ToolDefinitions = require("devtools/client/main").Tools;
 const {CssLogic} = require("devtools/shared/styleinspector/css-logic");
 const {ELEMENT_STYLE} = require("devtools/server/actors/styles");
 const promise = require("promise");
 const {setTimeout, clearTimeout} = Cu.import("resource://gre/modules/Timer.jsm", {});
-const {OutputParser} = require("devtools/shared/output-parser");
+const {OutputParser} = require("devtools/client/shared/output-parser");
 const {PrefObserver, PREF_ORIG_SOURCES} = require("devtools/client/styleeditor/utils");
 const {createChild} = require("devtools/client/styleinspector/utils");
 const {gDevTools} = Cu.import("resource://devtools/client/framework/gDevTools.jsm", {});
 
 loader.lazyRequireGetter(this, "overlays",
   "devtools/client/styleinspector/style-inspector-overlays");
 loader.lazyRequireGetter(this, "StyleInspectorMenu",
   "devtools/client/styleinspector/style-inspector-menu");
--- a/devtools/client/styleinspector/rule-view.js
+++ b/devtools/client/styleinspector/rule-view.js
@@ -10,17 +10,17 @@ const {Cc, Ci, Cu} = require("chrome");
 const promise = require("promise");
 const {setTimeout, clearTimeout} =
       Cu.import("resource://gre/modules/Timer.jsm", {});
 const {CssLogic} = require("devtools/shared/styleinspector/css-logic");
 const {InplaceEditor, editableField, editableItem} =
       require("devtools/client/shared/inplace-editor");
 const {ELEMENT_STYLE, PSEUDO_ELEMENTS} =
       require("devtools/server/actors/styles");
-const {OutputParser} = require("devtools/shared/output-parser");
+const {OutputParser} = require("devtools/client/shared/output-parser");
 const {PrefObserver, PREF_ORIG_SOURCES} = require("devtools/client/styleeditor/utils");
 const {
   createChild,
   appendText,
   advanceValidate,
   blurOnMultipleProperties,
   promiseWarn,
   throttle
--- a/devtools/client/styleinspector/test/browser_styleinspector_output-parser.js
+++ b/devtools/client/styleinspector/test/browser_styleinspector_output-parser.js
@@ -4,17 +4,17 @@
 
 "use strict";
 
 // Test expected outputs of the output-parser's parseCssProperty function.
 
 // This is more of a unit test than a mochitest-browser test, but can't be
 // tested with an xpcshell test as the output-parser requires the DOM to work.
 
-var {OutputParser} = require("devtools/shared/output-parser");
+var {OutputParser} = require("devtools/client/shared/output-parser");
 
 const COLOR_CLASS = "color-class";
 const URL_CLASS = "url-class";
 const CUBIC_BEZIER_CLASS = "bezier-class";
 
 const TEST_DATA = [
   {
     name: "width",
--- a/devtools/shared/moz.build
+++ b/devtools/shared/moz.build
@@ -41,13 +41,12 @@ DevToolsModules(
     'content-observer.js',
     'css-color.js',
     'deprecated-sync-thenables.js',
     'DevToolsUtils.js',
     'event-emitter.js',
     'event-parsers.js',
     'indentation.js',
     'Loader.jsm',
-    'output-parser.js',
     'Parser.jsm',
     'path.js',
     'system.js',
 )