Commit graph

378 commits

Author SHA1 Message Date
bors-servo
2426a38a4d
Auto merge of #29748 - Loirooriol:sync, r=mrobinson
Backport several style changes from Gecko

<!-- 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-19 22:49:36 +02:00
bors-servo
c7f8a6ecb5
Auto merge of #29747 - mrobinson:workspace-dependencies, r=mukilan
Start the transition to workspace dependencies

This will ultimately make it simpler to update crate dependencies and reduce duplication when specifying requirements. Generally, this change does not touch dependencies that are only used by a single crate. We could consider moving them to workspace dependencies 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] 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-18 07:03:30 +02:00
Martin Robinson
2f4c47bfe7 Start the transition to workspace dependencies
This will ultimately make it simpler to update crate dependencies and
reduce duplicate when specifying requirements. Generally, this change
does not touch dependencies that are only used by a single crate. We
could consider moving them to workspace dependencies in the future.
2023-05-17 11:59:35 +02:00
Martin Robinson
b60e105526 Refactor Layout 2020 layout for a compositor-side scroll tree
This change refactors how layout is done in Layout 2020 in preparation
for a compositor-side scroll tree:

1. Now the SpatialId and ClipId of each fragment is stored separately.
   This will allow storing a scroll node id instead of only the handle
   to the WebRender spatial node.
2. Separate out stacking context tree construction and display list
   building. This change will make it possible to eventually build the
   stacking context tree without the full display list if we find that
   necessary. For instance, this might be useful to cache containing
   block boundaries.
3. Add a `DisplayList` struct that stores both the WebRender display
   list builder and the compositor info. This exposes the API to the
   layout thread for display list building.

In addition, this change adds a lot of missing documentation.  This
should not change behavior.
2023-05-17 10:46:27 +02:00
Oriol Brufau
108c50c6df Further changes required by Servo 2023-05-16 12:54:55 +02: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
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
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
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
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
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
Martin Robinson
932dc72402 Fix an assertion failure in Layout 2020
The recent changes to containing blocks, exposed an issue in the
StyleExt trait:

 - When deciding whether an element creates a reference frame, whether
   or not it is a non-replaced inline is taken into account when
   determining if it has a transform.
 - When deciding whether an element creates a stacking context for all
   descendants, whether or not it is a non-replaced inline is *not*
   taken into account when determining if it has a transform.

In both cases, elements that are inline should not be considered to have
transforms. This commit fixes that issue as well as making it so that
inlines cannot be transformed. Note that is also breaks transforms on
replaced elements, but that functionality was fairly half-baked due to
the inconsistent determination of transforms.
2023-05-05 06:36:12 +02:00
bors-servo
4e37d07ea4
Auto merge of #29699 - mrobinson:add-html-body-tag, r=mukilan
Detect body elements during layout

During layout it is often useful, for various specification reasons, to know if an element is the `<body>` element of an `<html>` element root. There are a couple places where a brittle heuristic is used to detect `<body>` elements. This information is going to be even more important to properly handle `<html>` elements that inherit their overflow property from their `<body>` children.

Implementing this properly requires updating the DOM wrapper interface. This check does reach up to the parent of thread-safe nodes, but this is essentially the same kind of operation that `parent_style()` does, so is ostensibly safe.

This change should not change any behavior and is just a preparation step for properly handle `<body>` overflow.

<!-- 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 it does 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-04 11:35:25 +02:00
Martin Robinson
72302e2dae Detect body elements during layout
During layout it is often useful, for various specification reasons, to
know if an element is the `<body>` element of an `<html>` element root. There
are a couple places where a brittle heuristic is used to detect `<body>`
elements. This information is going to be even more important to
properly handle `<html>` elements that inherit their overflow property from
their `<body>` children.

Implementing this properly requires updating the DOM wrapper interface.
This check does reach up to the parent of thread-safe nodes, but this is
essentially the same kind of operation that `parent_style()` does, so is
ostensibly safe.

