Martin Robinson
d68c7e7881
layout: Implement computation of table column widths ( #31165 )
...
* layout: Implement computation of table column widths
This change implements the various steps of table column width
computation, ignoring features that don't exist yet (such as separated
borders, column elements, and colgroups).
Co-authored-by: Oriol Brufau <obrufau@igalia.com>
* Fix an issue with the assignment of column percent width
* Respond to review comments
---------
Co-authored-by: Oriol Brufau <obrufau@igalia.com>
2024-01-25 23:13:13 +00:00
Oriol Brufau
50f56affe3
Lint layout_2020 with clippy ( #31169 )
...
cargo clippy --fix -p layout_2020 --allow-dirty --broken-code
2024-01-25 09:03:31 +00:00
atbrakhi
45af1198aa
Layout: use Au
in ContentSizes
( #31135 )
...
* use app_units
* resolve errors in table layout
* fmt
* add back current_line.min_content
* update expectation
* review fix
2024-01-23 10:18:39 +00:00
Martin Robinson
5c1723c983
rustdoc: Fix many rustdoc errors ( #31147 )
...
This fixes many rustdoc errors that occur due to raw URLs in rustdoc
comments as well as unescaped Rust code that should be in backticks.
2024-01-22 13:13:48 +00:00
Samson
aad2dccc9c
Strict import formatting (grouping and granularity) ( #30325 )
...
* strict imports formatting
* Reformat all imports
2023-09-11 19:16:54 +00:00
Samson
711dbbd4af
remove extern crate
( #30311 )
...
* remove extern crate
* Update components/script_plugins/lib.rs
Co-authored-by: Martin Robinson <mrobinson@igalia.com>
---------
Co-authored-by: Martin Robinson <mrobinson@igalia.com>
2023-09-08 12:11:31 +00:00
Oriol Brufau
c264993da8
Resolve cyclic margin and padding percentages against zero ( #30085 )
...
From https://drafts.csswg.org/css-sizing-3/#min-percentage-contribution
> For the min size properties, as well as for margins and paddings
> (and gutters), a cyclic percentage is resolved against zero
> for determining intrinsic size contributions.
2023-08-10 11:38:44 +00:00
Oriol Brufau
4ec6dd1783
Handle floats in BlockContainer::inline_content_sizes
...
Typically, block-level contents are stacked vertically, so this was just
taking the maximum size among all contents. However, floats can be
stacked horizontally, so we need to sum their sizes.
2023-06-19 16:02:35 +02:00
Simon Sapin
42e9d2450e
Parallelize BlockContainer::inline_content_sizes
2020-06-19 15:38:15 +02:00
Anthony Ramine
235df94f2e
Compute content sizes lazily in layout 2020
2020-06-18 14:11:02 +02:00
Anthony Ramine
07d8c28d4a
Make outer_inline and outer_inline_and_percentages free functions
...
They now take a closure that will compute the content sizes on demand.
2020-06-15 18:09:15 +02:00
Simon Sapin
08f008a011
Use the writing mode of the containing block when accessing CSS properties
...
… and converting them to flow-relative geometric values.
These values are almost always used to size and position a fragment within its containing block, so using the mode of the containing block seems more correct.
Note that the `writing-mode` and `direction` properties are disabled in Servo at the moment, so this PR by itself should have no effect: the writing mode of an element is always the same of that of its containing block since they’re both horizontal rtl.
2020-06-10 09:03:18 +02:00
Simon Sapin
08801d94cd
Less cloning
2020-04-01 01:00:14 +02:00
Simon Sapin
c377d9c48e
Implement the box-sizing
property
2020-03-31 23:43:58 +02:00
Fernando Jiménez Moreno
a042f85083
Dump box tree state into json files and display it on layout 2020 viewer
2020-02-21 11:11:00 +01:00
Emilio Cobos Álvarez
1754c832d8
layout_2020: Avoid decomposing mixed length / percentages in intrinsic sizing.
...
As that makes no sense in presence of min / max.
2020-02-12 02:43:23 +01:00
Emilio Cobos Álvarez
e227715aee
style: Miscellaneous Servo build fixes.
2020-02-12 02:43:23 +01:00
Emilio Cobos Álvarez
e885ccb7ae
layout-2020: build fixes.
2019-12-16 14:23:56 +01:00
Simon Sapin
999dd72895
Account for min/max-width in outer intrinsic sizing
2019-12-10 12:36:43 +01:00
Simon Sapin
dd9dfc66e3
Use a new BoxContentSizes
enum instead of Option<ContentSizes>
2019-12-04 15:36:05 +01:00
Simon Sapin
38e8fd1e99
Replace boolean parameters by a new ContentSizesRequest
enum
2019-12-04 15:10:11 +01:00
Simon Sapin
01034b10e1
Use Sides::inline_sum
method
2019-12-04 13:47:13 +01:00
Simon Sapin
77d2c45991
Fix incorrect variable name
...
This was not the specified value
2019-12-04 13:37:20 +01:00
Simon Sapin
46f0f7d7e2
Implement shrink-to-fit for abspos
2019-12-03 15:11:35 +01:00
Simon Sapin
c056e5b6b0
Finish plumbing intrinsic min/max-content through box construction
2019-12-03 15:11:35 +01:00
Simon Sapin
303b36f17b
Add content sizes computation for block containers
2019-12-03 15:11:35 +01:00
Simon Sapin
6a5b8337a1
Rename IntrinsicSizes to ContentSizes
2019-12-03 15:11:35 +01:00