import type * as Protocol from '../../generated/protocol.js'; import { type DOMNode } from './DOMModel.js'; import { type SnapshotWithRect } from './PaintProfiler.js'; import { type Target } from './Target.js'; export interface Layer { id(): string; parentId(): string | null; parent(): Layer | null; isRoot(): boolean; children(): Layer[]; addChild(child: Layer): void; node(): DOMNode | null; nodeForSelfOrAncestor(): DOMNode | null; offsetX(): number; offsetY(): number; width(): number; height(): number; transform(): number[] | null; quad(): number[]; anchorPoint(): number[]; invisible(): boolean; paintCount(): number; lastPaintRect(): Protocol.DOM.Rect | null; scrollRects(): Protocol.LayerTree.ScrollRect[]; stickyPositionConstraint(): StickyPositionConstraint | null; gpuMemoryUsage(): number; requestCompositingReasonIds(): Promise; drawsContent(): boolean; snapshots(): Promise[]; } export declare namespace Layer { enum ScrollRectType { NonFastScrollable = "NonFastScrollable", TouchEventHandler = "TouchEventHandler", WheelEventHandler = "WheelEventHandler", RepaintsOnScroll = "RepaintsOnScroll", MainThreadScrollingReason = "MainThreadScrollingReason" } } export declare class StickyPositionConstraint { #private; constructor(layerTree: LayerTreeBase | null, constraint: Protocol.LayerTree.StickyPositionConstraint); stickyBoxRect(): Protocol.DOM.Rect; containingBlockRect(): Protocol.DOM.Rect; nearestLayerShiftingStickyBox(): Layer | null; nearestLayerShiftingContainingBlock(): Layer | null; } export declare class LayerTreeBase { #private; layersById: Map; constructor(target: Target | null); target(): Target | null; root(): Layer | null; setRoot(root: Layer | null): void; contentRoot(): Layer | null; setContentRoot(contentRoot: Layer | null): void; forEachLayer(callback: (arg0: Layer) => T, root?: Layer | null): T | boolean; layerById(id: string): Layer | null; resolveBackendNodeIds(requestedNodeIds: Set): Promise; backendNodeIdToNode(): Map; setViewportSize(viewportSize: { width: number; height: number; }): void; viewportSize(): { width: number; height: number; } | undefined; private nodeForId; }