
Sign up to save your podcasts
Or


The provided text describes Blink’s LayoutNG Fragment Tree, an immutable structure that captures the final geometry and layout results, replacing the mutable legacy layout tree. This structure is composed of specialized C++ classes, including NGPhysicalFragment and subclasses like NGPhysicalBoxFragment and NGPhysicalLineBoxFragment, which explicitly represent laid-out components and CSS fragmentation. The design enforces immutability and avoids parent pointers, which are essential constraints that allow successful fragment caching and partial reuse during incremental layout updates. For inline formatting contexts, LayoutNG utilizes a separate, flat list of NGFragmentItem objects and the NGInlineCursor to efficiently build and iterate over line fragments. Downstream processes, such as painting and hit testing, rely on NGPaintFragment wrappers that mirror the physical structure while supplying necessary parent pointers and global coordinate information for traversal. This architectural shift provides a clear, reusable, and predictable foundation that simplifies complex rendering tasks, especially those involving multi-column or paginated content.
By Free DebreuilThe provided text describes Blink’s LayoutNG Fragment Tree, an immutable structure that captures the final geometry and layout results, replacing the mutable legacy layout tree. This structure is composed of specialized C++ classes, including NGPhysicalFragment and subclasses like NGPhysicalBoxFragment and NGPhysicalLineBoxFragment, which explicitly represent laid-out components and CSS fragmentation. The design enforces immutability and avoids parent pointers, which are essential constraints that allow successful fragment caching and partial reuse during incremental layout updates. For inline formatting contexts, LayoutNG utilizes a separate, flat list of NGFragmentItem objects and the NGInlineCursor to efficiently build and iterate over line fragments. Downstream processes, such as painting and hit testing, rely on NGPaintFragment wrappers that mirror the physical structure while supplying necessary parent pointers and global coordinate information for traversal. This architectural shift provides a clear, reusable, and predictable foundation that simplifies complex rendering tasks, especially those involving multi-column or paginated content.