Title: [190744] branches/safari-601-branch/Source/WebInspectorUI

Diff

Modified: branches/safari-601-branch/Source/WebInspectorUI/ChangeLog (190743 => 190744)


--- branches/safari-601-branch/Source/WebInspectorUI/ChangeLog	2015-10-08 20:53:27 UTC (rev 190743)
+++ branches/safari-601-branch/Source/WebInspectorUI/ChangeLog	2015-10-08 20:56:12 UTC (rev 190744)
@@ -1,5 +1,29 @@
 2015-10-08  Lucas Forschler  <[email protected]>
 
+        Merge r188378. rdar://problem/22801980
+
+    2015-08-12  Joseph Pecoraro  <[email protected]>
+
+            Web Inspector: Sometimes CSS resources don't update after editing via Styles panel
+            https://bugs.webkit.org/show_bug.cgi?id=143244
+
+            Reviewed by Timothy Hatcher.
+
+            * UserInterface/Models/SourceCode.js:
+            (WebInspector.SourceCode.prototype._processContent):
+            This code is brittle and we should move off of putting the
+            possibly stale content in the Promise result.
+
+            * UserInterface/Views/ResourceContentView.js:
+            (WebInspector.ResourceContentView.prototype._contentAvailable):
+            * UserInterface/Views/SourceCodeTextEditor.js:
+            (WebInspector.SourceCodeTextEditor.prototype._contentAvailable):
+            * UserInterface/Models/Script.js:
+            (WebInspector.Script.prototype.requestScriptSyntaxTree):
+            Use the current source code's content.
+
+2015-10-08  Lucas Forschler  <[email protected]>
+
         Merge r187052. rdar://problem/22801992
 
     2015-07-20  Joseph Pecoraro  <[email protected]>

Modified: branches/safari-601-branch/Source/WebInspectorUI/UserInterface/Models/Script.js (190743 => 190744)


--- branches/safari-601-branch/Source/WebInspectorUI/UserInterface/Models/Script.js	2015-10-08 20:53:27 UTC (rev 190743)
+++ branches/safari-601-branch/Source/WebInspectorUI/UserInterface/Models/Script.js	2015-10-08 20:56:12 UTC (rev 190744)
@@ -149,7 +149,7 @@
         }
 
         this.requestContent().then(function(parameters) {
-            makeSyntaxTreeAndCallCallback(parameters.content);
+            makeSyntaxTreeAndCallCallback(parameters.sourceCode.content);
         }).catch(function(error) {
             makeSyntaxTreeAndCallCallback(null);
         });

Modified: branches/safari-601-branch/Source/WebInspectorUI/UserInterface/Models/SourceCode.js (190743 => 190744)


--- branches/safari-601-branch/Source/WebInspectorUI/UserInterface/Models/SourceCode.js	2015-10-08 20:53:27 UTC (rev 190743)
+++ branches/safari-601-branch/Source/WebInspectorUI/UserInterface/Models/SourceCode.js	2015-10-08 20:56:12 UTC (rev 190744)
@@ -189,8 +189,12 @@
 
         this._ignoreRevisionContentDidChangeEvent = true;
         revision.content = content || null;
-        delete this._ignoreRevisionContentDidChangeEvent;
+        this._ignoreRevisionContentDidChangeEvent = false;
 
+        // FIXME: Returning the content in this promise is misleading. It may not be current content
+        // now, and it may become out-dated later on. We should drop content from this promise
+        // and require clients to ask for the current contents from the sourceCode in the result.
+
         return Promise.resolve({
             error,
             sourceCode: this,

Modified: branches/safari-601-branch/Source/WebInspectorUI/UserInterface/Views/ResourceContentView.js (190743 => 190744)


--- branches/safari-601-branch/Source/WebInspectorUI/UserInterface/Views/ResourceContentView.js	2015-10-08 20:53:27 UTC (rev 190743)
+++ branches/safari-601-branch/Source/WebInspectorUI/UserInterface/Views/ResourceContentView.js	2015-10-08 20:56:12 UTC (rev 190744)
@@ -93,7 +93,8 @@
 
         // Content is ready to show, call the public method now.
         console.assert(!this._hasContent());
-        this.contentAvailable(parameters.content, parameters.base64Encoded);
+        console.assert(parameters.sourceCode === this._resource);
+        this.contentAvailable(parameters.sourceCode.content, parameters.base64Encoded);
     },
 
     _contentError: function(error)

Modified: branches/safari-601-branch/Source/WebInspectorUI/UserInterface/Views/SourceCodeTextEditor.js (190743 => 190744)


--- branches/safari-601-branch/Source/WebInspectorUI/UserInterface/Views/SourceCodeTextEditor.js	2015-10-08 20:53:27 UTC (rev 190743)
+++ branches/safari-601-branch/Source/WebInspectorUI/UserInterface/Views/SourceCodeTextEditor.js	2015-10-08 20:56:12 UTC (rev 190744)
@@ -451,7 +451,7 @@
             return;
 
         var sourceCode = parameters.sourceCode;
-        var content = parameters.content;
+        var content = sourceCode.content;
         var base64Encoded = parameters.base64Encoded;
 
         console.assert(sourceCode === this._sourceCode);
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to