This is the CSSOM interface that represents a nested declarations rule.
https://drafts.csswg.org/css-nesting/#the-cssnestrule
Testing: `/_mozilla/mozilla/interfaces.https.html`. And once
`CSSStyleRule` becomes a `CSSGroupingRule` subclass, this will be
further covered by `/css/css-nestting/`.
This is part of #36245
Signed-off-by: Oriol Brufau <obrufau@igalia.com>
Devtools clients need a `browserId`, `browsingContextID`, and
`outerWindowID`, which correspond to WebViewId, BrowsingContextId, and
PipelineId in Servo. These u32 values were previously derived from our
sharded (u32,u32) id values by taking only the `index` (second u32) and
ignoring the `namespace_id` (first u32), leading to collisions.
This patch fixes that by mapping those Servo ids to sequential u32
values.
---
<!-- Thank you for contributing to Servo! Please replace each `[ ]` by
`[X]` when the step is complete, and replace `___` with appropriate
data: -->
- [x] `./mach build -d` does not report any errors
- [x] `./mach test-tidy` does not report any errors
- [x] These changes fix#35954
<!-- Either: -->
- [x] There are tests for these changes OR
- [ ] These changes do not require tests because ___
<!-- Also, please make sure that "Allow edits from maintainers" checkbox
is checked, so that we can help you if you get stuck somewhere along the
way.-->
<!-- Pull requests that do not address these steps are welcome, but they
will require additional verification as part of the review process. -->
---------
Signed-off-by: Delan Azabani <dazabani@igalia.com>
Ensure there is an active realm when dispatching the `activation` DOM
event to the ServiceWorker global.
Testing: Existing WPT coverage.
Fixes: #36114Fixes: #36235Fixes: #36231
Signed-off-by: Josh Matthews <josh@joshmatthews.net>
Changed `RegExpFlag_Unicode` to `RegExpFlag_UnicodeSets` in all
instances.
Testing: Ran `./mach test-wpt
tests/wpt/tests/html/semantics/forms/constraints/form-validation-validity-patternMismatch.html`
and all tests passed successfully.
Fixes: #36075
---------
Signed-off-by: MDCODE247 <ammedabubakard500@gmail.com>
Implements Steps 2-3 of #35867:
- Adds `SimulateColorScheme` to `DevtoolScriptControlMsg` for light/dark
mode simulation.
- Handles it in `ScriptThread` with `handle_theme_change` to toggle
themes.
Testing: This PR does not require testing because it only adds
infrastructure (command and handler) but doesn’t yet integrate with
devtools actors.
Fixes: Part of #35867 (https://github.com/servo/servo/issues/35867)
---------
Signed-off-by: Uthman Yahaya Baba <uthmanyahayababa@gmail.com>
The indirection through ServoParser::parse_sync does nothing, so the
method can simply be called directly.
Signed-off-by: Simon Wülker <simon.wuelker@arcor.de>
So that we can see the improvement when enabling the feature.
Testing: This PR enables tests
This is part of #36245
Signed-off-by: Oriol Brufau <obrufau@igalia.com>
Bumps [darling](https://github.com/TedDriggs/darling) from 0.20.10 to
0.20.11.
<details>
<summary>Release notes</summary>
<p><em>Sourced from <a
href="https://github.com/TedDriggs/darling/releases">darling's
releases</a>.</em></p>
<blockquote>
<h2>v0.20.11</h2>
<ul>
<li>Support <code>#[darling(with = ...)]</code> on the <code>data</code>
field when deriving <code>FromDeriveInput</code>. This allows the use of
simpler receiver types, such as a <code>Vec</code> of enum
variants.</li>
<li>Bump version of <code>proc-macro2</code> to 1.0.86.</li>
<li>Accept closures for <code>#[darling(with = ...)]</code> on fields in
<code>FromDeriveInput</code>, <code>FromMeta</code>,
<code>FromField</code>, etc. <a
href="https://redirect.github.com/TedDriggs/darling/issues/309">#309</a></li>
<li>Add <code>darling::util::Callable</code> to accept a path or closure
as a meta-item expression</li>
<li>Add <code>#[darling(from_word = ...)]</code> and
<code>#[darling(from_none = ...)]</code> to control shorthand and
fallback behaviors for structs and enums deriving <code>FromMeta</code>
<a
href="https://redirect.github.com/TedDriggs/darling/issues/320">#320</a></li>
<li>Add <code>FromMeta</code> impl for <code>syn::ExprRange</code> <a
href="https://github.com/TedDriggs/issues/329">#329</a></li>
</ul>
</blockquote>
</details>
<details>
<summary>Changelog</summary>
<p><em>Sourced from <a
href="https://github.com/TedDriggs/darling/blob/master/CHANGELOG.md">darling's
changelog</a>.</em></p>
<blockquote>
<h2>v0.20.11 (March 28, 2025)</h2>
<ul>
<li>Support <code>#[darling(with = ...)]</code> on the <code>data</code>
field when deriving <code>FromDeriveInput</code>. This allows the use of
simpler receiver types, such as a <code>Vec</code> of enum
variants.</li>
<li>Bump version of <code>proc-macro2</code> to 1.0.86.</li>
<li>Accept closures for <code>#[darling(with = ...)]</code> on fields in
<code>FromDeriveInput</code>, <code>FromMeta</code>,
<code>FromField</code>, etc. <a
href="https://redirect.github.com/TedDriggs/darling/issues/309">#309</a></li>
<li>Add <code>darling::util::Callable</code> to accept a path or closure
as a meta-item expression</li>
<li>Add <code>#[darling(from_word = ...)]</code> and
<code>#[darling(from_none = ...)]</code> to control shorthand and
fallback behaviors for structs and enums deriving <code>FromMeta</code>
<a
href="https://redirect.github.com/TedDriggs/darling/issues/320">#320</a></li>
<li>Add <code>FromMeta</code> impl for <code>syn::ExprRange</code> <a
href="https://github.com/TedDriggs/issues/329">#329</a></li>
</ul>
</blockquote>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a
href="82a51e0b65"><code>82a51e0</code></a>
Bump version to 0.20.11</li>
<li><a
href="61834da6a2"><code>61834da</code></a>
Impl FromMeta for syn::ExprRange (<a
href="https://redirect.github.com/TedDriggs/darling/issues/332">#332</a>)</li>
<li><a
href="f18d5d5388"><code>f18d5d5</code></a>
Add explicit implementations of <code>FromMeta</code> methods to
<code>SpannedValue</code> and `Ove...</li>
<li><a
href="a6e5f524b2"><code>a6e5f52</code></a>
Move generation of from_word body for unit variants</li>
<li><a
href="c8c8201521"><code>c8c8201</code></a>
Add from_word and from_none options</li>
<li><a
href="3a848ca282"><code>3a848ca</code></a>
Extract path-or-closure to darling::util::Callable</li>
<li><a
href="fa552e4fd7"><code>fa552e4</code></a>
Error if <code>attrs</code> field is declared and
<code>forward_attrs</code> is missing.</li>
<li><a
href="af24bdf87a"><code>af24bdf</code></a>
Reject extra data passed to unit enum variants</li>
<li><a
href="b7a248f8ee"><code>b7a248f</code></a>
Fix clippy violations by removing unnecessary iifetimes</li>
<li><a
href="b746a0c4a9"><code>b746a0c</code></a>
Accept a closure for <code>with</code> in lieu of a path for fields (<a
href="https://redirect.github.com/TedDriggs/darling/issues/310">#310</a>)</li>
<li>Additional commits viewable in <a
href="https://github.com/TedDriggs/darling/compare/v0.20.10...v0.20.11">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 merge` will merge this PR after your CI passes on it
- `@dependabot squash and merge` will squash and merge this PR after
your CI passes on it
- `@dependabot cancel merge` will cancel a previously requested merge
and block automerging
- `@dependabot reopen` will reopen this PR if it is closed
- `@dependabot close` will close this PR and stop Dependabot recreating
it. You can achieve the same result by closing it manually
- `@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>
Bumps [socket2](https://github.com/rust-lang/socket2) from 0.5.8 to
0.5.9.
<details>
<summary>Commits</summary>
<ul>
<li>See full diff in <a
href="https://github.com/rust-lang/socket2/commits">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 merge` will merge this PR after your CI passes on it
- `@dependabot squash and merge` will squash and merge this PR after
your CI passes on it
- `@dependabot cancel merge` will cancel a previously requested merge
and block automerging
- `@dependabot reopen` will reopen this PR if it is closed
- `@dependabot close` will close this PR and stop Dependabot recreating
it. You can achieve the same result by closing it manually
- `@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>
<!-- Please describe your changes on the following line: -->
---Part of #35867, per Step 5 suggestion. This PR:
- Adds active_tab (via RefCell) to RootActor, updated in
get_tab_msg_by_browser_id.
- Adds browsing_context() helper to TabDescriptorActor.
- Adds actor()`getter to TabDescriptorActorMsg for access in root.rs.
-Creates the chain (Root - Tab - BrowsingContext) for routing
colorSchemeSimulation.
<!-- Thank you for contributing to Servo! Please replace each `[ ]` by
`[X]` when the step is complete, and replace `___` with appropriate
data: -->
- [X ] `./mach build -d` does not report any errors
- [X ] `./mach test-tidy` does not report any errors
- [ ] These changes fix #___ (GitHub issue number if applicable)
<!-- Either: -->
- [ ] There are tests for these changes OR
- [X] These changes do not require tests because they’re structural
setup for the actor chain and don’t change the system's behavior yet.
<!-- Also, please make sure that "Allow edits from maintainers" checkbox
is checked, so that we can help you if you get stuck somewhere along the
way.-->
<!-- Pull requests that do not address these steps are welcome, but they
will require additional verification as part of the review process. -->
---------
Signed-off-by: Uthman Yahaya Baba <uthmanyahayababa@gmail.com>
Bumps [iana-time-zone](https://github.com/strawlab/iana-time-zone) from
0.1.62 to 0.1.63.
<details>
<summary>Changelog</summary>
<p><em>Sourced from <a
href="https://github.com/strawlab/iana-time-zone/blob/main/CHANGELOG.md">iana-time-zone's
changelog</a>.</em></p>
<blockquote>
<h2>[0.1.63] - 2025-03-31</h2>
<h3>Changes</h3>
<ul>
<li>Bump MSRV (minimum supported rust version) to 1.62 (<a
href="https://redirect.github.com/strawlab/iana-time-zone/pull/131">#131</a>)</li>
<li>Bump <code>windows-core</code> to <code>0.56-0.61</code> range (<a
href="https://redirect.github.com/strawlab/iana-time-zone/pull/131">#131</a>,
<a
href="https://redirect.github.com/strawlab/iana-time-zone/pull/133">#133</a>)</li>
</ul>
</blockquote>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a
href="6adcd016a8"><code>6adcd01</code></a>
Bump version number to 0.1.63</li>
<li><a
href="16f281a63e"><code>16f281a</code></a>
Merge pull request <a
href="https://redirect.github.com/strawlab/iana-time-zone/issues/133">#133</a>
from MarijnS95/windows-0.56</li>
<li><a
href="798e431925"><code>798e431</code></a>
Bump <code>windows-core</code> range to <code>0.56-0.61</code> and
regenerate with <code>0.59</code></li>
<li><a
href="66033d9a0f"><code>66033d9</code></a>
Bump <code>windows-core</code> to <code>0.56</code></li>
<li><a
href="10c843db67"><code>10c843d</code></a>
Merge pull request <a
href="https://redirect.github.com/strawlab/iana-time-zone/issues/131">#131</a>
from MarijnS95/windows-core-0.54</li>
<li><a
href="a26e540edb"><code>a26e540</code></a>
Bump <code>windows-core</code> to <code>0.53-0.54</code> range</li>
<li><a
href="5bad55850b"><code>5bad558</code></a>
WIP: Bump MSRV to 1.62</li>
<li><a
href="343f31b804"><code>343f31b</code></a>
Merge pull request <a
href="https://redirect.github.com/strawlab/iana-time-zone/issues/164">#164</a>
from strawlab/dev/astraw-fix-aix</li>
<li><a
href="995347ff2b"><code>995347f</code></a>
AIX: remove unused code</li>
<li>See full diff in <a
href="https://github.com/strawlab/iana-time-zone/compare/v0.1.62...v0.1.63">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 merge` will merge this PR after your CI passes on it
- `@dependabot squash and merge` will squash and merge this PR after
your CI passes on it
- `@dependabot cancel merge` will cancel a previously requested merge
and block automerging
- `@dependabot reopen` will reopen this PR if it is closed
- `@dependabot close` will close this PR and stop Dependabot recreating
it. You can achieve the same result by closing it manually
- `@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>
Bumps [once_cell](https://github.com/matklad/once_cell) from 1.21.2 to
1.21.3.
<details>
<summary>Changelog</summary>
<p><em>Sourced from <a
href="https://github.com/matklad/once_cell/blob/master/CHANGELOG.md">once_cell's
changelog</a>.</em></p>
<blockquote>
<h2>1.21.3</h2>
<ul>
<li>Outline more initialization in <code>race</code>: <a
href="https://redirect.github.com/matklad/once_cell/pull/284">#284</a>,
<a
href="https://redirect.github.com/matklad/once_cell/pull/285">#285</a>.</li>
</ul>
</blockquote>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a
href="29e3d93cf0"><code>29e3d93</code></a>
Merge pull request <a
href="https://redirect.github.com/matklad/once_cell/issues/286">#286</a>
from briansmith/b/once-ref-dry</li>
<li><a
href="a206950676"><code>a206950</code></a>
Prepare for 1.21.3 release.</li>
<li><a
href="17d4a9b433"><code>17d4a9b</code></a>
DRY <code>race::OnceRef::{get_or_try_init, set}</code>.</li>
<li><a
href="01b1d560f4"><code>01b1d56</code></a>
Merge pull request <a
href="https://redirect.github.com/matklad/once_cell/issues/285">#285</a>
from briansmith/b/once-ref-cold</li>
<li><a
href="a851cc4788"><code>a851cc4</code></a>
Mark initialization of <code>OnceRef::get_or_try_init</code> cold.</li>
<li><a
href="2447a93fbe"><code>2447a93</code></a>
Merge pull request <a
href="https://redirect.github.com/matklad/once_cell/issues/281">#281</a>
from briansmith/b/init-inner</li>
<li><a
href="c294d64f9c"><code>c294d64</code></a>
Merge pull request <a
href="https://redirect.github.com/matklad/once_cell/issues/280">#280</a>
from briansmith/b/self</li>
<li><a
href="5f0fdd427a"><code>5f0fdd4</code></a>
Merge pull request <a
href="https://redirect.github.com/matklad/once_cell/issues/283">#283</a>
from briansmith/b/cast_mut</li>
<li><a
href="899e319523"><code>899e319</code></a>
Merge pull request <a
href="https://redirect.github.com/matklad/once_cell/issues/284">#284</a>
from briansmith/b/dry-get</li>
<li><a
href="90da60ba44"><code>90da60b</code></a>
Mark initialization of <code>OnceBox::get_or_try_init</code> cold.</li>
<li>Additional commits viewable in <a
href="https://github.com/matklad/once_cell/compare/v1.21.2...v1.21.3">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 merge` will merge this PR after your CI passes on it
- `@dependabot squash and merge` will squash and merge this PR after
your CI passes on it
- `@dependabot cancel merge` will cancel a previously requested merge
and block automerging
- `@dependabot reopen` will reopen this PR if it is closed
- `@dependabot close` will close this PR and stop Dependabot recreating
it. You can achieve the same result by closing it manually
- `@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>
"Composed" flag (https://dom.spec.whatwg.org/#composed-flag) should be
properly set on event construction phase from optional "EventInit"
dictionary
(https://dom.spec.whatwg.org/#dom-eventinit-composed).
The limited set of event types (Custom/Error/Focus/Mouse) will be
affected by this CL (used in WPT tests).
---
- [X] `./mach build -d` does not report any errors
- [X] `./mach test-tidy` does not report any errors
- [X] There are WPT shadow-dom tests which have new issues related to
event "relatedTarget" property
tests/wpt/tests/shadow-dom/event-composed-path-with-related-target.html
tests/wpt/tests/shadow-dom/event-with-related-target.html
Signed-off-by: Andrei Volykhin <andrei.volykhin@gmail.com>
Follow the specification more closely by using the flat tree when
calculating depth for the resize observer.
Testing: Newly passing WPT test.
Fixes: #36092
Signed-off-by: Josh Matthews <josh@joshmatthews.net>
This is struct is always already wrapped in a RefCell by `ResizeObserver`. It is not exposed to JS itself,
so it doesn't need `RefCell`s.
Signed-off-by: Simon Wülker <simon.wuelker@arcor.de>
This change also adds a bunch of spec comments, because our
ResizeObserver implementation deviates from the spec significantly in
ways that are not immediately intuitive.
Fixes https://github.com/servo/servo/issues/36096
Signed-off-by: Simon Wülker <simon.wuelker@arcor.de>
* script: Move HasParent to script_bindings and update imports for InheritTypes.
Signed-off-by: Josh Matthews <josh@joshmatthews.net>
* script: Make principal creation generic over DOM interface.
Signed-off-by: Josh Matthews <josh@joshmatthews.net>
* script: Move a bunch of proxy-related code to script_bindings.
Signed-off-by: Josh Matthews <josh@joshmatthews.net>
* script: Make some proxy-related code generic over the DOM interface.
Signed-off-by: Josh Matthews <josh@joshmatthews.net>
* script: Move DomSlice to script_bindings.
Signed-off-by: Josh Matthews <josh@joshmatthews.net>
* script: Move some utility bindings code to script_bindings.
Signed-off-by: Josh Matthews <josh@joshmatthews.net>
* script: Make enumerating and resolving globals generic over the DOM interface.
Signed-off-by: Josh Matthews <josh@joshmatthews.net>
* script: Make realm helpers generic over the DOM interface.
Signed-off-by: Josh Matthews <josh@joshmatthews.net>
* script: Move implementations on concrete DOM types to concrete bindings.
Signed-off-by: Josh Matthews <josh@joshmatthews.net>
* script: Make additional codegen helpers generic over the DOM interface.
Signed-off-by: Josh Matthews <josh@joshmatthews.net>
* script: Make iterator creation generic over the DOM interface.
Signed-off-by: Josh Matthews <josh@joshmatthews.net>
* script: Make reporting an exception a generic operation.
Signed-off-by: Josh Matthews <josh@joshmatthews.net>
* script: Move AsCCharPtrPtr to script_bindings.
Signed-off-by: Josh Matthews <josh@joshmatthews.net>
* Formatting.
Signed-off-by: Josh Matthews <josh@joshmatthews.net>
* Address clippy warnings.
Signed-off-by: Josh Matthews <josh@joshmatthews.net>
---------
Signed-off-by: Josh Matthews <josh@joshmatthews.net>
The idea here is that we can use the pull request description as the
commit message, so that the git history is cleaner. This requires:
1. Removing comments from the message, as GitHub doesn't remove them
from the pull request descriptions when committing.
2. Remove the checklist, which is now verified by the CI instead, so
is less important.
3. Ask the contributor to remove the lines expicitly.
Signed-off-by: Martin Robinson <mrobinson@igalia.com>
- Remove the last remaining Servo-specific PseudoElement enum from
layout. This was made to select `::before` and `::after` (both eager
pseudo-elements), but now `traverse_pseudo_element` is called
`traverse_eager_pseudo_element` and should work on any eager pseudo
element.
- Expose a single way of getting psuedo-element variants of
ThreadSafeLayoutElement in the Layout DOM, which returns `None` when
the pseudo-element doesn't apply (not defined for eager
pseudo-elements or when trying to get `<details>` related
pseudo-elements on elements that they don't apply to).
- Ensure that NodeAndStyleInfo always refers to a node. This is done by
making sure that anonymous boxes are all associated with their
originating node.
These changes are prepatory work for implementation of the `::marker`
pseudo-element as well as ensuring that all anonymous boxes can be
cached into the box tree eventually.
Signed-off-by: Martin Robinson <mrobinson@igalia.com>
This macro was copied into mozjs in 2023, in servo/mozjs#352
The two versions are identical, and rooting infrastructure generally
lives in mozjs. Let's not keep this redundant copy around.
The mozjs version is already imported evyerwhere via `#[macro_use]`.
Signed-off-by: Greg Morenz <greg-morenz@droid.cafe>
The DOM event listener "removed" status should be supported to track
the following situations (with immediate effect of listener removal):
- Removing a later event listener while an earlier listener
for the same event is running
- Nested usage (recursively dispatch another event) of "once" listeners
https://dom.spec.whatwg.org/#event-listener-removed
During event dispatching requires to clone event listeners list
on "invoke" step https://dom.spec.whatwg.org/#concept-event-listener-invoke
and the lowercase "event listener" concept in Servo is EventListenerEntry
https://dom.spec.whatwg.org/#concept-event-listener
Bug: #25479, #25090
Signed-off-by: Andrei Volykhin <andrei.volykhin@gmail.com>
In the fetch spec, the `text()` method of `Body` (an interface mixin
implemented by both `Request` and `Response`) consumes the body with
the Encoding spec "UTF-8 decode" algorithm, which skips the UTF-8 BOM
if it is present at the beginning of the body. Servo's implementation
does not do that. This patch fixes this.
Signed-off-by: Andreu Botella <abotella@igalia.com>
* Check for existence of sudo command in ./mach bootstrap on Linux (#35736)
Signed-off-by: Tom Overlund <tomov@dilacero.org>
* Remove extraneous semicolon from previous commit (test-tidy fix).
Signed-off-by: Tom Overlund <tomov@dilacero.org>
---------
Signed-off-by: Tom Overlund <tomov@dilacero.org>
When you create a `Request` object with a `FormData` body, the spec
says that the `Content-Type` header should start with
`multipart/form-data; boundary=`. However, in Servo's implementation
it started with `multipart/form-data;boundary=`, without the space.
While all reasonable servers should be able to that headers whether
the space is present or not, this brings Servo closer to the spec, and
also makes some WPT tests pass.
Note that submitting a form with `enctype="multipart/form-data"` does
produce a `Content-Type` header with the space (see
`HTMLFormElement::submit_entity_body`).
Signed-off-by: Andreu Botella <abotella@igalia.com>