layout: Add support for object-fit and object-position (#33479)

This also makes a couple small improvements:
 - Rename `IntrinsicSizes` to `NaturalSizes` which reflects more
   modern spec language.
 - Move the conversion of Stylo's `ImageRendering` to WebRender's
   version to a `ToWebRender` trait implementation.

Signed-off-by: Martin Robinson <mrobinson@igalia.com>
Co-authored-by: Oriol Brufau <obrufau@igalia.com>
This commit is contained in:
Martin Robinson 2024-09-18 08:20:28 +02:00 committed by GitHub
parent 632d832704
commit bd632fc814
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
58 changed files with 169 additions and 563 deletions

28
Cargo.lock generated
View file

@ -1308,7 +1308,7 @@ dependencies = [
[[package]]
name = "derive_common"
version = "0.0.1"
source = "git+https://github.com/servo/stylo?branch=2024-09-02#25daa6b91d77ced8498f0a729d311e4292328313"
source = "git+https://github.com/servo/stylo?branch=2024-09-02#1d95da7aec9de466cf0a16d832b6993dad4228fe"
dependencies = [
"darling",
"proc-macro2",
@ -1496,7 +1496,7 @@ dependencies = [
[[package]]
name = "dom"
version = "0.0.1"
source = "git+https://github.com/servo/stylo?branch=2024-09-02#25daa6b91d77ced8498f0a729d311e4292328313"
source = "git+https://github.com/servo/stylo?branch=2024-09-02#1d95da7aec9de466cf0a16d832b6993dad4228fe"
dependencies = [
"bitflags 2.6.0",
]
@ -4131,7 +4131,7 @@ dependencies = [
[[package]]
name = "malloc_size_of"
version = "0.0.1"
source = "git+https://github.com/servo/stylo?branch=2024-09-02#25daa6b91d77ced8498f0a729d311e4292328313"
source = "git+https://github.com/servo/stylo?branch=2024-09-02#1d95da7aec9de466cf0a16d832b6993dad4228fe"
dependencies = [
"accountable-refcell",
"app_units",
@ -5915,7 +5915,7 @@ dependencies = [
[[package]]
name = "selectors"
version = "0.24.0"
source = "git+https://github.com/servo/stylo?branch=2024-09-02#25daa6b91d77ced8498f0a729d311e4292328313"
source = "git+https://github.com/servo/stylo?branch=2024-09-02#1d95da7aec9de466cf0a16d832b6993dad4228fe"
dependencies = [
"bitflags 2.6.0",
"cssparser",
@ -6203,7 +6203,7 @@ dependencies = [
[[package]]
name = "servo_arc"
version = "0.2.0"
source = "git+https://github.com/servo/stylo?branch=2024-09-02#25daa6b91d77ced8498f0a729d311e4292328313"
source = "git+https://github.com/servo/stylo?branch=2024-09-02#1d95da7aec9de466cf0a16d832b6993dad4228fe"
dependencies = [
"serde",
"stable_deref_trait",
@ -6212,7 +6212,7 @@ dependencies = [
[[package]]
name = "servo_atoms"
version = "0.0.1"
source = "git+https://github.com/servo/stylo?branch=2024-09-02#25daa6b91d77ced8498f0a729d311e4292328313"
source = "git+https://github.com/servo/stylo?branch=2024-09-02#1d95da7aec9de466cf0a16d832b6993dad4228fe"
dependencies = [
"string_cache",
"string_cache_codegen",
@ -6430,7 +6430,7 @@ checksum = "38b58827f4464d87d377d175e90bf58eb00fd8716ff0a62f80356b5e61555d0d"
[[package]]
name = "size_of_test"
version = "0.0.1"
source = "git+https://github.com/servo/stylo?branch=2024-09-02#25daa6b91d77ced8498f0a729d311e4292328313"
source = "git+https://github.com/servo/stylo?branch=2024-09-02#1d95da7aec9de466cf0a16d832b6993dad4228fe"
dependencies = [
"static_assertions",
]
@ -6571,7 +6571,7 @@ checksum = "a2eb9349b6444b326872e140eb1cf5e7c522154d69e7a0ffb0fb81c06b37543f"
[[package]]
name = "static_prefs"
version = "0.1.0"
source = "git+https://github.com/servo/stylo?branch=2024-09-02#25daa6b91d77ced8498f0a729d311e4292328313"
source = "git+https://github.com/servo/stylo?branch=2024-09-02#1d95da7aec9de466cf0a16d832b6993dad4228fe"
[[package]]
name = "strck"
@ -6624,7 +6624,7 @@ dependencies = [
[[package]]
name = "style"
version = "0.0.1"
source = "git+https://github.com/servo/stylo?branch=2024-09-02#25daa6b91d77ced8498f0a729d311e4292328313"
source = "git+https://github.com/servo/stylo?branch=2024-09-02#1d95da7aec9de466cf0a16d832b6993dad4228fe"
dependencies = [
"app_units",
"arrayvec",
@ -6682,7 +6682,7 @@ dependencies = [
[[package]]
name = "style_config"
version = "0.0.1"
source = "git+https://github.com/servo/stylo?branch=2024-09-02#25daa6b91d77ced8498f0a729d311e4292328313"
source = "git+https://github.com/servo/stylo?branch=2024-09-02#1d95da7aec9de466cf0a16d832b6993dad4228fe"
dependencies = [
"lazy_static",
]
@ -6690,7 +6690,7 @@ dependencies = [
[[package]]
name = "style_derive"
version = "0.0.1"
source = "git+https://github.com/servo/stylo?branch=2024-09-02#25daa6b91d77ced8498f0a729d311e4292328313"
source = "git+https://github.com/servo/stylo?branch=2024-09-02#1d95da7aec9de466cf0a16d832b6993dad4228fe"
dependencies = [
"darling",
"derive_common",
@ -6721,7 +6721,7 @@ dependencies = [
[[package]]
name = "style_traits"
version = "0.0.1"
source = "git+https://github.com/servo/stylo?branch=2024-09-02#25daa6b91d77ced8498f0a729d311e4292328313"
source = "git+https://github.com/servo/stylo?branch=2024-09-02#1d95da7aec9de466cf0a16d832b6993dad4228fe"
dependencies = [
"app_units",
"bitflags 2.6.0",
@ -7088,7 +7088,7 @@ dependencies = [
[[package]]
name = "to_shmem"
version = "0.0.1"
source = "git+https://github.com/servo/stylo?branch=2024-09-02#25daa6b91d77ced8498f0a729d311e4292328313"
source = "git+https://github.com/servo/stylo?branch=2024-09-02#1d95da7aec9de466cf0a16d832b6993dad4228fe"
dependencies = [
"cssparser",
"servo_arc",
@ -7101,7 +7101,7 @@ dependencies = [
[[package]]
name = "to_shmem_derive"
version = "0.0.1"
source = "git+https://github.com/servo/stylo?branch=2024-09-02#25daa6b91d77ced8498f0a729d311e4292328313"
source = "git+https://github.com/servo/stylo?branch=2024-09-02#1d95da7aec9de466cf0a16d832b6993dad4228fe"
dependencies = [
"darling",
"derive_common",