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

Unified Diff: Source/devtools/front_end/elements/ElementsPanel.js

Issue 267393003: DevTools: Load document (html) content from disk cache in page agent enabling. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 6 years, 7 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: Source/devtools/front_end/elements/ElementsPanel.js
diff --git a/Source/devtools/front_end/elements/ElementsPanel.js b/Source/devtools/front_end/elements/ElementsPanel.js
index 929ebb38e0f240b2482c399af8fc226da946d2d6..eef78ccf53634690d1c3c3b480132442b7a7317c 100644
--- a/Source/devtools/front_end/elements/ElementsPanel.js
+++ b/Source/devtools/front_end/elements/ElementsPanel.js
@@ -135,7 +135,6 @@ WebInspector.ElementsPanel.prototype = {
this._targetToTreeOutline.put(target, treeOutline);
target.domModel.addEventListener(WebInspector.DOMModel.Events.DocumentUpdated, this._documentUpdatedEvent, this);
- target.cssModel.addEventListener(WebInspector.CSSStyleModel.Events.ModelWasEnabled, this._updateSidebars, this);
// Perform attach if necessary.
if (this.isShowing())
@@ -153,7 +152,6 @@ WebInspector.ElementsPanel.prototype = {
treeOutline.element.remove();
target.domModel.removeEventListener(WebInspector.DOMModel.Events.DocumentUpdated, this._documentUpdatedEvent, this);
- target.cssModel.removeEventListener(WebInspector.CSSStyleModel.Events.ModelWasEnabled, this._updateSidebars, this);
},
/**
@@ -1068,22 +1066,10 @@ WebInspector.ElementsPanel.prototype = {
},
/**
- * @return {boolean}
- */
- _cssModelEnabledForSelectedNode: function()
- {
- if (!this.selectedDOMNode())
- return true;
- return this.selectedDOMNode().target().cssModel.isEnabled();
- },
-
- /**
* @param {boolean=} forceUpdate
*/
updateStyles: function(forceUpdate)
{
- if (!this._cssModelEnabledForSelectedNode())
- return;
var stylesSidebarPane = this.sidebarPanes.styles;
var computedStylePane = this.sidebarPanes.computedStyle;
if ((!stylesSidebarPane.isShowing() && !computedStylePane.isShowing()) || !stylesSidebarPane.needsUpdate)
@@ -1095,8 +1081,6 @@ WebInspector.ElementsPanel.prototype = {
updateMetrics: function()
{
- if (!this._cssModelEnabledForSelectedNode())
- return;
var metricsSidebarPane = this.sidebarPanes.metrics;
if (!metricsSidebarPane.isShowing() || !metricsSidebarPane.needsUpdate)
return;
@@ -1107,8 +1091,6 @@ WebInspector.ElementsPanel.prototype = {
updatePlatformFonts: function()
{
- if (!this._cssModelEnabledForSelectedNode())
- return;
var platformFontsSidebar = this.sidebarPanes.platformFonts;
if (!platformFontsSidebar.isShowing() || !platformFontsSidebar.needsUpdate)
return;

Powered by Google App Engine
This is Rietveld 408576698