aboutsummaryrefslogtreecommitdiffstats
path: root/components/layout_2020
Commit message (Collapse)AuthorAgeFilesLines
...
* Fix rustdoc problems (#33458)Oriol Brufau2024-09-141-2/+2
| | | Signed-off-by: Oriol Brufau <obrufau@igalia.com>
* Allow table-layout:fixed to shrink cells to less than the border+padding ↵Oriol Brufau2024-09-131-6/+14
| | | | | | | | | | (#33442) A table cell with `width: auto` in fixed layout will now have an outer min-content width of zero, even if it has borders or padding. In a way, this is like allowing the content-box width to become negative. Signed-off-by: Oriol Brufau <obrufau@igalia.com> Co-authored-by: Martin Robinson <mrobinson@igalia.com>
* Fix precision issue with line heights (#33438)Oriol Brufau2024-09-131-1/+5
| | | | | | | | | When computing the ascent and descent in an inline formatting context, we weren't taking into account that app units have precision limitations. Therefore, in some cases we were getting a line height that was slightly taller than the value specified in `line-height`. Signed-off-by: Oriol Brufau <obrufau@igalia.com> Co-authored-by: Martin Robinson <mrobinson@igalia.com>
* uses app units in display_list (#33420)atbrakhi2024-09-1312-139/+131
| | | | Signed-off-by: atbrakhi <atbrakhi@igalia.com> Co-authored-by: Martin Robinson <mrobinson@igalia.com>
* Fix inset box-shadow to use the padding box (#33433)Oriol Brufau2024-09-131-5/+4
| | | | | As specified in https://drafts.csswg.org/css-backgrounds-3/#shadow-shape Signed-off-by: Oriol Brufau <obrufau@igalia.com>
* Simplify table logic in effective_overflow() (#33431)Oriol Brufau2024-09-131-33/+22
| | | | | | | | | | | | | On tables, we need to treat an overflow value of `scroll` or `auto` as `visible`. Both `scroll` or `auto` are scrollable, which implies that the other axis must also have a scrollable value. Therefore, when we make the value behave as the non-scrollable `visible`, we need to adjust the other axis too. The previous logic was checking `is_scrollable()` but that wasn't necessary, since computed values must have the same scrollability. Signed-off-by: Oriol Brufau <obrufau@igalia.com>
* Cleanup after #33396 (#33429)Oriol Brufau2024-09-125-19/+15
| | | | | | Mostly formatting improvements, but also recovering a pair of parenthesis that was accidentally removed, changing the logic. Signed-off-by: Oriol Brufau <obrufau@igalia.com>
* Add support for `table-layout: fixed` (#33384)Oriol Brufau2024-09-121-35/+55
| | | | | | | More details might be needed to fully support the feature, but this covers the basic functionality. Signed-off-by: Oriol Brufau <obrufau@igalia.com> Co-authored-by: Martin Robinson <mrobinson@igalia.com>
* Avoid crash with large table column widths (#33424)Oriol Brufau2024-09-121-12/+15
| | | | | Fixes #33423 Signed-off-by: Oriol Brufau <obrufau@igalia.com>
* Handle all `white-space` values when intrinsically sizing an IFC (#33343)Oriol Brufau2024-09-112-31/+52
| | | | | | | | | | | There were various cases like `text-wrap-mode: nowrap` and `white-space-collapse: break-spaces` that weren't handled well. Fixes #33335 flexbox_flex-formatting-interop.html fails now because we don't support `table-layout: fixed`. Signed-off-by: Oriol Brufau <obrufau@igalia.com>
* layout: Reverse space-between alignment properly for absolute children of ↵Martin Robinson2024-09-111-0/+2
| | | | | | | | | flex containers (#33406) When aligning with `space-between` the space should be allocated on the `flex-end` side of the container ie it should be mapped to `flex-start` (`start` and reversing if necssary). Signed-off-by: Martin Robinson <mrobinson@igalia.com>
* Let table-related boxes adjust their `overflow` values (#33400)Oriol Brufau2024-09-114-13/+64
| | | | | | | | | | The `overflow` property doesn't apply to table track and track groups, and table elements only accept a few `overflow` values. Therefore, this patch adds an `effective_overflow()` method to get the actual value that needs to be used. Signed-off-by: Oriol Brufau <obrufau@igalia.com> Co-authored-by: Martin Robinson <mrobinson@igalia.com>
* layout: Right-to-left support for other layout modes (#33375)Martin Robinson2024-09-1118-525/+814
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This change removes the `effective_writing_mode` concept and tries to properly implement right-to-left layout support for all non-inline writing modes. In general, what needs to happen is that rectangles need to be converted to physical rectangles using the containing block. A right-to-left rectangle's inline start is on the right physical side of the containing block. Likewise a positive inline offset in right-to-left text is a negative physical one. The implementation here is pretty good for most layout modes, but floats are still a bit in process. Currently, floats are processed in the logical layout of the block container, but there still might be issues with float interaction with mixed RTL and LTR. While this does move us closer to supporting vertical writing modes, this is still unsupported. New failures: - Vertical writing mode not supported: - `/css/CSS2/floats/floats-placement-vertical-001b.xht` - `/css/CSS2/floats/floats-placement-vertical-001c.xht` - Absolutes inlines should avoid floats (#33323) - `/css/css-position/position-absolute-dynamic-static-position-floats-004.html` - No support for grid - `/css/css-align/self-alignment/self-align-safe-unsafe-grid-003.html` - `/css/css-position/static-position/inline-level-absolute-in-block-level-context-009.html` - `/css/css-position/static-position/inline-level-absolute-in-block-level-context-010.html` - Cannot reproduce these locally on any platform. Very mysterious: - `/css/css-tables/row-group-margin-border-padding.html` - `/css/css-tables/row-margin-border-padding.html` - Exposes bugs we have related to hanging whitespace in preserved whitespace inlines: - `/css/css-text/white-space/trailing-space-and-text-alignment-rtl-003.html` - `/css/css-text/white-space/white-space-pre-wrap-trailing-spaces-023.html` Signed-off-by: Martin Robinson <mrobinson@igalia.com> Co-authored-by: Rakhi Sharma <atbrakhi@igalia.com>
* layout: Use `Au` in `ComputedValuesExt` (#33396)atbrakhi2024-09-1013-272/+240
| | | | | | | | | | | | | | | | | | | | * Use app unit in `ComputedValuesExt` Co-authored-by: Martin Robinson <mrobinson@igalia.com> Signed-off-by: atbrakhi <atbrakhi@igalia.com> * Some miscellaneous fixes Signed-off-by: Martin Robinson <mrobinson@igalia.com> * remove redundant defination of `containing_block_inline_size` Signed-off-by: atbrakhi <atbrakhi@igalia.com> --------- Signed-off-by: atbrakhi <atbrakhi@igalia.com> Signed-off-by: Martin Robinson <mrobinson@igalia.com> Co-authored-by: Martin Robinson <mrobinson@igalia.com>
* Allow breaking line after space with `white-space: break-spaces` (#33376)Oriol Brufau2024-09-101-4/+3
| | | | | | | | | | | | | | `white-space: break-spaces` should allow a soft wrap opportunity *after* every preserved white space. Then, to avoid breaking before the first white space, `TextRunSegment::shape_text()` has some logic to separate it from the following spaces and put it with the preceding text instead. The problem was that, when combined with `word-break: keep-all`, we were then only checking whether there were more white spaces afterwards, ignoring the soft wrap opportunity after the first one. Also removing a duplicated `can_break_anywhere` variable. Signed-off-by: Oriol Brufau <obrufau@igalia.com>
* Fix reordering of table-header-group and table-footer-group (#33383)Oriol Brufau2024-09-091-63/+66
| | | | | | | | | | | | | | | We weren't moving a table-header-group to the front if it was the first row group. However, there might still be preceding rows that don't belong to any row group. And similarly, we weren't moving a table-footer-group to the end if it was the last row group. However, there might still be following rows that don't belong to any row group. This patch fixes the logic, and enables existing tests from Microsoft that were missing a reference. Signed-off-by: Oriol Brufau <obrufau@igalia.com> Co-authored-by: Martin Robinson <mrobinson@igalia.com>
* layout: Implement proper absolute child position for flexbox (#33346)Martin Robinson2024-09-0910-228/+404
| | | | | | | | | | | This implements the requirements outlined in the [flexbox specification] about how to position absolute children of flex containers. We must establish a static position rectangle (to use if all insets are auto) and also align the child into that rectangle. [flebox specification]: https://drafts.csswg.org/css-flexbox/#abspos-items Signed-off-by: Martin Robinson <mrobinson@igalia.com> Co-authored-by: Oriol Brufau <obrufau@igalia.com>
* Remove unused imports (#33371)Oriol Brufau2024-09-092-3/+3
| | | Signed-off-by: Oriol Brufau <obrufau@igalia.com>
* tidy: Fix rustdoc warnings and add a tidy check for a common URL issue (#33366)Martin Robinson2024-09-084-11/+10
| | | | | | | | This change fixes all rustdoc errors and also adds a tidy check for a very common rustdoc URL issue. Eventually rustdoc warnings should likely cause the build to fail, but this catches those issues sooner in order to not waste so much developer time. Signed-off-by: Martin Robinson <mrobinson@igalia.com>
* layout: Do not use orthogonal baselines in flex layout (#33347)Martin Robinson2024-09-072-28/+43
| | | | | | | | | When a baseline is orthogonal to the main flexbox axis, it should not take part in baseline alignment. This change does that for column flex. While there is no support for vertical writing modes, this change is made to be as writing mode-agnostic as possible. Signed-off-by: Martin Robinson <mrobinson@igalia.com> Co-authored-by: Oriol Brufau <obrufau@igalia.com>
* layout: Lay out absolutes in atomic containing blocks (#33336)Martin Robinson2024-09-061-9/+17
| | | | | | | | | | When inline atomics establish containing blocks for absolute descendants, layout should happen with those atomics as the containing block. This ensures that the absolute descendents have the correct containing block and Fragment parent. This wasn't happening before and this change fixes that. Signed-off-by: Martin Robinson <mrobinson@igalia.com> Co-authored-by: Oriol Brufau <obrufau@igalia.com>
* Treat `align-self: normal` as `stretch` on flex items (#33314)Oriol Brufau2024-09-051-1/+2
| | | | | | According to https://drafts.csswg.org/css-align/#align-flex It was being treated as `auto` instead. Signed-off-by: Oriol Brufau <obrufau@igalia.com>
* Fix intrinsic sizing of column flex containers (#33299)Oriol Brufau2024-09-041-5/+3
| | | | | | | | | | | From https://drafts.csswg.org/css-flexbox-1/#intrinsic-cross-sizes, > The min-content/max-content cross size of a single-line flex container > is the largest min-content contribution/max-content contribution > (respectively) of its flex items. We were using the min/max-content size instead of the min/max-content contribution. Signed-off-by: Oriol Brufau <obrufau@igalia.com>
* Fix various issues with replaced elements in flex layout (#33263)Oriol Brufau2024-08-308-187/+331
| | | | | | | | In particular, this takes into account that flex items may be stretched, and if they have an aspect ratio, we ma6y need to convert the stretched size through the ratio. Signed-off-by: Oriol Brufau <obrufau@igalia.com> Co-authored-by: Martin Robinson <mrobinson@igalia.com>
* Use the proper aspect ratio in flexbox (#33256)Oriol Brufau2024-08-302-28/+20
| | | | | | | | | | When computing the automatic minimum size, flex layout was using the natural aspect ratio, ignoring the `aspect-ratio` property. `ReplacedContent::inline_size_over_block_size_intrinsic_ratio()` is now made private to avoid more accidental uses. Signed-off-by: Oriol Brufau <obrufau@igalia.com> Co-authored-by: Martin Robinson <mrobinson@igalia.com>
* Fix automatic minimum size for column flexbox (#33248)Oriol Brufau2024-08-291-3/+10
| | | | | | | `main_content_size_info()` was always assigning the main-axis automatic minimum size into the inline axis. But in a column flexbox, the main axis corresponds to the block axis. Signed-off-by: Oriol Brufau <obrufau@igalia.com>
* Handle aspect ratios in `ReplacedContent::inline_content_sizes` (#33240)Oriol Brufau2024-08-293-24/+39
| | | | | | | We were only handling the aspect ratio of a replaced element when computing its min/max-content contribution, but not when computing the min/max-content size. Now both cases will take it into account. Signed-off-by: Oriol Brufau <obrufau@igalia.com>
* layout: Stop using `unicode-segmentation` in layout (#33250)Martin Robinson2024-08-292-4/+4
| | | | | | | `layout` already uses `icu_segmentation` so there's no need to pull in another segmenter. This reduces the number of segmenters used in the crate to 2 from 3. Signed-off-by: Martin Robinson <mrobinson@igalia.com>
* layout: Add an indefinite containing block for intrinsic sizing (#33204)Oriol Brufau2024-08-2912-297/+572
| | | | | | | | | | | | | | | | | | When computing the min-content or max-content size of an element we need to ignore `inline-size`, `min-inline-size` and `max-inline-size`. However, we should take the block-axis sizing properties into account. That's because the contents could have percentages depending on them, which can then affect their inline size via an aspect ratio. Therefore, this patch adds `IndefiniteContainingBlock`, which is similar to `ContainingBlock`, but it allows an indefinite inline-size. This struct is then passed arround during intrinsic sizing. More refinement will be needed in follow-up patches in order to fully address the problem. Signed-off-by: Oriol Brufau <obrufau@igalia.com> Co-authored-by: Martin Robinson <mrobinson@igalia.com>
* Obey min and max cross sizes of flex items (#33242)Oriol Brufau2024-08-291-1/+6
| | | | | | | | When laying out the contents of a flex item, we used to resolve their cross-axis percentages against the preferred cross size of the item. Now we will take the min and max cross sizes into account. Signed-off-by: Oriol Brufau <obrufau@igalia.com> Co-authored-by: Martin Robinson <mrobinson@igalia.com>
* Obey `min-block-size` and `max-block-size` in floats (#33241)Oriol Brufau2024-08-291-1/+1
| | | | | We were using the unclamped `box_size.block` instead of `block_size`. Signed-off-by: Oriol Brufau <obrufau@igalia.com>
* Bump xi_unicode to latest version (#33246)Jonathan Schwender2024-08-291-1/+1
| | | | | | | | | | | | | | | | | | * Bump xi_unicode to latest version Signed-off-by: Jonathan Schwender <jonathan.schwender@huawei.com> * dep: update XI_LINE_BREAKING_CLASS_ZWJ constant to 42 This matches the value returned by xi-unicode's linebreak_property for `u200D` codepoint in v0.3.0 of the crate. Signed-off-by: Mukilan Thiyagarajan <mukilan@igalia.com> --------- Signed-off-by: Jonathan Schwender <jonathan.schwender@huawei.com> Signed-off-by: Mukilan Thiyagarajan <mukilan@igalia.com> Co-authored-by: Mukilan Thiyagarajan <mukilan@igalia.com>
* layout: Add initial support for `clip-path: [<basic-shape> || <shape-box>]` ↵Chocolate Pie2024-08-284-24/+373
| | | | | | | | | | | | | | | | | | | | | (#33107) * Turn on clip-path tests and add results Signed-off-by: Martin Robinson <mrobinson@igalia.com> * enhance: Add support for `clip-path: [<basic-shape> || <shape-box>]` Signed-off-by: Chocolate Pie <106949016+chocolate-pie@users.noreply.github.com> * Changes from review Signed-off-by: Martin Robinson <mrobinson@igalia.com> --------- Signed-off-by: Martin Robinson <mrobinson@igalia.com> Signed-off-by: Chocolate Pie <106949016+chocolate-pie@users.noreply.github.com> Co-authored-by: Martin Robinson <mrobinson@igalia.com>
* Fix clippy wanings in layout (#33215)atbrakhi2024-08-273-7/+4
| | | Signed-off-by: atbrakhi <atbrakhi@igalia.com>
* Allow creating a `ContentSizes` from `Au` (#33208)Oriol Brufau2024-08-274-36/+21
| | | | | No change in behavior, it just simplies some code a little bit. Signed-off-by: Oriol Brufau <obrufau@igalia.com>
* Allow caching `IndependentFormattingContext::inline_content_sizes()` (#33207)Oriol Brufau2024-08-271-3/+1
| | | | | | | | | | | | For non-replaced formatting contexts, this method redirected directly to `NonReplacedFormattingContextContents::inline_content_sizes()`, which has the actual logic for the computation. Thus it was bypassing the cache, which is handled in `NonReplacedFormattingContext::inline_content_sizes()`. Therefore, this patch redirects to the latter. Signed-off-by: Oriol Brufau <obrufau@igalia.com>
* Respect min/max constraints in the block axis of block containers (#33203)Oriol Brufau2024-08-271-17/+21
| | | | | | | | | | | | | | | Consider a block container that establishes an inline formatting context and has a definite `block-size` which is clamped by `min-block-size` or `max-block-size`. We were already sizing such container correctly, however, its contents were resolving their percentages against the unclamped `block-size` value. This patch fixes the `ContainingBlock` that we pass to the contents so that they resolve percentages correctly. Signed-off-by: Oriol Brufau <obrufau@igalia.com> Co-authored-by: Martin Robinson <mrobinson@igalia.com>
* layout: Add support for flex items with `position: relative` (#33151)Martin Robinson2024-08-231-81/+132
| | | Signed-off-by: Martin Robinson <mrobinson@igalia.com>
* layout: Clean up inline layout data structures (#33149)Martin Robinson2024-08-223-194/+154
| | | | | | | | | | | | | | | | - Rename `InlineFormattingContextState` to `InlineFormattingContextLayout`. - Have `InlineFormattingContextLayout` hold a reference to the `InlineFormattingContext`, so that it does not need to be passed around as an argument - Have `LineItemLayout` hold a reference to `InlineFormattingContextLayout` to avoid duplicating so much data. - Rename some members of `LineItemLayout` to make it clearer what they do. - Give beter names to many lifetimes and combine some that are effectively the same. Signed-off-by: Martin Robinson <mrobinson@igalia.com> Co-authored-by: Rakhi Sharma <atbrakhi@igalia.com>
* layout: Add initial support for bidirectional text (BiDi) (#33148)Martin Robinson2024-08-2111-103/+257
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This adds supports for right-to-left text assigning bidi levels to all line items when necessary. This includes support for the `dir` attribute as well as corresponding CSS properties like `unicode-bidi`. It only implements right-to-left rendering for inline layout at the moment and doesn't include support for `dir=auto`. Because of missing features, this causes quite a few tests to start failing, as references become incorrect due to right-to-left rendering being active in some cases, but not others (before it didn't exist at all). Analysis of most of the new failures: ``` - /css/css-flexbox/gap-001-rtl.html /css/css-flexbox/gap-004-rtl.html - Require implementing BiDi in Flexbox, because the start and end inline margins are opposite the order of items. - /css/CSS2/bidi-text/direction-applies-to-*.xht /css/CSS2/bidi-text/direction-applies-to-002.xht /css/CSS2/bidi-text/direction-applies-to-003.xht /css/CSS2/bidi-text/direction-applies-to-004.xht - Broken due to a bug in tables, not allocating the right amount of width for a column. - /css/css-lists/inline-list.html - This fails because we wrongly insert a soft wrap opportunity between the start of an inline box and its first content. - /css/css-text/bidi/bidi-lines-001.html /css/css-text/bidi/bidi-lines-002.html /css/CSS2/text/bidi-flag-emoji.html - We do not fully support unicode-bidi: plaintext - /css/css-text/text-align/text-align-end-010.html /css/css-text/text-align/text-align-justify-006.html /css/css-text/text-align/text-align-start-010.html /html/dom/elements/global-attributes/* - We do not support dir=auto yet. - /css/css-text/white-space/tab-bidi-001.html - Servo doesn't support tab stops - /css/CSS2/positioning/abspos-block-level-001.html /css/css-text/word-break/word-break-normal-ar-000.html - Do not yet support RTL layout in block - /css/css-text/white-space/pre-wrap-018.html - Even in RTL contexts, spaces at the end of the line must hang and not be reordered - /css/css-text/white-space/trailing-space-and-text-alignment-rtl-002.html - We are letting spaces hang with white-space: pre, but they shouldn't hang. ``` Signed-off-by: Martin Robinson <mrobinson@igalia.com> Co-authored-by: Rakhi Sharma <atbrakhi@igalia.com>
* Fix floating point errors in table layout (#33098)Simon Wülker2024-08-211-2/+30
| | | Signed-off-by: Simon Wülker <simon.wuelker@arcor.de>
* Take into account the intrinsic block size when computing the main size of a ↵Oriol Brufau2024-08-202-115/+179
| | | | | | | | | | | | | | | column flex container (#33135) In particular, `main_content_sizes()` now works with columns. `layout_for_block_content_size()` is now used for both intrinsic sizes and intrinsic contributions, a IntrinsicSizingMode parameter is added to choose the behavior. Also, we consider the main size of a flex item as indefinite if its flex basis is indefinite and the flex container has an indefinite main size. Signed-off-by: Oriol Brufau <obrufau@igalia.com> Co-authored-by: Martin Robinson <mrobinson@igalia.com>
* layout: Layout for column flex-basis and minimum automatic size ↵Martin Robinson2024-08-194-285/+421
| | | | | | | | | | | determination (#33068) This change adds an expensive layout for the determination of minimum automatic size and flex basis in process of flexbox layout. Currently, the layout is not cached, so may be performed up to 2 more times than necessary. Signed-off-by: Martin Robinson <mrobinson@igalia.com> Co-authored-by: Oriol Brufau <obrufau@igalia.com>
* layout: Prepare for bidi by guarding all access to `writing-mode` (#33082)Martin Robinson2024-08-1614-88/+129
| | | | | | | | | We want to selectively enable right-to-left writing modes per layout context. This change makes that possible by allowing access to `writing-mode` though an interface that always returns the default horizontal top-to-bottom (implicitly left-to-right) writing mode. Signed-off-by: Martin Robinson <mrobinson@igalia.com> Co-authored-by: Rakhi Sharma <atbrakhi@igalia.com>
* Update stylo for latest changes. (#33079)Josh Matthews2024-08-161-1/+1
| | | Signed-off-by: Josh Matthews <josh@joshmatthews.net>
* Remove lazy static (#33078)Hayashi Mikihiro2024-08-162-5/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * remove from rand Mutex<OsRng> can be initialized in compile time. Signed-off-by: Hayashi Mikihiro <34ttrweoewiwe28@gmail.com> * remove from layout_2020 Mutex<()> can be initialize in compile time Signed-off-by: Hayashi Mikihiro <34ttrweoewiwe28@gmail.com> * remove from media `IS_MULTIPROCESS` doesn't be used. Signed-off-by: Hayashi Mikihiro <34ttrweoewiwe28@gmail.com> * remove lazy_static from dependencies Signed-off-by: Hayashi Mikihiro <34ttrweoewiwe28@gmail.com> * rewrite suppressed_leaks_for_asan.txt For all of lazy_static was replaced with LazyLock. Signed-off-by: Hayashi Mikihiro <34ttrweoewiwe28@gmail.com> --------- Signed-off-by: Hayashi Mikihiro <34ttrweoewiwe28@gmail.com>
* layout: Support `start` and `end` values for flexbox `align-self` (#33032)Martin Robinson2024-08-151-9/+20
| | | | | | | These are similar to `flex-start` and `flex-end`, but in `wrap-reverse` situations, they are the opposite. Signed-off-by: Martin Robinson <mrobinson@igalia.com> Co-authored-by: Oriol Brufau <obrufau@igalia.com>
* layout: Initial implementation of `flex-direction: column` and ↵Martin Robinson2024-08-146-281/+322
| | | | | | | | | | | | | | | | | | | | | | `column-reverse` (#33031) This change removes restrictions on using the column layout mode of flexbox and adds an initial implementation of sizing for that flex direction. There's a lot of missing pieces still, but in some cases this does render column flexbox. In particular, there are now two code paths for preferred widths (intrinsic size) calcuation: one in the main axis (row) and one in the cross axis (column) corresponding to the flex direciton with horizontal writing modes. In addition, `FlexItemBox::inline_content_sizes` is removed in favor of making `sizing::outer_inline` / `IndependentFormattingContext::outer_inline_content_sizes` generic enough to handle using a different value for auto minimum sizes, which flexbox needs. Signed-off-by: Martin Robinson <mrobinson@igalia.com> Co-authored-by: Oriol Brufau <obrufau@igalia.com>
* layout: Convert the FragmentTree to physical geometry (#33030)Martin Robinson2024-08-1417-432/+502
| | | | | | | | | | | | | | | | This converts all geometry in the FragmentTree into physical geometry, doing conversions ahead of time instead of when traversing the fragment tree. This is necessary to properly implement BiDi in Servo as we need to know what side borders are on in mixed RTL and LTR contexts. In addition, fragments are laid out in a particular context and only that context knows its writing mode. There were issues where were using one writing mode to lay out and another to convert to phyisical coordinates. This isn't an issue now since we only use the default writing mode, but starts to be an issue with BiDi text. Closes #25564. Signed-off-by: Martin Robinson <mrobinson@igalia.com>
* Properly handle subpixel units when dividing space between flex lines (#32913)Martin Robinson2024-08-131-182/+202
| | | | Signed-off-by: Martin Robinson <mrobinson@igalia.com> Co-authored-by: Oriol Brufau <obrufau@igalia.com>