Crate layout_api

Source
Expand description

This module contains traits in script used generically in the rest of Servo. The traits are here instead of in script so that these modules won’t have to depend on script.

Modules§

layout_damage 🔒
wrapper_traits

Structs§

DomParallelInfo
Information that we need stored in each DOM node.
ElementsFromPointFlags
ElementsFromPointResult
Describe an item that matched a hit-test query.
HTMLCanvasData
HTMLMediaData
IFrameSize
ImageAnimationState
LayoutConfig
LayoutDamage
Individual layout actions that may be necessary after restyling. This is an extension of RestyleDamage from stylo, which only uses the 4 lower bits.
MediaFrame
MediaMetadata
OffsetParentResponse
PendingImage
The data associated with an image that is not yet present in the image cache. Used by the script thread to hold on to DOM elements that need to be repainted when an image fetch is complete.
PendingRasterizationImage
A data structure to tarck vector image that are fully loaded (i.e has a parsed SVG tree) but not yet rasterized to the size needed by layout. The rasterization is happening in the image cache.
PendingRestyle
A pending restyle.
PropertyRegistration
ReflowPhasesRun
The phases of reflow that were run when processing a reflow in layout.
ReflowRequest
Information needed for a script-initiated reflow.
ReflowRequestRestyle
Information needed for a script-initiated reflow that requires a restyle and reconstruction of box and fragment trees.
ReflowResult
Information derived from a layout pass that needs to be returned to the script thread.
RestyleReason
Conditions which cause a [Document] to need to be restyled during reflow, which might cause the rest of layout to happen as well.
SVGElementData
StyleData
TrustedNodeAddress
The address of a node known to be valid. These are sent from script to layout.

Enums§

BoxAreaType
Type of the area of CSS box for query. See https://www.w3.org/TR/css-box-3/#box-model.
FragmentType
The type of fragment that a scroll root is created for.
LayoutElementType
LayoutNodeType
PendingImageState
Whether the pending image needs to be fetched or is waiting on an existing fetch.
QueryMsg
ReflowGoal
The goal of a reflow request.
RegisterPropertyError

Constants§

SPECIAL_SCROLL_ROOT_ID_MASK 🔒
If none of the bits outside this mask are set, the scroll root is a special scroll root. Note that we assume that the top 16 bits of the address space are unused on the platform.

Statics§

NEXT_SPECIAL_SCROLL_ROOT_ID 🔒
The next ID that will be used for a special scroll root id.

Traits§

GenericLayoutDataTrait
Layout
LayoutFactory
ScriptThreadFactory
This trait is part of layout_api because it depends on both script_traits and also LayoutFactory from this crate. If it was in script_traits there would be a circular dependency.

Functions§

combine_id_with_fragment_type
next_special_id 🔒
Returns a new scroll root ID for a scroll root.
node_id_from_scroll_id

Type Aliases§

GenericLayoutData
IFrameSizes