This change should not change any behavior and is just a preparation
step for properly handle `<body>` overflow.
2023-05-04 10:46:27 +02:00
bors-servo
f29834608a
Auto merge of #29702 - Loirooriol:outline-offset, r=mrobinson
Implement outline-offset in layout-2020

Tests that are now passing:
- /_mozilla/css/outline_offset_a.htm
- /css/css-ui/outline-010.html
- /css/css-ui/outline-012.html
- /css/css-ui/outline-013.html
- /css/css-ui/outline-017.html
- /css/css-ui/outline-negative-offset-composited-scroll.html
- /css/css-ui/outline-offset-001.html
- /css/css-ui/outline-offset-table-001.html
- /css/css-ui/outline-offset.html
- /css/css-ui/parsing/outline-offset-computed.html
- /css/css-ui/parsing/outline-offset-valid.html

Also improvements in:
- /_mozilla/mozilla/calc.html
- /css/css-ui/animation/outline-offset-interpolation.html
- /css/css-ui/inheritance.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 #29701
<!-- 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-03 18:28:18 +02:00
Martin Robinson
0c13fcb9f2 Rework CB management during stacking context tree construction
Manage containing blocks and WebRender SpaceAndClip during stacking
context tree constuction using the ContainingBlockInfo data structure.
This will allow us to reuse this data structure whenever we traverse the
fragment tree. In addition, StackingContextBuilder is no longer
necessary at all. This change also fixes some bugs where fixed position
fragments were not placed in the correct spatial node. Unfortunately,
these fixes are difficult to test because of #29659.
2023-05-03 10:43:56 +02:00
Oriol Brufau
16b07ee456 Implement outline-offset in layout-2020
Tests that are now passing:
- /_mozilla/css/outline_offset_a.htm
- /css/css-ui/outline-010.html
- /css/css-ui/outline-012.html
- /css/css-ui/outline-013.html
- /css/css-ui/outline-017.html
- /css/css-ui/outline-negative-offset-composited-scroll.html
- /css/css-ui/outline-offset-001.html
- /css/css-ui/outline-offset-table-001.html
- /css/css-ui/outline-offset.html
- /css/css-ui/parsing/outline-offset-computed.html
- /css/css-ui/parsing/outline-offset-valid.html

Also improvements in:
- /_mozilla/mozilla/calc.html
- /css/css-ui/animation/outline-offset-interpolation.html
- /css/css-ui/inheritance.html
2023-05-02 17:59:48 +02:00
Oriol Brufau
d67bf49bd9 Implement outlines in layout-2020
This only covers the CSS2 properties: 'outline-width', 'outline-style',
'outline-color', and the shorthand 'outline'.

CSS UI 3 introduced 'outline-offset', which is left for a follow-up.

'outline-color: invert' isn't included either, but note CSS UI says that
conformant UAs may ignore the 'invert' value on platforms that do not
support color inversion of the pixels on the screen.

