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 303 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
314 var treeOutline = this._treeOutlines[i]; | 314 var treeOutline = this._treeOutlines[i]; |
315 treeOutline.setVisible(true); | 315 treeOutline.setVisible(true); |
316 | 316 |
317 if (!treeOutline.rootDOMNode) { | 317 if (!treeOutline.rootDOMNode) { |
318 if (treeOutline.domModel().existingDocument()) | 318 if (treeOutline.domModel().existingDocument()) |
319 this._documentUpdated(treeOutline.domModel(), treeOutline.domModel().e
xistingDocument()); | 319 this._documentUpdated(treeOutline.domModel(), treeOutline.domModel().e
xistingDocument()); |
320 else | 320 else |
321 treeOutline.domModel().requestDocument(); | 321 treeOutline.domModel().requestDocument(); |
322 } | 322 } |
323 } | 323 } |
324 this.focus(); | |
325 } | 324 } |
326 | 325 |
327 /** | 326 /** |
328 * @override | 327 * @override |
329 */ | 328 */ |
330 willHide() { | 329 willHide() { |
331 UI.context.setFlavor(Elements.ElementsPanel, null); | 330 UI.context.setFlavor(Elements.ElementsPanel, null); |
332 | 331 |
333 SDK.DOMModel.hideDOMNodeHighlight(); | 332 SDK.DOMModel.hideDOMNodeHighlight(); |
334 for (var i = 0; i < this._treeOutlines.length; ++i) { | 333 for (var i = 0; i < this._treeOutlines.length; ++i) { |
(...skipping 755 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1090 * @param {!SDK.DOMNode} node | 1089 * @param {!SDK.DOMNode} node |
1091 * @return {?{title: string, color: string}} | 1090 * @return {?{title: string, color: string}} |
1092 */ | 1091 */ |
1093 decorate(node) { | 1092 decorate(node) { |
1094 return { | 1093 return { |
1095 color: 'orange', | 1094 color: 'orange', |
1096 title: Common.UIString('Element state: %s', ':' + node.domModel().cssModel
().pseudoState(node).join(', :')) | 1095 title: Common.UIString('Element state: %s', ':' + node.domModel().cssModel
().pseudoState(node).join(', :')) |
1097 }; | 1096 }; |
1098 } | 1097 } |
1099 }; | 1098 }; |
OLD | NEW |