Changeset 137292 in webkit


Ignore:
Timestamp:
Dec 11, 2012, 4:45:14 AM (13 years ago)
Author:
pfeldman@chromium.org
Message:

Web Inspector: follow up to r136974: do not process shortcuts while editing
https://bugs.webkit.org/show_bug.cgi?id=104440

Reviewed by Alexander Pavlov.

Currently, typing H while editing node results in corresponding shortcut processing.

  • inspector/front-end/ElementsTreeOutline.js:

(WebInspector.ElementsTreeOutline):
(WebInspector.ElementsTreeOutline.prototype.handleShortcut):
(WebInspector.ElementsTreeElement.prototype.onenter):
(WebInspector.ElementsTreeElement.prototype._startEditingAttribute):
(WebInspector.ElementsTreeElement.prototype.dispose):
(WebInspector.ElementsTreeElement.prototype._startEditingAsHTML):
(WebInspector.ElementsTreeElement.prototype._editingCancelled):

Location:
trunk/Source/WebCore
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebCore/ChangeLog

    r137291 r137292  
     12012-12-11  Pavel Feldman  <pfeldman@chromium.org>
     2
     3        Web Inspector: follow up to r136974: do not process shortcuts while editing
     4        https://bugs.webkit.org/show_bug.cgi?id=104440
     5
     6        Reviewed by Alexander Pavlov.
     7
     8        Currently, typing H while editing node results in corresponding shortcut processing.
     9
     10        * inspector/front-end/ElementsTreeOutline.js:
     11        (WebInspector.ElementsTreeOutline):
     12        (WebInspector.ElementsTreeOutline.prototype.handleShortcut):
     13        (WebInspector.ElementsTreeElement.prototype.onenter):
     14        (WebInspector.ElementsTreeElement.prototype._startEditingAttribute):
     15        (WebInspector.ElementsTreeElement.prototype.dispose):
     16        (WebInspector.ElementsTreeElement.prototype._startEditingAsHTML):
     17        (WebInspector.ElementsTreeElement.prototype._editingCancelled):
     18
    1192012-12-11  Ken Kania  <kkania@chromium.org>
    220
  • trunk/Source/WebCore/inspector/front-end/ElementsTreeOutline.js

    r136974 r137292  
    5858    this._selectDOMNode = null;
    5959    this._eventSupport = new WebInspector.Object();
    60     this._editing = false;
    6160
    6261    this._visible = false;
     
    167166    },
    168167
    169     get editing()
    170     {
    171         return this._editing;
    172     },
    173 
    174168    update: function()
    175169    {
     
    560554        }
    561555
    562         if (event.keyCode === WebInspector.KeyboardShortcut.Keys.H.code) {
     556        if (!treeElement._editing && event.keyCode === WebInspector.KeyboardShortcut.Keys.H.code) {
    563557            WebInspector.cssModel.toggleInlineVisibility(node.id);
    564558            return;
     
    10891083        // On Enter or Return start editing the first attribute
    10901084        // or create a new attribute on the selected element.
    1091         if (this.treeOutline.editing)
     1085        if (this._editing)
    10921086            return false;
    10931087
     
    13201314
    13211315        config.customFinishHandler = handleKeyDownEvents.bind(this);
    1322        
     1316
    13231317        this._editing = WebInspector.startEditing(attribute, config);
    13241318
     
    14401434        function dispose()
    14411435        {
    1442             this._editing = false;
     1436            delete this._editing;
    14431437
    14441438            // Remove editor.
     
    14661460    _attributeEditingCommitted: function(element, newText, oldText, attributeName, moveDirection)
    14671461    {
    1468         this._editing = false;
     1462        delete this._editing;
    14691463
    14701464        var treeOutline = this.treeOutline;
     
    15291523    _tagNameEditingCommitted: function(element, newText, oldText, tagName, moveDirection)
    15301524    {
    1531         this._editing = false;
     1525        delete this._editing;
    15321526        var self = this;
    15331527
     
    15851579    _textNodeEditingCommitted: function(textNode, element, newText)
    15861580    {
    1587         this._editing = false;
     1581        delete this._editing;
    15881582
    15891583        function callback()
     
    16001594    _editingCancelled: function(element, context)
    16011595    {
    1602         this._editing = false;
     1596        delete this._editing;
    16031597
    16041598        // Need to restore attributes structure.
Note: See TracChangeset for help on using the changeset viewer.