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 344 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
355 } | 355 } |
356 | 356 |
357 _reset() { | 357 _reset() { |
358 delete this.currentQuery; | 358 delete this.currentQuery; |
359 } | 359 } |
360 | 360 |
361 /** | 361 /** |
362 * @param {!Common.Event} event | 362 * @param {!Common.Event} event |
363 */ | 363 */ |
364 _documentUpdatedEvent(event) { | 364 _documentUpdatedEvent(event) { |
365 this._documentUpdated( | 365 var domModel = /** @type {!SDK.DOMModel} */ (event.data); |
366 /** @type {!SDK.DOMModel} */ (event.target), /** @type {?SDK.DOMDocument
} */ (event.data)); | 366 this._documentUpdated(domModel, domModel.existingDocument()); |
367 } | 367 } |
368 | 368 |
369 /** | 369 /** |
370 * @param {!SDK.DOMModel} domModel | 370 * @param {!SDK.DOMModel} domModel |
371 * @param {?SDK.DOMDocument} inspectedRootDocument | 371 * @param {?SDK.DOMDocument} inspectedRootDocument |
372 */ | 372 */ |
373 _documentUpdated(domModel, inspectedRootDocument) { | 373 _documentUpdated(domModel, inspectedRootDocument) { |
374 this._reset(); | 374 this._reset(); |
375 this.searchCanceled(); | 375 this.searchCanceled(); |
376 | 376 |
(...skipping 681 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1058 * @param {!SDK.DOMNode} node | 1058 * @param {!SDK.DOMNode} node |
1059 * @return {?{title: string, color: string}} | 1059 * @return {?{title: string, color: string}} |
1060 */ | 1060 */ |
1061 decorate(node) { | 1061 decorate(node) { |
1062 return { | 1062 return { |
1063 color: 'orange', | 1063 color: 'orange', |
1064 title: Common.UIString('Element state: %s', ':' + SDK.CSSModel.fromNode(no
de).pseudoState(node).join(', :')) | 1064 title: Common.UIString('Element state: %s', ':' + SDK.CSSModel.fromNode(no
de).pseudoState(node).join(', :')) |
1065 }; | 1065 }; |
1066 } | 1066 } |
1067 }; | 1067 }; |
OLD | NEW |