| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
We now check the sink of script.src for trusted types. This is the first
attribute that we check, other sinks will be implemented in follow-up
changes.
The algorithms currently hardcode various parts. That's because I need
to refactor a couple of algorithms already present in TrustedTypePolicy.
They use callbacks at the moment, which made sense for their initial
use. However, for these new algorithms they don't work. Therefore, I
will align them with the specification by taking in an enum. However,
since that's a bigger refactoring, I left that out of this PR (which is
already quite big).
The other trusted types support (createScript and createHTML) will also
be implemented separately.
Part of #36258
---------
Signed-off-by: Tim van der Lippe <tvanderlippe@gmail.com>
Signed-off-by: Tim van der Lippe <TimvdLippe@users.noreply.github.com>
Co-authored-by: Josh Matthews <josh@joshmatthews.net>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
These changes make us match Gecko's setup for how Window and non-Window
globals are initialized. Since Window globals are much more common than
Worker globals, using lazy interface definitions can be a useful memory
optimization at the expense of increased complexity for property
lookups.
Also adds the MayResolve hook for all globals, which is an optimization
for the JIT to avoid calling resolve hooks unnecessarily.
Testing: Existing test coverage on global interfaces should suffice.
---------
Signed-off-by: Josh Matthews <josh@joshmatthews.net>
|
|
|
|
|
|
|
|
|
|
|
| |
Profiling from #36609 showed this is an easy win. Ordering of our root
list does not matter, so swap_remove is a constant time operation
compared to a linear time one that caused memmove to appear in profiles
with lots of unrooting.
Testing: Existing WPT tests will cover this change.
Fixes: Part of #36609.
Signed-off-by: Josh Matthews <josh@joshmatthews.net>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Sets the navigator.onLine attribute to true.
Testing:
Ran `./mach run https://pinterest.com
--enable-experimental-web-platform-features`. This doesn't show the
"Hmm..you're not connected to the internet" text anymore.
<img width="1027" alt="Screenshot 2025-04-16 at 11 31 02 AM"
src="https://github.com/user-attachments/assets/3745077b-dc51-42ce-88a0-38d5f157fc0c"
/>
part of: #36554
---------
Signed-off-by: Siddhant N. Trivedi <sidntrivedi012@gmail.com>
Signed-off-by: Siddhant N Trivedi <sidntrivedi012@gmail.com>
Co-authored-by: Josh Matthews <josh@joshmatthews.net>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
These changes make our implementation of the enumeration hook for
globals [match
Gecko's](https://searchfox.org/mozilla-central/rev/1f65969e57c757146e3e548614b49d3a4168eeb8/dom/base/nsGlobalWindowInner.cpp#3297),
fixing an assertion failure that occurred in the previous
implementation.
Our enumeration hook is supposed to fill a vector with names of
properties on the global object without modifying the global in any way;
instead we were defining all of the missing webidl interfaces. We now do
much less work and crash less.
Testing: New crashtest based on manual testcase.
Fixes: #34686
---------
Signed-off-by: Josh Matthews <josh@joshmatthews.net>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This is needed to implement features like `Response.json` which is a
static helper added to the fetch spec which overlaps with the `json`
instance method `Response` has from `Body`.
Partly based these changes on what Firefox does for this same issue.
(https://searchfox.org/mozilla-central/source/dom/bindings/Codegen.py
and
https://searchfox.org/mozilla-central/source/dom/bindings/Configuration.py
specifically keying `binaryNameFor` on name and `isStatic`).
Testing: I locally updated the Response.webidl to contain the new static
`json` and it compiles.
Signed-off-by: Sebastian C <sebsebmc@gmail.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The JS engine uses types like `Handle<Maybe<PropertyDescriptor>>` in
various places and our automated bindings are not able to handle the
Maybe type. We have hand-written bindings that use outparams to indicate
a PropertyDescriptor value is actually the Nothing type, but that data
was getting lost when we passed the property descriptor to
SetPropertyIgnoringNamedGetter, which assumed that the property
descriptor was always valid.
Depends on https://github.com/servo/mozjs/pull/579.
Testing: Manual testing on testcase from
https://github.com/servo/servo/issues/34709, and new crashtest added.
Fixes: #34709
Signed-off-by: Josh Matthews <josh@joshmatthews.net>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
support seekable attribute in `htmlmediaelement`, modify `seek`
algorithm to use `seekable` attribute.
related
[specs](https://html.spec.whatwg.org/multipage/media.html#dom-media-seekable)
Testing: Run WPT Test
Fixes: https://github.com/servo/servo/issues/22297
Will wait for https://github.com/servo/media/pull/435 before turning
this to ready for review.
cc @jdm @xiaochengh
Signed-off-by: rayguo17 <rayguo17@gmail.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Add missing "EnforceRange" attribute to interface methods
https://html.spec.whatwg.org/multipage/canvas.html#canvasimagedata
--
- [x] ./mach build -d does not report any errors
- [x] ./mach test-tidy does not report any errors
- [x] There are tests for these changes
tests/wpt/tests/html/canvas/element/pixel-manipulation/2d.imageData*
tests/wpt/tests/html/canvas/offscreen/pixel-manipulation/2d.imageData*
Signed-off-by: Andrei Volykhin <andrei.volykhin@gmail.com>
|
|
|
|
|
|
|
|
| |
https://drafts.csswg.org/cssom/#dom-cssstylesheet-cssstylesheet
Testing: covered by WPT
This is part of #36162
Signed-off-by: Oriol Brufau <obrufau@igalia.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
<!-- Please describe your changes on the following line: -->
Add transfer support to ReadableStream. Part of
https://github.com/servo/servo/issues/34676
---
<!-- Thank you for contributing to Servo! Please replace each `[ ]` by
`[X]` when the step is complete, and replace `___` with appropriate
data: -->
- [ ] `./mach build -d` does not report any errors
- [ ] `./mach test-tidy` does not report any errors
- [ ] These changes fix #___ (GitHub issue number if applicable)
<!-- Either: -->
- [ ] 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: gterzian <2792687+gterzian@users.noreply.github.com>
|
|
|
|
|
|
|
| |
This was missed in #36355 and should have also been gated by the flag.
With these, the wpt.fyi tests should now no longer pass, as the flag
hasn't been removed yet.
Signed-off-by: Tim van der Lippe <tvanderlippe@gmail.com>
|
|
|
|
|
|
|
|
|
|
| |
Implement enough of the Clipboard API to have a working `writeText`.
Testing: Unfortunately many clipboard-apis tests require testdriver, so
only idlharness ones will pass now.
---------
Signed-off-by: Gae24 <96017547+Gae24@users.noreply.github.com>
|
|
|
|
|
|
|
|
| |
add CanGc as argument to methods in HTMLInputElement, HTMLLinkElement
Testing: These changes do not require tests because they are a refactor.
Addresses part of https://github.com/servo/servo/issues/34573.
Signed-off-by: Yerkebulan Tulibergenov <yerkebulan@gmail.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
- [x] our [DataClone
error](https://github.com/servo/servo/blob/d733abfca02cdb9fd2af4f0d82ff050e25f71829/components/script/dom/bindings/error.rs#L80)
needs to support an optional message
- [x] we need to add support to our DOMException implementation to allow
an optional message to replace the default message
- [x] we need to create a new struct used by both StructuredDataReader
and StructuredDataWriter for storing the error message in the
report_error_callback
- [x] report_error_callback needs to cast the closure pointer to the new
struct
- [x] the code that [throws a DataClone
error](https://github.com/servo/servo/blob/5d1c64dba9cf3e65f770370eb17f00ad4114edce/components/script/dom/bindings/structuredclone.rs#L542)
needs to use the stored error message if it's available
Testing: *Describe how this pull request is tested or why it doesn't
require tests*
Fixes: #36191
---------
Signed-off-by: jerensl <54782057+jerensl@users.noreply.github.com>
|
|
|
|
|
|
|
|
|
|
|
|
| |
HTMLDialogElement, HTMLElement, HTMLFieldSetElement, HTMLFormControlsCollection, HTMLFormElement, HTMLIFrameElement (#36495)
add CanGc as argument to methods in HTMLCollection, HTMLDataListElement,
HTMLDialogElement, HTMLElement, HTMLFieldSetElement,
HTMLFormControlsCollection, HTMLFormElement, HTMLIFrameElement
Testing: These changes do not require tests because they are a refactor.
Addresses part of https://github.com/servo/servo/issues/34573.
Signed-off-by: Yerkebulan Tulibergenov <yerkebulan@gmail.com>
|
|
|
|
|
|
|
|
|
|
|
| |
HTMLAnchorElement, HTMLAreaElement, HTMLCanvasElement (#36492)
add CanGc as argument to methods in ElementInternals, GlobalScope,
HTMLAnchorElement, HTMLAreaElement, HTMLCanvasElement
Testing: These changes do not require tests because they are a refactor.
Addresses part of https://github.com/servo/servo/issues/34573.
Signed-off-by: Yerkebulan Tulibergenov <yerkebulan@gmail.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This algorithm is quite straightforward written in the specification,
but leads to some type awkwardness in Rust. Most notably, the callbacks
have different types and cannot be unified easily. They also return
different string types. Similarly, the returning objects are all unique
types and don't have a common denominator.
Therefore, rather than implementing it in 1-to-1 fashion with the
specification text, it instead uses callbacks to instruct the type
system of what to call when.
This is further complicated by the fact that the callback can exist
or not, as well as return a value or not. This requires multiple
unwrangling, combined with the fact that the algorithm should throw
or not.
All in all, the number of lines is relatively low compared to the
specification algorithm and the Rust compiler does a lot of heavy
lifting figuring out which type is what.
Part of https://github.com/servo/servo/issues/36258
Signed-off-by: Tim van der Lippe <tvanderlippe@gmail.com>
Co-authored-by: Josh Matthews <josh@joshmatthews.net>
|
|
|
|
|
|
|
| |
See: https://github.com/whatwg/xhr/pull/394
Testing: WPT tests exist for this
Signed-off-by: Sebastian C <sebsebmc@gmail.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
src in resource selection algorithm. (#36408)
Set the `htmlmediaelement`'s `currenSrc` in
resource-selection-algorithm.
Change the `htmlsourceelement`'s src and srcset to USVString type.
According to
[Spec](https://html.spec.whatwg.org/multipage/media.html#concept-media-load-algorithm),
Step 9.3 for mode is children, should set the `currentSrc` to `src` of
children `htmlsourceelement`.
Also, In the `htmlsourceelement` [interface
definition](https://html.spec.whatwg.org/multipage/embedded-content.html#the-source-element),
the `src` and `srcset` attribute should be type `USVString`.
Testing: More WPT tests related to resource selection algorithm are
passing.
Fix: Some spec fix
[Try](https://github.com/rayguo17/servo/actions/runs/14347535616)
cc @xiaochengh
Signed-off-by: rayguo17 <rayguo17@gmail.com>
|
|
|
|
|
|
|
|
| |
add CanGc as argument to methods in Element
Testing: These changes do not require tests because they are a refactor.
Addresses part of https://github.com/servo/servo/issues/34573.
Signed-off-by: Yerkebulan Tulibergenov <yerkebulan@gmail.com>
|
|
|
|
|
|
|
|
|
|
| |
Adds support for both the content and the IDL attribute.
Note this doesn't cover dynamic updates to `document.styleSheets` and
the owner node of the sheet.
Testing: Covered by WPT
Fixes: #26739
Signed-off-by: Oriol Brufau <obrufau@igalia.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
copy generated `include!`d files from script_bindings's OUT_DIR, to
script's OUT_DIR to allow Rust Analyzer to load them.
This is done to bypass limitation of Rust Analyzer:
https://github.com/rust-lang/rust-analyzer/issues/17040
Also build script will now be rerun only when there are actual changes
to concrete bindings due to emitted `cargo::rerun-if-changed` (not for
each change in script crate).
Testing: It compiles so it works, I tested manually and RA now works as
expected (although we need to from type alias to concrete union-types
definitions)
Fixes:
https://servo.zulipchat.com/#narrow/channel/263398-general/topic/rust-analyzer.20failed.20to.20include.20codes.20in.20script_bindings
---------
Signed-off-by: sagudev <16504129+sagudev@users.noreply.github.com>
|
|
|
|
|
|
|
|
|
|
|
|
| |
Remove the `unsafe` annotation from the `cross_origin_get` function and
add `unsafe` blocks around unsafe code within the function
Testing: Testing is not required as this change does not alter
behaviour.
Fixes: #36358
---------
Signed-off-by: Barigbue <barigbuenbira@gmail.com>
|
|
|
|
|
|
|
|
|
|
|
| |
DocumentFragment, DocumentType, DOMRect, DOMRectReadOnly, DOMStringMap (#36395)
add CanGc as argument to methods in DissimilarOriginWindow,
DocumentFragment, DocumentType, DOMRect, DOMRectReadOnly, DOMStringMap
Testing: These changes do not require tests because they are a refactor.
Addressed part of https://github.com/servo/servo/issues/34573.
Signed-off-by: Yerkebulan Tulibergenov <yerkebulan@gmail.com>
|
|
|
|
|
|
|
|
| |
Add CanGc as arguments in methods in Document
Testing: These changes do not require tests because they are a refactor.
Addressed part of https://github.com/servo/servo/issues/34573.
Signed-off-by: Yerkebulan Tulibergenov <yerkebulan@gmail.com>
|
|
|
|
|
|
|
|
|
|
|
| |
implement the `ClipboardItem` interface
Testing: covered by existing wpt tests
part of #36084
---------
Signed-off-by: Gae24 <96017547+Gae24@users.noreply.github.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
CSSStyleRule, CSSStyleSheet (#36375)
Add CanGc as arguments in methods in devtools.rs, CharacterData,
CSSStyleRule, CSSStyleSheet
Testing: These changes do not require tests because they are a refactor.
Addressed part of https://github.com/servo/servo/issues/34573.
---------
Signed-off-by: Yerkebulan Tulibergenov <yerkebulan@gmail.com>
|
|
|
|
|
|
|
|
|
|
|
|
| |
Remove unsafe from cross_origin_property_fallback
- Refactors `cross_origin_property_fallback` to remove the `unsafe`
annotation from the function signature, as it now uses safe wrappers
instead of raw pointers
- Adds an `unsafe` block around `MutableHandle::from_raw`
Testing: Changes does not require test
Fixes: https://github.com/servo/servo/issues/36359
Signed-off-by: Uthman Yahaya Baba <uthmanyahayababa@gmail.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Remove unsafe from maybe_cross_origin_get_prototype
-Refactors `maybe_cross_origin_get_prototype` to remove the `unsafe`
annotation from the function signature and `get_proto_object` argument
-Adds `unsafe` blocks around calls `D::GlobalScope::from_context` and
`MutableHandleObject::from_raw`
Testing: Changes does not require test
Fixes: https://github.com/servo/servo/issues/36357
Signed-off-by: Uthman Yahaya Baba <uthmanyahayababa@gmail.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Add CanGc as argument to methods in `Attr` and `Node`.
Addressed part of https://github.com/servo/servo/issues/34573.
---
- [x] `./mach build -d` does not report any errors
- [x] `./mach test-tidy` does not report any errors
- [x] These changes do not require tests because they are a refactor.
Signed-off-by: Yerkebulan Tulibergenov <yerkebulan@gmail.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
(#36365)
The method report_cross_origin_denial was marked as unsafe, have instead
moved the unsafe code within the method into an unsafe block within the
method and removed the unsafe marking for the method.
Testing: No testing needed
Fixes: This PR resolves #36356.
Signed-off-by : Ashok Kaushik kaushikashok45@gmail.com
---------
Signed-off-by: ashok.kaushik <ashok.kaushik@zohocorp.com>
Co-authored-by: ashok.kaushik <ashok.kaushik@zohocorp.com>
|
|
|
|
|
|
|
|
|
|
|
|
| |
Some methods are implemented fully, while others are implemented
partly. With these implementations, there are no observed crashes
when running the trusted-types web-platform-tests.
Most notably, the tests/wpt/tests/trusted-types/idlharness.window.js
is now fully passing.
Part of #36258
Signed-off-by: Tim van der Lippe <tvanderlippe@gmail.com>
|
|
|
|
|
|
|
|
|
|
|
|
| |
Implements https://urlpattern.spec.whatwg.org/#process-a-urlpatterninit
and the component canonicalization functions. These handle
percent-encoding and such for the components of a `URLPattern`.
No new tests pass, because the tokenizer and parser are still missing.
This is part 2 of upstreaming the changes in
https://github.com/simonwuelker/servo/tree/urlpattern
Signed-off-by: Simon Wülker <simon.wuelker@arcor.de>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Implement the TestUtils namespace from
https://testutils.spec.whatwg.org/.
This should make the `js/builtins/weakrefs` tests run faster and more
consistently.
This change will enable other WPT tests but no tests exist currently for
TestUtils itself.
Fixes: #36290
---------
Signed-off-by: Sebastian C <sebsebmc@gmail.com>
Signed-off-by: sagudev <16504129+sagudev@users.noreply.github.com>
Co-authored-by: sagudev <16504129+sagudev@users.noreply.github.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This is the final step of #1799, where the majority of the generated
code for the JS bindings is now compiled as part of the script_bindings
build step. The remaining pieces in script must live there because they
refer to concrete DOM types; all code in script_bindings is generic over
the
[DomTypes](https://doc.servo.org/script/dom/bindings/codegen/DomTypes/trait.DomTypes.html)
trait.
My testing with incremental builds shows me a 12 second reduction in
build times on my 2024 M4 Macbook Pro when modifying code in the script
crate after these changes. Before this PR those changes took 20 seconds
to rebuild Servo, and now they take 8 seconds.
Testing: Existing WPT tests ensure no regressions.
Fixes: #1799
---------
Signed-off-by: Josh Matthews <josh@joshmatthews.net>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Implements `rules`, `addRule()` and `removeRule()` for `CSSStyleSheet`.
https://drafts.csswg.org/cssom/#legacy-css-style-sheet-members
This is part of #36162
Testing:
- `/css/css-cascade/at-scope-parsing.html`
- `/css/css-conditional/at-supports-whitespace.html`
- `/css/css-nesting/invalidation-004.html`
- `/css/css-nesting/parsing.html`
- `/css/css-nesting/serialize-group-rules-with-decls.html`
- `/css/css-syntax/custom-property-rule-ambiguity.html`
- `/css/css-syntax/invalid-nested-rules.html`
- `/css/css-syntax/trailing-braces.html`
- `/css/css-syntax/var-with-blocks.html`
- `/css/css-transitions/parsing/starting-style-parsing.html`
- `/css/cssom/CSSStyleSheet.html`
- `/css/cssom/idlharness.html`
- `/css/cssom/insertRule-across-context.html`
Signed-off-by: Oriol Brufau <obrufau@igalia.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
https://github.com/user-attachments/assets/9aba75ff-4190-4a85-89ed-d3f3aa53d3b0
Among other things this adds a new `EmbedderMsg::ShowSelectElementMenu`
to tell the embedder to display a select popup at the given location.
This is a draft because some small style adjustments need to be made:
* the select element should always have the width of the largest option
* the border should be part of the shadow tree
Apart from that, it's mostly ready for review.
<details><summary>HTML for demo video</summary>
```html
<html>
<body>
<select id="c" name="choice">
<option value="first">First Value</option>
<option value="second">Second Value</option>
<option value="third">Third Value</option>
</select>
</body>
</html>
```
</details>
---
<!-- 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] Part of https://github.com/servo/servo/issues/3551
- [ ] 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: Simon Wülker <simon.wuelker@arcor.de>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Note that `StyleRule` may not have the `CssRules` readily available,
they may need to be created. So the previous approach of providing
`CSSGroupingRule` with the `CssRules` is no good: it would require
writing them in advance, just in case they end up being used.
Therefore, this removes the `CSSGroupingRule::rules` field. Instead,
they are lazily obtained in `CSSGroupingRule::rulelist()` by downcasting
and calling the appropriate method for the subclass.
Testing: covered by WPT
Fixes: #36245
Signed-off-by: Oriol Brufau <obrufau@igalia.com>
|
|
|
|
|
|
|
|
|
|
|
| |
Implement `setLineDash`, `getLineDash`, and `lineDashOffset` from
`CanvasPathDrawingStyles` mixin, according to the spec
https://html.spec.whatwg.org/multipage/canvas.html#canvaspathdrawingstyles.
Testing: Existing WPT.
---------
Signed-off-by: stevennovaryo <steven.novaryo@gmail.com>
|
|
|
|
|
|
|
|
|
|
|
| |
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>
|
|
|
| |
Signed-off-by: Alex Touchet <26315797+atouchet@users.noreply.github.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* 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>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* script: Move num module to script_bindings.
Signed-off-by: Josh Matthews <josh@joshmatthews.net>
* script: Make JS reflector creation generic over DOM trait.
Signed-off-by: Josh Matthews <josh@joshmatthews.net>
* script: Move bindings-specific lock to script_bindings.
Signed-off-by: Josh Matthews <josh@joshmatthews.net>
* script: Move DOM proto array code to script_bindings.
Signed-off-by: Josh Matthews <josh@joshmatthews.net>
* script: Move finalizer implementations to script_bindings.
Signed-off-by: Josh Matthews <josh@joshmatthews.net>
* script: Move some error routines to script_bindings.
Signed-off-by: Josh Matthews <josh@joshmatthews.net>
* script: Move some DOM interface conversion routines to script_bindings.
Signed-off-by: Josh Matthews <josh@joshmatthews.net>
* script: Make is_array_like generic over DOM trait.
Signed-off-by: Josh Matthews <josh@joshmatthews.net>
* script: Use generic interfaces for conditional exposure functions.
Signed-off-by: Josh Matthews <josh@joshmatthews.net>
* script: Move a bunch of routines used by codegen to script_bindings.
Signed-off-by: Josh Matthews <josh@joshmatthews.net>
* Formatting.
Signed-off-by: Josh Matthews <josh@joshmatthews.net>
* Fix clippy warnings.
Signed-off-by: Josh Matthews <josh@joshmatthews.net>
---------
Signed-off-by: Josh Matthews <josh@joshmatthews.net>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* Stop using RootedGuard's DerefMut impl
Signed-off-by: Greg Morenz <greg-morenz@droid.cafe>
* Update mozjs version
Signed-off-by: Greg Morenz <greg-morenz@droid.cafe>
* `self.bytes` should not be mutably borrowed over GC pause
Signed-off-by: Greg Morenz <greg-morenz@droid.cafe>
---------
Signed-off-by: Greg Morenz <greg-morenz@droid.cafe>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* Start working on a basic URLPattern implementation
This is API part of Interop 2025, so we should definitely support it!
This change implements the basic workflow for parsing
and compiling URL patterns. Parts of it are stubbed out and will be
implemented later.
For now the API is preference-gated behind "dom_urlpattern_enabled".
Signed-off-by: Simon Wülker <simon.wuelker@arcor.de>
* Preference-gate the URLPattern API
Signed-off-by: Simon Wülker <simon.wuelker@arcor.de>
* Update WPT expectations
Signed-off-by: Simon Wülker <simon.wuelker@arcor.de>
* Fix full wildcard value (Should be ".*" not "*")
Signed-off-by: Simon Wülker <simon.wuelker@arcor.de>
---------
Signed-off-by: Simon Wülker <simon.wuelker@arcor.de>
|
|
|
| |
Signed-off-by: Josh Matthews <josh@joshmatthews.net>
|
|
|
| |
Signed-off-by: Lukas Lihotzki <lukas@lihotzki.de>
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* feat: add CanGc argument in get_dictionary_property
Signed-off-by: Arya Nair <aryaajitnair@gmail.com>
* feat: add CanGc argument in get_dictionary_property
Signed-off-by: Arya Nair <aryaajitnair@gmail.com>
---------
Signed-off-by: Arya Nair <aryaajitnair@gmail.com>
|
|
|
|
|
| |
FromJSValConvertible. (#36097)
Signed-off-by: Josh Matthews <josh@joshmatthews.net>
|