Title: [193038] branches/safari-601-branch/Source/WebInspectorUI
Revision
193038
Author
[email protected]
Date
2015-12-03 10:34:11 -0800 (Thu, 03 Dec 2015)

Log Message

Merge r187598. rdar://problem/23221163

Modified Paths

Diff

Modified: branches/safari-601-branch/Source/WebInspectorUI/ChangeLog (193037 => 193038)


--- branches/safari-601-branch/Source/WebInspectorUI/ChangeLog	2015-12-03 18:34:06 UTC (rev 193037)
+++ branches/safari-601-branch/Source/WebInspectorUI/ChangeLog	2015-12-03 18:34:11 UTC (rev 193038)
@@ -1,5 +1,22 @@
 2015-12-01  Timothy Hatcher  <[email protected]>
 
+        Merge r187598. rdar://problem/23221163
+
+    2015-07-30  Devin Rousso  <[email protected]>
+
+            Web Inspector: Add special case for deleting the next character when editing rules in the CSS Sidebar
+            https://bugs.webkit.org/show_bug.cgi?id=147442
+
+            Reviewed by Timothy Hatcher.
+
+            If the cursor is on the first position of the first line in a CSS Rule and that line
+            has no content, delete the line instead of doing nothing.
+
+            * UserInterface/Views/CSSStyleDeclarationTextEditor.js:
+            (WebInspector.CSSStyleDeclarationTextEditor.prototype._handleBeforeChange):
+
+2015-12-01  Timothy Hatcher  <[email protected]>
+
         Merge r187578. rdar://problem/23221163
 
     2015-07-29  Nikita Vasilyev  <[email protected]>

Modified: branches/safari-601-branch/Source/WebInspectorUI/UserInterface/Views/CSSStyleDeclarationTextEditor.js (193037 => 193038)


--- branches/safari-601-branch/Source/WebInspectorUI/UserInterface/Views/CSSStyleDeclarationTextEditor.js	2015-12-03 18:34:06 UTC (rev 193037)
+++ branches/safari-601-branch/Source/WebInspectorUI/UserInterface/Views/CSSStyleDeclarationTextEditor.js	2015-12-03 18:34:11 UTC (rev 193038)
@@ -474,11 +474,22 @@
 
     _handleBeforeChange(codeMirror, change)
     {
-        if (change.origin !== "+delete" || (!change.to.line && !change.to.ch) || this._completionController.isShowingCompletions())
+        if (change.origin !== "+delete" || this._completionController.isShowingCompletions())
             return CodeMirror.Pass;
 
+        if (!change.to.line && !change.to.ch) {
+            if (codeMirror.lineCount() === 1)
+                return CodeMirror.Pass;
+
+            var line = codeMirror.getLine(change.to.line);
+            if (line && line.trim().length)
+                return CodeMirror.Pass;
+
+            codeMirror.execCommand("deleteLine");
+            return;
+        }
+
         var marks = codeMirror.findMarksAt(change.to);
-
         if (!marks.length)
             return CodeMirror.Pass;
 
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to