Sequential layout builder
AssigneeMicrosoft Corporation
InventorsEvgeny N. Veselov, Rossen Petkov Atanassov, Michael Jacob Jolson
Life of this patent
Estimating the term…
Abstract
Layout processing techniques have been described that allow processing of structured documents to be conducted, and for associated layout to be accomplished in a sequential manner. The layout process is split into multiple, smaller steps that can be executed sequentially. In at least some embodiments, a layout builder is utilized in conjunction with a stack to control layout execution on respective levels of the structural hierarchy of a structured document. Immutable data structures are utilized and allow for parallel execution of sequential layout operations. In at least some embodiments, partial execution of the layout sequence can be performed to produce usable data.
Claims20
A computer-implemented method comprising:
- receiving a structured document;
- encountering an opening tag within the structured document;
- creating a box builder associated with the opening tag, the box builder being one of multiple different types of box builders, each of the multiple different types of box builders specifically configured to build a particular type of content, and each of the multiple different types of box builders comprising an abstract class that represents common properties and methods of each specific one of the multiple different types of box builders, the box builder being further configured to be interrupted at a first point in building the particular type of content and restarted from a second point that is different than the first point, the second point being different from a beginning of the structured document and different from a third point that is sequential to the first point;
- utilizing a layout node that is configured to unify both original content and computed content, the computed content comprising values or data dependent on content properties and not dependent on space characteristics, the original content being dependent at least on space characteristics;
- creating an associated layout box that is re-usable in different positions for subsequent and parallel layout building processes based on the associated layout box containing internal positioned content and sizing information and not containing positioning data of the layout box;
- and
- using the box builder to sequentially process the structured document and populate the layout box with renderable content.
One or more computer-readable storage media, the one or more computer-readable storage media not comprising a signal, and the one or more computer-readable storage media embodying computer executable instructions which, when executed, implement a method comprising:
- receiving an HTML document;
- encountering an opening tag within the HTML document;
- creating a box builder associated with the opening tag, the box builder one of multiple different types of box builders, each of the multiple different types of box builders specifically configured to build a particular type of content, each of the multiple different types of box builders comprising an abstract class that represents common properties and methods of each specific one of the multiple different types of box builders, the box builder being organized as a finite state machine configured to transition from one state to another state based on one or more properties of the particular type of content being processed by the box builder, the box builder being further configured to be interrupted and restarted from an arbitrary point in building the particular type of content;
- utilizing a layout node that is configured to unify both original content of the box builder and computed content that includes values dependent on content properties and not dependent on space characteristics, the original content including content that is dependent on space characteristics;
- creating an associated layout box;
- using the box builder to sequentially process the HTML document and populate the layout box with renderable content;
- ascertaining whether a subsequent tag in the HTML document is a closing tag associated with the opening tag and, if not, continuing to sequentially process the HTML document effective to populate the layout box with renderable content;
- and
- if the subsequent tag is a closing tag associated with the opening tag, then causing insertion of the layout box into a display tree.
One or more computer readable storage memories embodying computer executable instructions which, responsive to execution, implement a web browser configured to process a structured document in a sequential, non-recursive manner effective to enable associated content to be rendered, the web browser including multiple different types of box builders, each of the multiple different types of box builders specifically configured to build a particular type of content, each of the multiple different types of box builders comprising an abstract class that represents common properties and methods of each specific one of the multiple different types of box builders, the multiple different types of box builders being organized as finite state machines each configured to transition from one state to another state depending on one or more properties of the particular type of content being processed by a respective one of said multiple different types of box builders, the multiple different types of box builders each configured to be interrupted at a point in building the particular type of content and restarted from an additional point that is between a beginning and an ending of the building of the particular type of content and which is not sequential to the point at which the building is interrupted, the web browser further configured to utilize a layout builder that allows for pre-computation of computed content by demand, the computed content including data that is dependent on content properties and not dependent on space characteristics.
Dependencies are inferred from the claim text.