Renaming the openharmony build job in #42929 caused artifact_ids to be
empty, which caused release failures.
Additionally, we add a validation step to the upload workflow, to
quickly pinpoint the issue of a missing input parameter,
since apparently github won't throw an error if a required input
parameter is empty.
This should make it easier to pinpoint the issue if it happens again.
Testing: Not tested.
---------
Signed-off-by: Jonathan Schwender <schwenderjonathan@gmail.com>
(cherry picked from commit 27fb3340c8)
Found this while analysing module preload test failures. In particular a
subtest of `modulepreload.html` was recently
[updated](https://github.com/web-platform-tests/wpt/pull/57243) to catch
this.
We need to ensure that SRI hash follows the base64 grammar specified by
CSP.
Testing: Updated test expectations of a test
---------
Signed-off-by: Gae24 <96017547+Gae24@users.noreply.github.com>
This is a preparation for publishing to crates.io. Changes include:
- Add `servo-` prefixes to avoid name collisions on crates.io
- Use `-` instead of `_` in package names.
- Rename the crates to their original names in Cargo.toml,
to keep the diff minimal
- Rename `media` to `servo-media-thread` to avoid name collision with
`servo-media` (originally from the media repository).
This is an outcome of the previous discussion at [#general > Switch
remaining git dependencies to
crates.io](https://servo.zulipchat.com/#narrow/channel/263398-general/topic/Switch.20remaining.20git.20dependencies.20to.20crates.2Eio/with/576336288)
Testing: This should be mostly covered by our CI, but some amount of
breakage is to be expected, since some package names could still be
referenced from scripts which are not tested or run in CI. [mach try
run](https://github.com/jschwe/servo/actions/runs/22502945949)
---------
Signed-off-by: Jonathan Schwender <schwenderjonathan@gmail.com>
There's some hanged scenarios with mitmproxy:
https://github.com/servo/servo/actions/runs/22539387007/job/65292396178
1. We rename `build` to `build-openharmony`.
2. We add
- 60 minutes timeout for each Build profile
- 40 minutes for bencher (Normally finish under 10 mins)
- 20 mins for scenario tests. (Normally finish under 4 mins)
---------
Signed-off-by: Euclid Ye <yezhizhenjiakang@gmail.com>
The specification of WebCrypto and Modern Algorithms in WebCrypto has
updated to reorder reading algorithm and data arguments in "encrypt",
"decrypt", "sign", "verify", "digest", "importKey", "unwrapKey",
"decapsulateKey" and "decapsulateBits" methods. This patch updates our
implementation accordingly.
The relevant commits in specification repositories:
- WebCrypto:
5b57233c0a
- Modern Algorithms in WebCrypto:
ae72ee6cf4
Testing: Pass new WPT tests added in
https://github.com/web-platform-tests/wpt/pull/57614 and
https://github.com/servo/servo/pull/42925
Signed-off-by: Kingsley Yung <kingsley@kkoyung.dev>
The change in 2d3a7c87c2 dropped the camelCase formatting of
is_main_process. As a result the about:memory page claims that all
processes are content processes.
Testing: run `./mach run -M` and open `about:memory` . The first process
listed will be "Main process" with this change.
Signed-off-by: webbeef <me@webbeef.org>
Add `./mach print-env` to export the environment variables mach sets to
stdout and `./mach exec` to execute an arbitrary command in the custom
environment. This allows users to easily run custom commands, or tools
in the same environment as mach would create without adding support
every tool. Note: `./mach print-env` is only targeting UNIX shells for
now, although probably one could detect the shell and e.g. also support
PowerShell (in theory).
In principle, simple commands like `./mach cargo-fix` could be removed
and instead used via `./mach exec cargo fix`.
The execution of commands via `./mach exec my_command` (e.g. running
custom tools like cargo-flamegraph) still has some limitations, since
arguments that the user might have meant to pass to the command, might
be eaten by `./mach` (if mach expects that parameter, e.g. `--target
<triple>`. It's recommended to delimit explicitly by adding `--`., e.g.
`./mach exec --ohos -- cargo build --target aarch64-unknown-linux-ohos`.
Without the `--` delimiter, `./mach would interpret `--target` instead
of passing it to `cargo build`.
Testing: Manual testing of `./mach print-env --ohos`.
Fixes: #25473#38223
Signed-off-by: Jonathan Schwender <schwenderjonathan@gmail.com>
WPT creates `epochs/daily` either at 2 or 3AM. This means that if a fix
land on day 1, then WPT is tagged earlier than the nightly release, so
it can take 24-48 hours before a change is reflected on wpt.fyi
If instead we create the nightly release in time before epoch, we can
see those results within 24 hours.
Testing: GitHub workflow change
---------
Signed-off-by: Tim van der Lippe <TimvdLippe@users.noreply.github.com>
We don't use the CLOBBER file anywhere. The CLOBBER was introduced in
d03e52d240, but without any commit
message. Judging by the CLOBBER file in that commit, this was related to
the CI machines at the time. Should be safe to remove.
Testing: Well, this probably should be reviewed by someone who is
familiar with the background. Not covered by any tests.
Signed-off-by: Jonathan Schwender <schwenderjonathan@gmail.com>
In the WebCrypto modern algorithm specification, the issue
(https://github.com/WICG/webcrypto-modern-algos/issues/47) on algorithm
name referencing in the export key operation of ML-KEM had been resolved
by the following commit in the specification repository:
705f8ec6ce
Our implementation actually matches the new specification. We simply
update the specification text, with some minor refactoring accordingly.
Testing: Refactoring. Existing tests suffice.
Signed-off-by: Kingsley Yung <kingsley@kkoyung.dev>
As said in
https://github.com/servo/servo/issues/42803#issuecomment-3957052680,
there's been a weird discrepancy between running wdspec tests in:
1. local / Linux WPT workflow
2. WebDriver Try
For 2, it triggers FAIL/ERROR that never happen in 1. It is not
intermittent, but always happens.
This PR makes 2 have same behaviour as running locally: default number
of processes (CPU count. For self-hosted runner workflow, this is
double. Hyperthreading?), single chunk.
This improves the running time by 2 mins as well.
Testing: The test results now work same as Linux WPT and local.
https://github.com/servo/servo/actions/runs/22385441028/job/64795317878#step:11:552Fixes: #39097Fixes: #42803
---------
Signed-off-by: Euclid Ye <yezhizhenjiakang@gmail.com>
The warning occurs when compiling the script bindings unit-tests `./mach
test-unit -p script_bindings --lib`.
Presumably in some contexts the inner macro is already imported, which
triggers the warning.
Directly using `crate::` avoids this.
The fixed warning:
```
warning: unused import: `$crate::match_domstring_ascii_inner`
--> components/script_bindings/domstring.rs:1050:17
|
1050 | use $crate::match_domstring_ascii_inner;
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
...
1352 | let _res = match_domstring_ascii!(s,
| ____________________-
1353 | | "❤" => true,
1354 | | _ => false,);
| |________________________- in this macro invocation
|
= note: this warning originates in the macro `match_domstring_ascii` (in Nightly builds, run with -Z macro-backtrace for more info)
```
Testing: Manually tested the warning is fixed by running `./mach
test-unit -p script_bindings --lib`.
---------
Signed-off-by: Jonathan Schwender <schwenderjonathan@gmail.com>
This is exposes the `tabIndex` property for `HTMLOrSVGElement` according
to the HTML specification. This is the first step toward implementation
of tab navigation in Servo.
Testing: This causes many WPT subtests to start passing, but causes a
few to
start failing. This is likely because we do not have a full
implementation of
the `delegatesFocus` parameter of `attachShadow` yet.
Fixes: This is part of #25001 and #32169.
Signed-off-by: Martin Robinson <mrobinson@igalia.com>
Co-authored-by: Oriol Brufau <obrufau@igalia.com>
`NormalizedAlgorithm::encrypt`, `NormalizedAlgorithm::decrypt` and other
similar functions have some catch-all `match` arms that are unreachable.
They are unreachable because we rely on the name attribute in `String`
of the subtle dictionaries and the `NormalizedAlgorithm` enum to
determine which cryptographic algorithm to use, while the algorithm
normalization mechanism guarantees that some combinations of name and
enum variants won't exist.
This patch tries to get rid of those unreachable `match` arms to make
our WebCrypto code more idiomatic so that the Rust compiler can help us
ensure the correctness in the future.
To achieve this, we break the enum `NormalizedAlgorithm` into multiple
enums: `EncryptAlgorithm`, `DecryptAlgorithm`, `SignAlgorithm`, etc.
Each one is associated to a cryptographic operation, and its variants
are the cryptographic algorithms that support the associated operation.
The inner type of each variant is the desired parameter dictionary.
Therefore, when the call `EncryptAlgorithm::encrypt`,
`DecryptAlgorithm::decrypt` and other similar functions, we can have
`match` statements that cover all patterns since those enums only
contains necessary variants.
To make this change, we also need to change the algorithm registration
mechanism. Instead of using the `SupportedAlgorithm` enum and its method
`SupportedAlgorithm::support` to register the operations of the
algorithms, the algorithm registration is now done in the function
`from_object_value` of a new trait named `NormalizedAlgorithm`, which
the new enums `EncryptAlgorithm`, `DecryptAlgorithm` and so implement.
(Note that the existing enum named `NormalizedAlgorithm` is removed.)
Some refactoring in also done in the `normalize_algorithm` function to
adapt the above changes.
This new design of algorithm registration is also closer to the
WebCrypto specification, as explained in the comment block below the
`normalize_algorithm` function.
The crate `strum` is also used to reduce some boilerplate code.
Testing: Refactoring. Existing tests suffice.
Fixes: Part of #42579
---------
Signed-off-by: Kingsley Yung <kingsley@kkoyung.dev>
Instead of unwrapping in `GStreamerMediaStream::encoded`, properly
propagate errors to callers. This prevents panics when we fail to
build GStreamer pipelines in this code path. This is probably the first
of many changes to avoid `unwrap()`ing in this code.
Testing: This change adds a WPT crash test.
Fixes: #36844.
Signed-off-by: Martin Robinson <mrobinson@igalia.com>
Before we were creating a new frame actor each time we paused, even if
the frame object in debugger.js was the same. Now we avoid this by
reusing the same frame actor id.
This helps our upcoming work on onStep, onPop, and onEnterFrame hooks.
Testing: Ran `mach test-devtools` and manually check that it works
Part of: #36027
Signed-off-by: eri <eri@igalia.com>
Co-authored-by: atbrakhi <atbrakhi@igalia.com>
This fixes a crash on the attached testcase when running with the async
html parser enabled. The crash also triggers on wpt. When executing
parse ops received from the async parser, we were not considering the
case where one of these operations causes the parser to abort (in the
case above, said operation is the `<popup-info></popup-info>`).
```html
<body>
<script>
class PopupInfo extends HTMLElement {
connectedCallback() {
document.open();
}
}
customElements.define('popup-info', PopupInfo);
</script>
<popup-info></popup-info>
</body>
```
The bug is very obscure and only triggers if `document.open` is called
while there is no parser-blocking script **and** the document parser is
still active.
Testing: We don't run tests on the async parser yet
Fixes: Part of https://github.com/servo/servo/issues/37418
Signed-off-by: Simon Wülker <simon.wuelker@arcor.de>
This PR fixes two related issues with Content Security Policy (CSP)
nonce validation for external scripts:
1. Missing nonce validation for external scripts with malformed
attributes
2. Incorrect violation event reporting for blocked external resources
This makes servo closer to passing the `nonce-enforce-blocked` wpt test.
The remaining failures are blocked by required changes in the html
parser.
1. Svg script support (https://github.com/servo/html5ever/issues/118)
```html
<svg xmlns="http://www.w3.org/2000/svg">
<script attribute attribute nonce="abc">
t.unreached_func("Duplicate attribute in SVG, no execution.")();
</script>
</svg>
```
2. Duplicate attrs check
the html parser needs to provide this flag, as mentioned on the original
commit message
(4821bc0ab0)
```html
<script attribute attribute nonce="abc">
t.unreached_func("Duplicate attribute, no execution.")();
</script>
<script attribute attribute=<style nonce="abc">
t.unreached_func("2# Duplicate attribute, no execution.")();
</script>
[...]
<script src="../support/nonce-should-be-blocked.js?5" attribute attribute nonce="abc"></script>
```
I've also created a PR to implement the duplicate attrs flag on
html5ever https://github.com/servo/html5ever/pull/695
Testing: doesn't fixes the aforementioned wpt test yet.
Fixes: part of #36437
---------
Signed-off-by: Dyego Aurélio <dyegoaurelio@gmail.com>
Since `evaluate_js_on_global` called `enter_realm` and there were
already some callee that did it, I've actually passed `&mut
CurrentRealm`.
Also converted `Window::WebdriverException` to pass `&mut JSContext`
inside `javascript_error_info_from_error_info`.
Testing: A successful build is enough
Part of #40600
---------
Signed-off-by: Gae24 <96017547+Gae24@users.noreply.github.com>
> This was overlooked earlier in #41169
Simulate a mouse click before loading the page so that it should trigger
input events before populating any LCP entries for this `webview`.
- When mouse click event is received before/while loading, it should not
report LCP for webview.
When Page is reloaded, LCp should be reinstated for webview.
- Verify the Successful reporting of LCP entry after the reload.
Testing: `tests/largest_contentful_paint.rs`
Fixes: #42759
Signed-off-by: Shubham Gupta <shubham.gupta@chromium.org>
As per spec, mouse movement should not be treated as user interaction,
so LCP will be reported after those events. This was overlooked in
#41999. This change calls
`show_webview_and_wait_for_rendering_to_be_ready` before evaluating a
script to determine whether or not any LCP entries were fired.
Testing: This should reduce flakiness
in`test_largest_contentful_paint_js_api_with_mouse_move`.
Fixes: #42801
Signed-off-by: Shubham Gupta <shubham.gupta@chromium.org>
In order to know whether a block box can collapse its bottom margin with
the bottom margin of its last child, we need to check its tentative
block size. Most usually, this will be the block size of the containing
block that is used when laying out the children.
However, anonymous blocks do not establish a containing block. So using
the containing block for children meant that we were using the tentative
block size of its parent. If that parent had a definite size, this would
prevent the anonymous block from collapsing bottom margins with its
children. This situation could happen when placing a block-level inside
of an inline box.
This patch fixes the problem by using an indefinite tentative block size
for anonymous blocks, instead of the containing block for children.
Testing: Adding new test
Fixes: #42469
Signed-off-by: Oriol Brufau <obrufau@igalia.com>
devtools: Make `why` attribute use `PauseReasons`
Currently we have why attribute hardcoded as per the event. In this PR
we introduce `PAUSE_REASON` and make sure `why` attribute is using
`PAUSE_REASONS`.
This is in order to support the upcoming work on `onStep`, `onPop`, and
`onEnterFrame` hook.
Testing: all existing tests are passing
Fixes: Part of #36027
Signed-off-by: atbrakhi <atbrakhi@igalia.com>
Co-authored-by: eri <eri@igalia.com>
This patch removes `js_*` preferences that are not currently wired up to
the SM engine. The `js_mem_gc_allocation_threshold_factor` was being
used previously but got that usage was commented out in #28092, so the
dead code is removed.
The `dom_worklet_blockingsleep` preference is also renamed to
`dom_worklet_blockingsleep_enabled` to match the declared name in
`PaintWorkletGlobalScope.idl` which also matches the naming convention
of the other the boolean preferences.
Finally, the `network_mime_sniff` is also unused and remmoved in this
patch.
Testing: Should be covered by existing tests.
Fixes: #42868
Signed-off-by: Mukilan Thiyagarajan <mukilan@igalia.com>
Bumps [dispatch2](https://github.com/madsmtm/objc2) from 0.3.0 to 0.3.1.
<details>
<summary>Commits</summary>
<ul>
<li><a
href="8852b42419"><code>8852b42</code></a>
Bump objc2 0.6.3 -> 0.6.4</li>
<li><a
href="2d39cba1f9"><code>2d39cba</code></a>
Cherry-pick ae1c875 for objc2 v0.6.4</li>
<li><a
href="2ace80ba71"><code>2ace80b</code></a>
Cherry-pick relevant parts of 9bd26ee for objc2 v0.6.4</li>
<li><a
href="67808515c2"><code>6780851</code></a>
Bump dispatch2 0.3.0 -> 0.3.1</li>
<li><a
href="ad963172ff"><code>ad96317</code></a>
Cherry-pick e429f0a for dispatch2 v0.3.1</li>
<li><a
href="ee273d9d14"><code>ee273d9</code></a>
Cherry-pick a4821be for dispatch2 v0.3.1</li>
<li><a
href="b4167b582b"><code>b4167b5</code></a>
Fix documentation on docs.rs</li>
<li><a
href="f5df468edf"><code>f5df468</code></a>
Bump objc2 0.6.1 -> 0.6.2</li>
<li><a
href="1942c3e3ff"><code>1942c3e</code></a>
Allow unpredictable_function_pointer_comparisons</li>
<li><a
href="f6eb40db08"><code>f6eb40d</code></a>
Relax signed encoding checks for register-sized integers</li>
<li>Additional commits viewable in <a
href="https://github.com/madsmtm/objc2/compare/dispatch2-0.3.0...dispatch2-0.3.1">compare
view</a></li>
</ul>
</details>
<br />
[](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores)
Dependabot will resolve any conflicts with this PR as long as you don't
alter it yourself. You can also trigger a rebase manually by commenting
`@dependabot rebase`.
[//]: # (dependabot-automerge-start)
[//]: # (dependabot-automerge-end)
---
<details>
<summary>Dependabot commands and options</summary>
<br />
You can trigger Dependabot actions by commenting on this PR:
- `@dependabot rebase` will rebase this PR
- `@dependabot recreate` will recreate this PR, overwriting any edits
that have been made to it
- `@dependabot show <dependency name> ignore conditions` will show all
of the ignore conditions of the specified dependency
- `@dependabot ignore this major version` will close this PR and stop
Dependabot creating any more for this major version (unless you reopen
the PR or upgrade to it yourself)
- `@dependabot ignore this minor version` will close this PR and stop
Dependabot creating any more for this minor version (unless you reopen
the PR or upgrade to it yourself)
- `@dependabot ignore this dependency` will close this PR and stop
Dependabot creating any more for this dependency (unless you reopen the
PR or upgrade to it yourself)
</details>
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
This cleans up some of the informational print statement during
`build_env()` to go to stderr instead.
This opens up stdout usage to print information to stdout for
consumption (in a follow-up PR)
Testing: Covered by `./mach build --ohos` in CI.
Signed-off-by: Jonathan Schwender <schwenderjonathan@gmail.com>
Bumps the objc2-related group with 1 update:
[objc2](https://github.com/madsmtm/objc2).
Updates `objc2` from 0.6.3 to 0.6.4
<details>
<summary>Commits</summary>
<ul>
<li><a
href="8852b42419"><code>8852b42</code></a>
Bump objc2 0.6.3 -> 0.6.4</li>
<li><a
href="2d39cba1f9"><code>2d39cba</code></a>
Cherry-pick ae1c875 for objc2 v0.6.4</li>
<li><a
href="2ace80ba71"><code>2ace80b</code></a>
Cherry-pick relevant parts of 9bd26ee for objc2 v0.6.4</li>
<li><a
href="67808515c2"><code>6780851</code></a>
Bump dispatch2 0.3.0 -> 0.3.1</li>
<li><a
href="ad963172ff"><code>ad96317</code></a>
Cherry-pick e429f0a for dispatch2 v0.3.1</li>
<li><a
href="ee273d9d14"><code>ee273d9</code></a>
Cherry-pick a4821be for dispatch2 v0.3.1</li>
<li>See full diff in <a
href="https://github.com/madsmtm/objc2/compare/objc2-0.6.3...objc2-0.6.4">compare
view</a></li>
</ul>
</details>
<br />
[](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores)
Dependabot will resolve any conflicts with this PR as long as you don't
alter it yourself. You can also trigger a rebase manually by commenting
`@dependabot rebase`.
[//]: # (dependabot-automerge-start)
[//]: # (dependabot-automerge-end)
---
<details>
<summary>Dependabot commands and options</summary>
<br />
You can trigger Dependabot actions by commenting on this PR:
- `@dependabot rebase` will rebase this PR
- `@dependabot recreate` will recreate this PR, overwriting any edits
that have been made to it
- `@dependabot show <dependency name> ignore conditions` will show all
of the ignore conditions of the specified dependency
- `@dependabot ignore <dependency name> major version` will close this
group update PR and stop Dependabot creating any more for the specific
dependency's major version (unless you unignore this specific
dependency's major version or upgrade to it yourself)
- `@dependabot ignore <dependency name> minor version` will close this
group update PR and stop Dependabot creating any more for the specific
dependency's minor version (unless you unignore this specific
dependency's minor version or upgrade to it yourself)
- `@dependabot ignore <dependency name>` will close this group update PR
and stop Dependabot creating any more for the specific dependency
(unless you unignore this specific dependency or upgrade to it yourself)
- `@dependabot unignore <dependency name>` will remove all of the ignore
conditions of the specified dependency
- `@dependabot unignore <dependency name> <ignore condition>` will
remove the ignore condition of the specified dependency and ignore
conditions
</details>
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
The current implementation treats an SVG element that needs a new
serialized tree as non-replaced content, so we attempt to lay out all of
the children. If serialization is successful, subsequent layouts treat
the SVG as replaced content and ignore the children, but the children's
layout data is never cleaned up. This means that layout queries against
those children can return stale data, which can lead to unexpected
results. By always treating SVG elements as replaced content, we remove
this footgun and improve consistency.
Testing: New crashtest added. It doesn't make sense to upstream this
because our SVG implementation is very nonstandard.
Fixes: #42291Fixes: #40900
---------
Signed-off-by: Josh Matthews <josh@joshmatthews.net>
Signed-off-by: Oriol Brufau <obrufau@igalia.com>
Co-authored-by: Oriol Brufau <obrufau@igalia.com>
This fixes an oversight from #42783: when detecting that a box can be
reused, we weren't clearing the box damage propagated to ancestors, so
ancestors were still recollecting children.
This exposed some problems in
`rebuild_box_tree_from_independent_formatting_context()`:
1. When reusing a block-level box that established an independent
formatting context, we weren't checking that the new style was still
block-level.
2. When reusing a block-level abspos box, we weren't checking if the new
original display was inline-level, preventing it from being handled as a
block-level because of the static position.
3. When reusing a flex item, we weren't checking if the `order` had
changed.
Testing: we have test coverage for the 3 problems above:
1. Covered by
`/html/rendering/non-replaced-elements/the-fieldset-and-legend-elements/legend-display.html`,
and also adding a new `/css/css-display/display-flow-root-dynamic.html`.
2. Covered by `/css/CSS2/abspos/hypothetical-box-dynamic.html`
3. Covered by `/css/css-display/order-dynamic.html`.
Signed-off-by: Oriol Brufau <obrufau@igalia.com>
Co-authored-by: Luke Warlow <lwarlow@igalia.com>
Co-authored-by: Martin Robinson <mrobinson@igalia.com>
The static position of an abspos is the hypothetical position that it
would have had in the normal flow. If the abspos is inside inline layout
and it had a block-level original display, then the static position is
computed as if the abspos was a block-level that breaks the inline.
Usually this places the static position after the current line. However,
if the abspos is not preceded by any text, padding, border, margin,
preserved newline or atomic inline, then the static position should be
as if the abspos was preceded by a 0px tall phantom line. Previously we
weren't taking that into account.
Note that browsers aren't completely interoperable in corner cases.
Testing: Adding 3 new tests. Blink fails the 2nd one and Gecko fails the
3rd one. WebKit and Servo pass them all.
Fixes: #41990
Signed-off-by: Oriol Brufau <obrufau@igalia.com>
This change adds more debugging output when failing to create an OpenGL
context upon starting Servo. In particular, the debugging output tries
to create a very old OpenGL context (version 1.0) in order to print the
context version created -- to more easily identify situations where the
driver is too old.
Testing: This just prints debugging information. It would be difficult
to
test this as we would need to mock OpenGL context creation failure and
test simply running `prinltln!`.
Fixes: #42824.
Fixes: #39987.
Signed-off-by: Martin Robinson <mrobinson@igalia.com>
When creating a HTML tokenizer then we check the
`dom_servoparser_async_html_tokenizer_enabled` preference and create a
sync or async tokenizer accordingly. We don't do that in `document.open`
though, this change fixes that.
Part of https://github.com/servo/servo/issues/37418
Testing: We don't run tests for the async tokenizer yet
Signed-off-by: Simon Wülker <simon.wuelker@arcor.de>
Add Image related Info into `ImageInfo`.
This will help in processing some other attributes like URL which are
needed for `PaintTiming`.
Testing: This is just a little refactor. No change in behavior expected.
Successful compilation is enough to verify.
Signed-off-by: Shubham Gupta <shubham.gupta@chromium.org>
Moves the `Drop` implementation for `GPUDevice` into a private
`DroppableGPUDevice` struct.
Also updates `Bindings.conf` to prevent the generation of `Drop`
implementations for `GPUDevice`.
Testing: WebGpu tests just cover the cases
Fixes: Partially #26488
Signed-off-by: Domenico Rizzo <domenico.rizzo@gmail.com>
When fragment tree layout is going to run for a node that starts an
independent formatting context, but only because an ancestor was
damaged, preserve the fragment cache. This means that in the optimistic
case we do not need to re-run fragment tree layout for this independent
formatting context. Previously this was only done for the children of
the independent formatting context, but the fragment cache is robust
enough to detect any layout changes necessary for the IFC fragment
itself as well. This helps to avoid so much fragment reconstruction
during incremental layout.
Testing: `basic-fragment-tree-layout.html` is updated reflecting the
decrease
in the number of fragments rebuilt.
Signed-off-by: Martin Robinson <mrobinson@igalia.com>
Co-authored-by: Luke Warlow <lwarlow@igalia.com>
Co-authored-by: Oriol Brufau <obrufau@igalia.com>
This reverts commit 1f42551042.
This change led to a decrease in Speedometer performance and needs to be
reworked to avoid that.
Testing: This is just a revert.
Signed-off-by: Martin Robinson <mrobinson@igalia.com>
`OutsideMarker` was storing the `BlockFormattingContext` and the
`LayoutBoxBase` in separate fields. Now it will store an entire
`IndependentFormattingContext` in a single field.
In particular, this fixes the issue that `OutsideMarker::repair_style()`
wasn't calling `BlockFormattingContext::repair_style()`. Now we can just
rely on `IndependentFormattingContext::repair_style()`, which correctly
repairs the style of both the `BlockFormattingContext` and the
`LayoutBoxBase`.
Also, the `BlockLevelBox::repair_style()` was repairing the style of the
`LayoutBoxBase` twice, for all kinds of block-level boxes. This removes
the duplication.
Testing: Adding a new test
Fixes: #42779
Signed-off-by: Oriol Brufau <obrufau@igalia.com>
We need a map between frame actor ids (from devtools) and frame objects
(from debugger.js) to implement stepping hooks in the future.
To achieve this, we register the frame actor with a call to the devtools
before entering the event loop when the debugger is paused. Instead of
creating the frame actor in `handle_debugger_pause`, we create it
before.
Testing: It passes existing devtools tests
Part of: #36027
Signed-off-by: eri <eri@igalia.com>
Co-authored-by: atbrakhi <atbrakhi@igalia.com>