| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
|
|
| |
* Implement console.count/countReset
* Address review comment
Signed-off-by: syvb <me@iter.ca>
---------
Signed-off-by: syvb <me@iter.ca>
|
| |
|
|
|
|
|
|
| |
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
* Use bitflags
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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`.
|
|
|
| |
https://html.spec.whatwg.org/multipage/#dom-style-disabled
|
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
|
|
| |
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>
|
|
|
| |
This avoids inserting it outside of its parent.
|
|
|
|
| |
So that the table appears after preceding inline-level contents.
Fixes #31603.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* 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
|
|
|
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
`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.
|
|
|
|
|
|
| |
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
* Update expectations
|
|
|
|
| |
b'd9a5cc25fc5f520bde022cee67e9e6a6f0b588f9' (#31599)
|
|
|
| |
This is the first step implementing WOFF2 font support in Servo.
|
| |
|
|
|
| |
Instead of assuming `box-sizing: content-box`.
|
|
|
|
|
|
|
| |
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>
|
| |
|
| |
|
| |
|
|
|
| |
And remove the pref `layout.tables.enabled`.
|
|
|
|
|
|
|
|
|
|
|
| |
* 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
|
|
|
| |
The spec doesn't make much sense, this seems to match Gecko and Blink.
|
|
|
| |
In #31469 I misunderstood how include.ini works (see #31502).
|
|
|
|
|
| |
* Fix intrinsic sizing of tables
* Feedback
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* 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>
|
|
|
| |
In #31481 I forgot to run ./mach update-manifest
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
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
|
|
|
| |
Instead of just crashing.
|
|
|
|
|
|
|
|
|
| |
* 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
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
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">
* Address review comments
|
|
|
|
|
| |
100% is stored as Percent(1.), not as percent(100.)
Co-authored-by: Martin Robinson <mrobinson@igalia.com>
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
* 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
|
|
|
|
| |
(#26469)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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 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>
|
|
|
|
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* 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
|
| |
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
|
|
|
| |
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.
|