Tests that are now passing:
- /_mozilla/css/input_insertion_point_empty_a.html
- /_mozilla/css/outlines_simple_a.html
- /_mozilla/css/stacking_context_overflow_relative_outline_a.html
- /_mozilla/mozilla/getPropertyPriority.html
- /css/CSS2/ui/outline-color-001.xht
- /css/CSS2/ui/outline-color-002.xht
- /css/CSS2/ui/outline-color-007.xht
- /css/CSS2/ui/outline-color-008.xht
- /css/CSS2/ui/outline-color-013.xht
- /css/CSS2/ui/outline-color-018.xht
- /css/CSS2/ui/outline-color-023.xht
- /css/CSS2/ui/outline-color-024.xht
- /css/CSS2/ui/outline-color-025.xht
- /css/CSS2/ui/outline-color-031.xht
- /css/CSS2/ui/outline-color-036.xht
- /css/CSS2/ui/outline-color-041.xht
- /css/CSS2/ui/outline-color-046.xht
- /css/CSS2/ui/outline-color-047.xht
- /css/CSS2/ui/outline-color-048.xht
- /css/CSS2/ui/outline-color-049.xht
- /css/CSS2/ui/outline-color-050.xht
- /css/CSS2/ui/outline-color-051.xht
- /css/CSS2/ui/outline-color-052.xht
- /css/CSS2/ui/outline-color-053.xht
- /css/CSS2/ui/outline-color-054.xht
- /css/CSS2/ui/outline-color-058.xht
- /css/CSS2/ui/outline-color-059.xht
- /css/CSS2/ui/outline-color-061.xht
- /css/CSS2/ui/outline-color-062.xht
- /css/CSS2/ui/outline-color-069.xht
- /css/CSS2/ui/outline-color-070.xht
- /css/CSS2/ui/outline-color-071.xht
- /css/CSS2/ui/outline-color-072.xht
- /css/CSS2/ui/outline-color-073.xht
- /css/CSS2/ui/outline-color-074.xht
- /css/CSS2/ui/outline-color-075.xht
- /css/CSS2/ui/outline-color-079.xht
- /css/CSS2/ui/outline-color-081.xht
- /css/CSS2/ui/outline-color-082.xht
- /css/CSS2/ui/outline-color-089.xht
- /css/CSS2/ui/outline-color-090.xht
- /css/CSS2/ui/outline-color-091.xht
- /css/CSS2/ui/outline-color-092.xht
- /css/CSS2/ui/outline-color-093.xht
- /css/CSS2/ui/outline-color-094.xht
- /css/CSS2/ui/outline-color-095.xht
- /css/CSS2/ui/outline-color-099.xht
- /css/CSS2/ui/outline-color-101.xht
- /css/CSS2/ui/outline-color-102.xht
- /css/CSS2/ui/outline-color-109.xht
- /css/CSS2/ui/outline-color-110.xht
- /css/CSS2/ui/outline-color-111.xht
- /css/CSS2/ui/outline-color-112.xht
- /css/CSS2/ui/outline-color-113.xht
- /css/CSS2/ui/outline-color-114.xht
- /css/CSS2/ui/outline-color-115.xht
- /css/CSS2/ui/outline-color-119.xht
- /css/CSS2/ui/outline-color-121.xht
- /css/CSS2/ui/outline-color-122.xht
- /css/CSS2/ui/outline-color-130.xht
- /css/css-ui/outline-001.html
- /css/css-ui/outline-002.html
- /css/css-ui/outline-004.html
- /css/css-ui/outline-007.html
- /css/css-ui/outline-008.html
- /css/css-ui/outline-016.html
- /css/css-ui/outline-018.html
- /css/css-ui/outline-021.html
- /css/css-ui/outline-022.html
- /css/css-ui/outline-color-001.html
- /css/css-ui/outline-style-011.html
- /css/css-ui/outline-style-012.html
- /css/css-ui/outline-style-013.html
- /css/css-ui/outline-style-014.html
- /css/css-ui/parsing/outline-color-computed.html
- /css/css-ui/parsing/outline-color-valid-mandatory.html
- /css/css-ui/parsing/outline-shorthand.html
- /css/css-ui/parsing/outline-style-computed.html
- /css/css-ui/parsing/outline-style-valid.html
- /css/css-ui/parsing/outline-width-valid.html
- /css/css-ui/translucent-outline.html

Also improvements in:
- /_mozilla/mozilla/calc.html
- /css/css-ui/animation/outline-color-interpolation.html
- /css/css-ui/animation/outline-width-interpolation.html
- /css/css-ui/inheritance.html
- /css/css-ui/outline-017.html
- /css/css-ui/parsing/outline-valid-mandatory.html
- /css/css-ui/parsing/outline-width-computed.html
- /css/cssom/cssom-setProperty-shorthand.html
- /css/cssom/getComputedStyle-resolved-colors.html
- /css/cssom/serialize-values.html
- /css/cssom/shorthand-values.html

