Changeset 27833 in webkit


Ignore:
Timestamp:
Nov 15, 2007 5:04:48 PM (16 years ago)
Author:
timothy@apple.com
Message:

Reviewed by Sam.

Bug 16007: REGRESSION: Disclosure triangle click zone for resource categories is off by 10 pixels
http://bugs.webkit.org/show_bug.cgi?id=16007

Makes the click width an option on TreeElement and make ResourceCategoryTreeElement
a true subclass of TreeElement. The click width for ResourceCategoryTreeElement is
20 pixels, and the default is 10 pixels.

  • page/inspector/ResourceCategory.js:
  • page/inspector/treeoutline.js:
Location:
trunk/WebCore
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/WebCore/ChangeLog

    r27832 r27833  
     12007-11-15  Timothy Hatcher  <timothy@apple.com>
     2
     3        Reviewed by Sam.
     4
     5        Bug 16007: REGRESSION: Disclosure triangle click zone for resource categories is off by 10 pixels
     6        http://bugs.webkit.org/show_bug.cgi?id=16007
     7
     8        Makes the click width an option on TreeElement and make ResourceCategoryTreeElement
     9        a true subclass of TreeElement. The click width for ResourceCategoryTreeElement is
     10        20 pixels, and the default is 10 pixels.
     11
     12        * page/inspector/ResourceCategory.js:
     13        * page/inspector/treeoutline.js:
     14
    1152007-11-15  Anders Carlsson  <andersca@apple.com>
    216
  • trunk/WebCore/page/inspector/ResourceCategory.js

    r26787 r27833  
    9494WebInspector.ResourceCategoryTreeElement = function(category)
    9595{
    96     var item = new TreeElement(category.title, category, true);
    97     item.selectable = false;
    98     return item;
     96    TreeElement.call(this, category.title, category, true);
    9997}
     98
     99WebInspector.ResourceCategoryTreeElement.prototype = {
     100    selectable: false,
     101    arrowToggleWidth: 20
     102}
     103
     104WebInspector.ResourceCategoryTreeElement.prototype.__proto__ = TreeElement.prototype;
  • trunk/WebCore/page/inspector/treeoutline.js

    r27575 r27833  
    391391    this.expanded = false;
    392392    this.selected = false;
    393     this.selectable = true;
    394393    this.hasChildren = hasChildren;
    395394    this.children = [];
     
    402401
    403402TreeElement.prototype = {
     403    selectable: true,
     404    arrowToggleWidth: 10,
     405
    404406    get listItemElement() {
    405407        return this._listItemNode;
     
    511513        return;
    512514
    513     if (event.offsetX > 10 || !element.treeElement.hasChildren)
     515    if (event.offsetX > element.treeElement.arrowToggleWidth || !element.treeElement.hasChildren)
    514516        element.treeElement.select();
    515517}
     
    521523        return;
    522524
    523     if (event.offsetX <= 10 && element.treeElement.hasChildren) {
     525    if (event.offsetX <= element.treeElement.arrowToggleWidth && element.treeElement.hasChildren) {
    524526        if (element.treeElement.expanded) {
    525527            if (event.altKey)
Note: See TracChangeset for help on using the changeset viewer.