1{ 2 "domain": "LayerTree", 3 "types": [ 4 { 5 "id": "LayerId", 6 "type": "string", 7 "description": "Unique RenderLayer identifier." 8 }, 9 { 10 "id": "PseudoElementId", 11 "type": "string", 12 "description": "Unique PseudoElement identifier." 13 }, 14 { 15 "id": "IntRect", 16 "type": "object", 17 "description": "A rectangle.", 18 "properties": [ 19 { "name": "x", "type": "integer", "description": "The x position." }, 20 { "name": "y", "type": "integer", "description": "The y position." }, 21 { "name": "width", "type": "integer", "description": "The width metric." }, 22 { "name": "height", "type": "integer", "description": "The height metric." } 23 ] 24 }, 25 { 26 "id": "Layer", 27 "type": "object", 28 "description": "Information about a compositing layer.", 29 "properties": [ 30 { "name": "layerId", "$ref": "LayerId", "description": "The unique id for this layer." }, 31 { "name": "nodeId", "$ref": "DOM.NodeId", "description": "The id for the node associated with this layer." }, 32 { "name": "bounds", "$ref": "IntRect", "description": "Bounds of the layer in absolute page coordinates." }, 33 { "name": "paintCount", "type": "integer", "description": "Indicates how many time this layer has painted." }, 34 { "name": "memory", "type": "integer", "description": "Estimated memory used by this layer." }, 35 { "name": "compositedBounds", "$ref": "IntRect", "description": "The bounds of the composited layer." }, 36 { "name": "isInShadowTree", "type": "boolean", "optional": true, "description": "Indicates whether this layer is associated with an element hosted in a shadow tree." }, 37 { "name": "isReflection", "type": "boolean", "optional": true, "description": "Indicates whether this layer was used to provide a reflection for the element." }, 38 { "name": "isGeneratedContent", "type": "boolean", "optional": true, "description": "Indicates whether the layer is attached to a pseudo element that is CSS generated content." }, 39 { "name": "isAnonymous", "type": "boolean", "optional": true, "description": "Indicates whether the layer was created for a CSS anonymous block or box." }, 40 { "name": "pseudoElementId", "$ref": "PseudoElementId", "optional": true, "description": "The id for the pseudo element associated with this layer." }, 41 { "name": "pseudoElement", "type": "string", "optional": true, "description": "The name of the CSS pseudo-element that prompted the layer to be generated." } 42 ] 43 }, 44 { 45 "id": "CompositingReasons", 46 "type": "object", 47 "description": "An object containing the reasons why the layer was composited as properties.", 48 "properties": [ 49 { "name": "transform3D", "type": "boolean", "optional": true, "description": "Composition due to association with an element with a CSS 3D transform." }, 50 { "name": "video", "type": "boolean", "optional": true, "description": "Composition due to association with a <video> element." }, 51 { "name": "canvas", "type": "boolean", "optional": true, "description": "Composition due to the element being a <canvas> element." }, 52 { "name": "plugin", "type": "boolean", "optional": true, "description": "Composition due to association with a plugin." }, 53 { "name": "iFrame", "type": "boolean", "optional": true, "description": "Composition due to association with an <iframe> element." }, 54 { "name": "backfaceVisibilityHidden", "type": "boolean", "optional": true, "description": "Composition due to association with an element with a \"backface-visibility: hidden\" style." }, 55 { "name": "clipsCompositingDescendants", "type": "boolean", "optional": true, "description": "Composition due to association with an element clipping compositing descendants." }, 56 { "name": "animation", "type": "boolean", "optional": true, "description": "Composition due to association with an animated element." }, 57 { "name": "filters", "type": "boolean", "optional": true, "description": "Composition due to association with an element with CSS filters applied." }, 58 { "name": "positionFixed", "type": "boolean", "optional": true, "description": "Composition due to association with an element with a \"position: fixed\" style." }, 59 { "name": "positionSticky", "type": "boolean", "optional": true, "description": "Composition due to association with an element with a \"position: sticky\" style." }, 60 { "name": "overflowScrollingTouch", "type": "boolean", "optional": true, "description": "Composition due to association with an element with a \"overflow-scrolling: touch\" style." }, 61 { "name": "stacking", "type": "boolean", "optional": true, "description": "Composition due to association with an element establishing a stacking context." }, 62 { "name": "overlap", "type": "boolean", "optional": true, "description": "Composition due to association with an element overlapping other composited elements." }, 63 { "name": "negativeZIndexChildren", "type": "boolean", "optional": true, "description": "Composition due to association with an element with descendants that have a negative z-index." }, 64 { "name": "transformWithCompositedDescendants", "type": "boolean", "optional": true, "description": "Composition due to association with an element with composited descendants." }, 65 { "name": "opacityWithCompositedDescendants", "type": "boolean", "optional": true, "description": "Composition due to association with an element with opacity applied and composited descendants." }, 66 { "name": "maskWithCompositedDescendants", "type": "boolean", "optional": true, "description": "Composition due to association with a masked element and composited descendants." }, 67 { "name": "reflectionWithCompositedDescendants", "type": "boolean", "optional": true, "description": "Composition due to association with an element with a reflection and composited descendants." }, 68 { "name": "filterWithCompositedDescendants", "type": "boolean", "optional": true, "description": "Composition due to association with an element with CSS filters applied and composited descendants." }, 69 { "name": "blendingWithCompositedDescendants", "type": "boolean", "optional": true, "description": "Composition due to association with an element with CSS blending applied and composited descendants." }, 70 { "name": "isolatesCompositedBlendingDescendants", "type": "boolean", "optional": true, "description": "Composition due to association with an element isolating compositing descendants having CSS blending applied." }, 71 { "name": "perspective", "type": "boolean", "optional": true, "description": "Composition due to association with an element with perspective applied." }, 72 { "name": "preserve3D", "type": "boolean", "optional": true, "description": "Composition due to association with an element with a \"transform-style: preserve-3d\" style." }, 73 { "name": "root", "type": "boolean", "optional": true, "description": "Composition due to association with the root element." }, 74 { "name": "blending", "type": "boolean", "optional": true, "description": "Composition due to association with an element with a \"blend-mode\" style." } 75 ] 76 } 77 ], 78 "commands": [ 79 { 80 "name": "enable", 81 "description": "Enables compositing tree inspection." 82 }, 83 { 84 "name": "disable", 85 "description": "Disables compositing tree inspection." 86 }, 87 { 88 "name": "layersForNode", 89 "parameters": [ 90 { "name": "nodeId", "$ref": "DOM.NodeId", "description": "Root of the subtree for which we want to gather layers." } ], 91 "description": "Returns the layer tree structure of the current page.", 92 "returns": [ 93 { "name": "layers", "type": "array", "items": { "$ref": "Layer" }, "description": "Child layers." } 94 ] 95 }, 96 { 97 "name": "reasonsForCompositingLayer", 98 "parameters": [ 99 { "name": "layerId", "$ref": "LayerId", "description": "The id of the layer for which we want to get the reasons it was composited." } 100 ], 101 "description": "Provides the reasons why the given layer was composited.", 102 "returns": [ 103 { "name": "compositingReasons", "$ref": "CompositingReasons", "description": "An object containing the reasons why the layer was composited as properties." } 104 ] 105 } 106 ], 107 "events": [ 108 { 109 "name": "layerTreeDidChange" 110 } 111 ] 112} 113