Backed out changeset 1bca17123507 (bug 1290988) for xpcshell failures (test_rewriteDeclarations.js) and devtools failures (browser_styleeditor_syncAddProperty.js). r=backout

--HG--
rename : devtools/shared/css/color-db.js => devtools/shared/css-color-db.js
rename : devtools/shared/css/lexer.js => devtools/shared/css-lexer.js
rename : devtools/shared/css/properties-db.js => devtools/shared/css-properties-db.js
This commit is contained in:
Sebastian Hengst 2016-09-13 17:43:44 +02:00
Родитель 1984be4adc
Коммит d11146270a
42 изменённых файлов: 53 добавлений и 1174 удалений

Просмотреть файл

@ -125,6 +125,7 @@ devtools/server/tests/**
devtools/shared/*.js
!devtools/shared/async-storage.js
!devtools/shared/async-utils.js
!devtools/shared/css-lexer.js
!devtools/shared/defer.js
!devtools/shared/event-emitter.js
!devtools/shared/indentation.js

Просмотреть файл

@ -10,7 +10,7 @@ XPCOMUtils.defineLazyModuleGetter(this, "setTimeout",
"resource://gre/modules/Timer.jsm");
XPCOMUtils.defineLazyGetter(this, "colorUtils", () => {
return require("devtools/shared/css/color").colorUtils;
return require("devtools/shared/css-color").colorUtils;
});
Cu.import("resource://devtools/shared/event-emitter.js");

Просмотреть файл

@ -18,7 +18,7 @@ XPCOMUtils.defineLazyServiceGetter(this, "styleSheetService",
"nsIStyleSheetService");
XPCOMUtils.defineLazyGetter(this, "colorUtils", () => {
return require("devtools/shared/css/color").colorUtils;
return require("devtools/shared/css-color").colorUtils;
});
Cu.import("resource://gre/modules/ExtensionUtils.jsm");

Просмотреть файл

@ -12,7 +12,7 @@ const {ELEMENT_STYLE} = require("devtools/shared/specs/styles");
const {TextProperty} =
require("devtools/client/inspector/rules/models/text-property");
const {promiseWarn} = require("devtools/client/inspector/shared/utils");
const {parseDeclarations} = require("devtools/shared/css/parsing-utils");
const {parseDeclarations} = require("devtools/shared/css-parsing-utils");
const Services = require("Services");
const STYLE_INSPECTOR_PROPERTIES = "devtools-shared/locale/styleinspector.properties";

Просмотреть файл

@ -9,7 +9,7 @@
/* eslint-disable mozilla/reject-some-requires */
const {Cc, Ci} = require("chrome");
/* eslint-enable mozilla/reject-some-requires */
const {escapeCSSComment} = require("devtools/shared/css/parsing-utils");
const {escapeCSSComment} = require("devtools/shared/css-parsing-utils");
const {getCssProperties} = require("devtools/shared/fronts/css-properties");
/* eslint-disable mozilla/reject-some-requires */
const {XPCOMUtils} = require("resource://gre/modules/XPCOMUtils.jsm");

Просмотреть файл

@ -23,7 +23,7 @@ const {
SELECTOR_ATTRIBUTE,
SELECTOR_ELEMENT,
SELECTOR_PSEUDO_CLASS
} = require("devtools/shared/css/parsing-utils");
} = require("devtools/shared/css-parsing-utils");
const promise = require("promise");
const Services = require("Services");
const EventEmitter = require("devtools/shared/event-emitter");

Просмотреть файл

@ -17,7 +17,7 @@ const {
const {
parseDeclarations,
parseSingleValue,
} = require("devtools/shared/css/parsing-utils");
} = require("devtools/shared/css-parsing-utils");
const Services = require("Services");
const HTML_NS = "http://www.w3.org/1999/xhtml";

Просмотреть файл

@ -6,9 +6,9 @@
"use strict";
const {parseDeclarations} = require("devtools/shared/css/parsing-utils");
const {parseDeclarations} = require("devtools/shared/css-parsing-utils");
const promise = require("promise");
const {getCSSLexer} = require("devtools/shared/css/lexer");
const {getCSSLexer} = require("devtools/shared/css-lexer");
const {KeyCodes} = require("devtools/client/shared/keycodes");
const HTML_NS = "http://www.w3.org/1999/xhtml";

