aboutsummaryrefslogtreecommitdiffstats
path: root/components/script
Commit message (Collapse)AuthorAgeFilesLines
* Auto merge of #22191 - mandreyel:update-sw-global-scope, r=paulrougetbors-servo2018-11-162-3/+6
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Update webidl of ServiceWorkerGlobalScope Part of #19302. --- <!-- 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 are part of #19302 (github issue number if applicable). <!-- Either: --> - [ ] There are tests for these changes OR - [x] These changes do not require tests because they just update the webidl for `ServiceWorkerGlobalScope`; related tests should be updated when we start to implement its functions. <!-- 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. --> <!-- Reviewable:start --> --- This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/22191) <!-- Reviewable:end -->
| * Update webidl of ServiceWorkerGlobalScopemandreyel2018-11-132-3/+6
| |
* | Auto merge of #22171 - CYBAI:sw-up-to-date, r=jdmbors-servo2018-11-162-5/+22
|\ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Update webidl of ServiceWorkerRegistration I'll start to work on #19302 and I'd like to update these sw related webidl one by one. --- - [x] `./mach build -d` does not report any errors - [x] `./mach test-tidy` does not report any errors - [x] These changes is part of #19302 - [x] These changes do not require tests because it just updates the webidl for `ServiceWorkerRegistration`; related tests should be updated when we start to implement its functions. <!-- Reviewable:start --> --- This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/22171) <!-- Reviewable:end -->
| * | Update webidl of ServiceWorkerRegistrationCYBAI2018-11-112-5/+22
| | |
* | | Auto merge of #22170 - CYBAI:fix-promiserejectevent, r=jdmbors-servo2018-11-161-2/+6
|\ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Fix PromiseRejectionEvent constructor when promise argument is None Due to lack of `required` of the `promise` argument in webidl, we need to handle this so that it can be correct behavior. And then the constructor test will be passed! --- - [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 <!-- Reviewable:start --> --- This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/22170) <!-- Reviewable:end -->
| * | | Fail to construct if promise is noneCYBAI2018-11-111-2/+6
| |/ /
* | | Auto merge of #21978 - jimberlage:input-value-fix, r=jdmbors-servo2018-11-161-9/+9
|\ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Fixes panic on DOMString::strip_leading_and_trailing_ascii_whitespace <!-- Please describe your changes on the following line: --> This changes `DOMString::strip_leading_and_trailing_ascii_whitespace` to handle multi-byte unicode characters. --- <!-- 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 #21963 (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. --> <!-- Reviewable:start --> --- This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/21978) <!-- Reviewable:end -->
| * | | Fixes panic on DOMString::strip_leading_and_trailing_ascii_whitespaceJim Berlage2018-11-081-9/+9
| | | |
* | | | Auto merge of #21804 - AgustinCB:unify-task-source-canceller-api, r=gterzianbors-servo2018-11-1627-249/+384
|\ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Unify the task source and task canceller API To do so, I created a struct `TaskManagement(TaskSource, TaskCanceller)` and made `*_task_source` return that instead of just the task source. Next, I refactored all places in which `task_canceller` by basically removing them in favour of a previously called `*_task_source`. I tried to make `task_canceller` a private method in `Window`, with the hope of enforcing the use of `*_task_source`. However, it's used in components/script/dom/globalscope.rs:575 in such a way that will make it harder to avoid. I decided to leave it that way. It'd be possible to unify `*_task_source` in such a way that we would have only one method. However, I decided not to do it because one of the `TaskSource` implementations is special: `history_traversal_task_source`. Not wanting to over complicate things, I decided to leave the structure this way. --- - [x] `./mach build -d` does not report any errors - [x] `./mach test-tidy` does not report any errors - [x] These changes fix #21154 (github issue number if applicable). - [x] These changes do not require tests because it's refactoring code that should already be tested. <!-- Reviewable:start --> --- This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/21804) <!-- Reviewable:end -->
| * | | | Unify the task source and task canceller APIAgustin Chiappe Berrini2018-11-1426-249/+359
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | I moved away from the `Window` struct all the logic to handle task sources, into a new struct called `TaskManager`. In a happy world, I'd be able to just have there two functions, of the types: ```rust fn task_source<T: TaskSource>(&self, name: TaskSourceName) -> Box<T> fn task_source_with_canceller<T: TaskSource>(&self, name: TaskSourceName) -> (Box<T>, TaskSourceCanceller) ``` And not so much duplicated code. However, because TaskSource can't be a trait object (because it has generic type parameters), that's not possible. Instead, I decided to reduce duplicated logic through macros. For reasons[1], I have to pass both the name of the function with canceller and the name of the function without, as I'm not able to concatenate them in the macro itself. I could probably use `concat_idents` to create both types already defined and reduce the amount of arguments by one, but that macro is nightly only. At the same time, not being able to declare macros inside `impl` forces me to pass `self` as an argument. All this makes this solution more verbose than it would be ideally. It does reduce duplication, but it doesn't reduce the size of the file. [1](https://github.com/rust-lang/rust/issues/29599)
| * | | | Implement TaskSource for HistoryTraversalAgustin Chiappe Berrini2018-11-134-15/+40
| | |_|/ | |/| | | | | | | | | | | | | | And remove the method in window that returns it, because it isn't used so far.
* / | | Introduce rejectionhandled eventCYBAI2018-11-132-13/+34
|/ / /
* | / Use keyboard-types::webdriver::send_keysPyfisch2018-11-111-1/+1
| |/ |/| | | | | | | | | | | | | This improves the quality of KeyboardEvents sent by WebDriver. Now key, code, location and modifiers are set according to spec. CompositionEvents are discarded as servo does not handle them at all.
* | Update uuidBastien Orivel2018-11-094-4/+4
|/
* Remove useless `use crate_name;` imports.Simon Sapin2018-11-0823-29/+0
| | | | A `crate_name::foo` path always works in 2018
* `cargo fix --edition-idioms`Simon Sapin2018-11-0880-324/+261
|
* Auto merge of #22136 - pyfisch:fix-select-all, r=jdmbors-servo2018-11-071-0/+1
|\ | | | | | | | | | | | | | | | | | | | | | | Correct select all Fixes assertion failure. Set selection direction forward on select all. <!-- Reviewable:start --> --- This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/22136) <!-- Reviewable:end -->
| * Correct select allPyfisch2018-11-071-0/+1
| | | | | | | | | | Fixes assertion failure. Set selection direction forward on select all.
* | Auto merge of #22087 - Eijebong:rust_serialize, r=jdmbors-servo2018-11-071-1/+1
|\ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Remove rustc-serialize from the dependencies Closes #12410. <!-- Reviewable:start --> --- This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/22087) <!-- Reviewable:end -->
| * | Remove rustc-serialize from the dependenciesBastien Orivel2018-11-071-1/+1
| |/
* | Auto merge of #22129 - ferjm:media.task.source, r=Manishearthbors-servo2018-11-071-3/+3
|\ \ | |/ |/| | | | | | | | | | | | | | | | | | | | | | | HTMLMediaElement - use media element instead of dom manipulation task… … source - [X] `./mach build -d` does not report any errors - [X] `./mach test-tidy` does not report any errors <!-- Reviewable:start --> --- This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/22129) <!-- Reviewable:end -->
| * HTMLMediaElement - use media element instead of dom manipulation task sourceFernando Jiménez Moreno2018-11-061-3/+3
| |
* | Reorder importsPyfisch2018-11-06257-709/+962
| |
* | Manually format remaining problemsPyfisch2018-11-062-19/+17
| | | | | | | | | | | | | | | | | | Use line comments instead of block comments as block comments contain trailing whitespace after formatting with rustfmt. Skip tests for malloc_size_of and script_plugins with rustfmt as they have many block comments.
* | Format remaining filesPyfisch2018-11-0678-550/+869
| |
* | Auto merge of #22086 - servo:2018-without-stylo, r=SimonSapinbors-servo2018-11-06369-4578/+4589
|\ \ | |/ |/| | | | | | | | | | | | | | | | | Switch some crates to the 2018 edition This is the subset of https://github.com/servo/servo/pull/22083 that doesn’t affect Gecko at all, so it isn’t blocked. <!-- Reviewable:start --> --- This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/22086) <!-- Reviewable:end -->
| * Switch most crates to the 2018 editionSimon Sapin2018-11-065-23/+27
| |
| * Sort `use` statementsSimon Sapin2018-11-0690-246/+251
| |
| * `cargo fix --edition`Simon Sapin2018-11-06365-4400/+4400
| |
| * Use 2018-style paths in generated DOM bindingsSimon Sapin2018-11-063-150/+150
| |
| * Rename mozjs to js in script through Cargo rather than `extern crate`Simon Sapin2018-11-062-4/+6
| |
* | Replace http with https in docsJan Andre Ikenmeyer2018-11-061-13/+13
|/
* Auto merge of #22112 - servo:webgl, r=jdmbors-servo2018-11-0610-27/+185
|\ | | | | | | | | | | | | | | Implement WEBGL_color_buffer_float and EXT_color_buffer_half_float <!-- Reviewable:start --> This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/22112) <!-- Reviewable:end -->
| * Implement WEBGL_color_buffer_float and EXT_color_buffer_half_float (fixes ↵Josh Matthews2018-11-0510-27/+185
| | | | | | | | #22113)
* | Auto merge of #22103 - Eijebong:formdata, r=jdmbors-servo2018-11-051-4/+4
|\ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Use a BTreeMap to store formdata I'm really unsure about the MallocSizeOf of BTreeMap as I took the same code as for HashMap. Fixes #13105 Fixes #21381 <!-- Reviewable:start --> --- This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/22103) <!-- Reviewable:end -->
| * | Use a BTreeMap to store formdataBastien Orivel2018-11-051-4/+4
| |/ | | | | | | | | | | | | | | I'm really unsure about the MallocSizeOf of BTreeMap as I took the same code as for HashMap. Fixes #13105 Fixes #21381
* / Update remaining references to cssparser 0.24.Emilio Cobos Álvarez2018-11-051-1/+1
|/
* Update to new ServiceWorker spec linkCYBAI2018-11-041-1/+1
|
* Auto merge of #22084 - KiChjang:idl-default-empty-array, r=jdmbors-servo2018-11-013-15/+22
|\ | | | | | | | | | | | | | | | | | | | | Handle default empty sequence values Fixes #22077. <!-- Reviewable:start --> --- This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/22084) <!-- Reviewable:end -->
| * Handle default empty sequence valuesKeith Yeung2018-11-013-15/+22
| |
* | Update hyper to 0.12Bastien Orivel2018-11-0119-394/+380
|/
* Auto merge of #22049 - ferjm:timeranges, r=jdmbors-servo2018-10-314-0/+190
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | Implement TimeRanges interface - [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 Spec: https://html.spec.whatwg.org/multipage/media.html#time-ranges <!-- Reviewable:start --> --- This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/22049) <!-- Reviewable:end -->
| * Implement TimeRanges interfaceFernando Jiménez Moreno2018-10-314-0/+190
| |
* | HTMLMediaElement - fire durationchange and resize iff something changesFernando Jiménez Moreno2018-10-302-6/+22
|/
* Auto merge of #21976 - notriddle:iframe-target-form-race, r=jdmbors-servo2018-10-291-10/+10
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Assign a name to iframes when loading the initial about:blank Before, it would assign the name too late, causing scripts (which will not wait for another tick) to accidentally spawn pop-up windows instead of loading into the iframe. --- <!-- 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 #21886 - [x] There are tests for these changes <!-- Reviewable:start --> --- This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/21976) <!-- Reviewable:end -->
| * Assign a name to iframes when loading the initial about:blankMichael Howell2018-10-191-10/+10
| | | | | | | | | | | | | | Before, it would assign the name too late, causing scripts (which will not wait for another tick) to accidentally spawn pop-up windows instead of loading into the iframe.
* | Auto merge of #21988 - CYBAI:drop-promises, r=jdmbors-servo2018-10-292-1/+10
|\ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Clear refcounted promise before dropping JSRuntime Not sure if this is the right solution? I also tried to `impl Drop for LiveDOMReferences` but it's still executed after dropping JSRuntime. So, maybe we should clear it before dropping the JSRuntime? cc @jdm @asajeffrey --- - [x] `./mach build -d` does not report any errors - [x] `./mach test-tidy` does not report any errors - [x] These changes fix #21331 . - [x] There are tests for these changes; the status of `fetch/cross-origin-resource-policy/fetch-in-iframe.html` will be `OK` <!-- Reviewable:start --> --- This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/21988) <!-- Reviewable:end -->
| * | Drop `TrustedPromise` before dropping JSRuntimeCYBAI2018-10-212-1/+10
| | |
* | | Rename seek_sync to seek_endFernando Jiménez Moreno2018-10-261-2/+2
| | |
* | | HTMLMediaElement.seek: clean-up and update WPTs expectationsFernando Jiménez Moreno2018-10-261-9/+2
| | |