| 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 331 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 342 }, | 342 }, |
| 343 | 343 |
| 344 /** | 344 /** |
| 345 * @return {string} | 345 * @return {string} |
| 346 */ | 346 */ |
| 347 nodeNameInCorrectCase: function() | 347 nodeNameInCorrectCase: function() |
| 348 { | 348 { |
| 349 var shadowRootType = this.shadowRootType(); | 349 var shadowRootType = this.shadowRootType(); |
| 350 if (shadowRootType) | 350 if (shadowRootType) |
| 351 return "#shadow-root (" + shadowRootType + ")"; | 351 return "#shadow-root (" + shadowRootType + ")"; |
| 352 return this.isXMLNode() ? this.nodeName() : this.nodeName().toLowerCase(
); | 352 |
| 353 // If there is no local name, it's case sensitive |
| 354 if (!this.localName()) |
| 355 return this.nodeName(); |
| 356 |
| 357 // If the names are different lengths, there is a prefix and it's case s
ensitive |
| 358 if (this.localName().length !== this.nodeName().length) |
| 359 return this.nodeName(); |
| 360 |
| 361 // Return the localname, which will be case insensitive if its an html n
ode |
| 362 return this.localName(); |
| 353 }, | 363 }, |
| 354 | 364 |
| 355 /** | 365 /** |
| 356 * @param {string} name | 366 * @param {string} name |
| 357 * @param {function(?Protocol.Error, number)=} callback | 367 * @param {function(?Protocol.Error, number)=} callback |
| 358 */ | 368 */ |
| 359 setNodeName: function(name, callback) | 369 setNodeName: function(name, callback) |
| 360 { | 370 { |
| 361 this._agent.setNodeName(this.id, name, this._domModel._markRevision(this
, callback)); | 371 this._agent.setNodeName(this.id, name, this._domModel._markRevision(this
, callback)); |
| 362 }, | 372 }, |
| (...skipping 1890 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2253 } | 2263 } |
| 2254 | 2264 |
| 2255 /** | 2265 /** |
| 2256 * @param {!WebInspector.Target} target | 2266 * @param {!WebInspector.Target} target |
| 2257 * @return {?WebInspector.DOMModel} | 2267 * @return {?WebInspector.DOMModel} |
| 2258 */ | 2268 */ |
| 2259 WebInspector.DOMModel.fromTarget = function(target) | 2269 WebInspector.DOMModel.fromTarget = function(target) |
| 2260 { | 2270 { |
| 2261 return /** @type {?WebInspector.DOMModel} */ (target.model(WebInspector.DOMM
odel)); | 2271 return /** @type {?WebInspector.DOMModel} */ (target.model(WebInspector.DOMM
odel)); |
| 2262 } | 2272 } |
| OLD | NEW |