New failures:
- /css/CSS2/ui/outline-applies-to-005.xht
- /css/CSS2/ui/outline-applies-to-006.xht
- /css/CSS2/ui/outline-color-applies-to-005.xht
- /css/CSS2/ui/outline-color-applies-to-006.xht
- /css/CSS2/ui/outline-style-applies-to-005.xht
- /css/CSS2/ui/outline-style-applies-to-006.xht
- /css/CSS2/ui/outline-width-applies-to-005.xht
- /css/CSS2/ui/outline-width-applies-to-006.xht
  Al of these fail because tables are not implemented yet.
- /css/css-ui/outline-offset.html
  Fails because outline-offset is not implemented yet.
- /css/css-ui/outline-with-padding-001.html
  Fails because the outline doesn't include overflowing contents.
  I don't think this is required by the spec, Firefox fails too.
2023-05-02 02:37:10 +02:00
Oriol Brufau
678b590f80 Normalize corner radii that add up to > 100%
WebRender already seems to be doing this normalization, but this is
needed by inner_radii in order to properly compute the reduced radii
when background-clip is content-box or padding-box.

This will also be needed for expanding the radii for box-shadow or
outline.

Test: css/css-backgrounds/background-rounded-image-clip-002.html
2023-05-01 02:17:54 +02:00
bors-servo
4339b3bab4
Auto merge of #29684 - Loirooriol:corner-clipping-typos, r=mrobinson
Fix corner clipping typos in layout-2020

<!-- Please describe your changes on the following line: -->
inner_radii() had a minus sign that shouldn't be there.

And padding_edge_clip() and content_edge_clip() clearly need to to use
the padding_rect() and content_rect() instead of border_rect.

Tests:
  - css/css-backgrounds/background-clip-padding-box-with-border-radius.html
  - css/css-backgrounds/background-rounded-image-clip.html

---
<!-- 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 #29683 (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-04-29 09:15:59 +02:00
Oriol Brufau
88b9ecea3c Fix corner clipping typos in layout-2020
inner_radii() had a minus sign that shouldn't be there.

And padding_edge_clip() and content_edge_clip() clearly need to to use
the padding_rect() and content_rect() instead of border_rect.

Tests:
  - css/css-backgrounds/background-clip-padding-box-with-border-radius.html
  - css/css-backgrounds/background-rounded-image-clip.html
2023-04-29 08:25:48 +02:00
Oriol Brufau
668c4c8aba Round text decoration thickness to >= 1 device pixels
Previously the thickness coming from font metrics could be something
like 0.7px, so with 1dppx it would be painted as either 1 or 0 device
pixels.

Enforcing at least 1 device pixel ensures that the decoration will be
visible, and rounding to an integral amount of device pixels ensures
that the thickness won't vary depending on the position.

The specification requires this behavior when text-decoration-thickness
is set to a length or percentage. It's not clear if it should also
happen by default, but this seems to match other browsers (except for
WebKit rounding up instead of to the nearest integer).

The test text-decoration-thickness-from-zero-sized-font.html is now
failing because of #29675.
2023-04-27 23:48:53 +02:00
Oriol Brufau
2692426103 Fix text-decoration for block containers in layout-2020
It was only applied to the 1st inline formatting context of a block
container. Other IFCs were created with the Default trait, implying
TextDecorationLine::NONE.
2023-04-26 20:44:01 +02:00
bors-servo
7114b31cf7
Auto merge of #29650 - Loirooriol:text-indent, r=mrobinson
Support text-indent in layout-2020

