aboutsummaryrefslogtreecommitdiffstats
path: root/components/layout/display_list/webrender_helpers.rs
Commit message (Collapse)AuthorAgeFilesLines
* Remove legacy layout (layout 2013) (#35943)Oriol Brufau2025-03-131-553/+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>
* Update rustfmt to the 2024 style edition (#35764)Simon Wülker2025-03-031-1/+1
| | | | | | | | | | | | | * 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>
* 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-141-2/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * 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>
* fix many clippy warnings (#33510)Gae242024-09-211-9/+9
| | | Signed-off-by: Gae24 <96017547+Gae24@users.noreply.github.com>
* 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>
* deps: Upgrade to WebRender 0.65 (#32930)Martin Robinson2024-08-051-0/+1
| | | Signed-off-by: Martin Robinson <mrobinson@igalia.com>
* compositor: Move WebRender-ish messages and types to `webrender_traits` (#32315)Mukilan Thiyagarajan2024-05-201-3/+3
| | | | | | | | | | | | | | | | | | | | * Move WebRender related types to `webrender_traits` This refactor moves several WebRender related types from `compositing_traits`, `script_traits` and `net_traits` crates to the `webrender_traits` crate. This change also moves the `Image` type and associated function out of `net_traits` and into the `pixels` crate. Co-authored-by: Martin Robinson <mrobinson@igalia.com> Signed-off-by: Mukilan Thiyagarajan <mukilan@igalia.com> * Move `script_traits::WebrenderIpcSender` to `webrender_traits::WebRenderScriptApi` --------- Signed-off-by: Mukilan Thiyagarajan <mukilan@igalia.com> Co-authored-by: Martin Robinson <mrobinson@igalia.com>
* Move non-gfx things out of `gfx_traits` and create a `base` crate (#32296)Martin Robinson2024-05-171-2/+2
| | | | | | | | | | | | | | | | | | | | | | | For a long time, `gfx_traits` has held a lot of things unrelated to graphics and also unrelated to the `gfx` crate (which is mostly about fonts). This is a cleanup which does a few things: 1. Move non `gfx` crate things out of `gfx_traits`. This is important in order to prevent dependency cycles with a different integration between layout, script, and fonts. 2. Rename the `msg` crate to `base`. It didn't really contain anything to do with messages and instead mostly holds ids, which are used across many different crates in Servo. This new crate will hold the *rare* data types that are widely used. Details: - All BackgroundHangMonitor-related things from base to a new `background_hang_monitor_api` crate. - Moved `TraversalDirection` to `script_traits` - Moved `Epoch`-related things from `gfx_traits` to `base`. - Moved `PrintTree` to base. This should be widely useful in Servo. - Moved `WebrenderApi` from `base` to `webrender_traits` and renamed it to `WebRenderFontApi`.
* chore: Clean up use of `gfx` and `constellation` types (#31981)Martin Robinson2024-04-091-2/+2
| | | | | | | | | | | | This change contains three semi-related clean ups: 1. the `to_webrender()` and `from_webrender()` functions on Pipeline are turned into more-idiomatic `From` and `Into` implementations. 2. `combine_id_with_fragment_type` now returns a `u64` as that is what is expected for all callers and not a `usize`. 3. The `query_scroll_id` query is removed entirely. The `ExternalScrollId` that this queries is easily generated directly from the node's opaque id. Querying into layout isn't necessary at all.
* dependencies: Upgrade to WebRender 0.64 (#31486)Martin Robinson2024-03-141-63/+81
| | | | | | | | | This brings the version of WebRender used in Servo up-to-date with Gecko upstream. The big change here is that HiDPI is no longer handled via WebRender. Instead this happens via a scale applied to the root layer in the compositor. In addition to this change, various changes are made to Servo to adapt to the new WebRender API. Co-authored-by: Mukilan Thiyagarajan <mukilan@igalia.com>
* layout: Propagate overflow values from `<body>` to root element (#31618)Martin Robinson2024-03-131-1/+7
| | | | | | | The specification gives instructions for how these values should be propagated. The other big changs here is that they aren't applied to the `<body>`. Co-authored-by: Oriol Brufau <obrufau@igalia.com>
* rustdoc: Fix many rustdoc errors (#31147)Martin Robinson2024-01-221-1/+1
| | | | 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.
* Only access hit test items for the current epoch in the compositor (#30491)Martin Robinson2023-10-041-1/+2
| | | | | | | | | | | | | | | When display lists update quickly, a hit test result might be returned for a previous display list / list of hit test items. When that happens, ignore the hit test result. This fixes a crash, but there might be situations where we can do something better, such as wait for display list processing to finish before performing the hit test. A future change might do this for events like mouse clicks and touch events that should never be thrown away. Ultimately, the best thing is likely moving hit testing back to layout or script so a valid hit test can always be performed against the current DOM. Fixes #29796.
* Strict import formatting (grouping and granularity) (#30325)Samson2023-09-111-2/+5
| | | | | * strict imports formatting * Reformat all imports
* Upgrade WebRender to e491e1ae637b2eed1e7195855d88357e5eb3ddf9 (#30323)Martin Robinson2023-09-101-15/+22
| | | | | | | | | | | | | | | | | | * Upgrade vendored version of WebRender * Patch WebRender: upgrade version of gleam * Restore hit testing implementation * Fix WebRender warnings * Adapt Servo to new WebRender * Update results * Add a workaround for #30313 This slightly expands text boundaries in order to take into account the fact that layout isn't measuring glyph boundaries.
* remove `extern crate` (#30311)Samson2023-09-081-0/+1
| | | | | | | | | | | * 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>
* Use explicit WebRender hit test items in legacy layout (#29981)Martin Robinson2023-07-171-13/+37
| | | | | | | Including hit tests in non-hit test display list items is no longer supported in upstream WebRender, so this change switches legacy layout to always use explicit hit test display list items. Signed-off-by: Martin Robinson <mrobinson@igalia.com>
* Auto merge of #29965 - mrobinson:clip-chain, r=delanbors-servo2023-07-111-67/+77
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Use the WebRender clip chain API The old clipping API has been removed from WebRender, so this switches both legacy and new layout over to use the clip chain API in preparation for the WebRender upgrade. <!-- 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] There are tests for these changes OR <!-- 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. -->
| * Use the WebRender clip chain APIMartin Robinson2023-07-041-67/+77
| | | | | | | | | | | | The old clipping API has been removed from WebRender, so this switches both legacy and new layout over to use the clip chain API in preparation for the WebRender upgrade.
* | Try to `use` WebRender types moreMartin Robinson2023-07-101-1/+1
|/ | | | | The newer versions of WebRender move types around between `webrender` and `webrender_api` and this will reduce the churn during the upgrade.
* Clean up and document the `send_display_list` interfaceMartin Robinson2023-05-241-16/+11
| | | | | | This moves more members to the CompositorDisplayListInfo struct, which now holds all miscellaneous, non-WebRender data when sending display lists. It also documents what each things sent with a display list does.
* Add a compositor-side scroll treeMartin Robinson2023-05-191-39/+76
| | | | | | This will allow the compositor to properly chain scrolling requests up when a node has reached the extent of the scroll area. This fixes scrolling on servo.org.
* Move hit testing information out of WebRenderMartin Robinson2023-03-151-5/+13
| | | | | | | | | Store hit testing information in a data structure that sits alongside the display list in the compositor. This will allow the compositor to store more information per-node. The data structure also takes care of de-duplicating information between successive display list entries. In the future, the data structure can be even more aggressive in producing smaller side hit testing lists, if necessary.
* Move more code into ClipScrollState during WebRender DL buildingMartin Robinson2023-03-101-74/+99
| | | | | | | | This change moves a bit more code into the `ClipScrollState` helper during WR display list building as well as inlines build_common_item_properties. This is all in preparation of modifications to this code which will build a Compositor-side scroll tree. It should not change any behavior.
* Bump euclid to 0.22Martin Robinson2023-01-261-1/+1
| | | | | | | | | | | | | - Also updates raqote to latest with an upgrade of font-kit to 0.11 applied on as a patch - Update lyon_geom to the latest version Major change: - All matrices are now stored in row major order. This means that parameters to rotation functions no longer should be negated. - `post_...()` functions are now named `then()`. `pre_transform()` is removed, so `then()` is used and the order of operations changed.
* Proxy all WR interactions for layout/font/script/canvas threads to the ↵Josh Matthews2020-06-091-3/+7
| | | | | | | compositor thread. There is now a single RenderApi that is used, and all transactions are serialized through the compositor.
* Use new webrender rounded clip API.Josh Matthews2020-05-121-10/+13
|
* Update webrender.Josh Matthews2020-05-111-3/+0
|
* Fix failing assertion -- failure to pop reference frameDaniel Alley2020-03-301-2/+5
| | | | closes #23438
* Remove syn 0.15 from our crate graph (fixes #24421)Anthony Ramine2020-03-051-0/+1
| | | | | | | | | | This required bumps of: * gleam * image * rust-webvr * webrender * webxr
* Update webrender and serde_bytesAnthony Ramine2019-11-131-5/+10
|
* Replace DisplayList::is_contentful with tracking during conversion to WR ↵Simon Sapin2019-09-061-5/+33
| | | | display lists
* Replace the WebRenderDisplayItemConverter trait with an inherent methodSimon Sapin2019-09-061-16/+3
|
* Update webrender, image, png and raqoteBastien Orivel2019-08-161-0/+1
| | | | This will avoid duping png because of the raqote backend
* Update euclid.Emilio Cobos Álvarez2019-07-231-1/+1
| | | | | | | | There are a few canvas2d-related dependencies that haven't updated, but they only use euclid internally so that's not blocking landing the rest of the changes. Given the size of this patch, I think it's useful to get this landed as-is.
* Remove sometimes-unused bounds field from base display item to prevent ↵Josh Matthews2019-07-091-1/+1
| | | | confusion.
* rustfmtJosh Matthews2019-07-091-17/+25
|
* Upgrade display list building for the WebRender update.Patrick Walton2019-07-091-102/+94
|
* WebRender units are no longer reexported.Patrick Walton2019-07-091-5/+4
|
* WR update: APIs updatePaul Rouget2019-03-221-8/+27
|
* Update webrender.Josh Matthews2019-01-171-87/+155
|
* Update webrenderManish Goregaokar2018-11-271-8/+14
|
* Update MPL license to https (part 4)Jan Andre Ikenmeyer2018-11-191-1/+1
|
* Auto merge of #22074 - jdm:wrup, r=noxbors-servo2018-11-071-1/+1
|\ | | | | | | | | | | | | | | | | | | | | Update webrender. Fixes #22114. <!-- 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/22074) <!-- Reviewable:end -->
| * Update webrender to 790b76f1547453615262c3037e1fb04bda22fbc8.Josh Matthews2018-11-061-1/+1
| |
* | `cargo fix --edition`Simon Sapin2018-11-061-2/+2
|/
* Directly build WebRender LineDisplayItemPyfisch2018-10-281-8/+1
| | | | Remove unused SimpleMatrixDetection.
* Layout: Remove redundant deny unsafe and formatPyfisch2018-10-221-4/+7
| | | | | | Add license to two files. Bypass DisplayListBuilder for some items.