In the scrollable overflow calcutation, apply CSS transforms to boxes
and scrollable overflow of the descendant. Clip unreachable scrollable
overflow according to it's block start and inline start scrolling
direction. And, renamed `Fragment::scrolling_overflow` to
`Fragment::scrolling_overflow_for_parent` as it was calculating the
scrolling overflow contribution from a child.
Add several WPT tests, testing the transform interaction `rotate`,
`scale`, and `skew` with scrollable overflow. There are several WPT test
that are testing the interaction that not expected from current browsers
implementation according to the spec.
Testing: Existing and new WPT.
Fixes: #36031
---------
Signed-off-by: stevennovaryo <steven.novaryo@gmail.com>
This affects the following testsuites:
- tests/wpt/tests/
- tests/wpt/mozilla/tests/
- tests/wpt/webgl/tests/
- tests/wpt/webgpu/tests/
Testing: Several tests improve
This is part of #36315
Signed-off-by: Oriol Brufau <obrufau@igalia.com>
The initial value of `min-width` and `min-height` was 0px in CSS2.
However, CSS3 changed it to `auto`, so for backwards compatibility,
`getComputedStyle` needs to resolve it to 0px in a bunch of cases.
Testing: covered by WPT
Signed-off-by: Oriol Brufau <obrufau@igalia.com>
This change ensures that `display: inline-grid` is considered an atomic
inline
- Add `is_atomic_inline_level()` logic to `box_fragment.rs` to improve
accuracy.
- Update `stacking_context.rs` to use the new `is_atomic_inline_level()`
method instead of the one from stylo.
- Update `repeat-auto-fill-005.html` test expectation.
- Remove .ini expectations for tests that are no longer failing.
Testing: covered by WPT
Fixes: #35310
---------
Signed-off-by: Barigbue <barigbuenbira@gmail.com>
This imports the following changes from Blitz:
- Map position:sticky to relative rather than absolute position
16a7c16544
- Map left and right alignment from Stylo
c71cc681d8
- Improve mapping of align-items/self
7bf2a25e75Fixes: #35998
Testing:
-
`/css/css-grid/alignment/grid-align-justify-margin-border-padding.html`
- `/css/css-grid/alignment/grid-align.html`
-
`/css/css-grid/alignment/grid-column-axis-alignment-sticky-positioned-items-001.html`
- `/css/css-grid/alignment/grid-gutters-and-alignment.html`
-
`/css/css-grid/alignment/grid-item-alignment-with-orthogonal-flows.html`
-
`/css/css-grid/alignment/grid-row-axis-alignment-sticky-positioned-items-001.html`
- `/css/css-grid/alignment/grid-self-alignment.html`
Signed-off-by: Oriol Brufau <obrufau@igalia.com>
The static position rect is calculated assuming that the containing
block would be established by the content box of some ancestor, but the
actual containing block is established by the padding box.
So we need to add the padding of that ancestor.
Signed-off-by: Oriol Brufau <obrufau@igalia.com>
In particular:
- `z-index` will now work on unpositioned grid items.
- `will-change: z-index` will only establish a stacking context if
`z-index` applies, i.e. if the box is positioned or a flex/grid item.
- The conditions in `establishes_stacking_context()` are reordered,
so that the most likely ones are checked first.
Signed-off-by: Oriol Brufau <obrufau@igalia.com>
Flatten and simplify Servo's preferences code. In addition, have both
preferences and options passed in as arguments to `Servo::new()` and
make sure not to use the globally set preferences in `servoshell` (as
much as possible now).
Instead of a complex procedural macro to generate preferences, just
expose a very simple derive macro that adds string based getters and
setters.
- All command-line parsing is moved to servoshell.
- There is no longer the concept of a missing preference.
- Preferences no longer have to be part of the resources bundle because
they now have reasonable default values.
- servoshell specific preferences are no longer part of the preferences
exposed by the Servo API.
Signed-off-by: Martin Robinson <mrobinson@igalia.com>
A box is usually sized by the formatting context in which it participates.
However, tables have some special sizing behaviors, and these were in
conflict.
Instead of letting tables attempting to re-resolve their inline table,
which failed to e.g. take flex properties into account or resolve sizing
keywords correctly, now tables will trust the inline size determined by
the parent. They will only floor it by the min-content size, and maybe
shrink the final size due to collapsed columns.
Signed-off-by: Oriol Brufau <obrufau@igalia.com>
Adds support for min-content, max-content, fit-content and stretch,
for the case that was missing from #34568: block-level elements that
establish an independent formatting context, when there are floats.
Signed-off-by: Oriol Brufau <obrufau@igalia.com>
Adds support for min-content, max-content, fit-content and stretch,
for block-level elements that don't establish an independent formatting
context, and for block-level elements when there is no float.
Signed-off-by: Oriol Brufau <obrufau@igalia.com>