Title: [218202] trunk/Source/WebInspectorUI
Revision
218202
Author
nvasil...@apple.com
Date
2017-06-13 14:03:52 -0700 (Tue, 13 Jun 2017)

Log Message

Web Inspector: Don't use -webkit-user-modify CSS property
https://bugs.webkit.org/show_bug.cgi?id=173232

Reviewed by Devin Rousso.

Replace -webkit-user-modify CSS property with contentEditable HTML attribute.

* UserInterface/Views/Editing.css:
(.editing):
* UserInterface/Views/EditingSupport.js:
(cleanUpAfterEditing):
* UserInterface/Views/VisualStyleSelectorTreeItem.css:
(.item.visual-style-selector-item:not(.dom-element-icon).editable > .titles > .title):
* UserInterface/Views/VisualStyleSelectorTreeItem.js:
(WebInspector.VisualStyleSelectorTreeItem.prototype.ondeselect):
(WebInspector.VisualStyleSelectorTreeItem.prototype._handleMainTitleMouseDown):
(WebInspector.VisualStyleSelectorTreeItem.prototype._commitSelector):

Modified Paths

Diff

Modified: trunk/Source/WebInspectorUI/ChangeLog (218201 => 218202)


--- trunk/Source/WebInspectorUI/ChangeLog	2017-06-13 20:58:15 UTC (rev 218201)
+++ trunk/Source/WebInspectorUI/ChangeLog	2017-06-13 21:03:52 UTC (rev 218202)
@@ -1,3 +1,23 @@
+2017-06-13  Nikita Vasilyev  <nvasil...@apple.com>
+
+        Web Inspector: Don't use -webkit-user-modify CSS property
+        https://bugs.webkit.org/show_bug.cgi?id=173232
+
+        Reviewed by Devin Rousso.
+
+        Replace -webkit-user-modify CSS property with contentEditable HTML attribute.
+
+        * UserInterface/Views/Editing.css:
+        (.editing):
+        * UserInterface/Views/EditingSupport.js:
+        (cleanUpAfterEditing):
+        * UserInterface/Views/VisualStyleSelectorTreeItem.css:
+        (.item.visual-style-selector-item:not(.dom-element-icon).editable > .titles > .title):
+        * UserInterface/Views/VisualStyleSelectorTreeItem.js:
+        (WebInspector.VisualStyleSelectorTreeItem.prototype.ondeselect):
+        (WebInspector.VisualStyleSelectorTreeItem.prototype._handleMainTitleMouseDown):
+        (WebInspector.VisualStyleSelectorTreeItem.prototype._commitSelector):
+
 2017-06-13  Sam Weinig  <s...@webkit.org>
 
         Rename JSDOMWindowShell to JSDOMWindowProxy to match the HTML5 spec.

Modified: trunk/Source/WebInspectorUI/UserInterface/Views/Editing.css (218201 => 218202)


--- trunk/Source/WebInspectorUI/UserInterface/Views/Editing.css	2017-06-13 20:58:15 UTC (rev 218201)
+++ trunk/Source/WebInspectorUI/UserInterface/Views/Editing.css	2017-06-13 21:03:52 UTC (rev 218202)
@@ -28,7 +28,6 @@
     box-shadow: hsla(0, 0%, 0%, 0.5) 3px 3px 4px;
     outline: 1px solid hsl(0, 0%, 65%) !important;
     background-color: white;
-    -webkit-user-modify: read-write-plaintext-only;
     text-overflow: clip !important;
     padding-left: 2px;
     margin-left: -2px;

Modified: trunk/Source/WebInspectorUI/UserInterface/Views/EditingSupport.js (218201 => 218202)


--- trunk/Source/WebInspectorUI/UserInterface/Views/EditingSupport.js	2017-06-13 20:58:15 UTC (rev 218201)
+++ trunk/Source/WebInspectorUI/UserInterface/Views/EditingSupport.js	2017-06-13 21:03:52 UTC (rev 218202)
@@ -122,6 +122,7 @@
     var moveDirection = "";
 
     element.classList.add("editing");
+    element.contentEditable = "plaintext-only";
 
     var oldSpellCheck = element.hasAttribute("spellcheck") ? element.spellcheck : undefined;
     element.spellcheck = config.spellcheck;
@@ -149,6 +150,8 @@
         WebInspector.markBeingEdited(element, false);
 
         this.classList.remove("editing");
+        this.contentEditable = false;
+
         this.scrollTop = 0;
         this.scrollLeft = 0;
 

Modified: trunk/Source/WebInspectorUI/UserInterface/Views/VisualStyleSelectorTreeItem.css (218201 => 218202)


--- trunk/Source/WebInspectorUI/UserInterface/Views/VisualStyleSelectorTreeItem.css	2017-06-13 20:58:15 UTC (rev 218201)
+++ trunk/Source/WebInspectorUI/UserInterface/Views/VisualStyleSelectorTreeItem.css	2017-06-13 21:03:52 UTC (rev 218202)
@@ -119,7 +119,6 @@
 .item.visual-style-selector-item:not(.dom-element-icon).editable > .titles > .title {
     cursor: text;
     -webkit-user-select: text;
-    -webkit-user-modify: read-write-plaintext-only;
 }
 
 .item.visual-style-selector-item:not(.dom-element-icon).editable > .titles > .title:focus {

Modified: trunk/Source/WebInspectorUI/UserInterface/Views/VisualStyleSelectorTreeItem.js (218201 => 218202)


--- trunk/Source/WebInspectorUI/UserInterface/Views/VisualStyleSelectorTreeItem.js	2017-06-13 20:58:15 UTC (rev 218201)
+++ trunk/Source/WebInspectorUI/UserInterface/Views/VisualStyleSelectorTreeItem.js	2017-06-13 21:03:52 UTC (rev 218202)
@@ -119,6 +119,7 @@
     ondeselect()
     {
         this._listItemNode.classList.remove("editable");
+        this._mainTitleElement.contentEditable = false;
     }
 
     populateContextMenu(contextMenu, event)
@@ -239,6 +240,7 @@
             return;
 
         this._listItemNode.classList.toggle("editable", this.selected);
+        this._mainTitleElement.contentEditable = this.selected ? "plaintext-only" : false;
     }
 
     _handleMainTitleKeyDown(event)
@@ -254,6 +256,7 @@
     {
         this._hideDOMNodeHighlight();
         this._listItemNode.classList.remove("editable");
+        this._mainTitleElement.contentEditable = false;
         this._updateTitleTooltip();
 
         let value = this.selectorText;
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to