Commit graph

46123 commits

Author SHA1 Message Date
Oriol Brufau
6b2bbdd02d Layout 2020: implement clearance as Option<Length>
Clearance was implemented as a Length, where zero meant no clearance.
However, having a clearance of 0px should be different than having
no clearance, since the former can still prevent margin collapse.

This patch keeps the existing behavior, so it won't be possible to get
a clearance of Some(Length::zero()), but it prepares the terrain for
a follow-up to fix calculate_clearance to return the proper thing.
2023-06-29 11:00:45 +02:00
bors-servo
a725380db0
Auto merge of #29939 - mrobinson:fix-float-placement-with-future-margins, r=mrobinson
Properly position floats when subsequent boxes collapse margins with containing block

Margins should be able to collapse through floats when collapsing with
parent blocks (the containing block). To properly place floats in this
situation, we need to look at these subsequent floats to find out how
much of the margin will collapse with the parent.

This initial implementation is very basic and the second step would be
to cache this in order to avoid having to constantly recalculate it.

Fixes #29915.

Co-authored-by: Oriol Brufau <obrufau@igalia.com>

<!-- 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 #29915.
- [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-06-28 08:41:47 +02:00
Martin Robinson
bb13702556 Properly position floats when subsequent boxes collapse margins with containing block
Margins should be able to collapse through floats when collapsing with
parent blocks (the containing block). To properly place floats in this
situation, we need to look at these subsequent floats to find out how
much of the margin will collapse with the parent.

This initial implementation is very basic and the second step would be
to cache this in order to avoid having to constantly recalculate it.

Fixes #29915.

Co-authored-by: Oriol Brufau <obrufau@igalia.com>
2023-06-27 22:45:42 +02:00
bors-servo
ea4701c57b
Auto merge of #29938 - mrobinson:remove-domtotexture, r=jdm
Remove the DOMToTexture feature

This relies on WebRender's frame output API, `set_output_image_handler`,
which has been removed from the latest upstream [1]. It's sad to remove
this feature, which was probably a lot of work to implement, but it
seems difficult to patch WebRender to restore this functionality.

Fixes #29936.

1. https://hg.mozilla.org/mozilla-central/rev/361521e3c52324809553c555fb066d50f023d9bf

<!-- 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 #29936.
- [x] These changes do not require tests because they remove functionality.

<!-- 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-06-27 20:01:48 +02:00
Martin Robinson
ec3b2826ae
Remove the DOMToTexture feature
This relies on WebRender's frame output API, `set_output_image_handler`,
which has been removed from the latest upstream [1]. It's sad to remove
this feature, which was probably a lot of work to implement, but it
seems difficult to patch WebRender to restore this functionality.

Fixes #29936.

1. https://hg.mozilla.org/mozilla-central/rev/361521e3c52324809553c555fb066d50f023d9bf
2023-06-27 11:39:52 +02:00
bors-servo
1ca74a3cee
Auto merge of #29935 - atouchet:sjson, r=jdm
Update serde_json

<!-- 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: -->
- [ ] `./mach build -d` does not report any errors
- [ ] `./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-06-27 01:52:51 +02:00
bors-servo
cc71bfd9c3
Auto merge of #29810 - MendyBerger:master, r=Loirooriol
css `inset` should work on Layout 2020

<!-- Please describe your changes on the following line: -->
`top`, `bottom`, `left`, `right`, are already implemented in layout-2020, so adding the shorthand can be enabled.

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

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

I'm don't know if I need tests for this, how do I determine that?

<!-- 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-06-26 22:49:49 +02:00
Alex Touchet
483edaa987 Update serde_json 2023-06-26 13:49:12 -07:00
Oriol Brufau
458df8c884 Update test expectations 2023-06-26 21:58:08 +02:00
MendyBerger
922e077f1d css inset-block/inline should work on servo-2020 2023-06-26 21:48:20 +02:00
MendyBerger
2df7d69b07 css inset should work on servo-2020 2023-06-26 21:48:19 +02:00
bors-servo
002fe81cc6
Auto merge of #29929 - Loirooriol:clearance-on-replaced, r=mrobinson
Fix clearance on replaced elements

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

<!-- 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-06-26 19:49:43 +02:00
bors-servo
725f95e69a
Auto merge of #29931 - mrobinson:update-uuid, r=jdm
Update uuid

This is required to use the new version of gleam and update ipc-channels
without duplicating the dependency in the future.

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

<!-- 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-06-26 17:35:30 +02:00
Oriol Brufau
246dc983f6 Fix clearance on replaced elements 2023-06-26 17:24:24 +02:00
Martin Robinson
78464eeabc Update uuid
This is required to use the new version of gleam and update ipc-channels
without duplicating the dependency in the future.
2023-06-26 16:27:12 +02:00
bors-servo
cc4650aeb3
Auto merge of #29921 - mrobinson:rename-wpt-tests-directory, r=atbrakhi
Rename `tests/wpt/web-platform-tests` to `tests/wpt/tests`

Rename the WPT tests directory to be more consistent with other WPT suites and
also to match what is done in Gecko. This makes things a bit simpler to type.

- Move tests/wpt/web-platform-tests to tests/wpt/tests
- Update scripts to reflect new WPT directory name

<!-- 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. -->
2023-06-26 12:48:31 +02:00
Martin Robinson
1359e8e462
Move tests/wpt/web-platform-tests to tests/wpt/tests 2023-06-26 10:48:30 +02:00
Martin Robinson
f017169ae4
Update scripts to reflect new WPT directory name 2023-06-26 10:48:02 +02:00
bors-servo
04359812c9
Auto merge of #29927 - Loirooriol:bfc-root-contain-floats, r=mrobinson
Increase BFC root height to contain floats

<!-- 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 #29823
- [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-06-26 10:29:36 +02:00
Oriol Brufau
e38083a96e Increase BFC root height to contain floats 2023-06-26 01:00:00 +02:00
bors-servo
234d507234
Auto merge of #29911 - mrobinson:static-absolute-with-static-fixed-child, r=Loirooriol
Fix positioning of statically positioned fixed child of absolutes

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

<!-- 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-06-25 22:12:45 +02:00
bors-servo
9829931c27
Auto merge of #29924 - servo:wpt_update_25-06-2023, r=servo-wpt-sync
Sync WPT with upstream (25-06-2023)

Automated downstream sync of changes from upstream as of 25-06-2023
[no-wpt-sync]
r? @servo-wpt-sync
2023-06-25 03:32:40 +02:00
WPT Sync Bot
209b7ad36b Update web-platform-tests to revision b'7b682ab07397d72fceb6594d0f27cb36cf1d8ee3' 2023-06-25 01:32:25 +00:00
bors-servo
7ffb9b2d49
Auto merge of #29917 - mrobinson:more-environment-cleanup, r=jdm
Clean up environment variables in `command_base.py`

- The `HOST_FILE` setting is completely unused by the code.
- Remove some likely Python 2 compatibility code.
- Remove things pertaining to Ubuntu 16.04 which is EOL.
- Remove a workaround for MacOS which no longer applies.

<!-- 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 do not require tests because they mostly remove dead build script code.

<!-- 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-06-24 14:27:15 +02:00
bors-servo
d30c9f8302
Auto merge of #29922 - sagudev:patch-6, r=mrobinson
Fix Windows build after #29912

Fixup for https://github.com/servo/servo/pull/29912#issuecomment-1605347271

<!-- 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 fixup https://github.com/servo/servo/pull/29912

<!-- 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-06-24 12:18:26 +02:00
Samson
0256ac9c62
Update command_base.py
Fixup for https://github.com/servo/servo/pull/29912#issuecomment-1605347271
2023-06-24 12:05:32 +02:00
bors-servo
19eeca7b3a
Auto merge of #29920 - sagudev:py-fixups, r=mrobinson
Standalone Flake8 config

Instead of passing flake8 config via CLI flags, I extracted them in flake8 config, so IDE tools can also pick it up.

---
<!-- 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 it is so trivial

<!-- 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-06-24 08:54:30 +02:00
bors-servo
edeed11cef
Auto merge of #29912 - mrobinson:try-gold-on-windows, r=jdm
Don't explicitly disable gold on Windows

This seems to be working fine now on CI, so I think we can remove this
workaround.

<!-- 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 do not require tests because they are just build 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-06-23 17:25:47 +02:00
sagudev
bf08032b03 Standalone Flake8 config 2023-06-23 16:24:35 +02:00
Martin Robinson
63a6b73f9a
Fix positioning of statically positioned fixed child of absolutes 2023-06-23 15:18:06 +02:00
bors-servo
c98810ee92
Auto merge of #29905 - servo:build-timings, r=atbrakhi
Collect build timings on GitHub CI

This will help to investigate slow builds on GitHub.

<!-- 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 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-06-23 15:15:23 +02:00
Martin Robinson
e679e1f793 Collect build timings on GitHub CI
This will help to investigate slow builds on GitHub.
2023-06-23 15:14:40 +02:00
bors-servo
d3bb2170b8
Auto merge of #29910 - mrobinson:static-absolute-of-inline-box, r=Loirooriol
Fix positioning of statically positioned absolute child of inline box

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

<!-- 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-06-23 08:59:37 +02:00
Martin Robinson
0ced74cde3
Fix positioning of statically positioned absolute child of inline box 2023-06-23 08:57:57 +02:00
bors-servo
befb472c9d
Auto merge of #29916 - mrobinson:rename-meta-directories, r=atbrakhi
Rename metadata directories

Rename metadata directories and update all references. This is in preparation
for making Layout 2020 the default layout system.

This does the following renames:
 - `tests/wpt/metadata` → `tests/wpt/meta-legacy-layout`
 - `tests/wpt/metadata-layout-2020` → `tests/wpt/meta`
 - `tests/wpt/mozilla/meta` → `tests/wpt/mozilla/meta-legacy-layout`
 - `tests/wpt/mozilla/meta-layout-2020` → `tests/wpt/mozilla/meta`

---
<!-- 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 do not require tests because they change how tests are run.

<!-- 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-06-22 23:42:20 +02:00
Martin Robinson
f4578afdfe
Rename metadata directories
This renames:
 - `tests/wpt/metadata` → `tests/wpt/meta-legacy-layout`
 - `tests/wpt/metadata-layout-2020` → `tests/wpt/meta`
 - `tests/wpt/mozilla/meta` → `tests/wpt/mozilla/meta-legacy-layout`
 - `tests/wpt/mozilla/meta-layout-2020` → `tests/wpt/mozilla/meta`
2023-06-22 21:15:41 +02:00
Martin Robinson
f162d28e6d
Clean up environment variables inn command_base.py
- The `HOST_FILE` setting is completely unused by the code.
- Remove some likely Python 2 compatibility code.
- Remove things pertaining to Ubuntu 16.04 which is EOL.
- Remove a workaround for MacOS which no longer applies.
2023-06-22 19:47:20 +02:00
bors-servo
cfd24f00bc
Auto merge of #29913 - mrobinson:mach-unicode-paths, r=atbrakhi
Allow building on paths with Unicode characters

This now works since the upgrade to Python 3, so we can remove
this code which prevents mach from running in these situations.

<!-- 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 #10002.
- [x] These changes do not require tests because they just change build scripts.

<!-- 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-06-22 17:34:07 +02:00
bors-servo
5ac7cdc18d
Auto merge of #25623 - nipunG314:25516, r=mrobinson
Refactor ServoParser Tokenizer to return TokenizerResult

As stated in  #25516, this PR refactors the feed functions in the following files to return an Option instead of a Result:

- components/script/dom/servoparser/async_html.rs
- components/script/dom/servoparser/html.rs
- components/script/dom/servoparser/xml.rs
- components/script/dom/servoparser/mod.rs

Originally, these functions were returning the Err values for situations that didn't actually result in an error. This PR fixes that.

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

<!-- Either: -->
- [X] These changes do not require tests because it is a refactor.

<!-- 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-06-22 14:21:16 +02:00
Nipun Garg
41fe94244a
Refactor ServoParser Tokenizer to return TokenizerResult 2023-06-22 13:45:20 +02:00
Martin Robinson
e22ae5daea
Allow building on paths with Unicode characters
This now works since the upgrade to Python 3, so we can remove
this code which prevents mach from running in these situations.
2023-06-22 12:25:38 +02:00
Martin Robinson
da581535d1
Don't explicitly disable gold on Windows
This seems to be working fine now on CI, so I think we can remove this
workaround.
2023-06-22 11:54:37 +02:00
bors-servo
a98dcfffe0
Auto merge of #29909 - mrobinson:mach-bootstrap-macos, r=mukilan
Implement `./mach bootstrap` for MacOS

<!-- 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 do not require tests because they just change build scripts.

<!-- 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-06-22 11:41:44 +02:00
Martin Robinson
a57c49a4bb Implement ./mach bootstrap for MacOS 2023-06-22 11:14:00 +02:00
bors-servo
7aaad0aa7e
Auto merge of #29903 - mrobinson:improve-windows-build-instructions, r=mrego
Simplify the build instructions in README.md

- Add a chocolatey configuration that installs all dependencies and split
  the instructions into a normal and manual installation section. In
  addition fix a warning print statement for the Windows build that would
  trigger a Python exception.
- Simplify the build instructions in the README and move all manual
  setup details to: https://github.com/servo/servo/wiki/Building

<!-- 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 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-06-22 08:21:21 +02:00
bors-servo
7fc6190c36
Auto merge of #29899 - mrobinson:absolute-floats, r=Loirooriol
Properly position absolutes with static insets that are children of floats

Previously, final float positions were calculated when their parents
were positioned. This prevented proper positioning of absolute children
of floats with static insets, because they accumulate offsets as they
are hoisted up the tree.

This change moves the final float positioning to
`PlacementState::place_fragment` for the float itself so that it happens
before any insets are updated for hoisted descendants. In addition to
simplifying the code, this makes it a bit more efficient. Finally,
floats are taken into account when updating static insets of hoisted
boxes.

Fixes #29826.

---
<!-- 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 #29826
- [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-06-22 01:56:56 +02:00
Martin Robinson
30ab348116 Properly position absolutes with static insets that are children of floats
Previously, final float positions were calculated when their parents
were positioned. This prevented proper positioning of absolute children
of floats with static insets, because they accumulate offsets as they
are hoisted up the tree.

This change moves the final float positioning to
`PlacementState::place_fragment` for the float itself so that it happens
before any insets are updated for hoisted descendants. In addition to
simplifying the code, this makes it a bit more efficient. Finally,
floats are taken into account when updating static insets of hoisted
boxes.

Fixes #29826.
2023-06-22 01:55:21 +02:00
Martin Robinson
8bac189ea2
Simplify the build instructions
- Add a chocolatey configuration that installs all dependencies and split
  the instructions into a normal and manual installation section. In
  addition fix a warning print statement for the Windows build that would
  trigger a Python exception.
- Simplify the build instructions in the README and move all manual
  setup details to: https://github.com/servo/servo/wiki/Building
2023-06-21 19:37:46 +02:00
bors-servo
9edc2c664f
Auto merge of #29902 - Loirooriol:clearance-prevents-margin-collapse2, r=mrobinson
Fix interaction of clearance with margin collapse

In #29897 I did the simple naive thing, but it wasn't entirely correct. This patch tries to address the problems. In particular:

 - Clearance should prevent margins from collapsing through if it happens between them, as opposed to on the element that owns them.
 - The margins of an element with clearance can still collapse through, and collapse with other siblings as normal, but the resulting margin can't collapse with the bottom margin of the parent.

<!-- 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 #29896
- [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-06-21 19:05:32 +02:00
Oriol Brufau
0dd6abe023 Fix interaction of clearance with margin collapse
In #29897 I did the simple naive thing, but it wasn't entirely correct.
This patch tries to address the problems. In particular:

 - Clearance should prevent margins from collapsing through if it
   happens between them, as opposed to on the element that owns them.
 - The margins of an element with clearance can still collapse through,
   and collapse with other siblings as normal, but the resulting
   margin can't collapse with the bottom margin of the parent.
2023-06-21 18:00:05 +02:00