Issue Title: Improve Documentation for Page Rendering Process
Issue Description:
The current documentation for the page rendering process can be improved to enhance clarity and provide more detailed steps. This will help developers better understand the intricate steps involved in page rendering and the role of different components.
Proposed Changes:
Create a 'Frame Tree' or 'Render Tree':
Traverse the DOM nodes.
Calculate the CSS style values for each node.
Calculate Preferred Width of Nodes:
Traverse the 'Frame Tree' bottom-up.
Sum the preferred width of the child nodes and the node's horizontal margins, borders, and padding.
Calculate Actual Width of Nodes:
Traverse top-down.
Allocate each node's available width to its children.
Calculate Height of Nodes:
Apply text wrapping.
Sum the child node heights and the node's margins, borders, and padding.
Calculate Node Coordinates:
Use the previously calculated information.
Handle Complex Features:
Manage elements that are floated, positioned absolutely or relatively, etc.
Issue Title: Improve Documentation for Page Rendering Process
Issue Description: The current documentation for the page rendering process can be improved to enhance clarity and provide more detailed steps. This will help developers better understand the intricate steps involved in page rendering and the role of different components.
Proposed Changes:
Create a 'Frame Tree' or 'Render Tree':
Calculate Preferred Width of Nodes:
Calculate Actual Width of Nodes:
Calculate Height of Nodes:
Calculate Node Coordinates:
Handle Complex Features:
Create Layers:
Allocate Textures:
Traverse and Execute Drawing Commands:
Reuse Calculated Values:
Composite Page Layers:
Compute Final Layer Positions:
Additional Information:
Benefits: