aboutsummaryrefslogtreecommitdiffstats
path: root/tests
Commit message (Collapse)AuthorAgeFilesLines
* Implement console.count/countReset (#31635)Smitty2024-03-174-72/+0
| | | | | | | | | | | * Implement console.count/countReset * Address review comment Signed-off-by: syvb <me@iter.ca> --------- Signed-off-by: syvb <me@iter.ca>
* Don't null out the baselines of anonymous tables (#31704)Oriol Brufau2024-03-1529-58/+0
|
* layout: Add basic support for `getClientRects()` queries (#31696)Martin Robinson2024-03-1511-44/+3
| | | | | | This adds basic support for `getClientRects()` by sharing code with the implementation of `getBoundingClientRect()`. In addition to sharing code, it also shares all of the bugs. Primarily, scrolilng positions are not taken into account when return boundary rectangles.
* Allow pre-wrap whitespace to hang at the end of the line (#31681)Oriol Brufau2024-03-1523-46/+0
| | | | | * Allow pre-wrap whitespace to hang at the end of the line * Use bitflags
* Obey white-space when intrinsically sizing an IFC (#31660)Oriol Brufau2024-03-1521-28/+14
| | | | | | | | | | | | | | | | | The old logic was assuming that all whitespace was a break opportunity, and that no newlines would be preserved. Note that text shaping considers the advance of a newline to be the same as a space. This was problematic because if we have a segment with a preserved space and newline, only the advance of the space should contrinute to the size of the block container. Therefore, I'm changing the breaker logic in other to have newline characters in their own segment. Then glyph_run_is_whitespace_ending_with_preserved_newline can just be renamed to glyph_run_is_preserved_newline. This patch is still not perfect because it doesn't check allow_wrap(), so `nowrap` is treated like `normal`, and `pre-wrap` like `pre`.
* Implement HTMLStyleElement.disabled attribute (#31682)Oriol Brufau2024-03-148-30/+0
| | | https://html.spec.whatwg.org/multipage/#dom-style-disabled
* dependencies: Upgrade to WebRender 0.64 (#31486)Martin Robinson2024-03-1471-120/+26
| | | | | | | | | This brings the version of WebRender used in Servo up-to-date with Gecko upstream. The big change here is that HiDPI is no longer handled via WebRender. Instead this happens via a scale applied to the root layer in the compositor. In addition to this change, various changes are made to Servo to adapt to the new WebRender API. Co-authored-by: Mukilan Thiyagarajan <mukilan@igalia.com>
* layout: Properly parent table-row and table-row-group (#31619)Martin Robinson2024-03-1418-24/+17
| | | | | | | | Put table cell content fragments into a hieararchy of fragments that include their table row and table row group fragments. This ensures that things like relative positioning and transforms set on rows and row groups properly affect cells and cell content. Co-authored-by: Oriol Brufau <obrufau@igalia.com>
* Allow finishing anonymous inline-table at the end of inline elements (#31650)Oriol Brufau2024-03-144-0/+48
| | | This avoids inserting it outside of its parent.
* End ongoing IFC when inserting anonymous block-level table (#31606)Oriol Brufau2024-03-133-0/+44
| | | | So that the table appears after preceding inline-level contents. Fixes #31603.
* Fix vertical alignment at the root of an IFC (#31636)Oriol Brufau2024-03-134-2/+166
| | | | | | | | | | | | | | At the root of an inline formatting context, we used its vertical-align in order to compute the strut. That was wrong, since vertical-align on a block container shouldn't affect the contents, it should only affect the alignment of the block container (if it's inline-level) within the parent IFC. This was only working well if the block container was block-level, since effective_vertical_align_for_inline_layout returned `baseline` for block-level boxes. Instead of the outer display type, this patch changes the logic to check whether we are at the root of the IFC.
* layout: Propagate overflow values from `<body>` to root element (#31618)Martin Robinson2024-03-1310-20/+0
| | | | | | | The specification gives instructions for how these values should be propagated. The other big changs here is that they aren't applied to the `<body>`. Co-authored-by: Oriol Brufau <obrufau@igalia.com>
* Gamepad: Align closer to spec and implement missing slots (#31385)Daniel Adams2024-03-122-6/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Implement missing gamepad slots, align to spec more - Fixes TODO's from initial gamepad implementation - Adds some missing spec steps * Only handle gamepad events when pref is enabled * Return empty list in getGamepads if document not active * ./mach fmt * Update getGamepads to return an array instead of GamepadList * Add spec link for [[exposed]] slot * Remove failing test expectations for not-fully-active * A few fixes - Change should_notify to has_gesture - Add spec links and TODO to navigator - Remove unneeded clone from GamepadList::list - Move gamepadconnected event firing into has_gesture block * Use queue_with_canceller for tasks and add expects * Explicitly check for gamepad user gesture * Move user gesture check into separate function * Change contains_user_gesture to be a gamepad function * mach fmt * Change axis/button threshold constants to be private to module
* font_cache: Handle filtering `@font-face` rules in Servo (#31601)Martin Robinson2024-03-1110-98/+61
| | | | | | | | | | | Instead of letting Stylo filter `@font-face` rules, handle this filtering in Servo. It doesn't make sense that Stylo knows about what fonts Servo supports. This also cleans up a bit the way that this is handled, giving an entire stylesheet of rules to the font cache to process instead of letting each layout thread walk the rules. This brings more of the font-related code into the FontCacheThread itself. This is the first step toward adding WOFF2 support and fixing various web font related bugs.
* layout: Enable rendering of `conical-gradient` and ↵Martin Robinson2024-03-1129-362/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | | `repeating-conical-gradient` (#31597) This also ignores a clippy warning for a new function (and a similar existing one), until this code can be refactored to use temporary Rust strutures to carry display list building state. There are a few new test failures here: - FAIL [expected PASS] /css/css-images/image-set/image-set-conic-gradient-rendering.html - FAIL [expected PASS] /css/css-images/image-set/image-set-repeating-conic-gradient-rendering.html These fail because Servo does not yet support `image-set()`. - FAIL [expected PASS] /css/filter-effects/filter-function/filter-function-conic-gradient.html - FAIL [expected PASS] /css/filter-effects/filter-function/filter-function-repeating-conic-gradient.html These fail because Servo does not support the very early filter effects specification. - FAIL [expected PASS] /html/canvas/element/manual/fill-and-stroke-styles/conic-gradient-rotation.html - FAIL [expected PASS] /html/canvas/element/manual/fill-and-stroke-styles/conic-gradient.html These fail because this change only adds support for CSS conical gradients. Another set of changes will be necessary to support this for Canvas.
* Take spaces into account in the max-content size of an IFC (#31613)Oriol Brufau2024-03-115-10/+3
| | | | | | They were only considered in min-content sizes. Also avoid some pointless conversions from Au to Length. Fixes #31605.
* Use get_desired_proto in htmlconstructor (#31600)Samson2024-03-104-64/+0
| | | | | * Use get_desired_proto in htmlconstructor * Update expectations
* Update web-platform-tests to revision ↵Servo WPT Sync2024-03-10757-6272/+21626
| | | | b'd9a5cc25fc5f520bde022cee67e9e6a6f0b588f9' (#31599)
* wpt: Start running the WOFF2 tests (#31595)Martin Robinson2024-03-0969-2/+136
| | | This is the first step implementing WOFF2 font support in Servo.
* Align table cell measures in the block axis to Gecko/Blink/WebKit (#31596)Oriol Brufau2024-03-091-3/+0
|
* Obey table cell's box-sizing (#31536)Oriol Brufau2024-03-083-21/+0
| | | Instead of assuming `box-sizing: content-box`.
* layout: Fix the pseudo for anonymous tables (#31578)Martin Robinson2024-03-0815-34/+0
| | | | | | | Anonymous tables should not use legacy pseudos, as the legacy layout engine had them inherit lots of random properites that lead to bad layout in the new layout engine. Co-authored-by: Oriol Brufau <obrufau@igalia.com>
* Fix inheritance.sub.html WPT to work on Servo (#31534)Azhar Ismagulova2024-03-084-29/+2
|
* clippy: fix warnings on modules outside components (#31567)eri2024-03-073-8/+8
|
* layout: Add support for box-shadow to Layout 2020 (#31453)Martin Robinson2024-03-0727-891/+6
|
* Enable CSS Tables by default (#31470)Oriol Brufau2024-03-07522-788/+484
| | | And remove the pref `layout.tables.enabled`.
* Add basic support for enumerating computed styles (#31499)Oriol Brufau2024-03-0622-224/+123
| | | | | | | | | | | * Add basic support for enumerating computed styles The old code was so broken, it was enumerating the style attribute instead of the computed styles. So this patch implements a basic enumeration, but not including custom properties whose computed value is not the guaranteed-invalid value. * Feedback
* Fix the measures of a table cell (#31513)Oriol Brufau2024-03-061-2/+0
| | | The spec doesn't make much sense, this seems to match Gecko and Blink.
* Enable accidentally skipped tests (#31507)Oriol Brufau2024-03-056-2/+75
| | | In #31469 I misunderstood how include.ini works (see #31502).
* Fix intrinsic sizing of tables (#31506)Oriol Brufau2024-03-056-13/+0
| | | | | * Fix intrinsic sizing of tables * Feedback
* Enable `css-text` explicitly in include.ini (#31502)Mukilan Thiyagarajan2024-03-0511-0/+60
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Enable `css-text` explicitly in include.ini The WPT test runner has some strange logic for determining the key's value for a node like `[css]` or `[css-text]`. In this logic, if the node doesn't have an explicit value for a key (here `skip`), then the implicit root node's setting (i.e key/value pair at the top of the file that is not nested under a heading) is used as the default fallback value [1]. Only when the implicit root node doesn't have an explicit value set does the logic starts looking at the current node's parent [2]. In our case, in `include.ini` the default value for `skip` is `true` as that is the first line in the file. Since `[css-text]` doesn't have `skip` set explicitly, the default value of `true` is used even though the parent's value is `false`. [1]: https://github.com/servo/servo/blob/2bafcf9f182bf907c4a4391f931a7364bd7b804f/tests/wpt/tests/tools/wptrunner/wptrunner/wptmanifest/backends/conditional.py#L265 [2]: https://github.com/servo/servo/blob/2bafcf9f182bf907c4a4391f931a7364bd7b804f/tests/wpt/tests/tools/wptrunner/wptrunner/manifestinclude.py#L59 Signed-off-by: Mukilan Thiyagarajan <mukilan@igalia.com> * Update text expectations --------- Signed-off-by: Mukilan Thiyagarajan <mukilan@igalia.com> Co-authored-by: Oriol Brufau <obrufau@igalia.com>
* Update manifest (#31497)Oriol Brufau2024-03-041-1/+1
| | | In #31481 I forgot to run ./mach update-manifest
* Fix column and row measures (#31480)Oriol Brufau2024-03-041-6/+0
| | | | | | | | | | | | | | The min-content size of a table track was >= the max-content size. So - For the min-content size of a column, now we just use min-inline-size, ignoring inline-size and max-inline-size. This matches Gecko, Blink and WebKit. - For the max-content size of a column, we keep matching Gecko. Note that Blink and WebKit are different, they ignore max-inline-size. - For both the min-content and max-content sizes of a row, now we just use block-size. This matches Gecko, Blink and WebKit. Also, if the computed value contains percentages, now we treat it as the initial value, instead of resolving percentages against zero. This matches Gecko and Blink, but not WebKit for rows.
* Treat indefinite percentages as auto offsets in relative positioning (#31484)Oriol Brufau2024-03-043-6/+0
| | | | | | | | | * Treat indefinite percentages as auto offsets in relative positioning Instead of just resolving the percentages against zero. The spec is not clear (https://github.com/w3c/csswg-drafts/issues/9353), but this way we match Gecko, Blink and WebKit. * Update test expectations
* Add CSSOM support for CSS layers (#31481)Oriol Brufau2024-03-0317-74/+92
| | | Instead of just crashing.
* Sync WPT with upstream (03-03-2024) (#31482)Servo WPT Sync2024-03-031957-65189/+19687
| | | | | | | | | * Update web-platform-tests to revision b'1b88c8bd56a924f9865daa15834d444c55dd7327' * Update expectations --------- Co-authored-by: sagudev <16504129+sagudev@users.noreply.github.com>
* Fix size of tables in flow layout (#31455)Oriol Brufau2024-03-0247-246/+12
| | | | | | | | | | | | | | | | | | | | | | * Fix size of tables in flow layout The contents of a table can make it bigger than what we would expect from its 'width', 'min-width', 'height' and ' min-height' properties. Also, 'width: auto' doesn't stretch it to fill the containing block. We had to refactor the resolution of margins to happen after layout, otherwise 'auto' margins wouldn't align correctly. Co-authored-by: Martin Robinson <mrobinson@igalia.com> * Feedback * Consistently use `containing_block_for_table` in table layout * Update test result --------- Co-authored-by: Martin Robinson <mrobinson@igalia.com>
* Enable more css tests (#31469)Oriol Brufau2024-03-011357-66/+17727
| | | | | | | | | | | | | | | | | | | | | | | | | | | * Enable more css tests In particular, these directories are no longer skipped: - CSS1 (has no tests) - css-box (except margin-trim) - css-cascade - css-display (except run-in) - css-easing - css-env - css-lists - css-namespaces - css-overflow - css-pseudo - css-sizing (except aspect-ratio and contain-intrinsic-size) - css-syntax - reference - support (has no tests) * Sort list properly * Explicitly list skipped directories * Do not skip css tests by default * Add expectations
* script: Implement `<meta http-equiv="refresh">` (#31468)Smitty2024-03-0114-387/+42
| | | | | * script: Implement <meta http-equiv="refresh"> * Address review comments
* Fix percentages in CSS tables (#31454)Oriol Brufau2024-02-291-3/+0
| | | | | 100% is stored as Percent(1.), not as percent(100.) Co-authored-by: Martin Robinson <mrobinson@igalia.com>
* layout: Add initial support for row height distribution (#31421)Martin Robinson2024-02-2947-162/+48
| | | | | | | | | | | | This change adds a version of row height distribution that follows the distribtuion algorithm used for tables in Blink's LayoutNG. This is just an intermediate step toward implementing a distribution algorithm for both rows and columns more similar to Layout NG. The CSS Table 3 specification is often wrong with regard to web compatability, which is why we have abandoned it in favor of the Layout NG algorithm for row height distribution. this work. Co-authored-by: Oriol Brufau <obrufau@igalia.com>
* Update Stylo to 2023-07-23 (#31437)Oriol Brufau2024-02-2929-1151/+26
| | | | | | | | | | | | | | | | | | | * Update Stylo to 2023-07-23 * to_shmem should be local when working with Stylo * Fixup for https://phabricator.services.mozilla.com/D180769 * Fixup for https://phabricator.services.mozilla.com/D181125 * Fixup for https://phabricator.services.mozilla.com/D181162 * Fixup for https://phabricator.services.mozilla.com/D181798 * Fixup for https://phabricator.services.mozilla.com/D182514 * Fixup for https://phabricator.services.mozilla.com/D182539 * Update test expectations
* webaudio: Throw when setting invalid automationRate on AudioBufferSourceNode ↵Shamir Khodzha2024-02-282-12/+0
| | | | (#26469)
* layout: Add an implementation of `process_resolved_font_style_query` for ↵Smitty2024-02-289-27/+0
| | | | | | | | | | | | | | | Layout 2020 (#31436) * layout: support setting canvas font Signed-off-by: syvb <me@iter.ca> * Update 2d.reset.state.font.html test Signed-off-by: syvb <me@iter.ca> --------- Signed-off-by: syvb <me@iter.ca>
* Update overrideMimeType and final-charset to match xhr spec (#29812)cybai (Haku)2024-02-288-243/+0
| | | | | | | | | | | * Update overrideMimeType to match xhr spec * Update final-encoding to match xhr spec * Fix an issue and add more comments --------- Co-authored-by: Martin Robinson <mrobinson@igalia.com>
* layout: Turn on synthetic small-caps for layout 2020 (#31435)Martin Robinson2024-02-2839-123/+118
| | | | | | | | | | | | Synthetic small caps is supported by the font subsystem, but this is disabled in Layout 2020. We can turn this on to bring support to parity with the old layout system. In addition to turning on synthetic small-caps this change also improves the way that they work. Before, synthetic small caps meant that every character was a small version of capitalized character. After this change, capital letters are larger than small caps versions of small letters -- matching other browsers and the common expectation of how small caps works.
* Move Stylo to its own repo (#31350)Delan Azabani2024-02-274-11/+22
| | | | | | | | | | | | | | | | | | | | | | | | | | | | * Remove packages that were moved to external repo * Add workspace dependencies pointing to 2023-06-14 branch * Fix servo-tidy.toml errors * Update commit to include #31346 * Update commit to include servo/stylo#2 * Move css-properties.json lookup to target/doc/stylo * Remove dependency on vendored mako in favour of pypi dependency This also removes etc/ci/generate_workflow.py, which has been unused since at least 9e71bd6a7010d6e5723831696ae0ebe26b47682f. * Add temporary code to debug Windows test failures * Fix failures on Windows due to custom target dir * Update commit to include servo/stylo#3 * Fix license in tests/unit/style/build.rs * Document how to build with local Stylo in Cargo.toml
* Fix percentages in the padding of a table-cell (#31430)Oriol Brufau2024-02-273-0/+123
|
* Support <div align="..."> and <center> in block layout (#31423)Oriol Brufau2024-02-262-4/+0
| | | | | | | | | As per HTML [1], <div align="..."> and <center> should align descendants to the left/center/right. This is similar to having 'auto' margins [2], but without changing their used values [3]. [1]: https://html.spec.whatwg.org/multipage/rendering.html#flow-content-3 [2]: https://html.spec.whatwg.org/multipage/rendering.html#align-descendants [3]: https://github.com/whatwg/html/issues/10149
* layout: Add line height from preserved segment breaks in quirks mode (#31419)Martin Robinson2024-02-267-0/+110
| | | | | | | | | | In quirks mode, preserved segment breaks should add line height to lines. This matches the behavior of WebKit and Blink, but not Gecko. This also handles the special-case of `<br>` elements, which are implemented with preserved segment breaks via `white-space: pre-line`. This is an implementation detail though because `<br>` has a special behavior if the line isn't empty -- it doesn't add any line height in this case.