Changeset 214141 in webkit


Ignore:
Timestamp:
Mar 18, 2017 5:58:18 PM (7 years ago)
Author:
webkit@devinrousso.com
Message:

Web Inspector: Empty attribute added to a DOM tree outline element should not add whitespace within the tag
https://bugs.webkit.org/show_bug.cgi?id=139623

Reviewed by Brian Burg.

  • UserInterface/Views/DOMTreeElement.js:

(WebInspector.DOMTreeElement.prototype._attributeEditingCommitted):
If the newText after editing has no content, remove the element for that attribute.

Location:
trunk/Source/WebInspectorUI
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebInspectorUI/ChangeLog

    r214140 r214141  
     12017-03-18  Devin Rousso  <webkit@devinrousso.com>
     2
     3        Web Inspector: Empty attribute added to a DOM tree outline element should not add whitespace within the tag
     4        https://bugs.webkit.org/show_bug.cgi?id=139623
     5
     6        Reviewed by Brian Burg.
     7
     8        * UserInterface/Views/DOMTreeElement.js:
     9        (WebInspector.DOMTreeElement.prototype._attributeEditingCommitted):
     10        If the `newText` after editing has no content, remove the element for that attribute.
     11
    1122017-03-18  Devin Rousso  <webkit@devinrousso.com>
    213
  • trunk/Source/WebInspectorUI/UserInterface/Views/DOMTreeElement.js

    r213744 r214141  
    982982        this._editing = false;
    983983
     984        if (!newText.trim())
     985            element.remove();
     986
    984987        if (!moveDirection && newText === oldText)
    985988            return;
Note: See TracChangeset for help on using the changeset viewer.