aboutsummaryrefslogtreecommitdiffstats
path: root/components/layout
Commit message (Collapse)AuthorAgeFilesLines
* Use version of `markup5ever` with `web_atoms` crate (#36542)Nico Burns3 days1-1/+1
| | | | | | | | Upgrades `markup5ever` and fixes "unnecessary import" lints. See https://github.com/servo/html5ever/pull/599 And https://github.com/servo/stylo/pull/173 Signed-off-by: Nico Burns <nico@nicoburns.com>
* layout: Combine `layout_2020` and `layout_thread_2020` into a crate called ↵Martin Robinson3 days57-0/+35634
| | | | | | | | | | | | | | | | | | `layout` (#36613) Now that legacy layout has been removed, the name `layout_2020` doesn't make much sense any longer, also it's 2025 now for better or worse. The split between the "layout thread" and "layout" also doesn't make as much sense since layout doesn't run on it's own thread. There's a possibility that it will in the future, but that should be something that the user of the crate controls rather than layout iself. This is part of the larger layout interface cleanup and optimization that @Looriool and I are doing. Testing: Covered by existing tests as this is just code movement. Signed-off-by: Martin Robinson <mrobinson@igalia.com>
* Remove legacy layout (layout 2013) (#35943)Oriol Brufau2025-03-1342-31387/+0
| | | | | | We were already not compiling it and not running tests on it by default. So it's simpler to just completely remove it. Signed-off-by: Oriol Brufau <obrufau@igalia.com>
* canvas: Do not update ImageKey during canvas layout (#35719)Samson2025-03-122-11/+13
| | | Signed-off-by: sagudev <16504129+sagudev@users.noreply.github.com>
* Use new stylo crate renames (#35898)Nico Burns2025-03-122-2/+2
| | | Signed-off-by: Nico Burns <nico@nicoburns.com>
* Update rustfmt to the 2024 style edition (#35764)Simon Wülker2025-03-0316-45/+39
| | | | | | | | | | | | | * Use 2024 style edition Signed-off-by: Simon Wülker <simon.wuelker@arcor.de> * Reformat all code Signed-off-by: Simon Wülker <simon.wuelker@arcor.de> --------- Signed-off-by: Simon Wülker <simon.wuelker@arcor.de>
* fonts: Remove the per-FontGroup cached fallback font (#35705)Martin Robinson2025-02-281-5/+7
| | | | | | | | | | | | | | | | | | | Instead of keeping a per-FontGroup cache of the previously used fallback font, cache this value in the caller of `FontGroup::find_by_codepoint`. The problem with caching this value in the `FontGroup` is that it can make one layout different from the next. Still, it is important to cache the value somewhere so that, for instance, Chinese character don't have to continuously walk through the entire fallback list when laying out. The heuristic here is to try to last used font first if the `Script`s match. At the very least this should make one layout consistent with the next. Fixes #35704. Fixes #35697. Fixes #35689. Fixes #35679. Signed-off-by: Martin Robinson <mrobinson@igalia.com>
* clippy: Fix a couple clippy warnings on macOS (#35703)Martin Robinson2025-02-271-1/+1
| | | | | | The new version of rust has more checks trying to prevent mistakes around order of operations and shifts. Signed-off-by: Martin Robinson <mrobinson@igalia.com>
* layout: Implement overflow scroll support for different axes (#35414)Euclid Ye2025-02-143-14/+16
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * layout: Add AxesScrollSensitivity to enable control of scroll in axis Signed-off-by: Euclid Ye <yezhizhenjiakang@gmail.com> * layout_2013: Be compatible with AxesScrollSensitivity Signed-off-by: Euclid Ye <yezhizhenjiakang@gmail.com> * layout: update struct AxesScrollSensitivity to euclid::Vector2D Signed-off-by: Euclid Ye <yezhizhenjiakang@gmail.com> * display_list: implement From<Overflow> for ScrollSensitivity Signed-off-by: Euclid Ye <yezhizhenjiakang@gmail.com> * layout: simplify and reuse scroll related logic Signed-off-by: Euclid Ye <yezhizhenjiakang@gmail.com> * layout_2013: simplify and reuse scroll related logic Signed-off-by: Euclid Ye <yezhizhenjiakang@gmail.com> * layout, layout_2013: revert AxesScrollSensitivity to pair struct Signed-off-by: Euclid Ye <yezhizhenjiakang@gmail.com> * layout: Reimport ComputedOverflow as #35103 depends on it Signed-off-by: Euclid Ye <yezhizhenjiakang@gmail.com> * layout: Add AxesOverflow to replace PhysicalVec Signed-off-by: Euclid Ye <yezhizhenjiakang@gmail.com> * layout: implement scroll of viewport for different axes Signed-off-by: Euclid Ye <yezhizhenjiakang@gmail.com> * layout: explicitly handle overflow match Signed-off-by: Euclid Ye <yezhizhenjiakang@gmail.com> * Update components/shared/webrender/Cargo.toml Co-authored-by: Martin Robinson <mrobinson@igalia.com> Signed-off-by: Euclid Ye <yezhizhenjiakang@gmail.com> --------- Signed-off-by: Euclid Ye <yezhizhenjiakang@gmail.com> Co-authored-by: Martin Robinson <mrobinson@igalia.com>
* deps: Upgrade to `webrender@0.66` (#35325)Martin Robinson2025-02-071-0/+1
| | | | | | | | | In addition to some small API changes, this downstream version of WebRender no longer depends on a very old version of time. This is the last step toward removing the dependency on `time0.1`. The review for this commit should also include: https://github.com/servo/webrender/commit/9f552bebab81a73e62068c42d94be2f9c0586ce4 Signed-off-by: Martin Robinson <mrobinson@igalia.com>
* Upgrade Stylo to 2025-02-03 (#35289)Oriol Brufau2025-02-051-1/+4
| | | | | | | | | | | | | | | | | | | | | | | | | * 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>
* Let `resolve_color()` take its parameter by reference (#35247)Oriol Brufau2025-01-313-14/+11
| | | | | | | | 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>
* script: Do not set up an IPC route for every image load (#35041)Martin Robinson2025-01-252-3/+3
| | | | | | | | | | | | 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>
* layout: Remove the obsolete layout tracing functionality (#35001)Martin Robinson2025-01-1515-318/+6
| | | | | | | | | | | | | | | | | | | | 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>
* config: Remove legacy-layout and unused `Preferences` and `Opts` (#34994)Martin Robinson2025-01-145-267/+12
| | | | | | There are some preferences and options that are only used by legacy layout or not used at all. This PR removes them. Signed-off-by: Martin Robinson <mrobinson@igalia.com>
* Elide lifetimes where possible after rustup (#34824)Martin Robinson2025-01-0311-20/+20
| | | | | | | | | 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>
* script: Manage `<iframe>` sizes in `Window` (#34643)Martin Robinson2024-12-161-10/+18
| | | | | | | | Manage `<iframe>` size updates in `Window`. In addition to removing duplicated code, this will allow setting `<iframe>` sizes synchronously on child `Pipeline`s of the same origin in the script process in a followup change. The goal is remove flakiness from `<iframe>` sizing. Signed-off-by: Martin Robinson <mrobinson@igalia.com>
* Upgrade Stylo to 2024-12-04 (#34501)Oriol Brufau2024-12-066-72/+95
| | | | | | | | | | | | | | | | | * Upgrade Stylo to 2024-12-04 Signed-off-by: Oriol Brufau <obrufau@igalia.com> * Fixup for https://phabricator.services.mozilla.com/D229998 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>
* Use `webrender_api::units::DevicePixel` rather than ↵Nico Burns2024-11-251-2/+7
| | | | | | | | | | | | | | | `style_traits::DevicePixel` unless interfacing with Stylo (#34353) * Use webrender_api::units::DevicePixel rather than style_traits::DevicePixel unless interfacing with Stylo Signed-off-by: Nico Burns <nico@nicoburns.com> * Fix OpenHarmony build Signed-off-by: Nico Burns <nico@nicoburns.com> --------- Signed-off-by: Nico Burns <nico@nicoburns.com>
* Remove some unused dependencies (#34355)Jonathan Schwender2024-11-251-1/+0
| | | | | | | | | | | | | | | * Remove unused deps This doesn't seem to remove any deps from the workspace. Signed-off-by: Jonathan Schwender <schwenderjonathan@gmail.com> * ohos: Remove gaol dependency Signed-off-by: Jonathan Schwender <schwenderjonathan@gmail.com> --------- Signed-off-by: Jonathan Schwender <schwenderjonathan@gmail.com>
* Upgrade Stylo to 2024-11-01 (#34322)Oriol Brufau2024-11-211-4/+8
| | | | | | | | | | | | | | | | | * Upgrade Stylo to 2024-11-01 Signed-off-by: Oriol Brufau <obrufau@igalia.com> * Fixup for https://phabricator.services.mozilla.com/D224747 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>
* Plumb time profiler output into tracing (#34238)Delan Azabani2024-11-152-2/+7
| | | | | | | | | | | | | | | | | * Plumb time profiler output into tracing Signed-off-by: Delan Azabani <dazabani@igalia.com> * Enter the span tightly around the callback Signed-off-by: Delan Azabani <dazabani@igalia.com> * Use `info_span!()` shorthand Signed-off-by: Delan Azabani <dazabani@igalia.com> --------- Signed-off-by: Delan Azabani <dazabani@igalia.com>
* Improve how intrinsic sizes work for videos (#31746)eri2024-10-292-18/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * feat: patch for video layout sizes added rebase from main 2024/10/05 Co-authored-by: Josh Matthews <josh@joshmatthews.net> Signed-off-by: eri <epazos@igalia.com> * feat: take width and height parameters if provided Signed-off-by: eri <epazos@igalia.com> * chore: tidy the code and update test expectations Signed-off-by: eri <epazos@igalia.com> * feat: handle removing poster Signed-off-by: eri <epazos@igalia.com> * chore: update test expectations and remove debug code Signed-off-by: eri <epazos@igalia.com> * fix: issues after rebasing to main Signed-off-by: eri <epazos@igalia.com> * feat: pass src remove test and tidy Signed-off-by: eri <epazos@igalia.com> * chore: clippy fixes Signed-off-by: eri <epazos@igalia.com> * chore: update passing test expectations Signed-off-by: eri <epazos@igalia.com> * fix object-position-svg test Signed-off-by: eri <epazos@igalia.com> * fix unintentional override of video size and resize events Signed-off-by: eri <epazos@igalia.com> * change how resize events are sent to better match the spec Signed-off-by: eri <epazos@igalia.com> * simplify poster mutation handling Co-authored-by: Oriol Brufau <obrufau@igalia.com> Signed-off-by: eri <eri@inventati.org> * improved handling of intrinsic sizes - differentiate between natural size and css size - presentational attributes - fallback ratio for video element - handle more cases where the src/poster are added/removed - aspect ratio hints Signed-off-by: eri <epazos@igalia.com> * update test expectations Signed-off-by: eri <epazos@igalia.com> * fix cleaning current frame Signed-off-by: eri <epazos@igalia.com> * update test expectations Signed-off-by: eri <epazos@igalia.com> * Apply suggestions from code review Co-authored-by: Oriol Brufau <obrufau@igalia.com> Signed-off-by: eri <eri@inventati.org> * More code review suggestions Signed-off-by: eri <epazos@igalia.com> * Prevent aspect-ratio:auto from pulling the ratio from the default object size As resolved in https://github.com/w3c/csswg-drafts/issues/7524#issuecomment-1204462924 Signed-off-by: Oriol Brufau <obrufau@igalia.com> --------- Signed-off-by: eri <epazos@igalia.com> Signed-off-by: eri <eri@inventati.org> Signed-off-by: Oriol Brufau <obrufau@igalia.com> Co-authored-by: Josh Matthews <josh@joshmatthews.net> Co-authored-by: Oriol Brufau <obrufau@igalia.com>
* layout: Add support for `mix-blend-mode: plus-lighter` (#34057)Martin Robinson2024-10-291-0/+1
| | | | | This just requires translating the style value into a WebRender value. Signed-off-by: Martin Robinson <mrobinson@igalia.com>
* Remove size_of_test macro from legacy layout and inline it (#34055)Nico Burns2024-10-292-9/+0
| | | | | in the last remaining location it is used. Signed-off-by: Nico Burns <nico@nicoburns.com>
* Upgrade Stylo to 2024-10-04 (#33767)Oriol Brufau2024-10-204-39/+62
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Upgrade Stylo to 2024-10-04 Signed-off-by: Oriol Brufau <obrufau@igalia.com> * Fixup for https://phabricator.services.mozilla.com/D220285 Signed-off-by: Oriol Brufau <obrufau@igalia.com> * Fixup for https://bugzilla.mozilla.org/show_bug.cgi?id=1918093 Signed-off-by: Oriol Brufau <obrufau@igalia.com> * Fixup for https://phabricator.services.mozilla.com/D222817 Signed-off-by: Oriol Brufau <obrufau@igalia.com> * Fixup for https://phabricator.services.mozilla.com/D222856 Signed-off-by: Oriol Brufau <obrufau@igalia.com> * Fixup for https://phabricator.services.mozilla.com/D222532 Signed-off-by: Oriol Brufau <obrufau@igalia.com> * Fixup for https://phabricator.services.mozilla.com/D222533 Signed-off-by: Oriol Brufau <obrufau@igalia.com> * Fixup for https://phabricator.services.mozilla.com/D222534 Signed-off-by: Oriol Brufau <obrufau@igalia.com> * Fixup for https://phabricator.services.mozilla.com/D223878 Signed-off-by: Oriol Brufau <obrufau@igalia.com> --------- Signed-off-by: Oriol Brufau <obrufau@igalia.com>
* fonts: Make `FontKey` and `FontInstanceKey` generation asynchronous (#33600)Martin Robinson2024-10-012-1/+4
| | | | | | | | | | | | | | | | | | | | | | | | Instead of a blocking a layout thread on the generation of WebRender `FontKey`s and `FontInstanceKey`s, generate the keys ahead of time and send the font data to WebRender asynchronously. This has the benefit of allowing use of the font much more quickly in layout, though blocking display list sending itself on the font data upload. In order to make this work for web fonts, `FontContext` now asks the `SystemFontService` for a `FontKey`s and `FontInstanceKey`s for new web fonts. This should happen much more quickly as the `SystemFontService` is only blocking in order to load system fonts into memory now. In practice this still drops layout thread blocking to fractions of a millisecond instead of multiple milliseconds as before. In addition, ensure that we don't send font data or generate keys for fonts that are used in layout but never added to display lists. This should help to reduce memory usage and increase performance. Performance of this change was verified by putting a microbenchmark around `FontContext::create_font` which is what triggered font key generation. Signed-off-by: Martin Robinson <mrobinson@igalia.com>
* fonts: Simplify `FontContext` in two ways that affect the unit test (#33541)Martin Robinson2024-09-253-13/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | This is done by no longer forwarding compositor-bound messages through SystemFontService and making `FontContext` non-generic: - Messages from the `FontContext` to the `Compositor` no longer need to be forwarded through the `SystemFontService`. Instead send these messages directly through the script IPC channel to the `Compositor`. - Instead of adding a mock `SystemFontServiceProxy`, simply implement a mock `SystemFontService` on the other side of an IPC channel in the `font_context` unit test. This allows making `FontContext` non-generic, greatly simplifying the code. The extra complexity moves into the unit test. These changes necessitate adding a new kind of `FontIdentifier`, `FontIdentifier::Mock` due to the fact that local fonts have platform-specific identifiers. This avoids having to pretend like the system font service can have web fonts -- which was always a bit of a hack. These two changes are combined into one PR because they both require extensive and similar chages in the font_context unit test which dependended on the details of both of them. Signed-off-by: Martin Robinson <mrobinson@igalia.com>
* fonts: Use `IpcSharedMemory` to send font data (#33530)Martin Robinson2024-09-251-3/+3
| | | | | | | | | | | | | | | | | | | | | This changes modifes the way that font data is sent over IPC channels. Instead of serializing the data or sending it via IPC byte senders, font data is copied into shared memory and a copy of the handle is sent over the channel. There is also the idea of sending the file handle of the on disk data of system fonts. This could be implemented as a further followup once there is an abstraction in `ipc-channel` over file handles. To accomplish this, a `FontData` abstraction is added, which also allows caching an in-memory shared `Arc<Vec<u8>>` version of the data (neeeded by some APIs). This could also be a place for caching font tables in the future. Finally, the `FontCacheThread` is renamed to the `SystemFontService` while the proxy for this is now named `SystemFontServiceProxy`. Signed-off-by: Martin Robinson <mrobinson@igalia.com> Co-authored-by: Mukilan Thiyagarajan <mukilan@igalia.com>
* Layout: Implement innerText/outerText (#33312)Ben2024-09-241-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Implement outerText on HtmlElement Signed-off-by: Shane Handley <shanehandley@fastmail.com> * Fixed some innerText/outerText bugs Signed-off-by: Benjamin Vincent Schulenburg <bennyschulenburg@gmx.de> * Unified innerText/outerText handling outside of Layout Before these 2 were treated separately and only within Layout would they end up calling the same method, now they are already unified within HTMLElement Signed-off-by: Benjamin Vincent Schulenburg <bennyschulenburg@gmx.de> * Address a few nits Signed-off-by: Martin Robinson <mrobinson@igalia.com> * Added innerText support for `inline-flex` Signed-off-by: Benjamin Vincent Schulenburg <bennyschulenburg@gmx.de> --------- Signed-off-by: Shane Handley <shanehandley@fastmail.com> Signed-off-by: Benjamin Vincent Schulenburg <bennyschulenburg@gmx.de> Signed-off-by: Martin Robinson <mrobinson@igalia.com> Co-authored-by: Shane Handley <shanehandley@fastmail.com> Co-authored-by: Martin Robinson <mrobinson@igalia.com>
* Add `HTMLCanvasDataSource::Empty` that represent transparent black instead ↵Samson2024-09-222-17/+18
| | | | | | | | | | | | | | | of `HTMLCanvasDataSource::Image(None)` (#33519) * `HTMLCanvasDataSource::Empty` that represent transparent black instead of Image(None) Signed-off-by: sagudev <16504129+sagudev@users.noreply.github.com> * Fix warning from 3a0d27b2312c6396e85178615290ac2ec3592ce1 Signed-off-by: sagudev <16504129+sagudev@users.noreply.github.com> --------- Signed-off-by: sagudev <16504129+sagudev@users.noreply.github.com>
* fix many clippy warnings (#33510)Gae242024-09-211-9/+9
| | | Signed-off-by: Gae24 <96017547+Gae24@users.noreply.github.com>
* Enable min-content, max-content, fit-content and stretch (#33492)Oriol Brufau2024-09-2010-115/+88
| | | | | | | | | For the sizing properties. We don't actually support them yet, just treating them as the initial value. Signed-off-by: Oriol Brufau <obrufau@igalia.com> Co-authored-by: Martin Robinson <mrobinson@igalia.com>
* Add `rust-version` to all `Cargo.toml` files (#33483)Martin Robinson2024-09-171-0/+1
| | | | | | | This is another step preparing for building Servo without `mach`. Fixes #33430. Signed-off-by: Martin Robinson <mrobinson@igalia.com>
* Replace .map_or(false with Option::is_some_and (#33468)Simon Wülker2024-09-164-19/+21
| | | Signed-off-by: Simon Wülker <simon.wuelker@arcor.de>
* Let `LengthPercentage::maybe_to_used_value()` accept `Option<Au>` (#33450)Oriol Brufau2024-09-161-1/+1
| | | | | | Bump Stylo to servo/stylo#75 and remove conversions that are no longer necessary. Signed-off-by: Oriol Brufau <obrufau@igalia.com>
* Update stylo for latest changes. (#33079)Josh Matthews2024-08-161-1/+1
| | | Signed-off-by: Josh Matthews <josh@joshmatthews.net>
* legacy-layout: Fix display list building after WebRender upgrade (#33073)Martin Robinson2024-08-161-25/+87
| | | | | | | | The most recent version of WebRender tracks stacking context offsets in a different way, which broke legacy layout. It's easier just to track the stacking context offset in Servo and apply them to the items manually like we do in non-legacy layout. Signed-off-by: Martin Robinson <mrobinson@igalia.com>
* Replace lazy_static crate with `std::sync::LazyLock` in layout and config ↵Hayashi Mikihiro2024-08-152-7/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | (#33065) * replace in layout_thread_2020 Signed-off-by: Hayashi Mikihiro <34ttrweoewiwe28@gmail.com> * replace in layout_thread Signed-off-by: Hayashi Mikihiro <34ttrweoewiwe28@gmail.com> * replace in layout Signed-off-by: Hayashi Mikihiro <34ttrweoewiwe28@gmail.com> * replace in config Signed-off-by: Hayashi Mikihiro <34ttrweoewiwe28@gmail.com> * replace in config_plugins The macro of config_plugins require Send trait bounds Signed-off-by: Hayashi Mikihiro <34ttrweoewiwe28@gmail.com> --------- Signed-off-by: Hayashi Mikihiro <34ttrweoewiwe28@gmail.com>
* Fix warnings after latest rust upgrade (#33043)Martin Robinson2024-08-142-12/+1
| | | | | | | This fixes various unused code warnings after the recent rust upgrade. Some of the dead code is maintained, as it is quite likely that it will be used in future changes. Signed-off-by: Martin Robinson <mrobinson@igalia.com>
* clippy: Fix missing indentation in comments and remove on unecessary cast ↵danik2922024-08-132-2/+2
| | | | | | | | | | | | | | | (#33026) * Add missing indendations in comments. Signed-off-by: Daniel Frantes <danfrantes@seznam.cz> * Fix test tidy error Signed-off-by: Daniel Frantes <danfrantes@seznam.cz> --------- Signed-off-by: Daniel Frantes <danfrantes@seznam.cz>
* clippy: Fix various clippy warnings throughout the code (#33003)Ashwin Naren2024-08-131-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * replace u64::max_value() with u64::MAX Signed-off-by: Ashwin Naren <arihant2math@gmail.com> * removed redundant import Signed-off-by: Ashwin Naren <arihant2math@gmail.com> * Fixed dereference Signed-off-by: Ashwin Naren <arihant2math@gmail.com> * Fixed a probable bug Signed-off-by: Ashwin Naren <arihant2math@gmail.com> * fixed imports Signed-off-by: Ashwin Naren <arihant2math@gmail.com> * fixed dereference Signed-off-by: Ashwin Naren <arihant2math@gmail.com> * dereference formatting Signed-off-by: Ashwin Naren <arihant2math@gmail.com> * removed unnessicary number imports Signed-off-by: Ashwin Naren <arihant2math@gmail.com> * removed unnessicary number imports Signed-off-by: Ashwin Naren <arihant2math@gmail.com> * removed excess borrow Signed-off-by: Ashwin Naren <arihant2math@gmail.com> * ran mach fmt Signed-off-by: Ashwin Naren <arihant2math@gmail.com> * fixed doc comment Signed-off-by: Ashwin Naren <arihant2math@gmail.com> * removed deref on an immutable reference Signed-off-by: Ashwin Naren <arihant2math@gmail.com> * fixed minor syntax error Signed-off-by: Ashwin Naren <arihant2math@gmail.com> * reverted clamping Signed-off-by: Ashwin Naren <arihant2math@gmail.com> * formatting Signed-off-by: Ashwin Naren <arihant2math@gmail.com> * reverted final clamp Signed-off-by: Ashwin Naren <arihant2math@gmail.com> --------- Signed-off-by: Ashwin Naren <arihant2math@gmail.com> Co-authored-by: Ashwin Naren <ashwin@pixelators.org>
* deps: Upgrade to WebRender 0.65 (#32930)Martin Robinson2024-08-052-0/+2
| | | Signed-off-by: Martin Robinson <mrobinson@igalia.com>
* Upgrade stylo to 2024-07-16 (#32812)Martin Robinson2024-07-242-9/+9
| | | | | | | | | | | | | | * Upgrade stylo to 2024-07-16 Signed-off-by: Martin Robinson <mrobinson@igalia.com> * Use the new `dom` crate from stylo Signed-off-by: Martin Robinson <mrobinson@igalia.com> --------- Signed-off-by: Martin Robinson <mrobinson@igalia.com> Co-authored-by: Oriol Brufau <obrufau@igalia.com>
* Convert layout to use Gecko's alignment style representation (#32790)Martin Robinson2024-07-171-34/+77
| | | | Signed-off-by: Nico Burns <nico@nicoburns.com> Co-authored-by: Nico Burns <nico@nicoburns.com>
* Fix more clippy (#32740)石蕊 (Pi-Cla)2024-07-091-1/+1
|
* fonts: Add support for generic font families and font size configuration ↵Martin Robinson2024-07-081-5/+0
| | | | | | | | | | | | | | | | | | (#32673) This adds support for generic font families in Servo and allows for configuration of them as well as their default font sizes. One interesting fix here is that now monospace default to 13px, like it does in other browsers. In addition to that, this exposes a new interface in Stylo which allows setting a default style. This is quite useful for fonts, but also for other kinds of default style settings -- like text zoom. Fixes #8371. Fixes #14773. Signed-off-by: Martin Robinson <mrobinson@igalia.com> Co-authored-by: Mukilan Thiyagarajan <mukilan@igalia.com>
* layout_2013: Remove code preventing writing mode assertion failures (#32698)Martin Robinson2024-07-043-10/+3
| | | | | | | | It's actually kind of useful that this code crashes, as it points out a problem. Additionally, we aren't going to be maintaining Layout 2013 any longer so it is very unlikely that these bugs will ever be fixed. This allows us to reduce our diff with upstream Stylo. Closes #30577.
* clippy: Fix warnings in `shared` and `config`, `fonts`, `layout`, and ↵Martin Robinson2024-07-046-6/+14
| | | | `layout_2020` components (#32674)
* Upgrade stylo to 2024-05-31 (#32474)Oriol Brufau2024-06-241-1/+1
| | | | | | | | | | | * Upgrade stylo to 2024-05-31 * Fixup for https://phabricator.services.mozilla.com/D211731 * Fixup for https://phabricator.services.mozilla.com/D207779 * Fixup for https://phabricator.services.mozilla.com/D207781 * Update test expectations