OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2007, 2008 Apple Inc. All rights reserved. | 2 * Copyright (C) 2007, 2008 Apple Inc. All rights reserved. |
3 * Copyright (C) 2008 Matt Lilek <webkit@mattlilek.com> | 3 * Copyright (C) 2008 Matt Lilek <webkit@mattlilek.com> |
4 * Copyright (C) 2009 Joseph Pecoraro | 4 * Copyright (C) 2009 Joseph Pecoraro |
5 * | 5 * |
6 * Redistribution and use in source and binary forms, with or without | 6 * Redistribution and use in source and binary forms, with or without |
7 * modification, are permitted provided that the following conditions | 7 * modification, are permitted provided that the following conditions |
8 * are met: | 8 * are met: |
9 * | 9 * |
10 * 1. Redistributions of source code must retain the above copyright | 10 * 1. Redistributions of source code must retain the above copyright |
(...skipping 1442 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1453 } | 1453 } |
1454 }, | 1454 }, |
1455 | 1455 |
1456 /** | 1456 /** |
1457 * @param {boolean=} omitFocus | 1457 * @param {boolean=} omitFocus |
1458 * @param {boolean=} selectedByUser | 1458 * @param {boolean=} selectedByUser |
1459 * @return {boolean} | 1459 * @return {boolean} |
1460 */ | 1460 */ |
1461 select: function(omitFocus, selectedByUser) | 1461 select: function(omitFocus, selectedByUser) |
1462 { | 1462 { |
| 1463 if (this._editing) |
| 1464 return false; |
1463 if (this.treeOutline._handlePickNode(this.title, this._node)) | 1465 if (this.treeOutline._handlePickNode(this.title, this._node)) |
1464 return true; | 1466 return true; |
1465 return TreeElement.prototype.select.call(this, omitFocus, selectedByUser
); | 1467 return TreeElement.prototype.select.call(this, omitFocus, selectedByUser
); |
1466 }, | 1468 }, |
1467 | 1469 |
1468 /** | 1470 /** |
1469 * @override | 1471 * @override |
1470 * @param {boolean=} selectedByUser | 1472 * @param {boolean=} selectedByUser |
1471 * @return {boolean} | 1473 * @return {boolean} |
1472 */ | 1474 */ |
(...skipping 1475 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2948 treeOutline.rootDOMNode = node; | 2950 treeOutline.rootDOMNode = node; |
2949 if (!treeOutline.children[0].hasChildren) | 2951 if (!treeOutline.children[0].hasChildren) |
2950 treeOutline._element.classList.add("single-node"); | 2952 treeOutline._element.classList.add("single-node"); |
2951 treeOutline.setVisible(true); | 2953 treeOutline.setVisible(true); |
2952 treeOutline.element.treeElementForTest = treeOutline.children[0]
; | 2954 treeOutline.element.treeElementForTest = treeOutline.children[0]
; |
2953 resolve(treeOutline.element); | 2955 resolve(treeOutline.element); |
2954 } | 2956 } |
2955 } | 2957 } |
2956 } | 2958 } |
2957 } | 2959 } |
OLD | NEW |