Changeset 218202 in webkit


Ignore:
Timestamp:
Jun 13, 2017 2:03:52 PM (7 years ago)
Author:
Nikita Vasilyev
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):

Location:
trunk/Source/WebInspectorUI
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebInspectorUI/ChangeLog

    r218179 r218202  
     12017-06-13  Nikita Vasilyev  <nvasilyev@apple.com>
     2
     3        Web Inspector: Don't use -webkit-user-modify CSS property
     4        https://bugs.webkit.org/show_bug.cgi?id=173232
     5
     6        Reviewed by Devin Rousso.
     7
     8        Replace -webkit-user-modify CSS property with contentEditable HTML attribute.
     9
     10        * UserInterface/Views/Editing.css:
     11        (.editing):
     12        * UserInterface/Views/EditingSupport.js:
     13        (cleanUpAfterEditing):
     14        * UserInterface/Views/VisualStyleSelectorTreeItem.css:
     15        (.item.visual-style-selector-item:not(.dom-element-icon).editable > .titles > .title):
     16        * UserInterface/Views/VisualStyleSelectorTreeItem.js:
     17        (WebInspector.VisualStyleSelectorTreeItem.prototype.ondeselect):
     18        (WebInspector.VisualStyleSelectorTreeItem.prototype._handleMainTitleMouseDown):
     19        (WebInspector.VisualStyleSelectorTreeItem.prototype._commitSelector):
     20
    1212017-06-13  Sam Weinig  <sam@webkit.org>
    222
  • trunk/Source/WebInspectorUI/UserInterface/Views/Editing.css

    r195730 r218202  
    2929    outline: 1px solid hsl(0, 0%, 65%) !important;
    3030    background-color: white;
    31     -webkit-user-modify: read-write-plaintext-only;
    3231    text-overflow: clip !important;
    3332    padding-left: 2px;
  • trunk/Source/WebInspectorUI/UserInterface/Views/EditingSupport.js

    r196271 r218202  
    123123
    124124    element.classList.add("editing");
     125    element.contentEditable = "plaintext-only";
    125126
    126127    var oldSpellCheck = element.hasAttribute("spellcheck") ? element.spellcheck : undefined;
     
    150151
    151152        this.classList.remove("editing");
     153        this.contentEditable = false;
     154
    152155        this.scrollTop = 0;
    153156        this.scrollLeft = 0;
  • trunk/Source/WebInspectorUI/UserInterface/Views/VisualStyleSelectorTreeItem.css

    r197119 r218202  
    120120    cursor: text;
    121121    -webkit-user-select: text;
    122     -webkit-user-modify: read-write-plaintext-only;
    123122}
    124123
  • trunk/Source/WebInspectorUI/UserInterface/Views/VisualStyleSelectorTreeItem.js

    r215630 r218202  
    120120    {
    121121        this._listItemNode.classList.remove("editable");
     122        this._mainTitleElement.contentEditable = false;
    122123    }
    123124
     
    240241
    241242        this._listItemNode.classList.toggle("editable", this.selected);
     243        this._mainTitleElement.contentEditable = this.selected ? "plaintext-only" : false;
    242244    }
    243245
     
    255257        this._hideDOMNodeHighlight();
    256258        this._listItemNode.classList.remove("editable");
     259        this._mainTitleElement.contentEditable = false;
    257260        this._updateTitleTooltip();
    258261
Note: See TracChangeset for help on using the changeset viewer.