| 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 333 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 344 { | 344 { |
| 345 if (this._elementCloseTag) | 345 if (this._elementCloseTag) |
| 346 return; | 346 return; |
| 347 | 347 |
| 348 this.updateTitle(); | 348 this.updateTitle(); |
| 349 this.treeOutline.updateSelection(); | 349 this.treeOutline.updateSelection(); |
| 350 }, | 350 }, |
| 351 | 351 |
| 352 /** | 352 /** |
| 353 * @override | 353 * @override |
| 354 */ | |
| 355 onreveal: function() | |
| 356 { | |
| 357 if (this.listItemElement) { | |
| 358 var tagSpans = this.listItemElement.getElementsByClassName("webkit-h
tml-tag-name"); | |
| 359 if (tagSpans.length) | |
| 360 tagSpans[0].scrollIntoViewIfNeeded(true); | |
| 361 else | |
| 362 this.listItemElement.scrollIntoViewIfNeeded(true); | |
| 363 } | |
| 364 }, | |
| 365 | |
| 366 /** | |
| 367 * @override | |
| 368 * @param {boolean=} omitFocus | 354 * @param {boolean=} omitFocus |
| 369 * @param {boolean=} selectedByUser | 355 * @param {boolean=} selectedByUser |
| 370 * @return {boolean} | 356 * @return {boolean} |
| 371 */ | 357 */ |
| 372 select: function(omitFocus, selectedByUser) | 358 select: function(omitFocus, selectedByUser) |
| 373 { | 359 { |
| 374 if (this._editing) | 360 if (this._editing) |
| 375 return false; | 361 return false; |
| 376 if (selectedByUser && this.treeOutline.handlePickNode(this.title, this._
node)) | 362 if (selectedByUser && this.treeOutline.handlePickNode(this.title, this._
node)) |
| 377 return true; | 363 return true; |
| (...skipping 1248 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1626 | 1612 |
| 1627 if (object) | 1613 if (object) |
| 1628 object.callFunction(scrollIntoView); | 1614 object.callFunction(scrollIntoView); |
| 1629 } | 1615 } |
| 1630 | 1616 |
| 1631 this._node.resolveToObject("", scrollIntoViewCallback); | 1617 this._node.resolveToObject("", scrollIntoViewCallback); |
| 1632 }, | 1618 }, |
| 1633 | 1619 |
| 1634 __proto__: TreeElement.prototype | 1620 __proto__: TreeElement.prototype |
| 1635 } | 1621 } |
| OLD | NEW |