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

Unified Diff: Source/devtools/front_end/CSSNamedFlowCollectionsView.js

Issue 17848002: Web Inspector: Integrate new regionOversetChange event into inspector (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 7 years, 6 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/CSSNamedFlowCollectionsView.js
diff --git a/Source/devtools/front_end/CSSNamedFlowCollectionsView.js b/Source/devtools/front_end/CSSNamedFlowCollectionsView.js
index d420d2731cb6d9f7b20e028e90276ceb942c960c..ccffd68dc1b0139113f838bf7febd0ff3d404025 100644
--- a/Source/devtools/front_end/CSSNamedFlowCollectionsView.js
+++ b/Source/devtools/front_end/CSSNamedFlowCollectionsView.js
@@ -249,6 +249,19 @@ WebInspector.CSSNamedFlowCollectionsView.prototype = {
},
/**
+ * @param {WebInspector.Event} event
+ */
+ _regionOversetChanged: function(event)
+ {
+ // FIXME: We only have support for Named Flows in the main document.
+ if (event.data.documentNodeId !== this._document.id)
+ return;
+
+ var flow = /** @type {WebInspector.NamedFlow} */ (event.data);
+ this._updateNamedFlow(flow);
+ },
+
+ /**
* @param {DOMAgent.NodeId} documentNodeId
* @param {string} flowName
*/
@@ -352,6 +365,7 @@ WebInspector.CSSNamedFlowCollectionsView.prototype = {
WebInspector.cssModel.addEventListener(WebInspector.CSSStyleModel.Events.NamedFlowCreated, this._namedFlowCreated, this);
WebInspector.cssModel.addEventListener(WebInspector.CSSStyleModel.Events.NamedFlowRemoved, this._namedFlowRemoved, this);
WebInspector.cssModel.addEventListener(WebInspector.CSSStyleModel.Events.RegionLayoutUpdated, this._regionLayoutUpdated, this);
+ WebInspector.cssModel.addEventListener(WebInspector.CSSStyleModel.Events.RegionOversetChanged, this._regionOversetChanged, this);
WebInspector.panel("elements").treeOutline.addEventListener(WebInspector.ElementsTreeOutline.Events.SelectedNodeChanged, this._selectedNodeChanged, this);
@@ -366,6 +380,7 @@ WebInspector.CSSNamedFlowCollectionsView.prototype = {
WebInspector.cssModel.removeEventListener(WebInspector.CSSStyleModel.Events.NamedFlowCreated, this._namedFlowCreated, this);
WebInspector.cssModel.removeEventListener(WebInspector.CSSStyleModel.Events.NamedFlowRemoved, this._namedFlowRemoved, this);
WebInspector.cssModel.removeEventListener(WebInspector.CSSStyleModel.Events.RegionLayoutUpdated, this._regionLayoutUpdated, this);
+ WebInspector.cssModel.removeEventListener(WebInspector.CSSStyleModel.Events.RegionOversetChanged, this._regionOversetChanged, this);
WebInspector.panel("elements").treeOutline.removeEventListener(WebInspector.ElementsTreeOutline.Events.SelectedNodeChanged, this._selectedNodeChanged, this);

Powered by Google App Engine
This is Rietveld 408576698