Existing WPT now passing:
  - _mozilla/css/text_indent_a.html
  - css/CSS2/css1/c71-fwd-parsing-002.xht
  - css/CSS2/css1/c71-fwd-parsing-004.xht
  - css/CSS2/floats-clear/floats-138.xht
  - css/CSS2/text/text-indent-007.xht
  - css/CSS2/text/text-indent-008.xht
  - css/CSS2/text/text-indent-010.xht
  - css/CSS2/text/text-indent-019.xht
  - css/CSS2/text/text-indent-020.xht
  - css/CSS2/text/text-indent-031.xht
  - css/CSS2/text/text-indent-032.xht
  - css/CSS2/text/text-indent-043.xht
  - css/CSS2/text/text-indent-044.xht
  - css/CSS2/text/text-indent-055.xht
  - css/CSS2/text/text-indent-056.xht
  - css/CSS2/text/text-indent-067.xht
  - css/CSS2/text/text-indent-068.xht
  - css/CSS2/text/text-indent-079.xht
  - css/CSS2/text/text-indent-080.xht
  - css/CSS2/text/text-indent-091.xht
  - css/CSS2/text/text-indent-092.xht
  - css/CSS2/text/text-indent-103.xht
  - css/CSS2/text/text-indent-104.xht
  - css/CSS2/text/text-indent-112.xht
  - css/CSS2/text/text-indent-113.xht
  - css/CSS2/text/text-indent-115.xht
  - css/CSS2/text/text-indent-applies-to-002.xht
  - css/CSS2/text/text-indent-applies-to-003.xht
  - css/CSS2/text/text-indent-applies-to-005.xht
  - css/CSS2/text/text-indent-applies-to-006.xht
  - css/CSS2/text/text-indent-applies-to-007.xht
  - css/CSS2/text/text-indent-applies-to-008.xht
  - css/CSS2/text/text-indent-applies-to-009.xht
  - css/CSS2/text/text-indent-applies-to-010.xht
  - css/CSS2/text/text-indent-applies-to-011.xht
  - css/CSS2/text/text-indent-applies-to-014.xht
  - css/CSS2/text/text-indent-applies-to-015.xht
  - css/CSS2/text/text-indent-inherited-001.xht
  - css/CSS2/text/text-indent-overflow-001.xht
  - css/CSS2/text/text-indent-overflow-002.xht
  - css/CSS2/text/text-indent-overflow-003.xht
  - css/CSS2/text/text-indent-overflow-004.xht
  - css/CSS2/text/text-indent-wrap-001.xht
  - css/css-text-decor/text-shadow/textindent.html
  - css/css-text/text-indent/text-indent-percentage-001.xht
  - css/css-text/text-indent/text-indent-percentage-002.html
  - css/css-text/text-indent/text-indent-percentage-003.html
  - css/css-text/text-indent/text-indent-percentage-004.html
  - css/css-values/minmax-length-percent-serialize.html
  - css/css-values/minmax-length-serialize.html

Also improvements in:
  - _mozilla/mozilla/calc.html
  - css/css-text/animations/text-indent-interpolation.html
  - css/css-text/inheritance.html
  - css/css-text/parsing/text-indent-computed.html
  - css/css-text/parsing/text-indent-valid.html
  - css/css-transitions/properties-value-implicit-001.html
  - css/css-values/animations/calc-interpolation.html
  - css/css-values/minmax-percentage-serialize.html
  - css/css-values/viewport-units-css2-001.html
  - css/css-variables/variable-substitution-basic.html
  - css/cssom/serialize-values.html

Existing WPT now failing, due to lack of direction, outside list markers,
flex and grid:
  - css/CSS2/text/text-indent-rtl-001.xht
  - css/CSS2/text/text-indent-rtl-002.xht
  - css/css-pseudo/marker-content-023.html
  - css/css-text/text-indent/anonymous-flex-item-001.html
  - css/css-text/text-indent/anonymous-grid-item-001.html

New WPT tests:
 - css/css-text/text-indent/text-indent-length-001.html
 - css/css-text/text-indent/text-indent-length-002.html
   This one fails in layout-2013.

