| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2009, 2010 Google Inc. All rights reserved. | 2 * Copyright (C) 2009, 2010 Google Inc. All rights reserved. |
| 3 * Copyright (C) 2009 Joseph Pecoraro | 3 * Copyright (C) 2009 Joseph Pecoraro |
| 4 * | 4 * |
| 5 * Redistribution and use in source and binary forms, with or without | 5 * Redistribution and use in source and binary forms, with or without |
| 6 * modification, are permitted provided that the following conditions are | 6 * modification, are permitted provided that the following conditions are |
| 7 * met: | 7 * met: |
| 8 * | 8 * |
| 9 * * Redistributions of source code must retain the above copyright | 9 * * Redistributions of source code must retain the above copyright |
| 10 * notice, this list of conditions and the following disclaimer. | 10 * notice, this list of conditions and the following disclaimer. |
| (...skipping 273 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 284 nodeNameInCorrectCase: function() | 284 nodeNameInCorrectCase: function() |
| 285 { | 285 { |
| 286 var shadowRootType = this.shadowRootType(); | 286 var shadowRootType = this.shadowRootType(); |
| 287 if (shadowRootType) | 287 if (shadowRootType) |
| 288 return "#shadow-root" + (shadowRootType === WebInspector.DOMNode.Sha
dowRootTypes.UserAgent ? " (user-agent)" : ""); | 288 return "#shadow-root" + (shadowRootType === WebInspector.DOMNode.Sha
dowRootTypes.UserAgent ? " (user-agent)" : ""); |
| 289 return this.isXMLNode() ? this.nodeName() : this.nodeName().toLowerCase(
); | 289 return this.isXMLNode() ? this.nodeName() : this.nodeName().toLowerCase(
); |
| 290 }, | 290 }, |
| 291 | 291 |
| 292 /** | 292 /** |
| 293 * @param {string} name | 293 * @param {string} name |
| 294 * @param {function(?Protocol.Error)=} callback | 294 * @param {function(?Protocol.Error, number)=} callback |
| 295 */ | 295 */ |
| 296 setNodeName: function(name, callback) | 296 setNodeName: function(name, callback) |
| 297 { | 297 { |
| 298 this._agent.setNodeName(this.id, name, this._domModel._markRevision(this
, callback)); | 298 this._agent.setNodeName(this.id, name, this._domModel._markRevision(this
, callback)); |
| 299 }, | 299 }, |
| 300 | 300 |
| 301 /** | 301 /** |
| 302 * @return {string} | 302 * @return {string} |
| 303 */ | 303 */ |
| 304 localName: function() | 304 localName: function() |
| (...skipping 120 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 425 function mycallback(error) | 425 function mycallback(error) |
| 426 { | 426 { |
| 427 if (callback) | 427 if (callback) |
| 428 callback(error ? null : this._children); | 428 callback(error ? null : this._children); |
| 429 } | 429 } |
| 430 | 430 |
| 431 this._agent.requestChildNodes(this.id, depth, mycallback.bind(this)); | 431 this._agent.requestChildNodes(this.id, depth, mycallback.bind(this)); |
| 432 }, | 432 }, |
| 433 | 433 |
| 434 /** | 434 /** |
| 435 * @param {function(?Protocol.Error)=} callback | 435 * @param {function(?Protocol.Error, string)=} callback |
| 436 */ | 436 */ |
| 437 getOuterHTML: function(callback) | 437 getOuterHTML: function(callback) |
| 438 { | 438 { |
| 439 this._agent.getOuterHTML(this.id, callback); | 439 this._agent.getOuterHTML(this.id, callback); |
| 440 }, | 440 }, |
| 441 | 441 |
| 442 /** | 442 /** |
| 443 * @param {string} html | 443 * @param {string} html |
| 444 * @param {function(?Protocol.Error)=} callback | 444 * @param {function(?Protocol.Error)=} callback |
| 445 */ | 445 */ |
| (...skipping 1025 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1471 highlightConfig.marginColor = WebInspector.Color.PageHighlight.Margi
n.toProtocolRGBA(); | 1471 highlightConfig.marginColor = WebInspector.Color.PageHighlight.Margi
n.toProtocolRGBA(); |
| 1472 | 1472 |
| 1473 if (mode === "all") | 1473 if (mode === "all") |
| 1474 highlightConfig.eventTargetColor = WebInspector.Color.PageHighlight.
EventTarget.toProtocolRGBA(); | 1474 highlightConfig.eventTargetColor = WebInspector.Color.PageHighlight.
EventTarget.toProtocolRGBA(); |
| 1475 | 1475 |
| 1476 return highlightConfig; | 1476 return highlightConfig; |
| 1477 }, | 1477 }, |
| 1478 | 1478 |
| 1479 /** | 1479 /** |
| 1480 * @param {!WebInspector.DOMNode} node | 1480 * @param {!WebInspector.DOMNode} node |
| 1481 * @param {function(?Protocol.Error, !A=, !B=)=} callback | 1481 * @param {function(?Protocol.Error, ...)=} callback |
| 1482 * @return {function(?Protocol.Error, !A=, !B=)} | 1482 * @return {function(...)} |
| 1483 * @template A,B | 1483 * @template T |
| 1484 */ | 1484 */ |
| 1485 _markRevision: function(node, callback) | 1485 _markRevision: function(node, callback) |
| 1486 { | 1486 { |
| 1487 /** | 1487 /** |
| 1488 * @param {?Protocol.Error} error | 1488 * @param {?Protocol.Error} error |
| 1489 * @this {WebInspector.DOMModel} | 1489 * @this {WebInspector.DOMModel} |
| 1490 */ | 1490 */ |
| 1491 function wrapperFunction(error) | 1491 function wrapperFunction(error) |
| 1492 { | 1492 { |
| 1493 if (!error) | 1493 if (!error) |
| (...skipping 363 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1857 setInspectModeEnabled: function(enabled, inspectUAShadowDOM, config, callbac
k) | 1857 setInspectModeEnabled: function(enabled, inspectUAShadowDOM, config, callbac
k) |
| 1858 { | 1858 { |
| 1859 this._agent.setInspectModeEnabled(enabled, inspectUAShadowDOM, config, c
allback); | 1859 this._agent.setInspectModeEnabled(enabled, inspectUAShadowDOM, config, c
allback); |
| 1860 } | 1860 } |
| 1861 } | 1861 } |
| 1862 | 1862 |
| 1863 /** | 1863 /** |
| 1864 * @type {!WebInspector.DOMModel} | 1864 * @type {!WebInspector.DOMModel} |
| 1865 */ | 1865 */ |
| 1866 WebInspector.domModel; | 1866 WebInspector.domModel; |
| OLD | NEW |