| Commit message (Collapse) | Author | Age | Files | Lines |
... | |
|
|
|
|
|
|
|
|
|
|
| |
This implements the requirements outlined in the [flexbox specification]
about how to position absolute children of flex containers. We must
establish a static position rectangle (to use if all insets are auto)
and also align the child into that rectangle.
[flebox specification]: https://drafts.csswg.org/css-flexbox/#abspos-items
Signed-off-by: Martin Robinson <mrobinson@igalia.com>
Co-authored-by: Oriol Brufau <obrufau@igalia.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* Implement TextEncoder::encodeInto()
Signed-off-by: webbeef <me@webbeef.org>
* Update components/script/dom/textencoder.rs
Signed-off-by: Martin Robinson <mrobinson@igalia.com>
* Update components/script/dom/textencoder.rs
Signed-off-by: Martin Robinson <mrobinson@igalia.com>
---------
Signed-off-by: webbeef <me@webbeef.org>
Signed-off-by: Martin Robinson <mrobinson@igalia.com>
Co-authored-by: Martin Robinson <mrobinson@igalia.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
(#33355)
This changes converts all input element parsing and normalization to use
`time` instead of `chrono`. `time` is used by our dependencies, so it
makes sense to work toward removing the Servo dependency on chrono.
In addition, parsing and normalization also moves to a trait on &str to
prepare for the possibility of all script parsers moving to a separate
crate that can have unit tests written against it.
Code duplication is eliminated when possible and more conversion is done
using integer types. These two things together mean we pass more tests
now.
Signed-off-by: Martin Robinson <mrobinson@igalia.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* Update XRInputSource gamepad index to be -1
Signed-off-by: Daniel Adams <msub2official@gmail.com>
* Update test expectations
Signed-off-by: Daniel Adams <msub2official@gmail.com>
---------
Signed-off-by: Daniel Adams <msub2official@gmail.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
(#33341)
* net: use saturating_sub when substracting durations to prevent underflows
Signed-off-by: webbeef <me@webbeef.org>
* Add regression test. (#1)
* Add regression test.
Signed-off-by: Josh Matthews <josh@joshmatthews.net>
---------
Signed-off-by: webbeef <me@webbeef.org>
Signed-off-by: Josh Matthews <josh@joshmatthews.net>
Co-authored-by: Josh Matthews <josh@joshmatthews.net>
|
|
|
|
|
| |
b'ec9b870fec350e59e9db48ae2858e914a07f38d6' (#33359)
Signed-off-by: WPT Sync Bot <ghbot+wpt-sync@servo.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* Remove console prototype hack
The console object has an empty object as its prototype,
not the realm object prototype.
Signed-off-by: Simon Wülker <simon.wuelker@arcor.de>
* Update WPT expectations
Signed-off-by: Simon Wülker <simon.wuelker@arcor.de>
---------
Signed-off-by: Simon Wülker <simon.wuelker@arcor.de>
|
|
|
|
|
|
|
|
|
| |
When a baseline is orthogonal to the main flexbox axis, it should not
take part in baseline alignment. This change does that for column flex.
While there is no support for vertical writing modes, this change is
made to be as writing mode-agnostic as possible.
Signed-off-by: Martin Robinson <mrobinson@igalia.com>
Co-authored-by: Oriol Brufau <obrufau@igalia.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* Update wgpu
Signed-off-by: sagudev <16504129+sagudev@users.noreply.github.com>
* Update expectations
Signed-off-by: sagudev <16504129+sagudev@users.noreply.github.com>
---------
Signed-off-by: sagudev <16504129+sagudev@users.noreply.github.com>
|
|
|
|
|
|
|
|
|
|
| |
When inline atomics establish containing blocks for absolute
descendants, layout should happen with those atomics as the containing
block. This ensures that the absolute descendents have the correct
containing block and Fragment parent. This wasn't happening before and
this change fixes that.
Signed-off-by: Martin Robinson <mrobinson@igalia.com>
Co-authored-by: Oriol Brufau <obrufau@igalia.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
(#33282)
Up until now, Servo was using a very old version of time to get a
cross-process monotonic timestamp (using `time::precise_time_ns()`).
This change replaces the usage of old time with a new serializable
monotonic time called `CrossProcessInstant` and uses it where `u64`
timestamps were stored before. The standard library doesn't provide this
functionality because it isn't something you can do reliably on all
platforms. The idea is that we do our best and then fall back
gracefully.
This is a big change, because Servo was using `u64` timestamps all over
the place some as raw values taken from `time::precise_time_ns()` and
some as relative offsets from the "navigation start," which is a concept
similar to DOM's `timeOrigin` (but not exactly the same). It's very
difficult to fix this situation without fixing it everywhere as the
`Instant` concept is supposed to be opaque. The good thing is that this
change clears up all ambiguity when passing times as a `time::Duration`
is unit agnostic and a `CrossProcessInstant` represents an absolute
moment in time.
The `time` version of `Duration` is used because it can both be negative
and is also serializable.
Good things:
- No need too pass around `time` and `time_precise` any longer.
`CrossProcessInstant` is also precise and monotonic.
- The distinction between a time that is unset or at `0` (at some kind
of timer epoch) is now gone.
There still a lot of work to do to clean up timing, but this is the
first step. In general, I've tried to preserve existing behavior, even
when not spec compliant, as much as possible. I plan to submit followup
PRs fixing some of the issues I've noticed.
Signed-off-by: Martin Robinson <mrobinson@igalia.com>
|
|
|
|
|
|
| |
According to https://drafts.csswg.org/css-align/#align-flex
It was being treated as `auto` instead.
Signed-off-by: Oriol Brufau <obrufau@igalia.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* Ensure depthFar is non-negative
Signed-off-by: Daniel Adams <msub2official@gmail.com>
* Properly append default features in requestSession
Signed-off-by: Daniel Adams <msub2official@gmail.com>
* Ensure XRRigidTransform init members have finite values
Signed-off-by: Daniel Adams <msub2official@gmail.com>
---------
Signed-off-by: Daniel Adams <msub2official@gmail.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* Impl pipeline constants
Signed-off-by: sagudev <16504129+sagudev@users.noreply.github.com>
* More relaxed lifetimes
Signed-off-by: sagudev <16504129+sagudev@users.noreply.github.com>
* Update expectations
Signed-off-by: sagudev <16504129+sagudev@users.noreply.github.com>
* Replace convert function with `From` implementation
Signed-off-by: sagudev <16504129+sagudev@users.noreply.github.com>
---------
Signed-off-by: sagudev <16504129+sagudev@users.noreply.github.com>
|
|
|
| |
Signed-off-by: Simon Wülker <simon.wuelker@arcor.de>
|
|
|
|
|
|
|
|
|
|
|
| |
From https://drafts.csswg.org/css-flexbox-1/#intrinsic-cross-sizes,
> The min-content/max-content cross size of a single-line flex container
> is the largest min-content contribution/max-content contribution
> (respectively) of its flex items.
We were using the min/max-content size instead of the min/max-content
contribution.
Signed-off-by: Oriol Brufau <obrufau@igalia.com>
|
|
|
| |
Signed-off-by: Simon Wülker <simon.wuelker@arcor.de>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* Update FakeXRDevice to support updating bounds
Signed-off-by: Daniel Adams <msub2official@gmail.com>
* Add missing spec link
Signed-off-by: Daniel Adams <msub2official@gmail.com>
* Mark secondaryViews as optional in FakeXRDevice.setViews
Signed-off-by: Daniel Adams <msub2official@gmail.com>
---------
Signed-off-by: Daniel Adams <msub2official@gmail.com>
|
|
|
|
|
| |
b'5d8ec746ed021738e7ee0cee92ad1a1814ba00fe' (#33274)
Signed-off-by: WPT Sync Bot <ghbot+wpt-sync@servo.org>
|
|
|
|
|
|
|
|
| |
In particular, this takes into account that flex items may be stretched,
and if they have an aspect ratio, we ma6y need to convert the stretched
size through the ratio.
Signed-off-by: Oriol Brufau <obrufau@igalia.com>
Co-authored-by: Martin Robinson <mrobinson@igalia.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* Update wgpu to include local const
Signed-off-by: sagudev <16504129+sagudev@users.noreply.github.com>
* set expectations
Signed-off-by: sagudev <16504129+sagudev@users.noreply.github.com>
---------
Signed-off-by: sagudev <16504129+sagudev@users.noreply.github.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* TextureUsages::from_bits_retain
Signed-off-by: sagudev <16504129+sagudev@users.noreply.github.com>
* Fixup CreateBindGroupLayout
Signed-off-by: sagudev <16504129+sagudev@users.noreply.github.com>
* GPUExtent3D checking and converting
Signed-off-by: sagudev <16504129+sagudev@users.noreply.github.com>
* Cleanup GPUCommandEncoders and some TODOs
Signed-off-by: sagudev <16504129+sagudev@users.noreply.github.com>
* validate gpuorigin3d
Signed-off-by: sagudev <16504129+sagudev@users.noreply.github.com>
* validate GPUColor
Signed-off-by: sagudev <16504129+sagudev@users.noreply.github.com>
* set good expect
Signed-off-by: sagudev <16504129+sagudev@users.noreply.github.com>
---------
Signed-off-by: sagudev <16504129+sagudev@users.noreply.github.com>
|
|
|
|
|
|
|
|
|
|
| |
When computing the automatic minimum size, flex layout was using the
natural aspect ratio, ignoring the `aspect-ratio` property.
`ReplacedContent::inline_size_over_block_size_intrinsic_ratio()` is now
made private to avoid more accidental uses.
Signed-off-by: Oriol Brufau <obrufau@igalia.com>
Co-authored-by: Martin Robinson <mrobinson@igalia.com>
|
|
|
|
|
|
|
| |
`main_content_size_info()` was always assigning the main-axis automatic
minimum size into the inline axis. But in a column flexbox, the main
axis corresponds to the block axis.
Signed-off-by: Oriol Brufau <obrufau@igalia.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
dromaeo (#33247)
* Allow exporting Dromaeo results as BMF JSON
Signed-off-by: sagudev <16504129+sagudev@users.noreply.github.com>
* Add speedometer runner
Signed-off-by: sagudev <16504129+sagudev@users.noreply.github.com>
---------
Signed-off-by: sagudev <16504129+sagudev@users.noreply.github.com>
|
|
|
|
|
|
|
| |
We were only handling the aspect ratio of a replaced element when
computing its min/max-content contribution, but not when computing
the min/max-content size. Now both cases will take it into account.
Signed-off-by: Oriol Brufau <obrufau@igalia.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
When computing the min-content or max-content size of an element we
need to ignore `inline-size`, `min-inline-size` and `max-inline-size`.
However, we should take the block-axis sizing properties into account.
That's because the contents could have percentages depending on them,
which can then affect their inline size via an aspect ratio.
Therefore, this patch adds `IndefiniteContainingBlock`, which is similar
to `ContainingBlock`, but it allows an indefinite inline-size. This
struct is then passed arround during intrinsic sizing.
More refinement will be needed in follow-up patches in order to fully
address the problem.
Signed-off-by: Oriol Brufau <obrufau@igalia.com>
Co-authored-by: Martin Robinson <mrobinson@igalia.com>
|
|
|
|
|
|
|
|
| |
When laying out the contents of a flex item, we used to resolve their
cross-axis percentages against the preferred cross size of the item.
Now we will take the min and max cross sizes into account.
Signed-off-by: Oriol Brufau <obrufau@igalia.com>
Co-authored-by: Martin Robinson <mrobinson@igalia.com>
|
|
|
|
|
| |
We were using the unclamped `box_size.block` instead of `block_size`.
Signed-off-by: Oriol Brufau <obrufau@igalia.com>
|
|
|
| |
Signed-off-by: Mukilan Thiyagarajan <mukilan@igalia.com>
|
|
|
| |
Signed-off-by: sagudev <16504129+sagudev@users.noreply.github.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
(#33107)
* 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>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* Try to fix panic in parser-reentrancy-customelement.window.js
Signed-off-by: Taym <haddadi.taym@gmail.com>
* ./mach fmt
Signed-off-by: Taym <haddadi.taym@gmail.com>
* Only return with ToTokenizerMsg::End and continue for others
Signed-off-by: Taym <haddadi.taym@gmail.com>
---------
Signed-off-by: Taym <haddadi.taym@gmail.com>
|
|
|
|
|
|
|
|
| |
According to HTML, the `width` and `height` attributes should only set
the natural sizes and the aspect ratio.
The `width` and `height` properties should stay as `initial` by default.
Signed-off-by: Oriol Brufau <obrufau@igalia.com>
Co-authored-by: Martin Robinson <mrobinson@igalia.com>
|
|
|
| |
Signed-off-by: Mukilan Thiyagarajan <mukilan@igalia.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Consider a block container that establishes an inline formatting context
and has a definite `block-size` which is clamped by `min-block-size` or
`max-block-size`.
We were already sizing such container correctly, however, its contents
were resolving their percentages against the unclamped `block-size`
value.
This patch fixes the `ContainingBlock` that we pass to the contents so
that they resolve percentages correctly.
Signed-off-by: Oriol Brufau <obrufau@igalia.com>
Co-authored-by: Martin Robinson <mrobinson@igalia.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The current working directory when running on WPT runners is not the
folder with the servo binary, but a parent folder into which the servo
nightly tar is extracted. This means the binary is `$PWD/servo/servo`
and resources directory in in `$PWD/servo/resources`, so the current
hardcoded relative path `resources/wpt-prefs.json` will not work on WPT
runners.
This is causing crashes in WPT runner:
https://github.com/web-platform-tests/wpt/runs/29284407168
https://community-tc.services.mozilla.com/tasks/J7MqNwJGQRSkIWlvB5ktPQ/runs/0/logs/live/public/logs/live.log
Signed-off-by: Mukilan Thiyagarajan <mukilan@igalia.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* More helpers on `Promise`
Signed-off-by: sagudev <16504129+sagudev@users.noreply.github.com>
* Sync `GPUBuffer`
Signed-off-by: sagudev <16504129+sagudev@users.noreply.github.com>
* Set some good expectations
Signed-off-by: sagudev <16504129+sagudev@users.noreply.github.com>
* Some bad expect
also on firefox
Signed-off-by: sagudev <16504129+sagudev@users.noreply.github.com>
* Extract DataBlock, DataView impl from GPUBuffer
Signed-off-by: sagudev <16504129+sagudev@users.noreply.github.com>
* Fix size check to work on 32bit platforms
Signed-off-by: sagudev <16504129+sagudev@users.noreply.github.com>
---------
Signed-off-by: sagudev <16504129+sagudev@users.noreply.github.com>
|
|
|
|
|
|
|
| |
Flexbox is still very much in progress, but things are working well
enough that we can enable it by default. It improves most pages that use
flexbox now.
Signed-off-by: Martin Robinson <mrobinson@igalia.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* Implement XRBoundedReferenceSpace
Signed-off-by: Daniel Adams <msub2official@gmail.com>
* Update expectations
Signed-off-by: Daniel Adams <msub2official@gmail.com>
* Update interfaces
Signed-off-by: Daniel Adams <msub2official@gmail.com>
* Add missing pref condition on IDL interface
Signed-off-by: Daniel Adams <msub2official@gmail.com>
---------
Signed-off-by: Daniel Adams <msub2official@gmail.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* Fix panic in abort-block-bfcache.window.js
Signed-off-by: Taym <haddadi.taym@gmail.com>
* Update test expectation
Signed-off-by: Taym <haddadi.taym@gmail.com>
---------
Signed-off-by: Taym <haddadi.taym@gmail.com>
|
|
|
| |
Signed-off-by: Nolan Lawson <nolan@nolanlawson.com>
|
|
|
|
|
| |
b'd988aeeb33edc4d452899921799b8bed69fff65d' (#33178)
Signed-off-by: WPT Sync Bot <ghbot+wpt-sync@servo.org>
|
|
|
|
|
|
| |
Also remove some code duplication by moving some of the code into the
`Element` impl.
Signed-off-by: Martin Robinson <mrobinson@igalia.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
character boundaries. (#32980)
* fix loop with chars().enumerate() by using find()
Signed-off-by: Kopanov Anton <anton.kopanov@ya.ru>
* Add documentation to parser and fix some small issues
- Rename the properties of `Descriptor` so that they are full words
- Use the Rust-parser to parse doubles
- Add documentation and restructure parser to be more readable
Signed-off-by: Martin Robinson <mrobinson@igalia.com>
---------
Signed-off-by: Kopanov Anton <anton.kopanov@ya.ru>
Signed-off-by: Martin Robinson <mrobinson@igalia.com>
Co-authored-by: Martin Robinson <mrobinson@igalia.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
file (#33163)
* Allow prefs to be passed in from a separate file
Signed-off-by: Daniel Adams <msub2official@gmail.com>
* Add wpt-prefs.json for setting WPT-specific prefs
Signed-off-by: Daniel Adams <msub2official@gmail.com>
* fix argument to read_prefs_file
Signed-off-by: Daniel Adams <msub2official@gmail.com>
* Update test_parse_pref test
Signed-off-by: Daniel Adams <msub2official@gmail.com>
* Add line in executorservo.py to read from wpt-prefs.json
Signed-off-by: Daniel Adams <msub2official@gmail.com>
* Update MANIFEST.json
Signed-off-by: Daniel Adams <msub2official@gmail.com>
* Update expectations
Signed-off-by: Daniel Adams <msub2official@gmail.com>
* Disable dom.webxr.test for interfaces test
Signed-off-by: Daniel Adams <msub2official@gmail.com>
---------
Signed-off-by: Daniel Adams <msub2official@gmail.com>
|
|
|
| |
Signed-off-by: Martin Robinson <mrobinson@igalia.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Previously if a font didn't have a space advance and it was needed to
make advances for tabs, Servo would try to read the advance from the
font. If the font didn't have a space glyph, Servo would panic. This
fixes that issue by making the space advance part of the `FontMetrics`
of a font (like Gecko) and falling back properly if that glyph doesn't
exist. The rendered glyph is still the "space" glyph, but we make
sure to select a font that supports that glyph explicitly.
This prevents a crash, but tabs still aren't handled properly. In
reality, tab stops should be calculated in layout and the size of
the space character of the current font shouldn't come into play.
The addition of the space advance metric will make this easier.
Fixes #32970.
Signed-off-by: Martin Robinson <mrobinson@igalia.com>
|
|
|
| |
Signed-off-by: webbeef <me@webbeef.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* Update XRWebGLLayer interface to latest spec
Signed-off-by: Daniel Adams <msub2official@gmail.com>
* Add missing spec links
Signed-off-by: Daniel Adams <msub2official@gmail.com>
---------
Signed-off-by: Daniel Adams <msub2official@gmail.com>
|