You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

7.1 KiB

LayerTree

_Auto generated documentation for WebKit inspector

Commands

LayerTree.enable(callback)

Enables compositing tree inspection.

Parameters

callback ( function )

Results

error ( error )

LayerTree.disable(callback)

Disables compositing tree inspection.

Parameters

callback ( function )

Results

error ( error )

LayerTree.layersForNode(DOM.NodeId, callback)

Returns the layer tree structure of the current page.

Parameters

nodeId ( DOM.NodeId )

Root of the subtree for which we want to gather layers.

callback ( function )

Results

error ( error )
layers ( array of Layer )

Child layers.

LayerTree.reasonsForCompositingLayer(LayerId, callback)

Provides the reasons why the given layer was composited.

Parameters

layerId ( LayerId )

The id of the layer for which we want to get the reasons it was composited.

callback ( function )

Results

error ( error )
compositingReasons ( CompositingReasons )

An object containing the reasons why the layer was composited as properties.

Events

Event: layerTreeDidChange

Types

Class: LayerId

Type: string

Unique RenderLayer identifier.

Class: PseudoElementId

Type: string

Unique PseudoElement identifier.

Class: IntRect

Type: object

A rectangle.

Properties

x ( integer )

The x position.

y ( integer )

The y position.

width ( integer )

The width metric.

height ( integer )

The height metric.

Class: Layer

Type: object

Information about a compositing layer.

Properties

layerId ( LayerId )

The unique id for this layer.

nodeId ( DOM.NodeId )

The id for the node associated with this layer.

bounds ( IntRect )

Bounds of the layer in absolute page coordinates.

paintCount ( integer )

Indicates how many time this layer has painted.

memory ( integer )

Estimated memory used by this layer.

compositedBounds ( IntRect )

The bounds of the composited layer.

isInShadowTree ( optional boolean )

Indicates whether this layer is associated with an element hosted in a shadow tree.

isReflection ( optional boolean )

Indicates whether this layer was used to provide a reflection for the element.

isGeneratedContent ( optional boolean )

Indicates whether the layer is attached to a pseudo element that is CSS generated content.

isAnonymous ( optional boolean )

Indicates whether the layer was created for a CSS anonymous block or box.

pseudoElementId ( optional PseudoElementId )

The id for the pseudo element associated with this layer.

pseudoElement ( optional string )

The name of the CSS pseudo-element that prompted the layer to be generated.

Class: CompositingReasons

Type: object

An object containing the reasons why the layer was composited as properties.

Properties

transform3D ( optional boolean )

Composition due to association with an element with a CSS 3D transform.

video ( optional boolean )

Composition due to association with a element.

canvas ( optional boolean )

Composition due to the element being a element.

plugin ( optional boolean )

Composition due to association with a plugin.

iFrame ( optional boolean )

Composition due to association with an