aboutsummaryrefslogtreecommitdiffstats
path: root/components/layout_2020/flow/inline/construct.rs
Commit message (Collapse)AuthorAgeFilesLines
* layout: Add very basic support for showing text in input boxes (#32365)Martin Robinson2024-06-201-0/+3
| | | | | | | | | | | | | | | | | | This only paints text in input fields. Selection and cursor are still not painted. In addition to adding this feature, the change also updates the user-agent.css with the latest from the HTML specification. Extra padding and extraneous settings (such as a bogus line-height and min-height) are also removed from servo.css. This leads to some new passes. There are some new passes, this introduces failures as inserting text reveals issues that were hidden before. Notably: - failures in `/html/editing/editing-0/spelling-and-grammar-checking/`: We do not support spell-checking. - Most of the rest of the new failures are missing features of input boxes that are also missing in legacy layout.
* layout: Flatten inline box storage in InlineFormattingContexts (#32539)Martin Robinson2024-06-191-95/+74
| | | | | | | | | | | This accomplishes two things: 1. Makes it easier to iterate through all inline formatting context items. 2. Will make it possible to easily move back and forth through the tree of inline boxes, in order to enable reordering and splitting inline boxes on lines -- necessary for BiDi. Co-authored-by: Rakhi Sharma <atbrakhi@igalia.com>
* layout: Linebreak the entire InlineFormattingContext at once (#32483)Martin Robinson2024-06-131-0/+8
| | | | | | | | | | | | | Instead of linebreaking inside each single-font text segment, linebreak the entire inline formatting context at once. This has several benefits: 1. It allows us to use `icu_segmenter` (already in use from style), which is written against a newer version of the Unicode spec -- preventing breaking emoji clusters. 2. Opens up the possibility of changing the way that linebreaking and shaping work -- eventually allowing shaping across inline box boundaries and line breaking *after* shaping. Co-authored-by: Rakhi Sharma <atbrakhi@igalia.com>
* layout: Add a `InlineFormattingContextBuilder` (#32415)Martin Robinson2024-06-031-0/+610
The main change here is that collapsed and `text-transform`'d text is computed as it's processed by DOM traversal. This single transformed text is stored in the root of the `InlineFormattingContext`. This will eventually allow performing linebreaking and shaping of the entire inline formatting context at once. Allowing for intelligent processing of linebreaking and also shaping across elements. This matches more closely what LayoutNG does. This shouldn't have any (or negligable) behavioral changes, but will allow us to prevent linebreaking inside of clusters in a followup change. Co-authored-by: Rakhi Sharma <atbrakhi@igalia.com>