aboutsummaryrefslogtreecommitdiffstats
path: root/components
Commit message (Collapse)AuthorAgeFilesLines
* Refactor scrolls on the window object (#29680)Martin Robinson2023-09-1511-114/+126
| | | | | | | | | | | | | | Refactor the scrolling and scrollable area calculation on the window object, to make it better match the specification. This has some mild changes to behavior, but in general things work the same as they did before. This is mainly preparation for properly handling viewport propagation of the `overflow` property but seems to fix a few issues as well. There is one new failure in Layout 2020 regarding `position: sticky`, but this isn't a big deal because there is no support for `position: sticky` in Layout 2020 yet. Co-authored-by: Rakhi Sharma <atbrakhi@igalia.com>
* Update version of `nix`, and `ron` (#30330)Fabrice Desré2023-09-151-1/+1
| | | | | | | * Bump ron to 0.8.1 to pickup more recent base64 * Remove dependency on nix 0.14 * Update libloading in simpleservo
* Add GPUSupportedFeatures and update GPUSupportedLimits (#30359)Samson2023-09-1411-48/+240
| | | | | | | * GPUSupportedFeatures * New supported limits * Update expectations
* Enable minibrowser by default but also keep the option to disable it (#30338)Atbrakhi2023-09-131-3/+3
| | | | | | | | | * enable minibrowser by default * review fix * rename no_minibrowser to no-minibrowser * review fix
* Layout 2020: Rename `flow_relative` types to `Logical...` (#30324)Martin Robinson2023-09-1215-315/+312
| | | | | | This makes the names of flow relative geometry consistent with what is used in the style crate and removes them from a module. With this change it's more obvious what makes these types different from the ones in `euclid`.
* servoshell: fix lockups while animating (#30322)Delan Azabani2023-09-122-1/+7
| | | | | | | | | | | * servoshell: fix lockups while animating * move comment to external_present declaration * disable needs_recomposite optimisation for now due to breakage * fix compile error that only happens on ci * fix more compile errors
* Strict import formatting (grouping and granularity) (#30325)Samson2023-09-11776-6125/+6629
| | | | | * strict imports formatting * Reformat all imports
* Use MozTools 4 and update mozjs (#30326)Samson2023-09-116-7/+8
| | | | | | | | | | | | | | | | | | | * Update mozjs * moztools4 in bootstrap * no autoconf * tidy * switch to servo-build-deps * update mozjs for real * glue mozjs * fmt * move to servo/mozjs
* Upgrade WebRender to e491e1ae637b2eed1e7195855d88357e5eb3ddf9 (#30323)Martin Robinson2023-09-1023-228/+253
| | | | | | | | | | | | | | | | | | * 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.
* Layout 2013: Don't make gradient display items for zero-sized gradients (#30321)Martin Robinson2023-09-092-7/+22
| | | | | | Before WebRender would ignore these, but newer version of WebRender have issues with them. This change simply prevents legacy layout from creating display items for these types of gradients. This is already the behavior of non-legacy layout.
* remove `extern crate` (#30311)Samson2023-09-08262-406/+407
| | | | | | | | | | | * 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>
* Layout 2013: Don't use WebRender border image outset support (#30315)Martin Robinson2023-09-081-14/+10
| | | | | | | | | | | | | | | | | The border image outset support in WebRender is going to be removed and even in versions of WebRender where it still exists, it fails to render properly. A border image is a type of border composed of slices of images. The "outset" of this kind of border is a property in CSS that makes the border boundaries expand. Previously, the value was passed to WebRender which would expand the border by this amount and render the images into the expanded rectangle. Since this is going to be removed, we handle this property outside of WebRender. The change is simply to expand the border area by the outset before calculating the rest of the border values. This is necessary for the WebRender upgrade.
* Replace a method call now deprecated in mozjs (#30307)Martin Robinson2023-09-061-1/+1
|
* Impl Setlike and Maplike (#30237)Samson2023-09-0611-4/+574
| | | | | | | | | | | | | | | | | | | * MallocSizeOf for Index{Set, Map} * like as iterable in WebIDL * Codegen magic for like interfaces * TestBinding for like * Test for Setlike and Maplike test bindings * Some fixes * Switch to any.js * nit * Keep order
* Move user input logic into servoshell (#30238)Atbrakhi2023-09-062-110/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | * cleanup and move user input logix into servoshell * fix fmt * moves test from servoshell file * move command-line args into servoshell * remove feature media-gstreamer * fix fmt * move user input logic code into lib to make it more testable * remove opts_matches in fn instead get it from main2 * remove pub and fix import * add licence in new file * revert passing Matches, instead pass Option String * review update, also move sanitize fn to parser file * fmt fix * review fix: remove extra line
* constellation: crash to a new “sad tab” error page (#30290)Delan Azabani2023-09-069-46/+91
| | | | | | | | | | | | | | | | | | | | | * constellation: crash to a new “sad tab” page * check in resources/crash.html * use a separate enum variant instead of keying on reason * fmt + tidy * rename Resource::Crash to Resource::CrashHTML * clean up crash page and add details (reason + backtrace) * avoid repeating crash errors in script::script_thread warn log * make new LoadData init more idiomatic * clarify comments and new fields * fix doc comment style
* Replace `immeta` dependency with `imsz` (#30294)Martin Robinson2023-09-062-13/+12
| | | | `immeta` is no longer maintained and `imsz` seems to have support for more image formats as well as having no dependencies itself.
* Refactor inline layout nesting (#30289)Martin Robinson2023-09-051-138/+204
| | | | | | | | | | | | | | | | | | | | This makes the nesting architecture of inline layout a lot simpler. Now PartialInlineBoxFragment and InlineNestingLevelState are replaced by two structs: - InlineContainerState - InlineBoxContainerState InlineContainerState holds state for the root of the inline formatting context, while InlineBoxContainerState holds state for inline boxes. InlineBoxContainerState has an InlineContainerState as the first element, thus "extends" it. Now the inline iterators are stack variables directly in the `layout()` method. They are no longer stored in the state. This avoids the weird nesting of state and instead relies on a normal vector to hold the stack of state. Co-authored-by: Mukilan Thiyagarajan <mukilan@igalia.com>
* Fix handling of `white-space` property for wrapping (#30259)Martin Robinson2023-09-041-45/+95
| | | | This still fails some tests because on element boundaries we want the `white-space` property of the first shared ancestor.
* Fix PlacementAmongFloats to avoid missing some bands (#30280)Oriol Brufau2023-09-011-2/+18
| | | | | | | | | | PlacementAmongFloats would stop iterating when current_bands would be empty, even if next_band wasn't at infinity. Then the BFC root or replaced block was placed after all the floats, even if it could fit next to some of them. This patch moves the next_band into current_bands so that the loop keeps considering bands.
* fix: Enter realm before dispatch activate (#30271)Li-Hsuan Hsieh2023-09-011-0/+1
| | | * ref: https://github.com/servo/servo/issues/30141
* build(deps): bump bitflags from 1.3.2 to 2.3.1 (#30273)Martin Robinson2023-09-0116-104/+101
| | | | | | Bumps [bitflags](https://github.com/bitflags/bitflags) from 1.3.2 to 2.3.1. - [Release notes](https://github.com/bitflags/bitflags/releases) - [Changelog](https://github.com/bitflags/bitflags/blob/main/CHANGELOG.md) - [Commits](https://github.com/bitflags/bitflags/compare/1.3.2...2.3.1)
* Flow inlines around floats (#30243)Martin Robinson2023-08-313-99/+410
| | | | | | | This implements the rest of the bulk of float support. Now inline element flow around floats and floats can be pushed down by inline elements before them. Co-authored-by: Oriol Brufau <obrufau@igalia.com>
* Properly handle degenerate aspect ratios (#30245)Martin Robinson2023-08-302-29/+35
| | | | | When a replaced element has a degenerate aspect ratio, it should be handled as if that element did not have an aspect ratio according to https://drafts.csswg.org/css-images/#natural-aspect-ratio.
* Always dummy (#30240)Samson2023-08-302-3/+2
|
* Avoid crash in PlacementAmongFloats (#30235)Oriol Brufau2023-08-291-1/+1
| | | | | | | | | | | PlacementAmongFloats was assuming that there would always be a FloatBand at a position smaller than or equal to the given ceiling, but this was not the case for negative ceilings. The reason is that the FloatContext initialized the FloatBandTree with a band at 0, and another at +∞. This patch changes the initial bands to −∞ and +∞. This seems more consistent and matches the expectation of PlacementAmongFloats.
* Fix type attribute for module script not in case insensitive issue (#30206)Li-Hsuan Hsieh2023-08-251-1/+3
| | | | | * fix(htmlscriptelement): Make sure type for module is in case insensitive * fix(htmlscripthtml): Remove related .ini file since the tests are passed
* Use std::cell::OnceCell and remove mitochondria dependency (#30207)Martin Robinson2023-08-256-12/+11
| | | | | `OnceCell` is now part of the standard library and we'll be able to use it once we upgrade rust. For now we can use the version that's shipped behind a feature flag in rust. This removes a dependency on one crate.
* build(deps): bump parking_lot from 0.11.2 to 0.12.0 (#30199)dependabot[bot]2023-08-253-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | * build(deps): bump parking_lot from 0.11.2 to 0.12.0 Bumps [parking_lot](https://github.com/Amanieu/parking_lot) from 0.11.2 to 0.12.0. - [Changelog](https://github.com/Amanieu/parking_lot/blob/master/CHANGELOG.md) - [Commits](https://github.com/Amanieu/parking_lot/compare/0.11.2...0.12.0) --- updated-dependencies: - dependency-name: parking_lot dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] <support@github.com> * Upgrade parking-log in style and layout_thread* as well --------- Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Martin Robinson <mrobinson@igalia.com>
* Fix the 32-bit build (#30204)Martin Robinson2023-08-251-2/+2
| | | | Use the `libc::char` to represent a pointer to characters rather than `i8`. This fixes the build for the Raspberry Pi and Android 32-bit.
* Disable WebRender debugger and upgrade webxr / media / rand (#30190)Martin Robinson2023-08-242-3/+2
| | | | | | Now that our dependencies are using a newer version of rand we can upgrade. This change also disables the WebRender debugger feature because it has been removed in later versions of WebRender and allows deduplicated the rand dependency as well as quite a few others.
* Fix warnings after chrono upgrade (#30165)Martin Robinson2023-08-232-43/+56
| | | | Some functions are now deprecated, so use the suggested ones and do a general cleanup of the affected lines of code.
* Layout floats as children of their inline ancestors (#30130)Martin Robinson2023-08-222-104/+163
| | | | | | | | | | | | | | | When layout was split into two phases, floats were laid out as direct children of the inline formatting context. This meant that they were positioned properly, but not properly made children of their inline ancestors' stacking contexts. This change maintains the proper positioning of floats, but positions them relatively to their inline ancestors. The big change here is that `text-align` needs to be taken into account before actually laying out LineItems. This has the added benefit of setting inline layout for the implementation of `text-align: full`. Now all line items are laid out at the real final position and we can adjust the `start_corner` property of float `BoxFragments` when their ancestors are laid out.
* Update wgpu to 0.17 (#30147)Samson2023-08-214-10/+10
|
* Upgrade whole webgpu stack (#29795)Samson2023-08-2069-1310/+2139
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Allow noidl files in script/dom/webidls * Upgrade wgpu to 0.16 and refresh whole webgpu implementation * Update WebGPU test expectations * misc * MutNullableDom -> DomRefCell<Option<Dom for GPUTexture * Direct use of GPUTextureDescriptor * Remove config from GPUCanvasContext * misc * finally blue color * gpubuffer "handle" error * GPU object have non-null label * gpu limits and info * use buffer_size * fix warnings * Cleanup * device destroy * fallback adapter * mach update-webgpu write webgpu commit hash in file * Mising deps in CI for webgpu tests * Updated expectations * Fixups * early reject * DomRefCell<Option<Dom -> MutNullableDom for GPUTexture
* remove minibrowser from prefs (#30127)Atbrakhi2023-08-191-3/+0
|
* Fix `mach test-wpt` to make crash tests work (#29832)Mukilan Thiyagarajan2023-08-181-15/+20
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Fix `mach test-wpt` to make crash tests work There are two issues related to crash tests: 1. test-wpt is unable to find existing crash tests even when called with --test-types=crashtests. The fix here is to add crashtests to the default test suite types to python/wpt/run.py 2. When running in headless mode, crashes in style threads don't cause servo to crash because the logic in constellation.rs currently calls handle_panic only when the top-level browsing context id is some value. Since style pool threads are shared, they always generate Panic messages with None as top-level browsing context id. Co-authored-by: Martin Robinson <mrobinson@igalia.com> Signed-off-by: Mukilan Thiyagarajan <mukilan@igalia.com> * Send bactrace to stderr and capture it in test runner Servo's panic hook writes backtraces to stdout. This patch changes it so they are written to stderr. The crash test executor for servo in WPT grouping formatter was also not capturing the output correctly for crashtests as the log events were being aggregated based on thread name which doesn't seem to match correctly in case of crashtests. This patch also fixes the log grouping logic to be based on test name. Co-authored-by: Martin Robinson <mrobinson@igalia.com> Signed-off-by: Mukilan Thiyagarajan <mukilan@igalia.com> * crashtests: update expectations for layout 2020 Co-authored-by: Martin Robinson <mrobinson@igalia.com> Signed-off-by: Mukilan Thiyagarajan <mukilan@igalia.com> * crashtests: update expectations for layout 2013 Co-authored-by: Martin Robinson <mrobinson@igalia.com> Signed-off-by: Mukilan Thiyagarajan <mukilan@igalia.com> * remove outdated & intemittent test expectations Signed-off-by: Mukilan Thiyagarajan <mukilan@igalia.com> --------- Signed-off-by: Mukilan Thiyagarajan <mukilan@igalia.com> Co-authored-by: Martin Robinson <mrobinson@igalia.com>
* [NFC] compositing: extract types into new compositing_traits crate (#30125)Delan Azabani2023-08-1815-284/+332
| | | | | | | | | | | * [NFC] compositing: extract types into new compositing_traits crate * [NFC] compositing: move InitialCompositorState back to compositing * [NFC] compositing: rename Msg to CompositorMsg * [NFC] compositing: revert changes to Cargo.toml features section * [NFC] compositing: merge imports
* Fix /custom-elements/when-defined-reentry-crash.html (#30121)Martin Robinson2023-08-181-1/+2
| | | | | | | The problem is a double-borrow of the `when_defined` member. The fix is to let go of the borrow before resolving the promise which will eventually try to borrow `when_defined` again. Fixes #30120.
* Format toml files (#30112)Samson2023-08-178-15/+22
| | | | | | | * Add taplo fmt config for toml fmt * fmt toml files * Add even-better-toml to extensions recommendations
* Tackle half of canvas.toDataURL's FIXMEs (#30094)Ennui Langeweile2023-08-171-7/+7
| | | Signed-off-by: Ennui Langeweile <85590273+EnnuiL@users.noreply.github.com>
* Remove unused import `EventLoopWaker` (#30110)Oriol Brufau2023-08-172-2/+2
| | | Seems a remnant from #30101
* Avoid complaints from ./mach test-tidyOriol Brufau2023-08-162-0/+2
|
* style: Add an input-region-margin to widgets, and implement it on LinuxEmilio Cobos Álvarez2023-08-161-0/+10
| | | | | | | | | Recompute the input region when resizing the widget and so on, and use it to check for rollups. Depends on D148211 Differential Revision: https://phabricator.services.mozilla.com/D148222
* Further changes required by ServoOriol Brufau2023-08-1611-70/+81
|
* style: Use ColorMix for interpolated colors in the computed style rather ↵Emilio Cobos Álvarez2023-08-1610-535/+458
| | | | | | | | | than ComplexColorRatios This among other things preserves the right color-space when interpolating currentColor. Differential Revision: https://phabricator.services.mozilla.com/D147512
* style: Remove -moz-scrollbar-thumb-proportionalEmilio Cobos Álvarez2023-08-161-5/+1
| | | | | | | | It unconditionally matches on all platforms, so it's not returning any useful information. Depends on D147689 Differential Revision: https://phabricator.services.mozilla.com/D147690
* style: Update style to uluru 3.0Mike Hommey2023-08-161-1/+1
| | | | Differential Revision: https://phabricator.services.mozilla.com/D147477
* style: Update style to arrayvec 0.7Mike Hommey2023-08-161-8/+6
| | | | Differential Revision: https://phabricator.services.mozilla.com/D147476
* style: Fix warnings about whitelist/blocklist functions being deprecated in ↵Mike Hommey2023-08-161-3/+3
| | | | | | bindgen 0.59 Differential Revision: https://phabricator.services.mozilla.com/D147695