Changeset 92168 in webkit


Ignore:
Timestamp:
Aug 2, 2011 1:05:20 AM (13 years ago)
Author:
pfeldman@chromium.org
Message:

Web Inspector: arrow is a pain to click in console. Drive-by selection reset fix.
https://bugs.webkit.org/show_bug.cgi?id=65467

Reviewed by Yury Semikhatsky.

  • inspector/front-end/ConsoleView.js:

(WebInspector.ConsoleView.prototype._messagesClicked):

  • inspector/front-end/ObjectPropertiesSection.js:

(WebInspector.ObjectPropertyTreeElement):

  • inspector/front-end/inspector.css:

(.properties-tree li):
(.properties-tree li.parent::before):

  • inspector/front-end/treeoutline.js:

(TreeElement.treeElementToggled):

Location:
trunk/Source/WebCore
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebCore/ChangeLog

    r92167 r92168  
     12011-08-02  Pavel Feldman  <pfeldman@google.com>
     2
     3        Web Inspector: arrow is a pain to click in console. Drive-by selection reset fix.
     4        https://bugs.webkit.org/show_bug.cgi?id=65467
     5
     6        Reviewed by Yury Semikhatsky.
     7
     8        * inspector/front-end/ConsoleView.js:
     9        (WebInspector.ConsoleView.prototype._messagesClicked):
     10        * inspector/front-end/ObjectPropertiesSection.js:
     11        (WebInspector.ObjectPropertyTreeElement):
     12        * inspector/front-end/inspector.css:
     13        (.properties-tree li):
     14        (.properties-tree li.parent::before):
     15        * inspector/front-end/treeoutline.js:
     16        (TreeElement.treeElementToggled):
     17
    1182011-08-01  Pavel Feldman  <pfeldman@google.com>
    219
  • trunk/Source/WebCore/inspector/front-end/ConsoleView.js

    r92125 r92168  
    4646
    4747    this.messagesElement = document.getElementById("console-messages");
    48     this.messagesElement.addEventListener("selectstart", this._messagesSelectStart.bind(this), false);
    4948    this.messagesElement.addEventListener("click", this._messagesClicked.bind(this), true);
    5049
     
    518517    },
    519518
    520     _messagesSelectStart: function(event)
    521     {
    522         if (this._selectionTimeout)
    523             clearTimeout(this._selectionTimeout);
    524 
    525         this.prompt.clearAutoComplete();
    526 
    527         function moveBackIfOutside()
    528         {
    529             delete this._selectionTimeout;
     519    _messagesClicked: function(event)
     520    {
     521        var link = event.target.enclosingNodeOrSelfWithNodeName("a");
     522        if (!link || !link.representedNode) {
    530523            if (!this.prompt.isCaretInsidePrompt() && window.getSelection().isCollapsed)
    531524                this.prompt.moveCaretToEndOfPrompt();
    532             this.prompt.autoCompleteSoon();
    533         }
    534 
    535         this._selectionTimeout = setTimeout(moveBackIfOutside.bind(this), 100);
    536     },
    537 
    538     _messagesClicked: function(event)
    539     {
    540         var link = event.target.enclosingNodeOrSelfWithNodeName("a");
    541         if (!link || !link.representedNode)
    542525            return;
     526        }
    543527
    544528        WebInspector.updateFocusedNode(link.representedNode.id);
  • trunk/Source/WebCore/inspector/front-end/ObjectPropertiesSection.js

    r91754 r92168  
    142142    // Pass an empty title, the title gets made later in onattach.
    143143    TreeElement.call(this, "", null, false);
     144    this.toggleOnClick = true;
     145    this.selectable = false;
    144146}
    145147
  • trunk/Source/WebCore/inspector/front-end/inspector.css

    r91562 r92168  
    14361436    overflow: hidden;
    14371437    -webkit-user-select: text;
    1438     cursor: auto;
     1438    cursor: default;
    14391439}
    14401440
     
    14521452    padding-right: 3px;
    14531453    -webkit-user-select: none;
    1454     cursor: default;
    14551454}
    14561455
  • trunk/Source/WebCore/inspector/front-end/treeoutline.js

    r90561 r92168  
    655655        return;
    656656
    657     if (!element.treeElement.isEventWithinDisclosureTriangle(event))
     657    var toggleOnClick = element.treeElement.toggleOnClick && !element.treeElement.selectable;
     658    var isInTriangle = element.treeElement.isEventWithinDisclosureTriangle(event);
     659    if (!toggleOnClick && !isInTriangle)
    658660        return;
    659661
Note: See TracChangeset for help on using the changeset viewer.