Instead of computing scrollable overflow while constructing the fragment
tree, we will now do it later. In the future this will also allow to
only recalculate the overflow without rebuilding the tree when transform
properties change, but that's left for a follow-up.
Stylo PR: https://github.com/servo/stylo/pull/194
Testing: One test is now passing (more investigation is needed), but
otherwise this isn't expected to have any effect.
Signed-off-by: Oriol Brufau <obrufau@igalia.com>
Co-authored-by: Martin Robinson <mrobinson@igalia.com>
* layout: Fix behavior of `transform-style: preserve-3d`
This makes `transform-style: preserve-3d` establish a containing block
for all descendants, as specified here:
<https://drafts.csswg.org/css-transforms-2/#transform-style-property>
Signed-off-by: Daniel Hast <hast.daniel@protonmail.com>
* layout: Check for transformable elements
Adds a new `is_transformable` helper method and use this in several other
methods, including the methods for whether the fragment establishes a
new stacking context or a containing block for all descendants.
Signed-off-by: Daniel Hast <hast.daniel@protonmail.com>
* Use generic green square reference for reftest.
Signed-off-by: Daniel Hast <hast.daniel@protonmail.com>
* layout: Fix stacking context & containing block checks.
Only the computed value of `transform-style` should be used to determine
whether the element establishes a stacking context and/or a containing
block, not the used value.
Signed-off-by: Daniel Hast <hast.daniel@protonmail.com>
* Update clip-no-stacking-context test expectation to pass.
Signed-off-by: Daniel Hast <hast.daniel@protonmail.com>
---------
Signed-off-by: Daniel Hast <hast.daniel@protonmail.com>
This patch implements the `FontFace` interface, but with some caveats
1. The interface is only exposed on `Window`. Support for Workers will
be handled in the future.
2. The concept of `css-connected` `FontFace` is not implemented, so
`@font-face` rules in stylesheets will not be represented in the DOM.
3. The constructor only supports using `url()` strings as source
and `ArrayBuffer` and `ArrayBufferView` are not supported yet.
A skeleton implementation of the `load` method of `FontFaceSet` is also
implemented in this patch. The intention is to support some web pages
that don't load without this method.
Signed-off-by: Mukilan Thiyagarajan <mukilan@igalia.com>
* Turn on clip-path tests and add results
Signed-off-by: Martin Robinson <mrobinson@igalia.com>
* enhance: Add support for `clip-path: [<basic-shape> || <shape-box>]`
Signed-off-by: Chocolate Pie <106949016+chocolate-pie@users.noreply.github.com>
* Changes from review
Signed-off-by: Martin Robinson <mrobinson@igalia.com>
---------
Signed-off-by: Martin Robinson <mrobinson@igalia.com>
Signed-off-by: Chocolate Pie <106949016+chocolate-pie@users.noreply.github.com>
Co-authored-by: Martin Robinson <mrobinson@igalia.com>
* Implement support for `drop-shadow`
* Clean up remnant from early attempts
* Fix misleading comments on GenericSimpleShadow
If Servo-specific `style` changes will need to be upstreamed anyway, I might as well fix a thing that had thrown me off!
* Revert "Fix misleading comments on GenericSimpleShadow"
This reverts commit cdc810b826ac082041adc212c24649ee3b86ca0a.
* Clean up an import
* Update test expectations
* Fix missing expectation on Layout 2013