| OLD | NEW |
| 1 // Copyright 2016 The Chromium Authors. All rights reserved. | 1 // Copyright 2016 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 /** @typedef {!{ | 4 /** @typedef {!{ |
| 5 rect: !Protocol.DOM.Rect, | 5 rect: !Protocol.DOM.Rect, |
| 6 snapshot: !SDK.PaintProfilerSnapshot | 6 snapshot: !SDK.PaintProfilerSnapshot |
| 7 }} | 7 }} |
| 8 */ | 8 */ |
| 9 SDK.SnapshotWithRect; | 9 SDK.SnapshotWithRect; |
| 10 | 10 |
| 11 /** | 11 /** |
| 12 * @interface | 12 * @interface |
| 13 */ | 13 */ |
| 14 SDK.Layer = function() {}; | 14 SDK.Layer = function() {}; |
| 15 | 15 |
| 16 SDK.Layer.prototype = { | 16 SDK.Layer.prototype = { |
| 17 /** | 17 /** |
| 18 * @return {string} | 18 * @return {string} |
| 19 */ | 19 */ |
| 20 id: function() {}, | 20 id() {}, |
| 21 | 21 |
| 22 /** | 22 /** |
| 23 * @return {?string} | 23 * @return {?string} |
| 24 */ | 24 */ |
| 25 parentId: function() {}, | 25 parentId() {}, |
| 26 | 26 |
| 27 /** | 27 /** |
| 28 * @return {?SDK.Layer} | 28 * @return {?SDK.Layer} |
| 29 */ | 29 */ |
| 30 parent: function() {}, | 30 parent() {}, |
| 31 | 31 |
| 32 /** | 32 /** |
| 33 * @return {boolean} | 33 * @return {boolean} |
| 34 */ | 34 */ |
| 35 isRoot: function() {}, | 35 isRoot() {}, |
| 36 | 36 |
| 37 /** | 37 /** |
| 38 * @return {!Array.<!SDK.Layer>} | 38 * @return {!Array.<!SDK.Layer>} |
| 39 */ | 39 */ |
| 40 children: function() {}, | 40 children() {}, |
| 41 | 41 |
| 42 /** | 42 /** |
| 43 * @param {!SDK.Layer} child | 43 * @param {!SDK.Layer} child |
| 44 */ | 44 */ |
| 45 addChild: function(child) {}, | 45 addChild(child) {}, |
| 46 | 46 |
| 47 /** | 47 /** |
| 48 * @return {?SDK.DOMNode} | 48 * @return {?SDK.DOMNode} |
| 49 */ | 49 */ |
| 50 node: function() {}, | 50 node() {}, |
| 51 | 51 |
| 52 /** | 52 /** |
| 53 * @return {?SDK.DOMNode} | 53 * @return {?SDK.DOMNode} |
| 54 */ | 54 */ |
| 55 nodeForSelfOrAncestor: function() {}, | 55 nodeForSelfOrAncestor() {}, |
| 56 | 56 |
| 57 /** | 57 /** |
| 58 * @return {number} | 58 * @return {number} |
| 59 */ | 59 */ |
| 60 offsetX: function() {}, | 60 offsetX() {}, |
| 61 | 61 |
| 62 /** | 62 /** |
| 63 * @return {number} | 63 * @return {number} |
| 64 */ | 64 */ |
| 65 offsetY: function() {}, | 65 offsetY() {}, |
| 66 | 66 |
| 67 /** | 67 /** |
| 68 * @return {number} | 68 * @return {number} |
| 69 */ | 69 */ |
| 70 width: function() {}, | 70 width() {}, |
| 71 | 71 |
| 72 /** | 72 /** |
| 73 * @return {number} | 73 * @return {number} |
| 74 */ | 74 */ |
| 75 height: function() {}, | 75 height() {}, |
| 76 | 76 |
| 77 /** | 77 /** |
| 78 * @return {?Array.<number>} | 78 * @return {?Array.<number>} |
| 79 */ | 79 */ |
| 80 transform: function() {}, | 80 transform() {}, |
| 81 | 81 |
| 82 /** | 82 /** |
| 83 * @return {!Array.<number>} | 83 * @return {!Array.<number>} |
| 84 */ | 84 */ |
| 85 quad: function() {}, | 85 quad() {}, |
| 86 | 86 |
| 87 /** | 87 /** |
| 88 * @return {!Array.<number>} | 88 * @return {!Array.<number>} |
| 89 */ | 89 */ |
| 90 anchorPoint: function() {}, | 90 anchorPoint() {}, |
| 91 | 91 |
| 92 /** | 92 /** |
| 93 * @return {boolean} | 93 * @return {boolean} |
| 94 */ | 94 */ |
| 95 invisible: function() {}, | 95 invisible() {}, |
| 96 | 96 |
| 97 /** | 97 /** |
| 98 * @return {number} | 98 * @return {number} |
| 99 */ | 99 */ |
| 100 paintCount: function() {}, | 100 paintCount() {}, |
| 101 | 101 |
| 102 /** | 102 /** |
| 103 * @return {?Protocol.DOM.Rect} | 103 * @return {?Protocol.DOM.Rect} |
| 104 */ | 104 */ |
| 105 lastPaintRect: function() {}, | 105 lastPaintRect() {}, |
| 106 | 106 |
| 107 /** | 107 /** |
| 108 * @return {!Array.<!Protocol.LayerTree.ScrollRect>} | 108 * @return {!Array.<!Protocol.LayerTree.ScrollRect>} |
| 109 */ | 109 */ |
| 110 scrollRects: function() {}, | 110 scrollRects() {}, |
| 111 | 111 |
| 112 /** | 112 /** |
| 113 * @return {number} | 113 * @return {number} |
| 114 */ | 114 */ |
| 115 gpuMemoryUsage: function() {}, | 115 gpuMemoryUsage() {}, |
| 116 | 116 |
| 117 /** | 117 /** |
| 118 * @param {function(!Array.<string>)} callback | 118 * @param {function(!Array.<string>)} callback |
| 119 */ | 119 */ |
| 120 requestCompositingReasons: function(callback) {}, | 120 requestCompositingReasons(callback) {}, |
| 121 | 121 |
| 122 /** | 122 /** |
| 123 * @return {boolean} | 123 * @return {boolean} |
| 124 */ | 124 */ |
| 125 drawsContent: function() {}, | 125 drawsContent() {}, |
| 126 | 126 |
| 127 /** | 127 /** |
| 128 * @return {!Array<!Promise<?SDK.SnapshotWithRect>>} | 128 * @return {!Array<!Promise<?SDK.SnapshotWithRect>>} |
| 129 */ | 129 */ |
| 130 snapshots: function() {} | 130 snapshots() {} |
| 131 }; | 131 }; |
| 132 | 132 |
| 133 SDK.Layer.ScrollRectType = { | 133 SDK.Layer.ScrollRectType = { |
| 134 NonFastScrollable: 'NonFastScrollable', | 134 NonFastScrollable: 'NonFastScrollable', |
| 135 TouchEventHandler: 'TouchEventHandler', | 135 TouchEventHandler: 'TouchEventHandler', |
| 136 WheelEventHandler: 'WheelEventHandler', | 136 WheelEventHandler: 'WheelEventHandler', |
| 137 RepaintsOnScroll: 'RepaintsOnScroll' | 137 RepaintsOnScroll: 'RepaintsOnScroll' |
| 138 }; | 138 }; |
| 139 | 139 |
| 140 /** | 140 /** |
| (...skipping 112 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 253 } | 253 } |
| 254 | 254 |
| 255 /** | 255 /** |
| 256 * @param {number} id | 256 * @param {number} id |
| 257 * @return {?SDK.DOMNode} | 257 * @return {?SDK.DOMNode} |
| 258 */ | 258 */ |
| 259 _nodeForId(id) { | 259 _nodeForId(id) { |
| 260 return this._domModel ? this._domModel.nodeForId(id) : null; | 260 return this._domModel ? this._domModel.nodeForId(id) : null; |
| 261 } | 261 } |
| 262 }; | 262 }; |
| OLD | NEW |