Commit graph

45781 commits

Author SHA1 Message Date
Oriol Brufau
320f12aa07 style: Simplify StyleColor representation
There's no need for CurrentColor / Numeric variants when we can
represent them with the complex form.

Differential Revision: https://phabricator.services.mozilla.com/D106690
2023-05-16 12:48:27 +02:00
Oriol Brufau
efea71ff9b style: Cherry-pick various servo changes
All formatting and not-part-of-the-gecko-build changes.

Differential Revision: https://phabricator.services.mozilla.com/D106634
2023-05-16 08:14:58 +02:00
bors-servo
c5d31c3ab6
Auto merge of #29743 - Loirooriol:disable-style-fmt, r=mrobinson
Disable formatting for components/style/

Gecko doesn't enforce proper formatting, so disabling it will make it easier to backport changes from there.

<!-- 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
- [ ] These changes fix #___ (GitHub issue number if applicable)

<!-- Either: -->
- [ ] There are tests for these changes OR
- [X] These changes do not require tests because there is no change in behavior

<!-- 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. -->
2023-05-15 20:33:39 +02:00
Oriol Brufau
e6ace3acae Disable formatting for components/style/
Gecko doesn't enforce proper formatting, so disabling it will make it
easier to backport changes from there.
2023-05-15 17:45:25 +02:00
bors-servo
17e1582ed4
Auto merge of #29737 - servo:wpt_update_14-05-2023, r=servo-wpt-sync
Sync WPT with upstream (14-05-2023)

Automated downstream sync of changes from upstream as of 14-05-2023
[no-wpt-sync]
r? @servo-wpt-sync
2023-05-15 07:11:20 +02:00
WPT Sync Bot
06e9d5a631 Update web-platform-tests to revision b'c9946198c9ee19db3b4974a388fae45da844a94a' 2023-05-14 01:39:34 +00:00
bors-servo
8dfd613aa1
Auto merge of #29727 - mrobinson:more-layout-dom-cleanup, r=jdm
More cleanup of the layout DOM wrappers

This PR includes two commits which continue to clean up the layout DOM wrappers.
 - in the first the unused `DangerousThreadSafeLayoutNode` trait is removed
 - in the second DOM-related code is combined into one source file in Layout 2020 and some traits are combined and removed.

---
<!-- 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 #29688
- [x] These changes fix #29722
- [x] These changes do not require tests because they do not change behavior.

<!-- 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. -->
2023-05-13 16:32:55 +02:00
Martin Robinson
72b5fcd0b6 Combine DOM-related concepts in Layout 2020 into dom.rs 2023-05-13 11:52:59 +02:00
bors-servo
45dd2764af
Auto merge of #29733 - mukilan:workaround-gstreamer-dylib-issue, r=mrobinson
Workaround bug in gstreamer binaries

The official gstreamer .pkg distribution should contain 'relocatable' dylibs, but as discovered in #29732, some dylibs have absolute links to liblzma.5.dylib ("/usr/local/opt/xz/lib/liblzma.5.dylib")

Since /opt/homebrew is the default install location on Apple Silicion, this will cause the packaging & build steps to fail, even if 'xz' package is installed via homebrew.

This is a temporary fix until upstream fixes the bug and makes the package truly 'relocatable'. Users
with non-default homebrew prefixes will still have the issue.

Thanks to @atbrakhi  for helping me debug and test the patch on her mac.

<!-- 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 #29732 (GitHub issue number if applicable)

<!-- Either: -->
- [ ] There are tests for these changes OR
- [x] These changes do not require tests because they fix the broken build process.

<!-- 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. -->
2023-05-13 05:48:04 +02:00
bors-servo
84982ff1ff
Auto merge of #29730 - stshine:flexbox-align-content, r=Loirooriol
layout_2020: Implement align-content in flexbox

Align all flex lines per `align-content`.

<!-- 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