<!-- 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 #29649 (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-04-26 01:11:55 +02:00
Oriol Brufau
c842023741 Support text-indent in layout-2020
Existing WPT now passing:
  - _mozilla/css/text_indent_a.html
  - css/CSS2/css1/c71-fwd-parsing-002.xht
  - css/CSS2/css1/c71-fwd-parsing-004.xht
  - css/CSS2/floats-clear/floats-138.xht
  - css/CSS2/text/text-indent-007.xht
  - css/CSS2/text/text-indent-008.xht
  - css/CSS2/text/text-indent-010.xht
  - css/CSS2/text/text-indent-019.xht
  - css/CSS2/text/text-indent-020.xht
  - css/CSS2/text/text-indent-031.xht
  - css/CSS2/text/text-indent-032.xht
  - css/CSS2/text/text-indent-043.xht
  - css/CSS2/text/text-indent-044.xht
  - css/CSS2/text/text-indent-055.xht
  - css/CSS2/text/text-indent-056.xht
  - css/CSS2/text/text-indent-067.xht
  - css/CSS2/text/text-indent-068.xht
  - css/CSS2/text/text-indent-079.xht
  - css/CSS2/text/text-indent-080.xht
  - css/CSS2/text/text-indent-091.xht
  - css/CSS2/text/text-indent-092.xht
  - css/CSS2/text/text-indent-103.xht
  - css/CSS2/text/text-indent-104.xht
  - css/CSS2/text/text-indent-112.xht
  - css/CSS2/text/text-indent-113.xht
  - css/CSS2/text/text-indent-115.xht
  - css/CSS2/text/text-indent-applies-to-002.xht
  - css/CSS2/text/text-indent-applies-to-003.xht
  - css/CSS2/text/text-indent-applies-to-005.xht
  - css/CSS2/text/text-indent-applies-to-006.xht
  - css/CSS2/text/text-indent-applies-to-007.xht
  - css/CSS2/text/text-indent-applies-to-008.xht
  - css/CSS2/text/text-indent-applies-to-009.xht
  - css/CSS2/text/text-indent-applies-to-010.xht
  - css/CSS2/text/text-indent-applies-to-011.xht
  - css/CSS2/text/text-indent-applies-to-014.xht
  - css/CSS2/text/text-indent-applies-to-015.xht
  - css/CSS2/text/text-indent-inherited-001.xht
  - css/CSS2/text/text-indent-overflow-001.xht
  - css/CSS2/text/text-indent-overflow-002.xht
  - css/CSS2/text/text-indent-overflow-003.xht
  - css/CSS2/text/text-indent-overflow-004.xht
  - css/CSS2/text/text-indent-wrap-001.xht
  - css/css-text-decor/text-shadow/textindent.html
  - css/css-text/text-indent/text-indent-percentage-001.xht
  - css/css-text/text-indent/text-indent-percentage-002.html
  - css/css-text/text-indent/text-indent-percentage-003.html
  - css/css-text/text-indent/text-indent-percentage-004.html
  - css/css-values/minmax-length-percent-serialize.html
  - css/css-values/minmax-length-serialize.html

Also improvements in:
  - _mozilla/mozilla/calc.html
  - css/css-text/animations/text-indent-interpolation.html
  - css/css-text/inheritance.html
  - css/css-text/parsing/text-indent-computed.html
  - css/css-text/parsing/text-indent-valid.html
  - css/css-transitions/properties-value-implicit-001.html
  - css/css-values/animations/calc-interpolation.html
  - css/css-values/minmax-percentage-serialize.html
  - css/css-values/viewport-units-css2-001.html
  - css/css-variables/variable-substitution-basic.html
  - css/cssom/serialize-values.html

Existing WPT now failing, due to lack of direction, outside list markers,
flex and grid:
  - css/CSS2/text/text-indent-rtl-001.xht
  - css/CSS2/text/text-indent-rtl-002.xht
  - css/css-pseudo/marker-content-023.html
  - css/css-text/text-indent/anonymous-flex-item-001.html
  - css/css-text/text-indent/anonymous-grid-item-001.html

New WPT tests:
 - css/css-text/text-indent/text-indent-length-001.html
 - css/css-text/text-indent/text-indent-length-002.html
   This one fails in layout-2013.
