Chromium Code Reviews| 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 305 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 316 } | 316 } |
| 317 | 317 |
| 318 /** | 318 /** |
| 319 * @override | 319 * @override |
| 320 * @param {boolean=} selectedByUser | 320 * @param {boolean=} selectedByUser |
| 321 * @return {boolean} | 321 * @return {boolean} |
| 322 */ | 322 */ |
| 323 onselect(selectedByUser) { | 323 onselect(selectedByUser) { |
| 324 this.treeOutline.suppressRevealAndSelect = true; | 324 this.treeOutline.suppressRevealAndSelect = true; |
| 325 this.treeOutline.selectDOMNode(this._node, selectedByUser); | 325 this.treeOutline.selectDOMNode(this._node, selectedByUser); |
| 326 if (selectedByUser) | 326 if (selectedByUser) { |
| 327 this._node.highlight(); | 327 this._node.highlight(); |
| 328 Host.userMetrics.actionTaken(Host.UserMetrics.Action.ChangeInspectedNodeIn ElementsPanel); | |
|
chenwilliam
2017/02/28 22:31:17
This only gets triggered when you select from the
| |
| 329 } | |
| 328 this._createSelection(); | 330 this._createSelection(); |
| 329 this.treeOutline.suppressRevealAndSelect = false; | 331 this.treeOutline.suppressRevealAndSelect = false; |
| 330 return true; | 332 return true; |
| 331 } | 333 } |
| 332 | 334 |
| 333 /** | 335 /** |
| 334 * @override | 336 * @override |
| 335 * @return {boolean} | 337 * @return {boolean} |
| 336 */ | 338 */ |
| 337 ondelete() { | 339 ondelete() { |
| (...skipping 1228 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 1566 | 1568 |
| 1567 // A union of HTML4 and HTML5-Draft elements that explicitly | 1569 // A union of HTML4 and HTML5-Draft elements that explicitly |
| 1568 // or implicitly (for HTML5) forbid the closing tag. | 1570 // or implicitly (for HTML5) forbid the closing tag. |
| 1569 Elements.ElementsTreeElement.ForbiddenClosingTagElements = new Set([ | 1571 Elements.ElementsTreeElement.ForbiddenClosingTagElements = new Set([ |
| 1570 'area', 'base', 'basefont', 'br', 'canvas', 'col', 'command', 'embed', 'frame', 'hr', | 1572 'area', 'base', 'basefont', 'br', 'canvas', 'col', 'command', 'embed', 'frame', 'hr', |
| 1571 'img', 'input', 'keygen', 'link', 'menuitem', 'meta', 'param', 'source', 'track', 'wbr' | 1573 'img', 'input', 'keygen', 'link', 'menuitem', 'meta', 'param', 'source', 'track', 'wbr' |
| 1572 ]); | 1574 ]); |
| 1573 | 1575 |
| 1574 // These tags we do not allow editing their tag name. | 1576 // These tags we do not allow editing their tag name. |
| 1575 Elements.ElementsTreeElement.EditTagBlacklist = new Set(['html', 'head', 'body'] ); | 1577 Elements.ElementsTreeElement.EditTagBlacklist = new Set(['html', 'head', 'body'] ); |
| OLD | NEW |