Просмотреть файл

@ -16,7 +16,7 @@ const { CanvasGraphUtils } = require("devtools/client/shared/widgets/Graphs");
const promise = require("promise");
const EventEmitter = require("devtools/shared/event-emitter");
const { colorUtils } = require("devtools/shared/css/color");
const { colorUtils } = require("devtools/shared/css-color");
const { getColor } = require("devtools/client/shared/theme");
const ProfilerGlobal = require("devtools/client/performance/modules/global");
const { MarkersOverview } = require("devtools/client/performance/modules/widgets/markers-overview");

Просмотреть файл

@ -12,7 +12,7 @@
const { Heritage } = require("devtools/client/shared/widgets/view-helpers");
const { AbstractCanvasGraph } = require("devtools/client/shared/widgets/Graphs");
const { colorUtils } = require("devtools/shared/css/color");
const { colorUtils } = require("devtools/shared/css-color");
const { getColor } = require("devtools/client/shared/theme");
const ProfilerGlobal = require("devtools/client/performance/modules/global");
const { MarkerBlueprintUtils } = require("devtools/client/performance/modules/marker-blueprint-utils");

Просмотреть файл

@ -10,7 +10,7 @@ const SPECIALVALUES = new Set([
"unset"
]);
const {getCSSLexer} = require("devtools/shared/css/lexer");
const {getCSSLexer} = require("devtools/shared/css-lexer");
/**
* This module is used to convert between various angle units.

Просмотреть файл

@ -6,15 +6,15 @@
const {Cc, Ci} = require("chrome");
const {angleUtils} = require("devtools/client/shared/css-angle");
const {colorUtils} = require("devtools/shared/css/color");
const {getCSSLexer} = require("devtools/shared/css/lexer");
const {colorUtils} = require("devtools/shared/css-color");
const {getCSSLexer} = require("devtools/shared/css-lexer");
const EventEmitter = require("devtools/shared/event-emitter");
const {
ANGLE_TAKING_FUNCTIONS,
BEZIER_KEYWORDS,
COLOR_TAKING_FUNCTIONS,
CSS_TYPES
} = require("devtools/shared/css/properties-db");
} = require("devtools/shared/css-properties-db");
const HTML_NS = "http://www.w3.org/1999/xhtml";
@ -40,7 +40,7 @@ loader.lazyGetter(this, "DOMUtils", function () {
* @param {Function} supportsTypes A function that returns a boolean when asked if a css
* property name supports a given css type.
* The function is executed like supportsType("color", CSS_TYPES.COLOR) where CSS_TYPES is
* defined in devtools/shared/css/properties-db.js
* defined in devtools/shared/css-properties-db.js
*/
function OutputParser(document, supportsType) {
this.parsed = [];

Просмотреть файл

@ -2,7 +2,7 @@
http://creativecommons.org/publicdomain/zero/1.0/ */
const TEST_URI = "data:text/html;charset=utf-8,browser_css_color.js";
var {colorUtils} = require("devtools/shared/css/color");
var {colorUtils} = require("devtools/shared/css-color");
var origColorUnit;
add_task(function* () {

Просмотреть файл

@ -10,7 +10,7 @@ var Ci = Components.interfaces;
var Cc = Components.classes;
var {require, loader} = Cu.import("resource://devtools/shared/Loader.jsm", {});
const {colorUtils} = require("devtools/shared/css/color");
const {colorUtils} = require("devtools/shared/css-color");
loader.lazyGetter(this, "DOMUtils", function () {
return Cc["@mozilla.org/inspector/dom-utils;1"].getService(Ci.inIDOMUtils);

Просмотреть файл

@ -13,8 +13,8 @@ var {require} = Cu.import("resource://devtools/shared/Loader.jsm", {});
const DOMUtils = Cc["@mozilla.org/inspector/dom-utils;1"].getService(Ci.inIDOMUtils);
const {colorUtils} = require("devtools/shared/css/color");
const {cssColors} = require("devtools/shared/css/color-db");
const {colorUtils} = require("devtools/shared/css-color");
const {cssColors} = require("devtools/shared/css-color-db");
function isValid(colorName) {
ok(colorUtils.isValidCSSColor(colorName),

Просмотреть файл

@ -5,7 +5,7 @@
var Cu = Components.utils;
const {require} = Cu.import("resource://devtools/shared/Loader.jsm", {});
const {escapeCSSComment, _unescapeCSSComment} = require("devtools/shared/css/parsing-utils");
const {escapeCSSComment, _unescapeCSSComment} = require("devtools/shared/css-parsing-utils");
const TEST_DATA = [
{

Просмотреть файл

@ -7,7 +7,7 @@
var Cu = Components.utils;
const {require} = Cu.import("resource://devtools/shared/Loader.jsm", {});
const {parseDeclarations, _parseCommentDeclarations} = require("devtools/shared/css/parsing-utils");
const {parseDeclarations, _parseCommentDeclarations} = require("devtools/shared/css-parsing-utils");
const {isCssPropertyKnown} = require("devtools/server/actors/css-properties");
const TEST_DATA = [

Просмотреть файл

@ -12,7 +12,7 @@ const {
SELECTOR_ATTRIBUTE,
SELECTOR_ELEMENT,
SELECTOR_PSEUDO_CLASS
} = require("devtools/shared/css/parsing-utils");
} = require("devtools/shared/css-parsing-utils");
const TEST_DATA = [
// Test that a null input throws an exception

Просмотреть файл

@ -7,7 +7,7 @@
var Cu = Components.utils;
const {require} = Cu.import("resource://devtools/shared/Loader.jsm", {});
const {parseSingleValue} = require("devtools/shared/css/parsing-utils");
const {parseSingleValue} = require("devtools/shared/css-parsing-utils");
const {isCssPropertyKnown} = require("devtools/server/actors/css-properties");
const TEST_DATA = [

Просмотреть файл

@ -5,7 +5,7 @@
var Cu = Components.utils;
const {require} = Cu.import("resource://devtools/shared/Loader.jsm", {});
const {RuleRewriter} = require("devtools/shared/css/parsing-utils");
const {RuleRewriter} = require("devtools/shared/css-parsing-utils");
const {isCssPropertyKnown} = require("devtools/server/actors/css-properties");
const TEST_DATA = [

Просмотреть файл

@ -31,7 +31,7 @@ const {
PRESETS,
DEFAULT_PRESET_CATEGORY
} = require("devtools/client/shared/widgets/CubicBezierPresets");
const {getCSSLexer} = require("devtools/shared/css/lexer");
const {getCSSLexer} = require("devtools/shared/css-lexer");
const XHTML_NS = "http://www.w3.org/1999/xhtml";
/**

Просмотреть файл

@ -17,7 +17,7 @@ const { LocalizationHelper } = require("devtools/shared/l10n");
const STRINGS_URI = "devtools/locale/filterwidget.properties";
const L10N = new LocalizationHelper(STRINGS_URI);
const {cssTokenizer} = require("devtools/shared/css/parsing-utils");
const {cssTokenizer} = require("devtools/shared/css-parsing-utils");
const asyncStorage = require("devtools/shared/async-storage");

Просмотреть файл

@ -26,7 +26,7 @@
const Services = require("Services");
const defer = require("devtools/shared/defer");
const {getCSSLexer} = require("devtools/shared/css/lexer");
const {getCSSLexer} = require("devtools/shared/css-lexer");
const EventEmitter = require("devtools/shared/event-emitter");
const {gDevTools} = require("devtools/client/framework/devtools");

Просмотреть файл

@ -11,7 +11,7 @@ const {CubicBezierWidget} =
const {CSSFilterEditorWidget} = require("devtools/client/shared/widgets/FilterWidget");
const {TooltipToggle} = require("devtools/client/shared/widgets/tooltip/TooltipToggle");
const EventEmitter = require("devtools/shared/event-emitter");
const {colorUtils} = require("devtools/shared/css/color");
const {colorUtils} = require("devtools/shared/css-color");
const Heritage = require("sdk/core/heritage");
const {HTMLTooltip} = require("devtools/client/shared/widgets/HTMLTooltip");
const {KeyShortcuts} = require("devtools/client/shared/key-shortcuts");

Просмотреть файл

@ -5,7 +5,7 @@
"use strict";
/* eslint-disable complexity */
const {cssTokenizer, cssTokenizerWithLineColumn} = require("devtools/shared/css/parsing-utils");
const {cssTokenizer, cssTokenizerWithLineColumn} = require("devtools/shared/css-parsing-utils");
const {getClientCssProperties} = require("devtools/shared/fronts/css-properties");
/**

Просмотреть файл

@ -17,8 +17,8 @@ loader.lazyGetter(this, "appInfo", () => {
const protocol = require("devtools/shared/protocol");
const { ActorClassWithSpec, Actor } = protocol;
const { cssPropertiesSpec } = require("devtools/shared/specs/css-properties");
const { CSS_PROPERTIES, CSS_TYPES } = require("devtools/shared/css/properties-db");
const { cssColors } = require("devtools/shared/css/color-db");
const { CSS_PROPERTIES, CSS_TYPES } = require("devtools/shared/css-properties-db");
const { cssColors } = require("devtools/shared/css-color-db");
exports.CssPropertiesActor = ActorClassWithSpec(cssPropertiesSpec, {
typeName: "cssProperties",

Просмотреть файл

@ -12,7 +12,7 @@ const {Ci, Cc} = require("chrome");
const {CanvasFrameAnonymousContentHelper, createNode} = require("./utils/markup");
const Services = require("Services");
const EventEmitter = require("devtools/shared/event-emitter");
const {rgbToHsl, rgbToColorName} = require("devtools/shared/css/color").colorUtils;
const {rgbToHsl, rgbToColorName} = require("devtools/shared/css-color").colorUtils;
const {getCurrentZoom, getFrameOffsets} = require("devtools/shared/layout/utils");
loader.lazyGetter(this, "clipboardHelper",

Просмотреть файл

@ -9,7 +9,7 @@ const promise = require("promise");
const protocol = require("devtools/shared/protocol");
const {LongStringActor} = require("devtools/server/actors/string");
const {getDefinedGeometryProperties} = require("devtools/server/actors/highlighters/geometry-editor");
const {parseDeclarations} = require("devtools/shared/css/parsing-utils");
const {parseDeclarations} = require("devtools/shared/css-parsing-utils");
const {isCssPropertyKnown} = require("devtools/server/actors/css-properties");
const {Task} = require("devtools/shared/task");
const events = require("sdk/event/core");

Просмотреть файл

@ -35,7 +35,7 @@ const { getRootBindingParent } = require("devtools/shared/layout/utils");
const nodeConstants = require("devtools/shared/dom-node-constants");
const {l10n, isContentStylesheet, shortSource, FILTER, STATUS} = require("devtools/shared/inspector/css-logic");
loader.lazyRequireGetter(this, "CSSLexer", "devtools/shared/css/lexer");
loader.lazyRequireGetter(this, "CSSLexer", "devtools/shared/css-lexer");
/**
* @param {function} isInherited A function that determines if the CSS property

Просмотреть файл

@ -14,7 +14,7 @@ window.onload = function() {
const { initCssProperties, getCssProperties } =
require("devtools/shared/fronts/css-properties");
const { CSS_PROPERTIES_DB } = require("devtools/shared/css/properties-db");
const { CSS_PROPERTIES_DB } = require("devtools/shared/css-properties-db");
function promiseAttachUrl (url) {
return new Promise((resolve, reject) => {

Просмотреть файл

Просмотреть файл

@ -6,8 +6,8 @@
const Services = require("Services");
const {getCSSLexer} = require("devtools/shared/css/lexer");
const {cssColors} = require("devtools/shared/css/color-db");
const {getCSSLexer} = require("devtools/shared/css-lexer");
const {cssColors} = require("devtools/shared/css-color-db");
const COLOR_UNIT_PREF = "devtools.defaultColorUnit";
@ -23,7 +23,7 @@ const SPECIALVALUES = new Set([
* This module is used to convert between various color types.
*
* Usage:
* let {colorUtils} = require("devtools/shared/css/color");
* let {colorUtils} = require("devtools/shared/css-color");
* let color = new colorUtils.CssColor("red");
*
* color.authored === "red"

Просмотреть файл

Просмотреть файл

@ -1,13 +0,0 @@
# -*- Mode: python; indent-tabs-mode: nil; tab-width: 40 -*-
# vim: set filetype=python:
# This Source Code Form is subject to the terms of the Mozilla Public
# License, v. 2.0. If a copy of the MPL was not distributed with this
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
DevToolsModules(
'color-db.js',
'color.js',
'lexer.js',
'parsing-utils.js',
'properties-db.js',
)

Разница между файлами не показана из-за своего большого размера Загрузить разницу

Просмотреть файл

@ -6,8 +6,8 @@
const { FrontClassWithSpec, Front } = require("devtools/shared/protocol");
const { cssPropertiesSpec } = require("devtools/shared/specs/css-properties");
const { Task } = require("devtools/shared/task");
const { CSS_PROPERTIES_DB } = require("devtools/shared/css/properties-db");
const { cssColors } = require("devtools/shared/css/color-db");
const { CSS_PROPERTIES_DB } = require("devtools/shared/css-properties-db");
const { cssColors } = require("devtools/shared/css-color-db");
/**
* Build up a regular expression that matches a CSS variable token. This is an
@ -91,7 +91,7 @@ CssProperties.prototype = {
/**
* Checks if the property supports the given CSS type.
* CSS types should come from devtools/shared/css/properties-db.js' CSS_TYPES.
* CSS types should come from devtools/shared/css-properties-db.js' CSS_TYPES.
*
* @param {String} property The property to be checked.
* @param {Number} type One of the type values from CSS_TYPES.

Просмотреть файл

@ -17,7 +17,7 @@ const {
const promise = require("promise");
const { Task } = require("devtools/shared/task");
const { Class } = require("sdk/core/heritage");
const { RuleRewriter } = require("devtools/shared/css/parsing-utils");
const { RuleRewriter } = require("devtools/shared/css-parsing-utils");
/**
* PageStyleFront, the front object for the PageStyleActor

Просмотреть файл

@ -41,7 +41,7 @@
*/
const Services = require("Services");
const CSSLexer = require("devtools/shared/css/lexer");
const CSSLexer = require("devtools/shared/css-lexer");
const {LocalizationHelper} = require("devtools/shared/l10n");
const styleInspectorL10N =
new LocalizationHelper("devtools-shared/locale/styleinspector.properties");

Просмотреть файл

@ -10,7 +10,6 @@ DIRS += [
'acorn',
'apps',
'client',
'css',
'discovery',
'fronts',
'gcli',
@ -46,6 +45,11 @@ DevToolsModules(
'async-utils.js',
'builtin-modules.js',
'content-observer.js',
'css-color-db.js',
'css-color.js',
'css-lexer.js',
'css-parsing-utils.js',
'css-properties-db.js',
'defer.js',
'deprecated-sync-thenables.js',
'DevToolsUtils.js',

Просмотреть файл

@ -9,7 +9,7 @@
const DOMUtils = Components.classes["@mozilla.org/inspector/dom-utils;1"]
.getService(Components.interfaces.inIDOMUtils);
const {PSEUDO_ELEMENTS, CSS_PROPERTIES} = require("devtools/shared/css/properties-db");
const {PSEUDO_ELEMENTS, CSS_PROPERTIES} = require("devtools/shared/css-properties-db");
const {generateCssProperties} = require("devtools/server/actors/css-properties");
function run_test() {
@ -17,13 +17,13 @@ function run_test() {
deepEqual(PSEUDO_ELEMENTS, DOMUtils.getCSSPseudoElementNames(),
"If this assertion fails, then the client side CSS pseudo elements list in " +
"devtools is out of date with the pseudo elements on the platform. To fix " +
"this assertion open devtools/shared/css/properties-db.js and follow the " +
"this assertion open devtools/shared/css-properties-db.js and follow the " +
"instructions above the CSS_PSEUDO_ELEMENTS on how to re-generate the list.");
const propertiesErrorMessage = "If this assertion fails, then the client side CSS " +
"properties list in devtools is out of date with the " +
"CSS properties on the platform. To fix this " +
"assertion open devtools/shared/css/properties-db.js " +
"assertion open devtools/shared/css-properties-db.js " +
"and follow the instructions above the CSS_PROPERTIES " +
"on how to re-generate the list.";

Просмотреть файл

@ -9,7 +9,7 @@
"use strict";
const jsLexer = require("devtools/shared/css/lexer");
const jsLexer = require("devtools/shared/css-lexer");
const domutils = Components.classes["@mozilla.org/inspector/dom-utils;1"]
.getService(Components.interfaces.inIDOMUtils);