Title: [115815] trunk/Source/WebCore
Revision
115815
Author
[email protected]
Date
2012-05-02 05:03:48 -0700 (Wed, 02 May 2012)

Log Message

WebInspector: Scripts panel editor dirty state is cleared when the tab with editor is closed.
https://bugs.webkit.org/show_bug.cgi?id=85361

Reviewed by Yury Semikhatsky.

Added content validation upon script show.

* inspector/front-end/_javascript_SourceFrame.js:
(WebInspector._javascript_SourceFrame.prototype.wasShown):

Modified Paths

Diff

Modified: trunk/Source/WebCore/ChangeLog (115814 => 115815)


--- trunk/Source/WebCore/ChangeLog	2012-05-02 12:01:31 UTC (rev 115814)
+++ trunk/Source/WebCore/ChangeLog	2012-05-02 12:03:48 UTC (rev 115815)
@@ -1,5 +1,17 @@
 2012-05-02  Pavel Feldman  <[email protected]>
 
+        WebInspector: Scripts panel editor dirty state is cleared when the tab with editor is closed.
+        https://bugs.webkit.org/show_bug.cgi?id=85361
+
+        Reviewed by Yury Semikhatsky.
+
+        Added content validation upon script show.
+
+        * inspector/front-end/_javascript_SourceFrame.js:
+        (WebInspector._javascript_SourceFrame.prototype.wasShown):
+
+2012-05-02  Pavel Feldman  <[email protected]>
+
         Web Inspector: breakpoints are de-activated only upon the second click.
         https://bugs.webkit.org/show_bug.cgi?id=85359
 

Modified: trunk/Source/WebCore/inspector/front-end/_javascript_SourceFrame.js (115814 => 115815)


--- trunk/Source/WebCore/inspector/front-end/_javascript_SourceFrame.js	2012-05-02 12:01:31 UTC (rev 115814)
+++ trunk/Source/WebCore/inspector/front-end/_javascript_SourceFrame.js	2012-05-02 12:03:48 UTC (rev 115815)
@@ -62,6 +62,12 @@
     },
 
     // View events
+    wasShown: function()
+    {
+        WebInspector.SourceFrame.prototype.wasShown.call(this);
+        this._setScriptSourceIsDirty(this._isDirty);
+    },
+
     willHide: function()
     {
         WebInspector.SourceFrame.prototype.willHide.call(this);
@@ -165,11 +171,17 @@
     {
         var isDirty = this.textModel.text !== this._originalContent;
         if (isDirty)
-            this._scriptsPanel.setScriptSourceIsDirty(this._uiSourceCode, true);
+            this._setScriptSourceIsDirty(true);
         else
             this.didEditContent(null, this._originalContent);
     },
 
+    _setScriptSourceIsDirty: function(isDirty)
+    {
+        this._scriptsPanel.setScriptSourceIsDirty(this._uiSourceCode, isDirty);
+        this._isDirty = isDirty;
+    },
+
     beforeTextChanged: function()
     {
         if (!this._isDirty) {
@@ -209,7 +221,7 @@
                 this._setBreakpoint(lineNumber, breakpoint.condition, breakpoint.enabled);
             }
         }
-        this._scriptsPanel.setScriptSourceIsDirty(this._uiSourceCode, false);
+        this._setScriptSourceIsDirty(false);
     },
 
     _getPopoverAnchor: function(element, event)
_______________________________________________
webkit-changes mailing list
[email protected]
http://lists.webkit.org/mailman/listinfo.cgi/webkit-changes

Reply via email to