| 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 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 42 this._isInShadowTree = isInShadowTree; | 42 this._isInShadowTree = isInShadowTree; |
| 43 | 43 |
| 44 this.id = payload.nodeId; | 44 this.id = payload.nodeId; |
| 45 domAgent._idToDOMNode[this.id] = this; | 45 domAgent._idToDOMNode[this.id] = this; |
| 46 this._nodeType = payload.nodeType; | 46 this._nodeType = payload.nodeType; |
| 47 this._nodeName = payload.nodeName; | 47 this._nodeName = payload.nodeName; |
| 48 this._localName = payload.localName; | 48 this._localName = payload.localName; |
| 49 this._nodeValue = payload.nodeValue; | 49 this._nodeValue = payload.nodeValue; |
| 50 this._pseudoType = payload.pseudoType; | 50 this._pseudoType = payload.pseudoType; |
| 51 this._shadowRootType = payload.shadowRootType; | 51 this._shadowRootType = payload.shadowRootType; |
| 52 this._frameId = payload.frameId || null; |
| 52 | 53 |
| 53 this._shadowRoots = []; | 54 this._shadowRoots = []; |
| 54 | 55 |
| 55 this._attributes = []; | 56 this._attributes = []; |
| 56 this._attributesMap = {}; | 57 this._attributesMap = {}; |
| 57 if (payload.attributes) | 58 if (payload.attributes) |
| 58 this._setAttributesPayload(payload.attributes); | 59 this._setAttributesPayload(payload.attributes); |
| 59 | 60 |
| 60 this._userProperties = {}; | 61 this._userProperties = {}; |
| 61 this._descendantUserPropertyCounters = {}; | 62 this._descendantUserPropertyCounters = {}; |
| (...skipping 406 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 468 /** | 469 /** |
| 469 * @param {!WebInspector.DOMNode} descendant | 470 * @param {!WebInspector.DOMNode} descendant |
| 470 * @return {boolean} | 471 * @return {boolean} |
| 471 */ | 472 */ |
| 472 isDescendant: function(descendant) | 473 isDescendant: function(descendant) |
| 473 { | 474 { |
| 474 return descendant !== null && descendant.isAncestor(this); | 475 return descendant !== null && descendant.isAncestor(this); |
| 475 }, | 476 }, |
| 476 | 477 |
| 477 /** | 478 /** |
| 479 * @return {?PageAgent.FrameId} |
| 480 */ |
| 481 frameId: function() |
| 482 { |
| 483 var node = this; |
| 484 while (!node._frameId && node.parentNode) |
| 485 node = node.parentNode; |
| 486 return node._frameId; |
| 487 }, |
| 488 |
| 489 /** |
| 478 * @param {!Array.<string>} attrs | 490 * @param {!Array.<string>} attrs |
| 479 * @return {boolean} | 491 * @return {boolean} |
| 480 */ | 492 */ |
| 481 _setAttributesPayload: function(attrs) | 493 _setAttributesPayload: function(attrs) |
| 482 { | 494 { |
| 483 var attributesChanged = !this._attributes || attrs.length !== this._attr
ibutes.length * 2; | 495 var attributesChanged = !this._attributes || attrs.length !== this._attr
ibutes.length * 2; |
| 484 var oldAttributesMap = this._attributesMap || {}; | 496 var oldAttributesMap = this._attributesMap || {}; |
| 485 | 497 |
| 486 this._attributes = []; | 498 this._attributes = []; |
| 487 this._attributesMap = {}; | 499 this._attributesMap = {}; |
| (...skipping 1143 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1631 setInspectModeEnabled: function(enabled, inspectShadowDOM, config, callback) | 1643 setInspectModeEnabled: function(enabled, inspectShadowDOM, config, callback) |
| 1632 { | 1644 { |
| 1633 DOMAgent.setInspectModeEnabled(enabled, inspectShadowDOM, config, callba
ck); | 1645 DOMAgent.setInspectModeEnabled(enabled, inspectShadowDOM, config, callba
ck); |
| 1634 } | 1646 } |
| 1635 } | 1647 } |
| 1636 | 1648 |
| 1637 /** | 1649 /** |
| 1638 * @type {!WebInspector.DOMAgent} | 1650 * @type {!WebInspector.DOMAgent} |
| 1639 */ | 1651 */ |
| 1640 WebInspector.domAgent; | 1652 WebInspector.domAgent; |
| OLD | NEW |