Title: [181672] trunk/Source/WebInspectorUI
Revision
181672
Author
[email protected]
Date
2015-03-17 17:03:07 -0700 (Tue, 17 Mar 2015)

Log Message

Web Inspector: Removal of multiline completion hint broken in Details sidebar
https://bugs.webkit.org/show_bug.cgi?id=142796

Patch by Tobias Reiss <[email protected]> on 2015-03-17
Reviewed by Joseph Pecoraro.

Prioritize CodeMirrorCompletionController over CSSStyleDeclarationTextEditor.
Both classes control the current CodeMirror instance of the Details Sidebar.
This change prevents possible race conditions during complete or delete-complete phases,
especially during operations on multiple styles in one line.

* UserInterface/Views/CSSStyleDeclarationTextEditor.js:
(WebInspector.CSSStyleDeclarationTextEditor):

Modified Paths

Diff

Modified: trunk/Source/WebInspectorUI/ChangeLog (181671 => 181672)


--- trunk/Source/WebInspectorUI/ChangeLog	2015-03-17 23:42:46 UTC (rev 181671)
+++ trunk/Source/WebInspectorUI/ChangeLog	2015-03-18 00:03:07 UTC (rev 181672)
@@ -1,3 +1,18 @@
+2015-03-17  Tobias Reiss  <[email protected]>
+
+        Web Inspector: Removal of multiline completion hint broken in Details sidebar
+        https://bugs.webkit.org/show_bug.cgi?id=142796
+
+        Reviewed by Joseph Pecoraro.
+
+        Prioritize CodeMirrorCompletionController over CSSStyleDeclarationTextEditor.
+        Both classes control the current CodeMirror instance of the Details Sidebar.
+        This change prevents possible race conditions during complete or delete-complete phases,
+        especially during operations on multiple styles in one line.
+
+        * UserInterface/Views/CSSStyleDeclarationTextEditor.js:
+        (WebInspector.CSSStyleDeclarationTextEditor):
+
 2015-03-17  Matt Baker  <[email protected]>
 
         Web Inspector: Show rendering frames (and FPS) in Layout and Rendering timeline

Modified: trunk/Source/WebInspectorUI/UserInterface/Views/CSSStyleDeclarationTextEditor.js (181671 => 181672)


--- trunk/Source/WebInspectorUI/UserInterface/Views/CSSStyleDeclarationTextEditor.js	2015-03-17 23:42:46 UTC (rev 181671)
+++ trunk/Source/WebInspectorUI/UserInterface/Views/CSSStyleDeclarationTextEditor.js	2015-03-18 00:03:07 UTC (rev 181672)
@@ -53,9 +53,6 @@
         autoCloseBrackets: true
     });
 
-    this._codeMirror.on("change", this._contentChanged.bind(this));
-    this._codeMirror.on("blur", this._editorBlured.bind(this));
-
     this._completionController = new WebInspector.CodeMirrorCompletionController(this._codeMirror, this);
     this._tokenTrackingController = new WebInspector.CodeMirrorTokenTrackingController(this._codeMirror, this);
 
@@ -65,6 +62,11 @@
     this._tokenTrackingController.mouseOutReleaseDelayDuration = 0;
     this._tokenTrackingController.mode = WebInspector.CodeMirrorTokenTrackingController.Mode.NonSymbolTokens;
 
+    // Make sure CompletionController adds event listeners first.
+    // Otherwise we end up in race conditions during complete or delete-complete phases.
+    this._codeMirror.on("change", this._contentChanged.bind(this));
+    this._codeMirror.on("blur", this._editorBlured.bind(this));
+
     this.style = style;
 };
 
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to