| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2011 Google Inc. All rights reserved. | 2 * Copyright (C) 2011 Google Inc. All rights reserved. |
| 3 * Copyright (C) 2007, 2008 Apple Inc. All rights reserved. | 3 * Copyright (C) 2007, 2008 Apple Inc. All rights reserved. |
| 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 455 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 466 * @this {WebInspector.ConsoleViewMessage} | 466 * @this {WebInspector.ConsoleViewMessage} |
| 467 */ | 467 */ |
| 468 function printNode(nodeId) | 468 function printNode(nodeId) |
| 469 { | 469 { |
| 470 if (!nodeId) { | 470 if (!nodeId) { |
| 471 // Sometimes DOM is loaded after the sync message is being forma
tted, so we get no | 471 // Sometimes DOM is loaded after the sync message is being forma
tted, so we get no |
| 472 // nodeId here. So we fall back to object formatting here. | 472 // nodeId here. So we fall back to object formatting here. |
| 473 this._formatParameterAsObject(object, elem, false); | 473 this._formatParameterAsObject(object, elem, false); |
| 474 return; | 474 return; |
| 475 } | 475 } |
| 476 var node = WebInspector.domAgent.nodeForId(nodeId); | 476 var node = WebInspector.domModel.nodeForId(nodeId); |
| 477 var renderer = WebInspector.moduleManager.instance(WebInspector.Rend
erer, node); | 477 var renderer = WebInspector.moduleManager.instance(WebInspector.Rend
erer, node); |
| 478 if (renderer) | 478 if (renderer) |
| 479 elem.appendChild(renderer.render(node)); | 479 elem.appendChild(renderer.render(node)); |
| 480 else | 480 else |
| 481 console.error("No renderer for node found"); | 481 console.error("No renderer for node found"); |
| 482 } | 482 } |
| 483 object.pushNodeToFrontend(printNode.bind(this)); | 483 object.pushNodeToFrontend(printNode.bind(this)); |
| 484 }, | 484 }, |
| 485 | 485 |
| 486 /** | 486 /** |
| (...skipping 531 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1018 } | 1018 } |
| 1019 | 1019 |
| 1020 return sourceString + " " + typeString + " " + levelString + ": " + this
.formattedMessage().textContent + "\n" + this._message.url + " line " + this._me
ssage.line; | 1020 return sourceString + " " + typeString + " " + levelString + ": " + this
.formattedMessage().textContent + "\n" + this._message.url + " line " + this._me
ssage.line; |
| 1021 }, | 1021 }, |
| 1022 | 1022 |
| 1023 get text() | 1023 get text() |
| 1024 { | 1024 { |
| 1025 return this._message.messageText; | 1025 return this._message.messageText; |
| 1026 } | 1026 } |
| 1027 } | 1027 } |
| OLD | NEW |