2023-04-25 23:01:07 +02:00
Martin Robinson
404ee8b984 Fix scrolling from script in Layout 2020
Script will only scroll if it detects that an element has a scrolling
box, so this change adds an implementation of the scroll area query to
Layout 2020. This allows some scrolling tests to start passing.

This change also updates all expected results in css-backgrounds and
cssom-view.
2023-04-25 21:25:01 +02:00
Martin Robinson
db194e74ad Rename ComputedValuesExt::establishes_containing_block
This renames the helper method to be a bit more accurate. For elements
with static, relative, and sticky positioning, their containing block is
always formed by their nearest block container ancestor. This method is
really dealing with style that means an element will establish a
containing block for absolutely positioned descendants.
2023-04-20 11:49:28 +02:00
Martin Robinson
c23f05583b Fix calculation of block axis for abspos elements
The calculation of the block axis positioning of absolutely positioned
elements was using the inline size of the containing block instead of
the block size.
2023-04-14 11:17:26 +02:00
Delan Azabani
73dcce12b6 Handle min/max sizes in non-replaced positioned boxes 2023-04-12 15:38:52 +08:00
Martin Robinson
9e0b41ebc4 Add support for <iframe> elements for Layout 2020
This change adds support for the <iframe> element to Layout 2020. In
addition, certain aspects of the implementation are made the same
between both layout systems.
2023-04-04 17:49:24 +02:00
Martin Robinson
6d4b7e7a22 Move hit testing information out of WebRender
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.
2023-03-15 12:25:29 +01:00
Martin Robinson
2440f71f9a Fix the layout 2020 build after euclid upgrade
The euclid upgrade included some backward incompatible changes to the
API. This changes updates a few function calls that used the old names.
2023-03-07 12:20:01 +01:00
Martin Robinson
423cc34cb0 Bump euclid to 0.22
- 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.
2023-01-26 08:59:21 +01:00
Dirk Stolle
f2260e7c18 Fix some typos
Signed-off-by: Dirk Stolle <striezel-dev@web.de>
2022-12-17 03:22:34 +01:00
Josh Matthews
f8a44d0ad4 Remove env_logger duplicate. 2022-04-01 02:26:19 -04:00
Josh Matthews
9eaa27c946 Update html5ever/xml5ever. 2022-04-01 01:43:26 -04:00
Josh Matthews
a24a4f0608 Update parking_lot. 2022-04-01 01:33:17 -04:00
Naveen Gattu
0e3b52af27 fmt 2021-11-30 18:13:39 -08:00
Naveen Gattu
00a7c172e2
rm ws 2021-11-30 12:54:15 -08:00
Naveen Gattu
9af545e4e4
Do not use ParallelIterator if not using rayon 2021-11-30 12:51:56 -08:00
Lewin Probst
976f5b76bc Updated cssparser dependency to 0.29.
Signed-off-by: Lewin Probst <info@emirror.de>
2021-11-18 16:16:46 +01:00
Josh Matthews
01681e79c4 Update nightly rustc. 2021-11-01 08:46:18 -04:00
yvt
bc63187340 feat(layout_2020): implement offset{Parent, Top, Left, Width, Height} 2021-06-19 13:27:09 +09:00
yvt
638941ac43 refactor(layout_2020): add depth parameter to the closure passed to FragmentTree::find 2021-06-16 00:56:41 +09:00
Emilio Cobos Álvarez
31e8e418ea Miscellaneous build / tidy fixes. 2021-02-26 17:53:55 +01:00
Josh Matthews
adb75ba114 Revert "Revert "Update harfbuzz, freetype, unicode-script.""
This reverts commit 6b520850f3.
2020-08-10 13:30:12 -04:00
Josh Matthews
6b520850f3 Revert "Update harfbuzz, freetype, unicode-script."
This reverts commit 327fed6084.
2020-08-04 19:16:13 -04:00