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 585 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
596 isDescendant: function(descendant) | 596 isDescendant: function(descendant) |
597 { | 597 { |
598 return descendant !== null && descendant.isAncestor(this); | 598 return descendant !== null && descendant.isAncestor(this); |
599 }, | 599 }, |
600 | 600 |
601 /** | 601 /** |
602 * @return {?PageAgent.FrameId} | 602 * @return {?PageAgent.FrameId} |
603 */ | 603 */ |
604 frameId: function() | 604 frameId: function() |
605 { | 605 { |
606 var node = this; | 606 var node = this.parentNode || this; |
dgozman
2016/08/03 16:53:13
Does this work for immediate children of iframe no
lushnikov
2016/08/03 18:00:08
Yes; added test.
| |
607 while (!node._frameId && node.parentNode) | 607 while (!node._frameId && node.parentNode) |
608 node = node.parentNode; | 608 node = node.parentNode; |
609 return node._frameId; | 609 return node._frameId; |
dgozman
2016/08/03 16:53:13
Should we change _frameId instead?
lushnikov
2016/08/03 18:00:08
Renamed into frameOwnerFrameId to avoid confusion
| |
610 }, | 610 }, |
611 | 611 |
612 /** | 612 /** |
613 * @param {!Array.<string>} attrs | 613 * @param {!Array.<string>} attrs |
614 * @return {boolean} | 614 * @return {boolean} |
615 */ | 615 */ |
616 _setAttributesPayload: function(attrs) | 616 _setAttributesPayload: function(attrs) |
617 { | 617 { |
618 var attributesChanged = !this._attributes || attrs.length !== this._attr ibutes.length * 2; | 618 var attributesChanged = !this._attributes || attrs.length !== this._attr ibutes.length * 2; |
619 var oldAttributesMap = this._attributesMap || {}; | 619 var oldAttributesMap = this._attributesMap || {}; |
(...skipping 1660 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
2280 } | 2280 } |
2281 | 2281 |
2282 /** | 2282 /** |
2283 * @param {!WebInspector.Target} target | 2283 * @param {!WebInspector.Target} target |
2284 * @return {?WebInspector.DOMModel} | 2284 * @return {?WebInspector.DOMModel} |
2285 */ | 2285 */ |
2286 WebInspector.DOMModel.fromTarget = function(target) | 2286 WebInspector.DOMModel.fromTarget = function(target) |
2287 { | 2287 { |
2288 return /** @type {?WebInspector.DOMModel} */ (target.model(WebInspector.DOMM odel)); | 2288 return /** @type {?WebInspector.DOMModel} */ (target.model(WebInspector.DOMM odel)); |
2289 } | 2289 } |
OLD | NEW |