Changeset 117300 in webkit


Ignore:
Timestamp:
May 16, 2012 9:22:25 AM (12 years ago)
Author:
apavlov@chromium.org
Message:

Web Inspector: Double Clicking on "No watch expressions" should add an expression
https://bugs.webkit.org/show_bug.cgi?id=86631

Reviewed by Vsevolod Vlasov.

A double-click listener for the section element adds a new watch expression if the correct element
has been clicked.
Drive-by: do not persist deleted (null) watch expressions.

  • inspector/front-end/WatchExpressionsSidebarPane.js:

(WebInspector.WatchExpressionsSection.prototype._sectionDoubleClick):
(WebInspector.WatchExpressionsSection.prototype.updateExpression):

Location:
trunk/Source/WebCore
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebCore/ChangeLog

    r117299 r117300  
     12012-05-16  Alexander Pavlov  <apavlov@chromium.org>
     2
     3        Web Inspector: Double Clicking on "No watch expressions" should add an expression
     4        https://bugs.webkit.org/show_bug.cgi?id=86631
     5
     6        Reviewed by Vsevolod Vlasov.
     7
     8        A double-click listener for the section element adds a new watch expression if the correct element
     9        has been clicked.
     10        Drive-by: do not persist deleted (null) watch expressions.
     11
     12        * inspector/front-end/WatchExpressionsSidebarPane.js:
     13        (WebInspector.WatchExpressionsSection.prototype._sectionDoubleClick):
     14        (WebInspector.WatchExpressionsSection.prototype.updateExpression):
     15
    1162012-05-16  Vsevolod Vlasov  <vsevik@chromium.org>
    217
  • trunk/Source/WebCore/inspector/front-end/WatchExpressionsSidebarPane.js

    r111551 r117300  
    139139    this.element.addEventListener("mousemove", this._mouseMove.bind(this), true);
    140140    this.element.addEventListener("mouseout", this._mouseOut.bind(this), true);
     141    this.element.addEventListener("dblclick", this._sectionDoubleClick.bind(this), false);
    141142}
    142143
     
    237238    },
    238239
     240    _sectionDoubleClick: function(event)
     241    {
     242        if (event.target !== this.element && event.target !== this.propertiesElement && event.target !== this.emptyElement)
     243            return;
     244        event.consume();
     245        this.addNewExpressionAndEdit();
     246    },
     247
    239248    updateExpression: function(element, value)
    240249    {
    241         this.watchExpressions[element.property.watchIndex] = value;
     250        if (value === null)
     251            delete this.watchExpressions[element.property.watchIndex];
     252        else
     253            this.watchExpressions[element.property.watchIndex] = value;
    242254        this.saveExpressions();
    243255        this.update();
Note: See TracChangeset for help on using the changeset viewer.