mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Backed out changeset ef6fd70cccf5 (bug 1145049)
This commit is contained in:
parent
a604dbbbe8
commit
6cb917c2a0
@ -184,9 +184,6 @@ let HighlighterActor = exports.HighlighterActor = protocol.ActorClass({
|
||||
},
|
||||
|
||||
destroy: function() {
|
||||
if (!this._inspector) {
|
||||
return;
|
||||
}
|
||||
protocol.Actor.prototype.destroy.call(this);
|
||||
|
||||
this._destroyHighlighter();
|
||||
@ -198,10 +195,6 @@ let HighlighterActor = exports.HighlighterActor = protocol.ActorClass({
|
||||
this._layoutHelpers = null;
|
||||
},
|
||||
|
||||
disconnect: function () {
|
||||
this.destroy();
|
||||
},
|
||||
|
||||
/**
|
||||
* Display the box model highlighting on a given NodeActor.
|
||||
* There is only one instance of the box model highlighter, so calling this
|
||||
|
@ -220,12 +220,6 @@ var NodeActor = exports.NodeActor = protocol.ActorClass({
|
||||
this.rawNode.ownerDocument.documentElement === this.rawNode;
|
||||
},
|
||||
|
||||
destroy: function () {
|
||||
protocol.Actor.prototype.destroy.call(this);
|
||||
this.rawNode = null;
|
||||
this.walker = null;
|
||||
},
|
||||
|
||||
// Returns the JSON representation of this object over the wire.
|
||||
form: function(detail) {
|
||||
if (detail === "actorid") {
|
||||
@ -1225,9 +1219,6 @@ var WalkerActor = protocol.ActorClass({
|
||||
|
||||
destroy: function() {
|
||||
try {
|
||||
if (this._destroyed) {
|
||||
return;
|
||||
}
|
||||
this._destroyed = true;
|
||||
|
||||
this.clearPseudoClassLocks();
|
||||
@ -1235,17 +1226,6 @@ var WalkerActor = protocol.ActorClass({
|
||||
|
||||
this._hoveredNode = null;
|
||||
this.rootDoc = null;
|
||||
this.rootWin = null;
|
||||
this.rootNode = null;
|
||||
this.tabActor = null;
|
||||
this.layoutHelpers = null;
|
||||
this._orphaned = null;
|
||||
this._retainedOrphans = null;
|
||||
this._refMap.forEach(actor => {
|
||||
this.unmanage(actor);
|
||||
actor.destroy();
|
||||
});
|
||||
this._refMap = null;
|
||||
|
||||
this.reflowObserver.off("reflows", this._onReflows);
|
||||
this.reflowObserver = null;
|
||||
@ -3332,30 +3312,6 @@ var InspectorActor = exports.InspectorActor = protocol.ActorClass({
|
||||
this.tabActor = tabActor;
|
||||
},
|
||||
|
||||
destroy: function () {
|
||||
protocol.Actor.prototype.destroy.call(this);
|
||||
this._highlighterPromise = null;
|
||||
this._pageStylePromise = null;
|
||||
this._walkerPromise = null;
|
||||
if (this.walker) {
|
||||
this.walker.destroy();
|
||||
}
|
||||
this.walker = null;
|
||||
if (this.pageStyle) {
|
||||
this.pageStyle.destroy();
|
||||
}
|
||||
this.pageStyle = null;
|
||||
if (this.highlighter) {
|
||||
this.highlighter.destroy();
|
||||
}
|
||||
this.highlighter = null;
|
||||
this.tabActor = null;
|
||||
},
|
||||
|
||||
disconnect: function () {
|
||||
this.destroy();
|
||||
},
|
||||
|
||||
get window() this.tabActor.window,
|
||||
|
||||
getWalker: method(function(options={}) {
|
||||
@ -3400,7 +3356,7 @@ var InspectorActor = exports.InspectorActor = protocol.ActorClass({
|
||||
}
|
||||
|
||||
this._pageStylePromise = this.getWalker().then(walker => {
|
||||
return this.pageStyle = PageStyleActor(this);
|
||||
return PageStyleActor(this);
|
||||
});
|
||||
return this._pageStylePromise;
|
||||
}, {
|
||||
@ -3429,7 +3385,7 @@ var InspectorActor = exports.InspectorActor = protocol.ActorClass({
|
||||
}
|
||||
|
||||
this._highlighterPromise = this.getWalker().then(walker => {
|
||||
return this.highlighter = HighlighterActor(this, autohide);
|
||||
return HighlighterActor(this, autohide);
|
||||
});
|
||||
return this._highlighterPromise;
|
||||
}, {
|
||||
|
@ -124,32 +124,10 @@ var PageStyleActor = protocol.ActorClass({
|
||||
// Stores the association of DOM objects -> actors
|
||||
this.refMap = new Map;
|
||||
|
||||
// Keep the list of StyleRuleActor created for font
|
||||
// in order to clean them up when the PageStyleActor is collected
|
||||
this.fontStyleActors = new Set;
|
||||
|
||||
this.onFrameUnload = this.onFrameUnload.bind(this);
|
||||
events.on(this.inspector.tabActor, "will-navigate", this.onFrameUnload);
|
||||
},
|
||||
|
||||
destroy: function () {
|
||||
if (!this.walker)
|
||||
return;
|
||||
protocol.Actor.prototype.destroy.call(this);
|
||||
events.off(this.inspector.tabActor, "will-navigate", this.onFrameUnload);
|
||||
this.inspector = null;
|
||||
this.walker = null;
|
||||
this.refMap.forEach(actor => {
|
||||
this.unmanage(actor);
|
||||
actor.destroy();
|
||||
});
|
||||
this.fontStyleActors.forEach(actor => actor.destroy());
|
||||
this.fontStyleActors = null;
|
||||
this.refMap = null;
|
||||
this.cssLogic = null;
|
||||
this._styleElement = null;
|
||||
},
|
||||
|
||||
get conn() this.inspector.conn,
|
||||
|
||||
form: function(detail) {
|
||||
@ -329,9 +307,7 @@ var PageStyleActor = protocol.ActorClass({
|
||||
|
||||
// If this font comes from a @font-face rule
|
||||
if (font.rule) {
|
||||
let styleActor = StyleRuleActor(this, font.rule);
|
||||
this.fontStyleActors.add(styleActor);
|
||||
fontFace.rule = styleActor;
|
||||
fontFace.rule = StyleRuleActor(this, font.rule);
|
||||
fontFace.ruleText = font.rule.cssText;
|
||||
}
|
||||
|
||||
@ -987,16 +963,6 @@ var StyleRuleActor = protocol.ActorClass({
|
||||
|
||||
get conn() this.pageStyle.conn,
|
||||
|
||||
destroy: function () {
|
||||
if (!this.rawStyle)
|
||||
return;
|
||||
protocol.Actor.prototype.destroy.call(this);
|
||||
this.rawStyle = null;
|
||||
this.pageStyle = null;
|
||||
this.rawNode = null;
|
||||
this.rawRule = null;
|
||||
},
|
||||
|
||||
// Objects returned by this actor are owned by the PageStyleActor
|
||||
// to which this rule belongs.
|
||||
get marshallPool() this.pageStyle,
|
||||
|
Loading…
Reference in New Issue
Block a user