aboutsummaryrefslogtreecommitdiffstats
path: root/components/script
Commit message (Collapse)AuthorAgeFilesLines
* abort parser before shutting down layout in exit pipelineGregory Terzian2019-11-221-6/+8
|
* abort parser, if any, when pipeline exitsGregory Terzian2019-11-211-0/+6
|
* Auto merge of #24685 - shnmorimoto:fix_revoke_blob_url, r=jdmbors-servo2019-11-181-7/+9
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Fix revoke blob url <!-- Please describe your changes on the following line: --> fix #24290 --- <!-- 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 #24290 (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. -->
| * check same-origin and url against the blob beign revokedShinichi Morimoto2019-11-181-7/+9
| |
* | Auto merge of #24669 - glowe:issue-24628/set-mime-type, r=jdmbors-servo2019-11-181-0/+1
|\ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Set response mime_type based on Content-Type <!-- Please describe your changes on the following line: --> Set the response's `mime_type` based on its `Content-Type` header whenever `Response::set_headers` is called. This ensures that `mime_type` is always consistent with `Content-Type`. The other reason for going with this approach is it relies on `extract_mime_type`: https://github.com/servo/servo/blob/afbcbf75eaa63ff0eec8fd3858e9155eb8dbadaa/components/script/dom/headers.rs#L260-L261 Besides the consistency argument, I also expect that we'll update the `extract_mime_type` method to conform with its specification. Another option I explored was adding a `set_mime_type` member to `Response` and calling that with the mime type from `Metadata::content_type` in `FetchResponseListener::process_response`. I decided against this since it expanded the interface of `Response` and didn't have the same benefits of the first option. Fixes #24628. --- <!-- 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 #24628. <!-- Either: --> - [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. -->
| * | Set response mime_type based on Content-Typeglowe2019-11-141-0/+1
| | | | | | | | | | | | | | | | | | | | | Set the response's mime_type based on its Content-Type header whenever Response::set_headers is called. Fixes #24628.
* | | Auto merge of #24664 - gterzian:fix_port_transfer, r=jdmbors-servo2019-11-181-15/+73
|\ \ \ | |_|/ |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Fix loophole in messageport transfer <!-- 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: --> - [ ] `./mach build -d` does not report any errors - [ ] `./mach test-tidy` does not report any errors - [ ] These changes fix #24600 (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. -->
| * | fix complete messageport transferGregory Terzian2019-11-151-15/+73
| | |
* | | Auto merge of #24665 - saschanaz:timerhandler, r=noxbors-servo2019-11-174-91/+54
|\ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Use TimerHandler IDL union type <!-- 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 #20700 <!-- Either: --> - [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. -->
| * | | Use TimerHandler IDL union typeKagami Sascha Rosylight2019-11-054-91/+54
| | | |
* | | | Auto merge of #24742 - servo:jdm-patch-34, r=asajeffreybors-servo2019-11-161-3/+6
|\ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Reduce unnecesarily large borrow in script thread - [x] `./mach build -d` does not report any errors - [x] `./mach test-tidy` does not report any errors - [x] These changes fix #24730 - [x] There are tests for these changes
| * | | | script: Reduce scope of borrows for history updates.Josh Matthews2019-11-141-3/+6
| | | | |
* | | | | Use `#![register_tool]` instead of `#![register_attr]`Simon Sapin2019-11-1541-68/+67
| | | | | | | | | | | | | | | | | | | | CC https://github.com/rust-lang/rust/issues/66079
* | | | | Use `#![register_attr(…)]` instead of `Registry::register_attribute`Simon Sapin2019-11-151-0/+4
|/ / / / | | | | | | | | | | | | CC https://github.com/rust-lang/rust/pull/66344, https://github.com/rust-lang/rust/issues/66080
* | | | Auto merge of #24624 - garasubo:fix-keypress-trigger, r=paulrougetbors-servo2019-11-141-1/+9
|\ \ \ \ | |_|_|/ |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Fix keypress trigger condition Fix #22346 keypress event should be triggered for keys representing character values. So, we should trigger this event for enter key. This event should not trigger for IME inputs. TODO: - It seems we don't handle composition events correctly. To implement this keypress condition correctly, we should fix that first. In my current implementation, onkeypress event will be trigger when the user press Enter key to send inputs in IME (onCompotionEnd). - I don't update any tests, and I couldn't find any tests related to this change in WPT. It might be better to add some tests for it, but I don't know what is the appropriate way. <!-- 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 #___ (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. -->
| * | | Solve #22346takumi2019-11-031-1/+9
| | | | | | | | | | | | | | | | | | | | | | | | keypress event should be triggered for keys representing character values. So, we should trigger this event for enter key. This event should not trigger for IME inputs.
* | | | Auto merge of #24674 - servo:jdm-patch-34, r=noxbors-servo2019-11-131-4/+1
|\ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Correct inverted logic for available image checks. From https://html.spec.whatwg.org/multipage/images.html#updating-the-image-data: Step 3 says to initialize selected source to null. Step 4 says to set the selected source to the image element's src value if it's not using responsive images and it has a non-empty src value. Step 6 performs some steps if selected source is not null. The existing code tried to do the step 6 check in a roundabout way which caused us to always check for an available image when using responsive images, which is incorrect. The new code is easier to read and matches the specification text. --- - [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 it's not worth writing a test to verify that an image cache check that would always fail does not happen.
| * | | | Correct inverted logic for available image checks.Josh Matthews2019-11-061-4/+1
| | | | |
* | | | | dom: Reduce the scope of iframe's load blocker borrow.Josh Matthews2019-11-121-4/+7
| | | | |
* | | | | Implement srcdoc support for iframes.jaymodi982019-11-123-5/+72
| | | | |
* | | | | Add consume stream callbackRidhim Rastogi2019-11-111-1/+108
| | | | |
* | | | | Addresses issues raised in #24465; removes redundancy in set_bitmap_dimensionsBailey Blankenship2019-11-1010-45/+156
| | | | | | | | | | | | | | | | | | | | Removed passing test .ini files and moved euclid extensions to euclidext.rs to factor out redundant code
* | | | | Auto merge of #24694 - servo:rustup, r=jdmbors-servo2019-11-092-2/+0
|\ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Remove use of on_unimplemented It errors in today’s Nightly: ```rust error[E0557]: feature has been removed --> components/script/lib.rs:9:12 | 9 | #![feature(on_unimplemented)] | ^^^^^^^^^^^^^^^^ feature has been removed error[E0658]: this is an internal attribute that will never be stable --> components/script/dom/bindings/conversions.rs:77:1 | 77 | #[rustc_on_unimplemented(message = "The IDL interface `{Self}` is not derived from `{T}`.")] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | = note: for more information, see https://github.com/rust-lang/rust/issues/29642 = help: add `#![feature(rustc_attrs)]` to the crate attributes to enable error: aborting due to 2 previous errors ```
| * | | | | Remove use of on_unimplementedSimon Sapin2019-11-082-2/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | It errors in today’s Nightly: ```rust error[E0557]: feature has been removed --> components/script/lib.rs:9:12 | 9 | #![feature(on_unimplemented)] | ^^^^^^^^^^^^^^^^ feature has been removed error[E0658]: this is an internal attribute that will never be stable --> components/script/dom/bindings/conversions.rs:77:1 | 77 | #[rustc_on_unimplemented(message = "The IDL interface `{Self}` is not derived from `{T}`.")] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | = note: for more information, see https://github.com/rust-lang/rust/issues/29642 = help: add `#![feature(rustc_attrs)]` to the crate attributes to enable error: aborting due to 2 previous errors ```
* | | | | | Auto merge of #24514 - imiklos:webgl_transform_feedback, r=jdmbors-servo2019-11-087-7/+399
|\ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add WebGL Transformfeedback support Reference: https://www.khronos.org/registry/webgl/specs/latest/2.0/#3.7.15 cc @mmatyas @jdm @zakorgy --- <!-- 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] 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. -->
| * | | | | | Add Support for WebGL TransormfeedbackIstvan Miklos2019-11-087-7/+399
| | |/ / / / | |/| | | | | | | | | | | | | | | | Reference: https://www.khronos.org/registry/webgl/specs/latest/2.0/#3.7.15
* | | | | | Auto merge of #24636 - saschanaz:windowproxy, r=nox,jdmbors-servo2019-11-074-32/+84
|\ \ \ \ \ \ | |_|/ / / / |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Use MessageEventSource on MessageEvent IDL <!-- 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 #22617 <!-- 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. -->
| * | | | | Store source as an enumKagami Sascha Rosylight2019-11-041-16/+50
| | | | | |
| * | | | | Use MessageEventSource on MessageEvent IDLKagami Sascha Rosylight2019-11-044-26/+44
| | | | | |
* | | | | | Ensure layout/script always have a correct viewport size when a new pipeline ↵Josh Matthews2019-11-062-0/+3
| | | | | | | | | | | | | | | | | | | | | | | | is created.
* | | | | | script: Ignore redundant resize notifications.Josh Matthews2019-11-061-0/+9
| | | | | |
* | | | | | dom: Calculate the viewport size of iframes when they are first added to the ↵Josh Matthews2019-11-062-9/+20
| |/ / / / |/| | | | | | | | | | | | | | tree.
* | | | | Auto merge of #24644 - saschanaz:sequence-default, r=jdmbors-servo2019-11-0513-65/+40
|\ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Use IDL sequence default value <!-- 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 #24643 <!-- Either: --> - [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. -->
| * | | | | Use IDL sequence default valueKagami Sascha Rosylight2019-11-0413-65/+40
| |/ / / /
* | | | | Auto merge of #24473 - mmatyas:webgl_fns_buffer, r=jdmbors-servo2019-11-054-68/+415
|\ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Implement the basic WebGL2 buffer data operations Adds support for the WebGL2 calls `bufferData`, `bufferSubData`, `copyBufferSubData` and `getBufferSubData`. Reference: https://www.khronos.org/registry/webgl/specs/latest/2.0/#3.7.3 --- <!-- Please describe your changes on the following line: --> This patch depends on https://github.com/servo/sparkle/pull/8. Some tests cause a crash for me at the moment, as they depend on other, not yet implemented buffer calls and transform feedback objects. As for the code, there are a few parts I'm not sure about: - To get the element byte size of a TypedArray I've wrote a simple `match`, as the relevant field is not published in `rust-mozjs`. Is that okay or there's some other way to get this already? - The WebGL1 BufferData implementations were copied into the WebGL2 code as a workaround, due to the difference in the available buffer slots (ie. `self.bound_buffer`). An alternative could be is to pass this function and self as parameters to an internal buffer data implementation function, but personally I found that code to be quite ugly. cc @jdm @zakorgy --- <!-- 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 (with the sparkle patch) - [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. -->
| * | | | | Implement the basic WebGL2 buffer data operationsMátyás Mustoha2019-11-054-68/+415
| | |_|/ / | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | Adds support for `bufferData`, `bufferSubData`, `copyBufferSubData` and `getBufferSubData`. Reference: https://www.khronos.org/registry/webgl/specs/latest/2.0/#3.7.3
* / | | | Implement MouseEvent's x/y and offsetX/offsetY attributesMicah Tigley2019-11-042-0/+64
|/ / / /
* / / / Add StreamConsumer wrapper and ReportStreamErrorCallback fnRidhim Rastogi2019-11-031-0/+56
|/ / /
* | | Auto merge of #24616 - teapotd:imageinfo-option-refactoring, r=jdmbors-servo2019-11-014-69/+47
|\ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Store Option<ImageInfo> instead of making fields of ImageInfo optional Fixes #24582 --- - [X] `./mach build -d` does not report any errors - [X] `./mach test-tidy` does not report any errors - [X] These changes fix #24582 - [X] These changes do not require tests
| * | | Store Option<ImageInfo> instead of making fields optionalteapotd2019-11-014-69/+47
| | | |
* | | | Use surfman for managing GL surfacesPatrick Walton2019-11-0111-181/+234
|/ / / | | | | | | | | | | | | | | | Co-authored-by: Alan Jeffrey <ajeffrey@mozilla.com> Co-authored-by: Zakor Gyula <gyula.zakor@h-lab.eu> Co-authored-by: Josh Matthews <josh@joshmatthews.net>
* | | Auto merge of #24584 - JoshMcguigan:perf-resource-timing-duration, r=jdmbors-servo2019-10-311-2/+1
|\ \ \ | |/ / |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | implement PerformanceResourceTiming duration <!-- Please describe your changes on the following line: --> Implements #21255 I wanted to give this a shot, but I'm not sure this is the appropriate implementation. In particular, I'm not sure if adding duration to the webidl interface is correct, because that doesn't seem to align with the web version (linked above the interface)? Also, I'd like to write a test for this method, but I'm not sure where that test should go. My apologies if this is way off target. --- <!-- 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 #21255 (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. -->
| * | PerformanceResourceTiming calculate durationJosh Mcguigan2019-10-301-2/+1
| | |
* | | webgl: Always convert float/half-float-based types to internal texture types.Josh Matthews2019-10-292-26/+18
| | |
* | | Support stringifier attributesKagami Sascha Rosylight2019-10-2912-62/+11
| | |
* | | Update WebIDL.pyKagami Sascha Rosylight2019-10-292-6/+172
|/ /
* | Auto merge of #24564 - paulrouget:initButtons, r=jdmbors-servo2019-10-291-1/+1
|\ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Properly set MouseEvent buttons property Properly set MouseEvent buttons property. Same behavior as Chrome and Firefox. --- <!-- 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 #24363 (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. -->
| * | Properly set MouseEvent buttons propertyPaul Rouget2019-10-281-1/+1
| | |
* | | Auto merge of #24573 - teapotd:is-point-in-path-nan, r=jdmbors-servo2019-10-281-0/+4
|\ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Return false from CanvasState::is_point_in_path for NaN/infinite values Servo doesn't pass WPT test `/2dcontext/path-objects/2d.path.isPointInPath.nonfinite.html` when built with raqote (see [here](https://github.com/servo/servo/pull/24470#issuecomment-546009000)). This change adds a missing check for NaN/infinite values in `CanvasState::is_point_in_path` and fixes this. --- - [X] `./mach build -d` does not report any errors - [X] `./mach test-tidy` does not report any errors - [X] These changes fix #24540 - [X] These changes do not require tests because WPT tests cover it
| * | | Return false from CanvasState::IsPointInPath for NaN/infinite valuesteapotd2019-10-281-0/+4
| | | |