Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(712)

Unified Diff: third_party/WebKit/Source/devtools/front_end/elements/ComputedStyleModel.js

Issue 2144923002: DevTools: remove the ComputedStyles -> Styles pane dependency. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebaselined Created 4 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: third_party/WebKit/Source/devtools/front_end/elements/ComputedStyleModel.js
diff --git a/third_party/WebKit/Source/devtools/front_end/elements/SharedSidebarModel.js b/third_party/WebKit/Source/devtools/front_end/elements/ComputedStyleModel.js
similarity index 85%
rename from third_party/WebKit/Source/devtools/front_end/elements/SharedSidebarModel.js
rename to third_party/WebKit/Source/devtools/front_end/elements/ComputedStyleModel.js
index 1eb7e828b57ca539d3e3922f4a202fbc53ab1e68..6c67b5ba1fda842e1256c259e3e23b41d09f3558 100644
--- a/third_party/WebKit/Source/devtools/front_end/elements/SharedSidebarModel.js
+++ b/third_party/WebKit/Source/devtools/front_end/elements/ComputedStyleModel.js
@@ -6,18 +6,18 @@
* @extends {WebInspector.Object}
* @constructor
*/
-WebInspector.SharedSidebarModel = function()
+WebInspector.ComputedStyleModel = function()
{
WebInspector.Object.call(this);
this._node = WebInspector.context.flavor(WebInspector.DOMNode);
WebInspector.context.addFlavorChangeListener(WebInspector.DOMNode, this._onNodeChanged, this);
}
-WebInspector.SharedSidebarModel.Events = {
+WebInspector.ComputedStyleModel.Events = {
ComputedStyleChanged: "ComputedStyleChanged"
}
-WebInspector.SharedSidebarModel.prototype = {
+WebInspector.ComputedStyleModel.prototype = {
/**
* @return {?WebInspector.DOMNode}
*/
@@ -84,14 +84,14 @@ WebInspector.SharedSidebarModel.prototype = {
},
/**
- * @return {!Promise.<?WebInspector.SharedSidebarModel.ComputedStyle>}
+ * @return {!Promise.<?WebInspector.ComputedStyleModel.ComputedStyle>}
*/
fetchComputedStyle: function()
{
var elementNode = this._elementNode();
var cssModel = this.cssModel();
if (!elementNode || !cssModel)
- return Promise.resolve(/** @type {?WebInspector.SharedSidebarModel.ComputedStyle} */(null));
+ return Promise.resolve(/** @type {?WebInspector.ComputedStyleModel.ComputedStyle} */(null));
if (!this._computedStylePromise)
this._computedStylePromise = cssModel.computedStylePromise(elementNode.id).then(verifyOutdated.bind(this, elementNode));
@@ -101,19 +101,19 @@ WebInspector.SharedSidebarModel.prototype = {
/**
* @param {!WebInspector.DOMNode} elementNode
* @param {?Map.<string, string>} style
- * @return {?WebInspector.SharedSidebarModel.ComputedStyle}
- * @this {WebInspector.SharedSidebarModel}
+ * @return {?WebInspector.ComputedStyleModel.ComputedStyle}
+ * @this {WebInspector.ComputedStyleModel}
*/
function verifyOutdated(elementNode, style)
{
- return elementNode === this._elementNode() && style ? new WebInspector.SharedSidebarModel.ComputedStyle(elementNode, style) : /** @type {?WebInspector.SharedSidebarModel.ComputedStyle} */(null);
+ return elementNode === this._elementNode() && style ? new WebInspector.ComputedStyleModel.ComputedStyle(elementNode, style) : /** @type {?WebInspector.ComputedStyleModel.ComputedStyle} */(null);
}
},
_onComputedStyleChanged: function()
{
delete this._computedStylePromise;
- this.dispatchEventToListeners(WebInspector.SharedSidebarModel.Events.ComputedStyleChanged);
+ this.dispatchEventToListeners(WebInspector.ComputedStyleModel.Events.ComputedStyleChanged);
},
__proto__: WebInspector.Object.prototype
@@ -124,7 +124,7 @@ WebInspector.SharedSidebarModel.prototype = {
* @param {!WebInspector.DOMNode} node
* @param {!Map.<string, string>} computedStyle
*/
-WebInspector.SharedSidebarModel.ComputedStyle = function(node, computedStyle)
+WebInspector.ComputedStyleModel.ComputedStyle = function(node, computedStyle)
{
this.node = node;
this.computedStyle = computedStyle;

Powered by Google App Engine
This is Rietveld 408576698