mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-10-23 02:05:42 +00:00
Backed out changeset e58df849e249 (bug 1268461) for bustage
This commit is contained in:
parent
56aee50d78
commit
779fe0a0a8
@ -1,10 +1,7 @@
|
||||
# -*- Mode: python; c-basic-offset: 4; 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(
|
||||
'storage.js',
|
||||
'stylesheets.js'
|
||||
)
|
||||
|
@ -1,36 +0,0 @@
|
||||
/* 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/. */
|
||||
"use strict";
|
||||
|
||||
const { Front, FrontClassWithSpec } = require("devtools/server/protocol.js");
|
||||
const { originalSourceSpec } = require("devtools/shared/specs/stylesheets.js");
|
||||
|
||||
/**
|
||||
* The client-side counterpart for an OriginalSourceActor.
|
||||
*/
|
||||
const OriginalSourceFront = FrontClassWithSpec(originalSourceSpec, {
|
||||
initialize: function (client, form) {
|
||||
Front.prototype.initialize.call(this, client, form);
|
||||
|
||||
this.isOriginalSource = true;
|
||||
},
|
||||
|
||||
form: function (form, detail) {
|
||||
if (detail === "actorid") {
|
||||
this.actorID = form;
|
||||
return;
|
||||
}
|
||||
this.actorID = form.actor;
|
||||
this._form = form;
|
||||
},
|
||||
|
||||
get href() {
|
||||
return this._form.url;
|
||||
},
|
||||
get url() {
|
||||
return this._form.url;
|
||||
}
|
||||
});
|
||||
|
||||
exports.OriginalSourceFront = OriginalSourceFront;
|
@ -14,13 +14,11 @@ Cu.import("resource://gre/modules/Task.jsm");
|
||||
|
||||
const promise = require("promise");
|
||||
const events = require("sdk/event/core");
|
||||
const {OriginalSourceFront} = require("devtools/client/fronts/stylesheets");
|
||||
const protocol = require("devtools/server/protocol");
|
||||
const {Arg, Option, method, RetVal, types} = protocol;
|
||||
const {LongStringActor, ShortLongString} = require("devtools/server/actors/string");
|
||||
const {fetch} = require("devtools/shared/DevToolsUtils");
|
||||
const {listenOnce} = require("devtools/shared/async-utils");
|
||||
const {originalSourceSpec} = require("devtools/shared/specs/stylesheets");
|
||||
const {SourceMapConsumer} = require("source-map");
|
||||
|
||||
loader.lazyGetter(this, "CssLogic", () => require("devtools/shared/inspector/css-logic").CssLogic);
|
||||
@ -68,7 +66,9 @@ let modifiedStyleSheets = new WeakMap();
|
||||
* Actor representing an original source of a style sheet that was specified
|
||||
* in a source map.
|
||||
*/
|
||||
var OriginalSourceActor = protocol.ActorClassWithSpec(originalSourceSpec, {
|
||||
var OriginalSourceActor = protocol.ActorClass({
|
||||
typeName: "originalsource",
|
||||
|
||||
initialize: function(aUrl, aSourceMap, aParentActor) {
|
||||
protocol.Actor.prototype.initialize.call(this, null);
|
||||
|
||||
@ -110,13 +110,44 @@ var OriginalSourceActor = protocol.ActorClassWithSpec(originalSourceSpec, {
|
||||
/**
|
||||
* Protocol method to get the text of this source.
|
||||
*/
|
||||
getText: function() {
|
||||
getText: method(function() {
|
||||
return this._getText().then((text) => {
|
||||
return new LongStringActor(this.conn, text || "");
|
||||
});
|
||||
}
|
||||
}, {
|
||||
response: {
|
||||
text: RetVal("longstring")
|
||||
}
|
||||
})
|
||||
})
|
||||
|
||||
/**
|
||||
* The client-side counterpart for an OriginalSourceActor.
|
||||
*/
|
||||
var OriginalSourceFront = protocol.FrontClass(OriginalSourceActor, {
|
||||
initialize: function(client, form) {
|
||||
protocol.Front.prototype.initialize.call(this, client, form);
|
||||
|
||||
this.isOriginalSource = true;
|
||||
},
|
||||
|
||||
form: function(form, detail) {
|
||||
if (detail === "actorid") {
|
||||
this.actorID = form;
|
||||
return;
|
||||
}
|
||||
this.actorID = form.actor;
|
||||
this._form = form;
|
||||
},
|
||||
|
||||
get href() {
|
||||
return this._form.url;
|
||||
},
|
||||
get url() {
|
||||
return this._form.url;
|
||||
}
|
||||
});
|
||||
|
||||
/**
|
||||
* A MediaRuleActor lives on the server and provides access to properties
|
||||
* of a DOM @media rule and emits events when it changes.
|
||||
|
@ -24,7 +24,6 @@ DIRS += [
|
||||
'sourcemap',
|
||||
'specs',
|
||||
'shims',
|
||||
'specs',
|
||||
'touch',
|
||||
'transport',
|
||||
'webconsole',
|
||||
|
@ -5,6 +5,5 @@
|
||||
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
|
||||
|
||||
DevToolsModules(
|
||||
'storage.js',
|
||||
'stylesheets.js'
|
||||
'storage.js'
|
||||
)
|
||||
|
@ -1,20 +0,0 @@
|
||||
/* 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/. */
|
||||
"use strict";
|
||||
|
||||
const { RetVal, generateActorSpec } = require("devtools/server/protocol.js");
|
||||
|
||||
const originalSourceSpec = generateActorSpec({
|
||||
typeName: "originalsource",
|
||||
|
||||
methods: {
|
||||
getText: {
|
||||
response: {
|
||||
text: RetVal("longstring")
|
||||
}
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
exports.originalSourceSpec = originalSourceSpec;
|
Loading…
Reference in New Issue
Block a user