Changeset 50303 in webkit


Ignore:
Timestamp:
Oct 29, 2009 2:59:33 PM (14 years ago)
Author:
timothy@apple.com
Message:

Fix tabbing through element attributes in the Web Insector.

https://bugs.webkit.org/show_bug.cgi?id=30429

Reviewed by Pavel Feldman.

  • inspector/front-end/ElementsTreeOutline.js:

(WebInspector.ElementsTreeElement.prototype._attributeEditingCommitted): Don't call _updateTitle,
it is called for us when removeAttribute succeeds in the back-end.
(WebInspector.ElementsTreeElement.prototype._textNodeEditingCommitted): Ditto except for nodeValue.
(WebInspector.ElementsTreeElement.prototype._editingCancelled): Don't call _updateTitle, editing code reverts.
(WebInspector.ElementsTreeElement.prototype._updateTitle): Return early if we are editing.

Location:
trunk/WebCore
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/WebCore/ChangeLog

    r50301 r50303  
     12009-10-29  Timothy Hatcher  <timothy@apple.com>
     2
     3        Fix tabbing through element attributes in the Web Insector.
     4
     5        https://bugs.webkit.org/show_bug.cgi?id=30429
     6
     7        Reviewed by Pavel Feldman.
     8
     9        * inspector/front-end/ElementsTreeOutline.js:
     10        (WebInspector.ElementsTreeElement.prototype._attributeEditingCommitted): Don't call _updateTitle,
     11        it is called for us when removeAttribute succeeds in the back-end.
     12        (WebInspector.ElementsTreeElement.prototype._textNodeEditingCommitted): Ditto except for nodeValue.
     13        (WebInspector.ElementsTreeElement.prototype._editingCancelled): Don't call _updateTitle, editing code reverts.
     14        (WebInspector.ElementsTreeElement.prototype._updateTitle): Return early if we are editing.
     15
    1162009-10-29  Dan Bernstein  <mitz@apple.com>
    217
  • trunk/WebCore/inspector/front-end/ElementsTreeOutline.js

    r50163 r50303  
    732732        if (!parseElement.hasAttributes()) {
    733733            this.representedObject.removeAttribute(attributeName);
    734             this._updateTitle();
    735734            moveToNextAttributeIfNeeded.call(this);
    736735            return;
     
    749748            this.representedObject.removeAttribute(attributeName);
    750749
    751         this._updateTitle();
    752 
    753750        this.treeOutline.focusedNodeChanged(true);
    754751
     
    769766
    770767        textNode.nodeValue = newText;
    771         this._updateTitle();
     768
     769        // No need to call _updateTitle here, it will be called after the nodeValue is committed.
    772770    },
    773771
     
    776774        delete this._editing;
    777775
    778         this._updateTitle();
     776        // No need to call _updateTitle here, the editing code will revert to the original text.
    779777    },
    780778
    781779    _updateTitle: function()
    782780    {
     781        // If we are editing, return early to prevent canceling the edit.
     782        // After editing is committed _updateTitle will be called.
     783        if (this._editing)
     784            return;
     785
    783786        var title = this._nodeTitleInfo(this.representedObject, this.hasChildren, WebInspector.linkifyURL).title;
    784787        this.title = "<span class=\"highlight\">" + title + "</span>";
Note: See TracChangeset for help on using the changeset viewer.