aboutsummaryrefslogtreecommitdiffstats
path: root/components/script
Commit message (Collapse)AuthorAgeFilesLines
* Don't root a Realm that's used for one call.dom-protosJosh Matthews2023-05-291-3/+3
|
* Formatting.Josh Matthews2023-05-2881-206/+588
|
* Support arbitrary protos when wrapping DOM objects with constructors.Josh Matthews2023-05-28197-586/+2028
|
* Support arbitrary protos when wrapping EventTarget objects.Josh Matthews2023-05-286-22/+185
|
* Auto merge of #29798 - jdm:per-interface-codegen, r=jdmbors-servo2023-05-262-30/+74
|\ | | | | | | | | | | | | | | | | | | | | Extract bodies of generated binding helpers into common code This is part of fixing #29770, by extracting common behaviour that [will be called](https://searchfox.org/mozilla-central/rev/2d678a843ceab81e43f7ffb83212197dc10e944a/dom/bindings/BindingUtils.cpp#3744) from new code in interface.rs. --- - [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
| * Formatting.Josh Matthews2023-05-261-8/+2
| |
| * Use an enum to pass the index value for interfaces/protos.Josh Matthews2023-05-262-9/+27
| |
| * Extract bodies of DefineDOMInterface and GetProtoObject/GetConstructorObject ↵Josh Matthews2023-05-262-30/+62
| | | | | | | | out of generated bindings.
* | Further changes required by ServoOriol Brufau2023-05-241-3/+3
| |
* | Further changes required by ServoOriol Brufau2023-05-242-23/+13
| |
* | De-dupe phfThe Capyloon Team2023-05-231-3/+3
| |
* | Enter realms when creating special same-origin iframes.Josh Matthews2023-05-202-0/+4
| |
* | Enter realms when processing pre-sequential events.Josh Matthews2023-05-201-1/+9
| |
* | Enter realms more consistently during the script event loop.Josh Matthews2023-05-206-5/+52
| |
* | Fix formatting.Josh Matthews2023-05-204-15/+7
| |
* | Remove unused argument from AlreadyInRealm::assert.Josh Matthews2023-05-208-12/+10
| |
* | Remove global argument from Promise::new_in_current_realm.Josh Matthews2023-05-2030-56/+54
| |
* | Make GlobalScope.get_cx a static method.Josh Matthews2023-05-2039-127/+132
|/
* Auto merge of #29748 - Loirooriol:sync, r=mrobinsonbors-servo2023-05-197-35/+18
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Backport several style changes from Gecko <!-- Please describe your changes on the following line: --> --- <!-- 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: --> - [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. -->
| * Further changes required by ServoOriol Brufau2023-05-193-4/+4
| |
| * Further changes required by ServoOriol Brufau2023-05-164-31/+14
| |
* | Auto merge of #28587 - yvt:fix-location-target, r=mrobinsonbors-servo2023-05-181-179/+270
|\ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Make `Location` operate on the correct objects This PR updates the implementation of the "[`Location`-object navigate][1]" algorithm to use the correct browsing context as the source browsing context for navigation. This affects the determination of a referrer and referrer policy and the treatment of `javascript:` URLs. This PR also fixes the derivation of a `Location` object's [relevant `Document`][2] to match the specified behavior. [1]: https://html.spec.whatwg.org/multipage/#location-object-navigate [2]: https://html.spec.whatwg.org/multipage/#relevant-document --- - [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
| * | Make `Location` operate on the correct objectsyvt2023-05-181-179/+270
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This PR updates the implementation of the "Location-object navigate" algorithm to use the correct browsing context as the source browsing context for navigation. This affects the determination of a referrer and referrer policy and the treatment of javascript: URLs. This PR also fixes the derivation of a Location object's relevant Document to match the specified behavior.
* | | Auto merge of #29637 - ↵bors-servo2023-05-181-15/+3
|\ \ \ | |/ / |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | AnthonyJ3:Use-same-origin-as-default-credential-mode-for-RequestInit-fix, r=mukilan Use same-origin as default credential mode for RequestInit fix <!-- Please describe your changes on the following line: --> - Updated the default credential mode from omit to same-origin as per: https://github.com/whatwg/fetch/pull/1153 - Deleted instances of fallback credentials --- - [X] `./mach build -d` does not report any errors - [X] `./mach test-tidy` does not report any errors - [X] These changes fix #29633 (GitHub issue number if applicable) - [X] There are tests for these changes
| * | fixup! defaulted credentials mode to same-origin & removed fallback credentialsAnthonyJ32023-04-251-4/+3
| | |
| * | fixup! defaulted credentials mode to same-origin & removed fallback credentialsAnthonyJ32023-04-171-4/+1
| | |
| * | defaulted credentials mode to same-origin & removed fallback credentialsAnthonyJ32023-04-161-9/+1
| | | | | | | | | | | | Signed-off-by: AnthonyJ3 <johnsonac.3300@gmail.com>
* | | Auto merge of #29752 - mrobinson:fix-29741-by-extending-request-builder, ↵bors-servo2023-05-181-0/+1
|\ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | r=mukilan Fix 29741 by extending request builder Extend RequestBuilder to include ResponseTainting and used said functionality to set response_tainting to `::CorsTainting` in `cors_preflight_fetch()`. --- <!-- 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 #29741 <!-- 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. -->
| * | | add response tainting to request builderIver Småge men bærbar2023-05-181-0/+1
| | |/ | |/|
* / | Start the transition to workspace dependenciesMartin Robinson2023-05-171-47/+47
|/ / | | | | | | | | | | | | This will ultimately make it simpler to update crate dependencies and reduce duplicate when specifying requirements. Generally, this change does not touch dependencies that are only used by a single crate. We could consider moving them to workspace dependencies in the future.
* | Combine DOM-related concepts in Layout 2020 into dom.rsMartin Robinson2023-05-131-2/+4
| |
* | Remove DangerousThreadSafeLayoutNodeMartin Robinson2023-05-121-36/+33
| | | | | | | | | | | | Remove this trait and replace it by two non-public functions on ServoThreadSafeLayoutNode. This requires making the iterator not generic, which simplifies things a little bit as well.
* | Simplify our setup for font metric queries from styleOriol Brufau2023-05-111-3/+0
| | | | | | | | | | | | | | | | This is a backport of https://phabricator.services.mozilla.com/D157589, by Emilio Cobos Álvarez, plus some additions so that Servo compiles, and some parts from https://phabricator.services.mozilla.com/D144455. Should have no change in behavior.
* | Add value argument to URLSearchParams's has() and delete()Veronika Bušů2023-05-112-6/+14
| | | | | | | | | | | | This commit should fix #29725. Signed-off-by: Veronika Bušů <paricbat@email.cz>
* | Auto merge of #29711 - switchpiggy:sp3, r=mrobinsonbors-servo2023-05-081-1/+20
|\ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Implemented special cases for Element.clientWidth() and clientHeight() <!-- Please describe your changes on the following line: --> Implemented the special cases for Element.clientWidth() and Element.clientHeight() as outlined in issue #29704. --- <!-- 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 <!-- Either: --> - [x] These changes do not require tests because tests already exist. <!-- 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. --> [Specification text](https://w3c.github.io/csswg-drafts/cssom-view/#dom-element-clientwidth): > If the element is the [root element](https://w3c.github.io/csswg-drafts/css-display-4/#root-element) and the element’s [node document](https://dom.spec.whatwg.org/#concept-node-document) is not in [quirks mode](https://dom.spec.whatwg.org/#concept-document-quirks), or if the element is [the body element](https://html.spec.whatwg.org/multipage/dom.html#the-body-element-2) and the element’s node document is in quirks mode, return the [viewport](https://www.w3.org/TR/CSS21/visuren.html#x1) width excluding the size of a rendered scroll bar (if any).
| * | fixup! Checks moved to Element::client_rect(), fixed conditions for the ↵switchpiggy2023-05-052-27/+14
| | | | | | | | | | | | special cases, reconfigured Window constructor to initialize current_viewport to initial window size
| * | Checks moved to Element::client_rect(), fixed conditions for the special ↵switchpiggy2023-05-052-24/+34
| | | | | | | | | | | | cases, reconfigured Window constructor to initialize current_viewport to initial window size
| * | Implemented special cases for Element.clientWidth() and clientHeight()switchpiggy2023-05-041-0/+22
| | |
* | | Auto merge of #29703 - ohno418:update-url-constructor-steps, r=mrobinsonbors-servo2023-05-081-17/+17
|\ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Update step numbers in URL constructor <!-- Please describe your changes on the following line: --> Two commits have been made ahead of the current implementation of Servo's URL constructor: - Align with a more modern IDL definition style [1] - Add URL.canParse() [2] Since these commits don't alter the actual behavior, this commit only updates the step numbers and adds brief descriptions for each step. No behavior change is expected with this commit. [1]: https://github.com/whatwg/url/commit/ea3b75d333cbce91f73676ef2d21bcadb12b4419 [2]: https://github.com/whatwg/url/commit/ae3c28b84e3e7122c2807401c26b8a63cb2ab445 --- <!-- 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: --> - [x] These changes do not require tests because no behavior has changed. <!-- 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. -->
| * | | Update step numbers in URL constructorYutaro Ohno2023-05-061-17/+17
| |/ / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Two commits have been made ahead of the current implementation of Servo's URL constructor: - Align with a more modern IDL definition style [1] - Add URL.canParse() [2] Since these commits don't alter the actual behavior, this commit only updates the step numbers and adds brief descriptions for each step. No behavior change is expected with this commit. [1]: https://github.com/whatwg/url/commit/ea3b75d333cbce91f73676ef2d21bcadb12b4419 [2]: https://github.com/whatwg/url/commit/ae3c28b84e3e7122c2807401c26b8a63cb2ab445 Signed-off-by: Yutaro Ohno <yutaro.ono.418@gmail.com>
* | | Auto merge of #29716 - mrobinson:generic-dom-wrapper, r=jdmbors-servo2023-05-087-20/+1734
|\ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Eliminate duplicate Layout DOM wrappers There are duplicate sets of Layout DOM wrappers: one for Layout 2013 and one for Layout 2020. As part of cleaning up and simplifying the wrappers, this change parameterizes them on the specific layout data they contain. This allows them to be shared again. In addition, various small cleanups are included. Fixes #29691. <!-- Please describe your changes on the following line: --> --- <!-- 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 #29691 - [x] There are tests for these changes <!-- 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. -->
| * | | Eliminate duplicate Layout DOM wrappersMartin Robinson2023-05-057-20/+1734
| |/ / | | | | | | | | | | | | | | | | | | | | | | | | | | | There are duplicate sets of Layout DOM wrappers: one for Layout 2013 and one for Layout 2020. As part of cleaning up and simplifying the wrappers, this change parameterizes them on the specific layout data they contain. This allows them to be shared again. In addition, various small cleanups are included. Fixes #29691.
* / / Fix scrolling on root elementMartin Robinson2023-05-051-3/+8
|/ / | | | | | | | | | | | | | | | | | | | | | | | | eca0acf4598c173c71765b961bd2079c0bb48cd2 uncovered a bug in the way that the scrolling area of `window` was calculated and broke scrolling on the root element. This change does two things in order to fix that: 1. Does a partial revert of eca0acf4598c173c71765b961bd2079c0bb48cd2 in order to get scrolling from script working again on the window object. 2. Has the compositor always generate a frame for scrolls starting from script and waits for them. This is speculative fix for flakiness in root scrolling tests on CI.
* | Auto merge of #29693 - mrobinson:cleanup-options, r=mukilanbors-servo2023-05-033-43/+16
|\ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Clean up how command-line options are passed around <!-- Please describe your changes on the following line: --> --- <!-- 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 #29678 - [x] These changes do not require tests because they do not change behavior.
| * | Clean up arguments passed to ScriptThreadMartin Robinson2023-05-011-41/+14
| | |
| * | Clean up debug optionsMartin Robinson2023-05-012-2/+2
| | |
* | | Fix flakiness in animation testsMartin Robinson2023-05-023-7/+34
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 1. When updating the animation timeline, ensure that nodes that are animating are marked dirty, if necessary, so any style queries will force an layout flush. 2. Disable the problematic transition test suites, as they are in Gecko. These suites often fail when Servo is so overloaded that it cannot deliver frames fast enough to get more than two samples during the animation lifecycle. Fixes #28334. Fixes #26435. Fixes #21486.
* | | Bump mozangle to 0.3.3.Philip Lamb2023-05-011-1/+1
| | |
* | | Reset to in-memory stream with empty byte sequence for None init bodycybai2023-04-271-0/+5
|/ / | | | | | | | | | | | | Because the response body stream is initialized with FetchResponse, it cannot be processed with in-memory empty sequence. Thus, instead of using the FetchResponse stream, we'll reset it to Memory body stream with empty byte sequence if there's no init body.
* | Allow script to scroll `overflow: scroll` elementsMartin Robinson2023-04-252-48/+58
| | | | | | | | | | | | Before the code was only allowing `overflow: hidden` elements to scroll. This fixes that issue and also clean up the code that deals with detecting whether the body is a "potentially scrollable" in quirks mode.