Commit graph

952 commits

Author SHA1 Message Date
Oriol Brufau
fdbfecf7dd
Upgrade Stylo to 2025-02-03 (#35289)
* Upgrade Stylo to 2025-02-03

Signed-off-by: Oriol Brufau <obrufau@igalia.com>

* Fixup for https://phabricator.services.mozilla.com/D233218

Signed-off-by: Oriol Brufau <obrufau@igalia.com>

* Fixup for https://phabricator.services.mozilla.com/D233758

Signed-off-by: Oriol Brufau <obrufau@igalia.com>

* Fixup for https://phabricator.services.mozilla.com/D231255

Signed-off-by: Oriol Brufau <obrufau@igalia.com>

* Update test expectations

Signed-off-by: Oriol Brufau <obrufau@igalia.com>

---------

Signed-off-by: Oriol Brufau <obrufau@igalia.com>
2025-02-05 02:35:58 +00:00
Oriol Brufau
e2bb772669
layout: Limit content_inline_size_for_table override to collapsed columns (#35209)
A box is usually sized by the formatting context in which it participates.
However, tables have some special sizing behaviors that we implemented
with a `content_inline_size_for_table` override.

However, breaking the assumptions of the formatting context isn't great.
It was also bad for performance that we could try to layout a table
among floats even though it wouldn't en up fitting because of a larger
min-content size.

Therefore, this changes the logic so that formatting contexts use some
special sizing for tables, and then tables only override that amount
when there are collapsed columns. Eventually, we should try to remove
that case too, see https://github.com/w3c/csswg-drafts/issues/11408

Signed-off-by: Oriol Brufau <obrufau@igalia.com>
2025-02-05 00:35:59 +00:00
Oriol Brufau
88d01f6303
layout: Implement default overflow alignment for abspos (#35208)
According to https://drafts.csswg.org/css-align/#auto-safety-position

Signed-off-by: Oriol Brufau <obrufau@igalia.com>
2025-02-04 22:28:44 +00:00
Oriol Brufau
27c40fcd29
layout: Don't let table grid boxes inherit display: inline-table (#35264)
The outer display type of a table element applies to the table wrapper
box. The table grid box needs to be block-level as defined in
https://drafts.csswg.org/css-tables/#table-grid-box

Therefore this sets `display: table` on table grid boxes, and then when
painting collapsed table borders we can use the usual logic to compute
the StackingContextSection.

Signed-off-by: Oriol Brufau <obrufau@igalia.com>
2025-02-03 17:11:49 +00:00
Oriol Brufau
7301af8468
layout: Fix painting order of collapsed table borders (#35219)
In #35075 I painted them in front of the decorations (backgrounds and
borders) of any block-level box in the same stacking context. I did that
because other browsers paint them in front of the decorations of the
descendants of the table, but my approach also painted them in front of
decorations of following siblings of the table, which was wrong.

This patch makes it so that collapsed table orders are painted in the
same step as decorations. However, tables defer painting their collapsed
borders after the decorations of their descendants.

This matches Blink and WebKit, and brings us closer to Gecko (which is
slightly different in some corner cases).

Signed-off-by: Oriol Brufau <obrufau@igalia.com>
2025-02-03 14:46:40 +00:00
TIN TUN AUNG
2030b7affd
layout: align-content with default value normal should behave as strech in flex container (#35178)
Signed-off-by: rayguo17 <rayguo17@gmail.com>
2025-02-03 08:27:55 +00:00
Simon Wülker
6a2e37183c
Lay out the contents of slot elements (#35220)
* Make Slottable match layout/alignment of NonNull<Node>

Signed-off-by: Simon Wülker <simon.wuelker@arcor.de>

* Implement ServoLayoutElement::slotted_nodes

Signed-off-by: Simon Wülker <simon.wuelker@arcor.de>

* Bump mozjs

Signed-off-by: Simon Wülker <simon.wuelker@arcor.de>

* Layout the contents of slot elements

Signed-off-by: Simon Wülker <simon.wuelker@arcor.de>

* Implement ServoLayoutElement::assigned_slot

Signed-off-by: Simon Wülker <simon.wuelker@arcor.de>

* implement ServoLayoutElement::traversal_parent

Signed-off-by: Simon Wülker <simon.wuelker@arcor.de>

* Simplify slottable name update

Signed-off-by: Simon Wülker <simon.wuelker@arcor.de>

* Don't iterate over children of shadow hosts

Signed-off-by: Simon Wülker <simon.wuelker@arcor.de>

* Recompute slot style when contents change

Signed-off-by: Simon Wülker <simon.wuelker@arcor.de>

* Change match_slottable to a function instead of a macro

Signed-off-by: Simon Wülker <simon.wuelker@arcor.de>

* Fix crown errors

Signed-off-by: Simon Wülker <simon.wuelker@arcor.de>

* Update WPT expectations

Signed-off-by: Simon Wülker <simon.wuelker@arcor.de>

* Reset a slottable's assigned slot when it's removed from the slot

Signed-off-by: Simon Wülker <simon.wuelker@arcor.de>

---------

Signed-off-by: Simon Wülker <simon.wuelker@arcor.de>
2025-02-02 20:49:42 +00:00
Oriol Brufau
3122de08f3
Let resolve_color() take its parameter by reference (#35247)
Bumps Stylo to https://github.com/servo/stylo/pull/116

This way the callers don't have to clone it if they don't have ownership
or want to use the value later.

Signed-off-by: Oriol Brufau <obrufau@igalia.com>
2025-01-31 23:34:40 +00:00
Oriol Brufau
bc7cdab46f
layout: Remove wrong optimization when placing table among floats (#35207)
When we try to place a table next to some floats, and it doesn't fit
vertically, then we try again considering more floats. And as an
optimization we were using the previous width of the table as a minimum.
However, this was wrong, because the table might accept a smaller width
when the available space is smaller than beforehand.

Signed-off-by: Oriol Brufau <obrufau@igalia.com>
2025-01-29 15:54:52 +00:00
Oriol Brufau
7977357a57
layout: Zero out collapsed track sizes when painting collapsed borders (#35165)
We were painting collapsed borders without taking into account that some
tracks might have been "removed" by `visibility: collapse`.

This just sets the sizes of these tracks to zero. Note this implies that
collapsed borders may overlap each other, or overlap cell contents, but
this seems to match Blink.

Signed-off-by: Oriol Brufau <obrufau@igalia.com>
2025-01-27 20:40:26 +00:00
Oriol Brufau
38847d4991
layout: Correctly resolve currentcolor on collapsed borders (#35163)
If a collapsed border has the `currentcolor` color, we were resolving it
using the color of the table. Now we resolve it using the color of the
box which owns the border that wins and becomes the collapsed border.

Signed-off-by: Oriol Brufau <obrufau@igalia.com>
2025-01-27 19:58:18 +00:00
Martin Robinson
6b04bc6263
layout: Take percentage columns into account when sizing table grid min and max (#35167)
The specification doesn't say how to deal with percentages when
determining the minimum and maximum size of a table grid, so follow the
approach that Chromium uses.

Essentially, figure out the "missing" percentage from the non-percentage
columns and then use that to work backwards to fine the size of the
percentage ones.

This change is larger than one might expect, because this percentage
approach shouldn't happen for tables that are descendants of a flex,
grid or table container (except when there is an interceding absolute).
We have to pass this information down when building the box tree. This
will also make it easier to improve propagated text decorations in the
future.

Signed-off-by: Martin Robinson <mrobinson@igalia.com>
Co-authored-by: Oriol Brufau <obrufau@igalia.com>
2025-01-27 15:04:37 +00:00
Oriol Brufau
d5fcc5a5d5
layout: Improve fixed table layout (#35170)
If `width` is indefinite, treat the outer size as zero, instead of
treating the content size as zero and then adding padding and borders.

Also, we don't want a default minimum of zero to get added padding and
borders, and then defeat the point baove. So just ignore minimums and
maximums.

That seems to roughly match what other browsers do, but as usual, the
details are not interoperable, e.g. some browsers may obey min or max
sizing properties in some cases.

Signed-off-by: Oriol Brufau <obrufau@igalia.com>
2025-01-27 15:02:32 +00:00
Martin Robinson
37695c8c8c
script: Do not set up an IPC route for every image load (#35041)
Instead of setting up a route for every image load in the DOM / Layout,
route all incoming image cache responses through the `ScriptThread`.
This avoids creating a set of file descriptor for every image that is
loaded.

This change requires having the `ImageCache` track the `PipelineId` of
the original the listener so that the `ScriptThread` can route it
properly to the correct `Window`.

Signed-off-by: Martin Robinson <mrobinson@igalia.com>
2025-01-25 09:39:04 +00:00
Oriol Brufau
fea8b68860
layout: Remove min and max container sizes from FlexContext (#35144)
Thanks to #34946 we don't have to recompute the min and max sizes, we
can get them from the `ContainingBlock`.

And then in `FlexContext` there is no need to store both the definite
and the min & max sizes of the container`, we can instead make do with
a single `FlexRelativeVec2<SizeConstraint>`.

This removes 1 of the 3 usages of `ContentBoxSizesAndPBMDeprecated`,
which is also good.

Signed-off-by: Oriol Brufau <obrufau@igalia.com>
2025-01-24 16:11:23 +00:00
Oriol Brufau
5e5379d3bf
layout: Hide collapsed borders crossed by spanning cells (#35129)
For example, a cell with `rowspan="2"` can cross a collapsed border that
was set on the rows. Now the slice of this row border that is crossed
by the cell will be hidden.

Signed-off-by: Oriol Brufau <obrufau@igalia.com>
2025-01-23 14:23:03 +00:00
Oriol Brufau
aa54a0b1a6
layout: simplify CollapsedBorderLine (#35125)
This used to be a struct that had a list of `CollapsedBorder`s, and the
maximum border width among that list.

However, this cached maximum border width was only used when resolving
the borders of the table. Therefore, for all grid lines except the first
and last ones per axis, this data was useless.

Also, in order to address #35123 I plan to retroactively zero out some
collapsed borders, which could invalidate this cache.

So this patch just removes the field and turns `CollapsedBorderLine`
into an alias of `Vec<CollapsedBorder>`.

Signed-off-by: Oriol Brufau <obrufau@igalia.com>
2025-01-23 12:38:24 +00:00
Oriol Brufau
8740c03682
layout: Fix table geometry when collapsed borders have different sizes (#35122)
Even though when painting the collapsed borders we were using the right
size, when sizing the table we were treating cells as having a border
of half the maximum border size along the entire grid line.

Now we only take the maximum among the borders adjacent to the cell.

Signed-off-by: Oriol Brufau <obrufau@igalia.com>
2025-01-23 11:17:06 +00:00
Oriol Brufau
2ee25e344d
layout: Proper check for BoxFragment generated by a table wrapper box (#35136)
We were just checking the computed `display` style, but a few HTML
elements can ignore some `display` values and generate a different
kind of box.

This uses the right check, though for now there is no difference in
behavior since we don't have special HTML layouts.

Signed-off-by: Oriol Brufau <obrufau@igalia.com>
2025-01-22 20:36:41 +00:00
Martin Robinson
102b77aef8
Make naming of variables consistent with SpecificLayoutInfo (#35104)
This is a followup to #34926.

Fixes #35078.

Signed-off-by: Martin Robinson <mrobinson@igalia.com>
2025-01-21 17:28:14 +00:00
Oriol Brufau
a54add0159
layout: Fix border widths of table wrapper with collapsed borders (#35097)
For a table wrapper in collapsed-borders mode we were just halving the
border widths from the computed style. However, it needs to actually
receive half of the resulting collapsed border, which can be bigger.

Signed-off-by: Oriol Brufau <obrufau@igalia.com>
2025-01-21 15:14:17 +00:00
Oriol Brufau
acfd2e6de4
layout: Fix conflict resolution for collapsed borders differing in color (#35100)
https://www.w3.org/TR/CSS21/tables.html#border-conflict-resolution
> If border styles differ only in color, then a style set on a cell wins
> over one on a row, which wins over a row group, column, column group
> and, lastly, table.

We were actually using the opposite order.

Signed-off-by: Oriol Brufau <obrufau@igalia.com>
2025-01-21 14:34:05 +00:00
Martin Robinson
c17668bb0e
layout: Improve distribution colspan cell inline size (#35095)
We previously tried to implement the [table specification algorithm] for
distributing the inline size of cells with `rowspan` > 1. This algorithm
isn't great though, so this change starts switching Servo to using an
algorithm like the one used in LayoutNG from blink. This leads to
improvements in test results.

Limitations:
 - Currently, non-fixed layout mode is handled, but a followup change will
   very likely addressed fixed mode tables.
 - Column merging is not handled at all.

Fixes #6578.

Signed-off-by: Martin Robinson <mrobinson@igalia.com>
Co-authored-by: Oriol Brufau <obrufau@igalia.com>
2025-01-21 13:29:55 +00:00
Oriol Brufau
d00d76c1e8
layout: Paint collapsed table borders on their own (#35075)
We were previously splitting collapsed borders into two halves, and then
paint each one as part of the corresponding cell. This looked wrong when
the border style wasn't solid, or when a cell spanned multiple tracks
and the border wasn't the same for all of them.

Now the borders of a table wrapper, table grid or table cell aren't
painted in collapsed borders mode. Instead, the resulting collapsed
borders are painted on their own.

Signed-off-by: Oriol Brufau <obrufau@igalia.com>
2025-01-21 13:10:27 +00:00
Oriol Brufau
9b388da9cb
layout: Fix clientWidth & friends for tables (#35096)
`clientWidth` shouldn't include the borders of a box. The problem was
that we pretend that table wrapper boxes have the border specified on
the table element, even though this border actually applies to the
table grid box instead of the table wrapper box.

Therefore, `clientWidth` was wrong when it subtracted the borders.
This patch fixes it.

Signed-off-by: Oriol Brufau <obrufau@igalia.com>
2025-01-20 17:18:20 +00:00
Oriol Brufau
f6c166533e
layout: Respect alignment when sizing replaced abspos (#35085)
If an absolutely position element which is replaced has `justify-self`
or `align-self` set to `stretch`, and no inset is `auto` on that axis,
then an automatic size should behave as `stretch`, not as `fit-content`.

Signed-off-by: Oriol Brufau <obrufau@igalia.com>
2025-01-20 13:25:00 +00:00
Oriol Brufau
f57ceeb3b4
layout: Remove some unneeded is_table parameters (#35064)
We can just check the `LayoutStyle` instead.

Signed-off-by: Oriol Brufau <obrufau@igalia.com>
2025-01-19 00:25:53 +00:00
Martin Robinson
17b70c5178
layout: Make table column constraint distribution more generic (#35042)
This will be useful for distributing colspan constraints to their
columns

Signed-off-by: Martin Robinson <mrobinson@igalia.com>
Co-authored-by: Oriol Brufau <obrufau@igalia.com>
2025-01-18 14:54:38 +00:00
Oriol Brufau
60dc3b26fb
layout: Allow layouts to customize their used style (#35012)
Some layouts like table need some style overrides. We were handling this
in `ComputedValuesExt`, but it was messy, unreliable and too limited.

For example, we were assuming that a style with `display: table` would
belong to a table wrapper box or table grid box. However, certain HTML
elements can ignore their `display` value and generate a different kind
of box. I think we aren't doing that yet, but we will need this.

Also, resolving the used border of a table needs layout information,
which we don't have in `ComputedValuesExt`. This patch will allow to
improve border collapsing in a follow-up.

Signed-off-by: Oriol Brufau <obrufau@igalia.com>
2025-01-16 16:54:47 +00:00
Oriol Brufau
d58aa7fc04
layout: Allow different collapsed border style/color within a row/column (#35003)
We were previously using the same style and color for two collapsed
borders sharing a coordinate. Now such a line of collapsed borders can
be piecewise and have different colors and styles.

This still doesn't add support for piecewise border widths.

Also, since we are currently painting borders as part of the table and
cell boxes, and a box side can't have a piecewise border, this patch
only really works when:
 - There aren't spanning cells
 - The table has no assigned border (only the cells and tracks have it)

Signed-off-by: Oriol Brufau <obrufau@igalia.com>
2025-01-16 11:24:00 +00:00
TIN TUN AUNG
cbea70d1a0
layout: Make non-normal align-content establish a block formatting context (#34984)
* Make non-normal align-content establish a block formatting context

Signed-off-by: rayguo17 <rayguo17@gmail.com>

* Adjust code comment

Signed-off-by: Martin Robinson <mrobinson@igalia.com>

---------

Signed-off-by: rayguo17 <rayguo17@gmail.com>
Signed-off-by: Martin Robinson <mrobinson@igalia.com>
Co-authored-by: Martin Robinson <mrobinson@igalia.com>
2025-01-15 16:46:37 +00:00
Martin Robinson
e81951a973
layout: Remove the obsolete layout tracing functionality (#35001)
There were two kinds of layout tracing controlled by the same debugging
option:

 - modern layout: Functionality that dumped a JSON serialization of the
   layout tree before and after layout.
 - legacy layout: A scope based tracing that reported the process of
   layout in a structured way.

I don't think anyone working on layout is using either of these two
features. For modern layout requiring data structure to implement
`serde` serialization is incredibly inconvenient and also generates a
lot of extra code.

We also have a more modern tracing functionality based on perfetto that
we have started to use for layout and IMO it's actually being used and
more robust.

Signed-off-by: Martin Robinson <mrobinson@igalia.com>
2025-01-15 13:24:14 +00:00
Oriol Brufau
4332c1e405
layout: Improve logic for block size of table (#34947)
The containing block for children already has the size coming from the
style and the rules of the parent formatting context, so no need to try
to recompute it.

This allows removing a bunch of functions, and fixes some problems when
the table is a flex item.

Signed-off-by: Oriol Brufau <obrufau@igalia.com>
2025-01-13 11:50:25 +00:00
Oriol Brufau
f66cd172d6
layout: Generalize ContainingBlock's block size to a SizeConstraint (#34946)
It used to be an `AuOrAuto`, turning it into a `SizeConstraint` allows
passing the information about the min and max constraints when the
containing block doesn't have a definite block size.

This will be useful for table layout.

Note that in most cases we were already constructing the containing
block from a `SizeConstraint`, but we were calling `to_auto_or()` to
turn it into an `AuOrAuto`.

Signed-off-by: Oriol Brufau <obrufau@igalia.com>
2025-01-13 10:25:33 +00:00
Martin Robinson
de780dcde4
layout: Make Fragment hold ArcRefCell inside (#34923)
Push the interior mutability into enum variants of `Fragment`, so that
they can be cloned. This saves memory in the `Fragment` tree as the
`Fragment` enum is now a relatively wee 16 bytes and the interior parts
can be a variety of sizes. Before, every `Fragment` was the size of the
biggest kind (`BoxFragment` - 248 bytes).

This a step on the way toward incremental layout.

Signed-off-by: Martin Robinson <mrobinson@igalia.com>
Co-authored-by: Oriol Brufau <obrufau@igalia.com>
2025-01-13 09:59:59 +00:00
Oriol Brufau
e2be55b873
layout: Improve painting of collapsed borders in table layout (#34933)
This is still not the right approach, because we are not painting
collapsed borders as a single thing. Instead, we are splitting them
into two halves and paint each half on a different cell. This only
looks good for solid borders.

Signed-off-by: Oriol Brufau <obrufau@igalia.com>
2025-01-11 00:38:31 +00:00
Oriol Brufau
25a94efcdf
layout: Improve sizing of tables in collapsed-borders mode (#34932)
Signed-off-by: Oriol Brufau <obrufau@igalia.com>
2025-01-10 23:22:32 +00:00
Oriol Brufau
5f168dd1d5
layout: Don't recalculate the PaddingBorderMargin in table layout (#34931)
Just use the cached `TableLayout::pbm`. Also, `TableLayout::pbm` is now
computed with the right writing mode, but no change in practice since
we don't support vertical writing modes.

Signed-off-by: Oriol Brufau <obrufau@igalia.com>
2025-01-10 15:58:23 +00:00
Steven Novaryo
bbb255d81c
layout: grid-template getComputedStyle cleanup (#34926)
* Update Taffy and WPT expectations

Signed-off-by: stevennovaryo <steven.novaryo@gmail.com>

* Rename DetailedInfo to SpecificInfo

Signed-off-by: stevennovaryo <steven.novaryo@gmail.com>

* Run fmt

Signed-off-by: stevennovaryo <steven.novaryo@gmail.com>

---------

Signed-off-by: stevennovaryo <steven.novaryo@gmail.com>
2025-01-10 09:04:49 +00:00
Oriol Brufau
4f8dcfe6f9
layout: Set padding to zero on tables in collapsed-borders mode (#34908)
https://drafts.csswg.org/css2/#collapsing-borders
> in this model, a table does not have padding

https://drafts.csswg.org/css-tables/#collapsed-style-overrides
> The padding of the table-root is ignored (as if it was set to 0px).

Signed-off-by: Oriol Brufau <obrufau@igalia.com>
2025-01-09 14:06:26 +00:00
Oriol Brufau
b0d7eaf526
layout: Minor tweaks for table layout (#34921)
- Fix a typo in a comment.
 - Get the writing mode of the table in a less convoluted way.
 - Check `is_horizontal()` instead of `!is_vertical()`

Signed-off-by: Oriol Brufau <obrufau@igalia.com>
2025-01-09 13:26:03 +00:00
Steven Novaryo
76fa456a9a
layout: grid template getComputedStyle resolved value (#34885)
* Store taffy detailed info into fragment

Signed-off-by: stevennovaryo <steven.novaryo@gmail.com>

* Fix info propagation and resolved grid track query

Signed-off-by: stevennovaryo <steven.novaryo@gmail.com>

* Fix import

Signed-off-by: stevennovaryo <steven.novaryo@gmail.com>

* Fix tracklist matching logic and type optimization

Signed-off-by: stevennovaryo <steven.novaryo@gmail.com>

* Run fmt

Signed-off-by: stevennovaryo <steven.novaryo@gmail.com>

* Update wpt expectations

Signed-off-by: stevennovaryo <steven.novaryo@gmail.com>

* Optimizing info propagation and minor qol

Signed-off-by: stevennovaryo <steven.novaryo@gmail.com>

* Run fmt

Signed-off-by: stevennovaryo <steven.novaryo@gmail.com>

---------

Signed-off-by: stevennovaryo <steven.novaryo@gmail.com>
2025-01-09 10:49:27 +00:00
Oriol Brufau
ceec1759f6
layout: Defer some table sizing logic to the parent formatting context (#34889)
A box is usually sized by the formatting context in which it participates.
However, tables have some special sizing behaviors, and these were in
conflict.

Instead of letting tables attempting to re-resolve their inline table,
which failed to e.g. take flex properties into account or resolve sizing
keywords correctly, now tables will trust the inline size determined by
the parent. They will only floor it by the min-content size, and maybe
shrink the final size due to collapsed columns.

Signed-off-by: Oriol Brufau <obrufau@igalia.com>
2025-01-09 00:25:58 +00:00
Oriol Brufau
02c10fc502
layout: Refine the check for dependending on available space (#34907)
When laying out a block-level box that avoids floats, if we know that
its size doesn't depend on the available space, we can take a fast path
and only lay it out once. If its size depends on the available space,
we may have to lay it out multiple times, which can be slower.

This patch improves the check for this dependency on the available space.
For example, `min-width: 200px; width: 100px; max-width: stretch` was
previously considered to depend on the available space because of
`max-width`. However, `max-width` is irrelevant when the min size is
greater than the preferred size.

Signed-off-by: Oriol Brufau <obrufau@igalia.com>
2025-01-08 18:22:01 +00:00
Oriol Brufau
79322a3138
layout: Remove wrong FIXME (#34895)
There is an early return for independent formatting contexts, so at this
point we don't need to handle them.

Signed-off-by: Oriol Brufau <obrufau@igalia.com>
2025-01-08 14:51:57 +00:00
Oriol Brufau
abdfcacae8
layout: Don't use content_inline_size_for_table in taffy (#34891)
`content_inline_size_for_table` is an override for table layout.
We only use taffy for grid layout, not for table layout.

Signed-off-by: Oriol Brufau <obrufau@igalia.com>
2025-01-08 14:51:14 +00:00
Oriol Brufau
d24b3e2035
layout: Assert that GRIDMIN <= GRIDMAX (#34892)
In the past this didn't hold, so we had to floor GRIDMAX by GRIDMIN.
We must have fixed some bugs because now it's fine to just assert it.

Signed-off-by: Oriol Brufau <obrufau@igalia.com>
2025-01-08 13:00:30 +00:00
Oriol Brufau
1c321a17ac
Treat % as 0 for the min-content contribution of replaced elements (#32103)
`width` and `max-width` typically treat expressions with percentages as
their initial value, but for the min-content contribution of replaced
elements, they should instead be treated as zero.

https://drafts.csswg.org/css-sizing-3/#replaced-percentage-min-contribution

Signed-off-by: Oriol Brufau <obrufau@igalia.com>
2025-01-06 14:43:30 +00:00
Martin Robinson
621ddd749c
Elide lifetimes where possible after rustup (#34824)
The new version of rust allows us to elide some lifetimes and clippy is
now complaining about this. This change elides them where possible and
removes the clippy exceptions.

Fixes #34804.

Signed-off-by: Martin Robinson <mrobinson@igalia.com>
2025-01-03 18:54:44 +00:00
Nico Burns
deb819f233
Upgrade rustc to 1.83 (#34793)
* Upgrade rustc to 1.83

Signed-off-by: Nico Burns <nico@nicoburns.com>

* Fix crown (change copied from linked clippy function)

Signed-off-by: Nico Burns <nico@nicoburns.com>

* Fix named lifetime lint

Signed-off-by: Nico Burns <nico@nicoburns.com>

* Bump shell.nix

Signed-off-by: Nico Burns <nico@nicoburns.com>

* Fix non-local impl warnings

Signed-off-by: Nico Burns <nico@nicoburns.com>

* Format with 1.83 formatting changes

Signed-off-by: Nico Burns <nico@nicoburns.com>

* Fix manual non-local impl

Signed-off-by: Nico Burns <nico@nicoburns.com>

* More fixes for crown

Signed-off-by: Nico Burns <nico@nicoburns.com>

* Fix tidy

Signed-off-by: Nico Burns <nico@nicoburns.com>

* Fix needless_return lints

Signed-off-by: Nico Burns <nico@nicoburns.com>

* Fix doc comment lint

Signed-off-by: Nico Burns <nico@nicoburns.com>

* Fix missing wait lint

Signed-off-by: Nico Burns <nico@nicoburns.com>

* Allow needless_lifetimes lint

Signed-off-by: Nico Burns <nico@nicoburns.com>

* more doc comments

Signed-off-by: Nico Burns <nico@nicoburns.com>

* More needless_returns

Signed-off-by: Nico Burns <nico@nicoburns.com>

* is_empty lint

Signed-off-by: Nico Burns <nico@nicoburns.com>

* Fix needless_lifetime lints

Signed-off-by: Nico Burns <nico@nicoburns.com>

* fix div_ceil lint

Signed-off-by: Nico Burns <nico@nicoburns.com>

* Allow non-minimal bool

Signed-off-by: Nico Burns <nico@nicoburns.com>

* Non-local impl in constellation

Signed-off-by: Nico Burns <nico@nicoburns.com>

* Missing wait in constellation

Signed-off-by: Nico Burns <nico@nicoburns.com>

* fmt

Signed-off-by: Nico Burns <nico@nicoburns.com>

* remove useless lints table

Signed-off-by: Nico Burns <nico@nicoburns.com>

* Fixup comments

Signed-off-by: Nico Burns <nico@nicoburns.com>

* Allow non-local definition in sandboxing code to simplify feature flagging

Signed-off-by: Nico Burns <nico@nicoburns.com>

* Remove wait calls and allow zombie_processes lint

Signed-off-by: Nico Burns <nico@nicoburns.com>

---------

Signed-off-by: Nico Burns <nico@nicoburns.com>
2025-01-01 09:38:28 +00:00