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

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

Issue 2567283004: DevTools: drastically simplify UISourceCode.checkContentUpdated (Closed)
Patch Set: kill stale test Created 4 years 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/sources/UISourceCodeFrame.js
diff --git a/third_party/WebKit/Source/devtools/front_end/sources/UISourceCodeFrame.js b/third_party/WebKit/Source/devtools/front_end/sources/UISourceCodeFrame.js
index 53e49541b293e5da5a2d1219ef4d9b6de287efc9..7ee4c75ff3c619712a21ddc60e5d3a193e0d7012 100644
--- a/third_party/WebKit/Source/devtools/front_end/sources/UISourceCodeFrame.js
+++ b/third_party/WebKit/Source/devtools/front_end/sources/UISourceCodeFrame.js
@@ -130,9 +130,6 @@ Sources.UISourceCodeFrame = class extends SourceFrame.SourceFrame {
*/
wasShown() {
super.wasShown();
- this._boundWindowFocused = this._windowFocused.bind(this);
- this.element.ownerDocument.defaultView.addEventListener('focus', this._boundWindowFocused, false);
- this._checkContentUpdated();
// We need CodeMirrorTextEditor to be initialized prior to this call as it calls |cursorPositionToCoordinates| internally. @see crbug.com/506566
setImmediate(this._updateBucketDecorations.bind(this));
}
@@ -143,8 +140,6 @@ Sources.UISourceCodeFrame = class extends SourceFrame.SourceFrame {
willHide() {
super.willHide();
UI.context.setFlavor(Sources.UISourceCodeFrame, null);
- this.element.ownerDocument.defaultView.removeEventListener('focus', this._boundWindowFocused, false);
- delete this._boundWindowFocused;
this._uiSourceCode.removeWorkingCopyGetter();
}
@@ -161,16 +156,6 @@ Sources.UISourceCodeFrame = class extends SourceFrame.SourceFrame {
return this._uiSourceCode.contentType() !== Common.resourceTypes.Document;
}
- _windowFocused(event) {
- this._checkContentUpdated();
- }
-
- _checkContentUpdated() {
- if (!this.loaded || !this.isShowing())
- return;
- this._uiSourceCode.checkContentUpdated(true);
- }
-
commitEditing() {
if (!this._uiSourceCode.isDirty())
return;

Powered by Google App Engine
This is Rietveld 408576698