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

Unified Diff: Source/devtools/front_end/sources/UISourceCodeFrame.js

Issue 659433002: DevTools: Fix unsaved committed changes UI to match saved state when saving with file manager. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 6 years, 2 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
« no previous file with comments | « no previous file | Source/devtools/front_end/workspace/UISourceCode.js » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/devtools/front_end/sources/UISourceCodeFrame.js
diff --git a/Source/devtools/front_end/sources/UISourceCodeFrame.js b/Source/devtools/front_end/sources/UISourceCodeFrame.js
index 8263e32a77ed6a9361709fdf56600e247e969be2..fb1875e845c07357e9ede61a016eff4fb1b91be5 100644
--- a/Source/devtools/front_end/sources/UISourceCodeFrame.js
+++ b/Source/devtools/front_end/sources/UISourceCodeFrame.js
@@ -40,6 +40,7 @@ WebInspector.UISourceCodeFrame = function(uiSourceCode)
this._uiSourceCode.addEventListener(WebInspector.UISourceCode.Events.WorkingCopyChanged, this._onWorkingCopyChanged, this);
this._uiSourceCode.addEventListener(WebInspector.UISourceCode.Events.WorkingCopyCommitted, this._onWorkingCopyCommitted, this);
+ this._uiSourceCode.addEventListener(WebInspector.UISourceCode.Events.SavedStateUpdated, this._onSavedStateUpdated, this);
this._updateStyle();
}
@@ -149,6 +150,14 @@ WebInspector.UISourceCodeFrame.prototype = {
});
},
+ /**
+ * @param {!WebInspector.Event} event
+ */
+ _onSavedStateUpdated: function(event)
+ {
+ this._updateStyle();
+ },
+
_updateStyle: function()
{
this.element.classList.toggle("source-frame-unsaved-committed-changes", this._uiSourceCode.hasUnsavedCommittedChanges());
« no previous file with comments | « no previous file | Source/devtools/front_end/workspace/UISourceCode.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698