Web Inspector: JavaScript breakpoints disappear when Ctrl+S is pressed for the script...
authorvsevik@chromium.org <vsevik@chromium.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 22 May 2012 13:50:35 +0000 (13:50 +0000)
committervsevik@chromium.org <vsevik@chromium.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 22 May 2012 13:50:35 +0000 (13:50 +0000)
https://bugs.webkit.org/show_bug.cgi?id=87121

Reviewed by Pavel Feldman.

JavaScriptSourceFrame and StylesSourceFrame should not commit working copy unless UISourceCode is dirty.

* inspector/front-end/JavaScriptSourceFrame.js:
(WebInspector.JavaScriptSourceFrame.prototype.commitEditing):
* inspector/front-end/StylesPanel.js:
(WebInspector.StyleSourceFrame.prototype.commitEditing):
* inspector/front-end/UISourceCode.js:
(WebInspector.UISourceCode.prototype.commitWorkingCopy):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@117965 268f45cc-cd09-0410-ab3c-d52691b4dbfc

Source/WebCore/ChangeLog
Source/WebCore/inspector/front-end/JavaScriptSourceFrame.js
Source/WebCore/inspector/front-end/StylesPanel.js
Source/WebCore/inspector/front-end/UISourceCode.js

index 15d8d05..8c7ed47 100644 (file)
@@ -1,3 +1,19 @@
+2012-05-22  Vsevolod Vlasov  <vsevik@chromium.org>
+
+        Web Inspector: JavaScript breakpoints disappear when Ctrl+S is pressed for the script without changes.
+        https://bugs.webkit.org/show_bug.cgi?id=87121
+
+        Reviewed by Pavel Feldman.
+
+        JavaScriptSourceFrame and StylesSourceFrame should not commit working copy unless UISourceCode is dirty.
+
+        * inspector/front-end/JavaScriptSourceFrame.js:
+        (WebInspector.JavaScriptSourceFrame.prototype.commitEditing):
+        * inspector/front-end/StylesPanel.js:
+        (WebInspector.StyleSourceFrame.prototype.commitEditing):
+        * inspector/front-end/UISourceCode.js:
+        (WebInspector.UISourceCode.prototype.commitWorkingCopy):
+
 2012-05-22  Ilya Tikhonovsky  <loislo@chromium.org>
 
         Web Inspector: HeapSnapshot: speed-up calculateRetainedSize functon.
index ff2b2a0..d2b44fe 100644 (file)
@@ -92,6 +92,9 @@ WebInspector.JavaScriptSourceFrame.prototype = {
      */
     commitEditing: function(text)
     {
+        if (!this._uiSourceCode.isDirty())
+            return;
+
         this._isCommittingEditing = true;
         this._uiSourceCode.commitWorkingCopy(this._didEditContent.bind(this));
     },
index 9a5b5be..94b2159 100644 (file)
@@ -145,6 +145,9 @@ WebInspector.StyleSourceFrame.prototype = {
      */
     commitEditing: function(text)
     {
+        if (!this._styleSource.isDirty())
+            return;
+
         this._isCommittingEditing = true;
         this._styleSource.commitWorkingCopy(this._didEditContent.bind(this));
     },
index e972490..92cb9ad 100644 (file)
@@ -211,11 +211,6 @@ WebInspector.UISourceCode.prototype = {
             callback(error);
         }
 
-        if (!this.isDirty()) {
-            callback(null);
-            return;
-        }
-
         var newContent = this._workingCopy;
         this._committingWorkingCopy = true;
         this.workingCopyCommitted(innerCallback.bind(this));