| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
| |
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>
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* 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>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* 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>
|
|
|
|
|
|
|
|
|
|
|
|
| |
This allows sharing font templates, fonts, and platform fonts across
layout threads. It's the first step toward storing web fonts in the
layout versus the shared `FontCacheThread`. Now fonts and font groups
have some locking (especially on FreeType), which will probably affect
performance. On the other hand, we measured memory usage and this saves
roughly 40 megabytes of memory when loading servo.org based on data from
the memory profiler.
Signed-off-by: Martin Robinson <mrobinson@igalia.com>
Co-authored-by: Mukilan Thiyagarajan <mukilan@igalia.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This change splits the style and layout data in DOM nodes that is
populated by style and layout passes. This makes Servo's data design
more like Gecko's. This allows:
1. Removing the various `StyleAndLayout` data structures used by layout.
2. Removing the `GetStyleAndLayoutData` and
`GetStyleAndOpaqueLayoutData` traits. Accessing style and layout data
are now just functions on the `LayoutNode` and `ThreadSafeLayoutNode`
traits.
3. Styling now doesn't populate layout data. This is is postponed until
layout itself.
4. Allows the DOM wrappers to no longer have to be generic over the
layout data. This data was already stored using `std::any::Any` and
the new code just makes layout responsible for downcasting. Cleaning
up the generic type parameter in the DOM wrappers can happen in a
followup change.
The main benefit to all of this is that we should be able to remove
unsafe creation of `ServoLayoutNode` in layout and
`TrustedLayoutNodeAddress` entirely, because `ServoLayoutNode` will be
able to be passed directly from script to layout. In addition, this
removes one more abstraction layer from the layout DOM wrappers, making
the code a lot more understandable.
Note: This increases the measured size of DOM types, but the same data
is stored. It's simply that before that data was stored behind a heap
pointer.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* Update Stylo to 2023-10-16
* Fixup for https://phabricator.services.mozilla.com/D185154
* Fixup for https://phabricator.services.mozilla.com/D188216
* Fixup for https://phabricator.services.mozilla.com/D185677
* Fixup for https://phabricator.services.mozilla.com/D188566
* Fixup for https://phabricator.services.mozilla.com/D188727
* Fixup for https://phabricator.services.mozilla.com/D189475
* Fixup for https://phabricator.services.mozilla.com/D189521
* Fixup for https://phabricator.services.mozilla.com/D188812
* Fixup for https://phabricator.services.mozilla.com/D189484
* Update test expectations
|
|
|
|
|
| |
* clippy: fix warnings in components/layout
* fix: formatting
|
|
|
|
|
| |
In order for stylo to be a separate crate, it needs to depend on less
things from Servo. This change makes it so that stylo no longer depends
on servo_url.
|
|
|
|
|
|
|
|
|
| |
* Lint layout_2013 with clippy
CARGO_BUILD_RUSTC=rustc cargo clippy --fix -p layout_2013 --broken-code
* ./mach fmt
* Cosmetic adjustments
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This adds support for fixing up tables so that internal table elements
that are not properly parented in the DOM have the correct box tree
structure according to the CSS Table specification [1]. Note that this
only comes into play when building the DOM via script, as HTML 5 has its
own table fixups that mean that the box tree construction fixups here
are not necessary.
There are no tests for this change. In general, it's hard to write tests
against the shape of the box tree, because it depends on the DOM. We
plan to test this via WPT tests once layout is complete.
1. https://drafts.csswg.org/css-tables/#table-internal-element
Co-authored-by: Oriol Brufau <obrufau@igalia.com>
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
In legacy layout, anonymous text wrappers were inheriting the `overflow`
and `text-overflow` properties. This results in the creation of extra
clipping for these anonymous wrappers which could clip away floats. We
will likely implement `text-overflow` differently in non-legacy layout.
This change marks all legacy layout pseudo elements as "legacy" and also
adds a new pseudo element for non-legacy layout that does not inherit
`overflow`.
Fixes #30562.
Co-authored-by: Oriol Brufau <obrufau@igalia.com>
|
|
|
|
|
| |
* strict imports formatting
* Reformat all imports
|
|
|
|
|
|
|
|
|
|
|
| |
* 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>
|
|
|
|
|
| |
This is the first step toward removing the compile-time difference in
style between Layout 2020 and Layout 2013.
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
|
|
|
| |
Do not allow pseudo-elements for replaced elements
|
| |
|
| |
|
| |
|
| |
|
| |
|
|
|
|
| |
It's only used there.
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
|
|
|
|
|
| |
Add license to two files.
Bypass DisplayListBuilder for some items.
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
|\
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Move DL items from gfx to layout and implement corner clipping
Implement corner clipping.
Remove PixelFormat from WebrenderImageInfo.
Use WebRender text shadow.
Remove MallocSizeOf and Deserialize for DL items.
Closes #19649, closes #19680, closes #19802
<!-- Please describe your changes on the following line: -->
---
<!-- Thank you for contributing to Servo! Please replace each `[ ]` by `[X]` when the step is complete, and replace `__` with appropriate data: -->
- [x] `./mach build -d` does not report any errors
- [x] `./mach test-tidy` does not report any errors
- [x] These changes fix #__ (github issue number if applicable).
<!-- Either: -->
- [x] There are tests for these changes OR
- [ ] These changes do not require tests because _____
<!-- Also, please make sure that "Allow edits from maintainers" checkbox is checked, so that we can help you if you get stuck somewhere along the way.-->
<!-- Pull requests that do not address these steps are welcome, but they will require additional verification as part of the review process. -->
<!-- Reviewable:start -->
---
This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/20420)
<!-- Reviewable:end -->
|
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Implement corner clipping.
Remove PixelFormat from WebrenderImageInfo.
Use WebRender text shadow.
Remove MallocSizeOf and Deserialize for DL items.
Closes #19649, #19680, #19802
|
|/
|
|
|
|
|
|
|
|
| |
This should fix the following two "expected to fail" tests:
- getComputedStyle(elem) for url() listStyleImage uses the resolved URL
and elem.style uses the original URL
- getComputedStyle(elem) for url() listStyle uses the resolved URL
and elem.style uses the original URL
|
| |
|