<!-- Either: -->
- [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. -->
2023-05-12 17:31:46 +02:00
Pu Xingyu
ea599c88df Update wpt expectations 2023-05-12 22:29:17 +08:00
Mukilan Thiyagarajan
80087f31c8 Workaround bug in gstreamer binaries
The official gstreamer .pkg distribution should contain
'relocatable' dylibs, but as discovered in #29732,
some dylibs have absolute links to liblzma.5.dylibs

Since /opt/homebrew is the default install location
on Apple Silicion, this will cause the packaging &
build steps to fail, even if 'xz' package is installed
via homebrew.

This is a temporary fix until upstream fixes the bug
and makes the package truly 'relocatable'.

Signed-off-by: Mukilan Thiyagarajan <me@mukilan.in>
2023-05-12 19:03:47 +05:30
Martin Robinson
ab4bd2a133 Remove DangerousThreadSafeLayoutNode
Remove this trait and replace it by two non-public functions on
ServoThreadSafeLayoutNode. This requires making the iterator not
generic, which simplifies things a little bit as well.
2023-05-12 08:18:31 +02:00
bors-servo
d798376d7c
Auto merge of #29731 - mukilan:consumer-offical-gstreamer-for-macos, r=mrobinson
Consume official GStreamer binaries on MacOS

This PR re-enables support for the gstreamer mediastack in macOS by consuming the official binary '.pkg' files from gstreamer.freedesktop.org

To maintain symmetry with other platforms, the '.pkg' files are uploaded to servo-build-deps and fetched from there using the new script 'etc/install_macos_gstreamer.sh'.

Unlike the Homebrew version, the official GStreamer is distributed as a 'relocatable' framework i.e the dylibs all have @rpath-relative install names and also link to other dylibs using @rpath relative path. To address this difference the 'servo' binary needs to be patched with 'install_name_tool' to add an LC_RPATH command that sets the relative paths that the dynamic linker should search when trying to satify dependencies. In Servo's case, this will be a path relative to the 'servo' binary itself i.e '@executable_path/lib/'

The additional 'lib' is due to a flaw in the gstreamer packaging where the install names of some of the dylibs have the prefix '@rpath/lib' and some of them just have '@rpath'.

This PR also fixes a couple of issues present in the `mach build` process on MacOS:
1. `mach build` process was not copying transitive dependencies of servo binary but only the first level dylibs
2. `mach build` process didn't patch the links to dylibs in servo binary (and dependencies). This meant though (some) dylibs were copied to local path, the binary still loaded the dylibs from system GStreamer installation i.e homebrew instead of the copieds dylibs

The build and runtime dependencies in etc/homebrew/Brewfile and etc/homebrew/Brewfile-build have also been removed in This PR.

<!-- 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 #29653 me

<!-- Either: -->
- [ ] There are tests for these changes OR
- [X] These changes do not require tests because they broken build and package process.

<!-- 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. -->
2023-05-12 08:15:52 +02:00
Pu Xingyu
4a65dd0425 layout_2020: Implement align-content in flexbox
Align all flex lines per `align-content`.
2023-05-12 10:43:32 +08:00
bors-servo
03574d8191
Auto merge of #29719 - stshine:flexbox-justify-content, r=Loirooriol
layout 2020: Implement justify-content in flexbox

Align the items along the main-axis per justify-content.

<!-- 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
- [ ] 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. -->
2023-05-11 23:44:48 +02:00
bors-servo
9bec0d0f8e
Auto merge of #29728 - Loirooriol:sync-fontprovider-D157589, r=mrobinson
Simplify our setup for font metric queries from style

This is a backport of https://phabricator.services.mozilla.com/D157589,
by Emilio Cobos Álvarez, plus some additions so that Servo compiles,
and some parts from https://phabricator.services.mozilla.com/D144455.

Should have no change in behavior.

<!-- 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
- [ ] These changes fix #___ (GitHub issue number if applicable)

<!-- Either: -->
- [ ] There are tests for these changes OR
- [X] These changes do not require tests because there should be no change in behavior

<!-- 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. -->
2023-05-11 21:04:45 +02:00
Oriol Brufau
ab2ba273e3 Simplify our setup for font metric queries from style
This is a backport of https://phabricator.services.mozilla.com/D157589,
by Emilio Cobos Álvarez, plus some additions so that Servo compiles,
and some parts from https://phabricator.services.mozilla.com/D144455.

Should have no change in behavior.
2023-05-11 21:02:15 +02:00
Mukilan Thiyagarajan
8cfb19a8fb Consume official GStreamer binaries on MacOS
This PR re-enables support for the gstreamer mediastack
in macOS by consuming the official binary '.pkg' files
from gstreamer.freedesktop.org

To maintain symmetry with other platforms, the '.pkg'
files are uploaded to servo-build-deps and fetched from
there using the new script 'etc/install_macos_gstreamer.sh'.

Unlike the Homebrew version, the official GStreamer is
distributed as a 'relocatable' framework i.e the dylibs all
have @rpath-relative install names and also link to other
dylibs using @rpath relative path. To address this difference
the 'servo' binary needs to be patched with 'install_name_tool'
to add an LC_RPATH command that sets the relative paths
that the dynamic linker should search when trying to satify
dependencies. In Servo's case, this will be a path relative to
the 'servo' binary itself i.e '@executable_path/lib/'

The additional 'lib' is due to a flaw in the gstreamer
packaging where the install names of some of the dylibs
have the prefix '@rpath/lib' and some of them just have '@rpath'.

This PR also fixes a couple of issues present in the
`mach build` process on MacOS:
1. `mach build` process was not copying transitive dependencies
   of servo binary but only the first level dylibs
2. `mach build` process didn't patch the links to dylibs
   in servo binary (and dependencies). This meant though
   (some) dylibs were copied to local path, the binary
   still loaded the dylibs from system GStreamer installation
   i.e homebrew instead of the copieds dylibs

The build and runtime dependencies in etc/homebrew/Brewfile
and etc/homebrew/Brewfile-build have also been removed in This
PR.

Signed-off-by: Mukilan Thiyagarajan <me@mukilan.in>
2023-05-12 00:14:38 +05:30
bors-servo
feaa66b597
Auto merge of #29729 - Loirooriol:sync-cap-D133101, r=mrobinson
Add support for the 'cap' font-relative unit

This is a backport of https://phabricator.services.mozilla.com/D133101, by Jonathan Kew.

Note that Servo isn't using font metrics yet, so the unit still won't really work.

<!-- 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
- [ ] These changes fix #___ (GitHub issue number if applicable)

<!-- Either: -->
- [ ] 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. -->
2023-05-11 18:41:09 +02:00
bors-servo
425b0fe641
Auto merge of #29726 - paricbat:urlsearchparams-has-delete, r=mrobinson
Add value argument to URLSearchParams's has() and delete()

<!-- Please describe your changes on the following line: -->
My first attempt at contributing Rust code!
Add the value argument to `has()` and `done()` as in [the spec](https://url.spec.whatwg.org/#dom-urlsearchparams-delete).

---
<!-- 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  #29725 (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. -->
2023-05-11 08:36:09 +02:00
Veronika Bušů
e40ec79f65 Add value argument to URLSearchParams's has() and delete()
This commit should fix #29725.

Signed-off-by: Veronika Bušů <paricbat@email.cz>
2023-05-11 08:34:17 +02:00
Pu Xingyu
3079828cb9 Update wpt test expectations 2023-05-10 19:09:18 +08:00
Pu Xingyu
debcd30b21 layout 2020: Implement justify-content in flexbox
Align the items along the main-axis per justify-content.
2023-05-10 19:06:52 +08:00
Oriol Brufau
6785c57c78 Add support for the 'cap' font-relative unit
This is a backport of https://phabricator.services.mozilla.com/D133101,
by Jonathan Kew.

Note that Servo isn't using font metrics yet, so the unit still won't
really work.
2023-05-10 03:02:30 +02:00
bors-servo
818ee77d9d
Auto merge of #29677 - mrobinson:resolved-insets, r=delan
Better implement getComputedStyle() for positioned insets

The specification dictates quite quite idiosyncratic return values when
querying insets of positioned elements via `getComputedStyle()`. These
depend on whether or not the element's size was overconstrained. This
change adds a better implementation of that in preparation for returning
proper values for `position: sticky`.

There are two changes here:
- The containing block used in `FragmentTree::find` is properly computed using the `ContainingBlockManager` data structure. This data structure is now updated during traversal through the fragment tree in `Fragment::find`.
- We now take into account whether or not a absolute elements are overconstrained when calculating their resolved insets. For absolutely positioned elements, this happens during absolute positioning. For relatively positioned elements, we can determine this when a `BoxFragment` is constructed.

---
<!-- 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

<!-- 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. -->
2023-05-09 12:09:51 +02:00
Martin Robinson
e167526618 Better implement getComputedStyle() for positioned insets
The specification dictates quite quite idiosyncratic return values when
querying insets of positioned elements via getComputedStyle(). These
depend on whether or not the elements size was overconstrained. This
change adds a better implementation of that in preparation for returning
proper values for position: sticky.
2023-05-09 12:07:20 +02:00
bors-servo
419c03182f
Auto merge of #29711 - switchpiggy:sp3, r=mrobinson
Implemented special cases for Element.clientWidth() and clientHeight()

<!-- Please describe your changes on the following line: -->
Implemented the special cases for Element.clientWidth() and Element.clientHeight() as outlined in issue #29704.

---
<!-- 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

<!-- Either: -->
- [x] These changes do not require tests because tests already exist.

<!-- 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. -->

[Specification text](https://w3c.github.io/csswg-drafts/cssom-view/#dom-element-clientwidth):
> If the element is the [root element](https://w3c.github.io/csswg-drafts/css-display-4/#root-element) and the element’s [node document](https://dom.spec.whatwg.org/#concept-node-document) is not in [quirks mode](https://dom.spec.whatwg.org/#concept-document-quirks), or if the element is [the body element](https://html.spec.whatwg.org/multipage/dom.html#the-body-element-2) and the element’s node document is in quirks mode, return the [viewport](https://www.w3.org/TR/CSS21/visuren.html#x1) width excluding the size of a rendered scroll bar (if any).
2023-05-08 13:56:51 +02:00
bors-servo
61f872e7da
Auto merge of #29710 - servo:rename_sender_receiver_in_constellation, r=mrobinson
Make names of Sender<> and Receiver<> variables more coherent

<!-- Please describe your changes on the following line: -->
Sometimes these variables are called port, sometimes ipc, sometimes they have the name of the thread on the other end and sometimes not.  This PR tries to standardize on an obvious name for all of them:

Common pattern to note in this PR:
- If it is a `IpcSender`, then naming is followed by `ipc_sender`, such as:  `bluetooth_ipc_sender`,  `canvas_ipc_sender` etc..
- If variable is `crossbeam_channel` sender/receiver then naming is followed by `sender`/`receiver` such as:  `devtools_sender`, `canvas_sender` etc...

---
<!-- 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 [#29679](https://github.com/servo/servo/issues/29679)

<!-- Either: -->
- [ ] There are tests for these changes OR
- [x] These changes do not require tests

<!-- 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. -->
2023-05-08 11:36:33 +02:00
bors-servo
c67d760264
Auto merge of #29703 - ohno418:update-url-constructor-steps, r=mrobinson
Update step numbers in URL constructor

<!-- Please describe your changes on the following line: -->
Two commits have been made ahead of the current implementation of
Servo's URL constructor:

- Align with a more modern IDL definition style [1]
- Add URL.canParse() [2]

Since these commits don't alter the actual behavior, this commit only
updates the step numbers and adds brief descriptions for each step.

No behavior change is expected with this commit.

[1]: ea3b75d333
[2]: ae3c28b84e

---
<!-- 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
- [ ] These changes fix #___ (GitHub issue number if applicable)

<!-- Either: -->
- [x] These changes do not require tests because no behavior has changed.

<!-- 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. -->
2023-05-08 09:29:40 +02:00
atbrakhi
55de8e3ddc Make sender and receiver name more coherent 2023-05-08 09:23:10 +02:00
bors-servo
7cfdf87e77
Auto merge of #29716 - mrobinson:generic-dom-wrapper, r=jdm
Eliminate duplicate Layout DOM wrappers

There are duplicate sets of Layout DOM wrappers: one for Layout 2013 and one for Layout 2020. As part of cleaning up and simplifying the wrappers, this change parameterizes them on the specific layout data they contain. This allows them to be shared again. In addition, various small cleanups are included.

Fixes #29691.

<!-- 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 #29691
- [x] There are tests for these changes

<!-- 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. -->
2023-05-08 07:17:09 +02:00
bors-servo
897ecc5a19
Auto merge of #29721 - servo:wpt_update_07-05-2023, r=jdm
Sync WPT with upstream (07-05-2023)

Automated downstream sync of changes from upstream as of 07-05-2023
[no-wpt-sync]
r? @servo-wpt-sync
2023-05-08 03:19:53 +02:00
bors-servo
463e5f9d5a
Auto merge of #29720 - Loirooriol:backport-D143942, r=mrobinson
Don't go through app-units-ratio to convert absolute lengths

This is a backport of https://phabricator.services.mozilla.com/D143942, by Emilio Cobos Álvarez.

This doesn't change behavior on its own, but the current code introduces some minor floating point error which we can avoid, and which would cause failures with the patch for #29696.

<!-- 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
- [ ] These changes fix #___ (GitHub issue number if applicable)

<!-- Either: -->
- [ ] There are tests for these changes OR
- [X] These changes do not require tests because they don't change behavior on their own.

<!-- 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. -->
2023-05-08 01:01:51 +02:00
switchpiggy
53f939eac5 Changed expected test results for clientHeight/clientWidth special cases from failing to passing 2023-05-07 14:16:58 -07:00
bors-servo
01f8121642
Auto merge of #29706 - mrobinson:temporary-fix-for-scroll-root, r=jdm
Fix scrolling on root element

eca0acf459 uncovered a bug in the way that the scrolling area of `window` was calculated and broke scrolling on the root element. This change does two things in order to fix that:

1. Does a partial revert of eca0acf459 in order to get scrolling from script working again on the window object.
2. Has the compositor always generate a frame for scrolls starting from script and waits for them. This is speculative fix for flakiness in root scrolling tests on CI.

The changes to the compositor expose some hidden failures, which is why some tests are marked as failing now.

---
<!-- 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

<!-- 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. -->
2023-05-07 19:04:53 +02:00
bors-servo
6a8ba16439
Auto merge of #29723 - sagudev:2edition2021, r=jdm
Use resolver 2

Latest [wgpu crates requires resolver 2](https://sotrh.github.io/learn-wgpu/beginner/tutorial1-window/#using-rust-s-new-resolver). There are also some rust 2021 edition fixes from cargo-fix.

---
<!-- 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
- [ ] These changes fix #___ (GitHub issue number if applicable)

<!-- Either: -->
- [ ] 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. -->
2023-05-07 16:28:18 +02:00
sagudev
dffb75a4c6 cargo-fix for 2021 2023-05-07 15:45:56 +02:00
sagudev
c2778b9bef Use resolver v2 2023-05-07 15:45:55 +02:00
WPT Sync Bot
9b45fdb3f5 Update web-platform-tests to revision b'8d8b273d2265095c7f5330ff231940e68fb49754' 2023-05-07 01:31:13 +00:00
Yutaro Ohno
3336bf6cce Update step numbers in URL constructor
Two commits have been made ahead of the current implementation of
Servo's URL constructor:

- Align with a more modern IDL definition style [1]
- Add URL.canParse() [2]

Since these commits don't alter the actual behavior, this commit only
updates the step numbers and adds brief descriptions for each step.

No behavior change is expected with this commit.

[1]: ea3b75d333
[2]: ae3c28b84e

Signed-off-by: Yutaro Ohno <yutaro.ono.418@gmail.com>
2023-05-06 16:06:03 +09:00
Oriol Brufau
f19df142f8 Don't go through app-units-ratio to convert absolute lengths
This is a backport of https://phabricator.services.mozilla.com/D143942,
by Emilio Cobos Álvarez.

This doesn't change behavior on its own, but the current code introduces
some minor floating point error which we can avoid, and which would
cause failures with the patch for #29696.
2023-05-06 02:02:07 +02:00
bors-servo
bee09efcc5
Auto merge of #29717 - Loirooriol:dont-skip-borders-and-outline-tests, r=mukilan
Don't skip css-borders and css-outline tests

This enables a total of 8 tests.
I have a patch that fixes 5 out of the 7 failures.

<!-- 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
- [ ] These changes fix #___ (GitHub issue number if applicable)

<!-- Either: -->
- [ ] There are tests for these changes OR
- [X] These changes do not require tests because there is no change in behavior.

<!-- 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. -->
2023-05-05 23:52:56 +02:00
switchpiggy
34762d97ad fixup! Checks moved to Element::client_rect(), fixed conditions for the special cases, reconfigured Window constructor to initialize current_viewport to initial window size 2023-05-05 11:13:26 -07:00
Martin Robinson
2d31d4301d Eliminate duplicate Layout DOM wrappers
There are duplicate sets of Layout DOM wrappers: one for Layout 2013 and
one for Layout 2020. As part of cleaning up and simplifying the
wrappers, this change parameterizes them on the specific layout data
they contain. This allows them to be shared again. In addition, various
small cleanups are included.

Fixes #29691.
2023-05-05 17:16:38 +02:00
bors-servo
0e6db5266d
Auto merge of #29708 - Loirooriol:outline-serialization, r=mrobinson
Improve serialization of the outline shorthand

This is a backport of https://phabricator.services.mozilla.com/D155569, by Connor Pearson.

Test: /css/css-ui/parsing/outline-valid-mandatory.html

<!-- 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 #29697 (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. -->
2023-05-05 16:22:51 +02:00
Oriol Brufau
f6fb31a877 Don't skip css-borders and css-outline tests
This enables a total of 8 tests.
I have a patch that fixes 5 out of the 7 failures.
2023-05-05 14:57:13 +02:00
bors-servo
ab0d462c83
Auto merge of #29715 - servo:upgrade-boto3-python-dependency, r=mrobinson
Upgrade boto3 python module.

<!-- Please describe your changes on the following line: -->

The current version seem to be broken due to API change in one of the transitive dependency (urllib3) causing nightly builds to fail during package upload step with error:

```
ImportError: cannot import name 'DEFAULT_CIPHERS' from 'urllib3.util.ssl_' (C:\a\servo\servo\python\_virtualenv3.7\Lib\site-packages\urllib3\util\ssl_.py)
```

---
<!-- 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 #29714

<!-- Either: -->
- [ ] There are tests for these changes OR
- [x] These changes do not require tests because it is only used by CI workflow which has been tested in a [manual run](https://github.com/servo/servo/actions/runs/4892112991).
2023-05-05 14:30:20 +02:00
bors-servo
0e1d1e3189
Auto merge of #29712 - mrobinson:no-test-results-for-closed-prs, r=mukilan
Don't report test results for closed PRs

When doing a try run, bors will often push the last closed merge onto the branch before pushing the change to try. This means that test results get reported on closed PRs. There are two issues with this:

1. Doing too much work on the bots.
2. Extra results on closed PRs.

This changes fixes the second issue.

Fixes #29583.

<!-- 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 #29583

<!-- Either: -->
- [x] These changes do not require tests because they fix a infrastructure issue.

<!-- 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. -->
2023-05-05 12:55:34 +02:00
Martin Robinson
edeb24b30f Fix scrolling on root element
eca0acf459 uncovered a bug in the way that
the scrolling area of `window` was calculated and broke scrolling on the
root element. This change does two things in order to fix that:

1. Does a partial revert of eca0acf459 in
   order to get scrolling from script working again on the window
   object.
2. Has the compositor always generate a frame for scrolls starting from
   script and waits for them. This is speculative fix for flakiness in
   root scrolling tests on CI.
2023-05-05 12:42:02 +02:00