Commit graph

210 commits

Author SHA1 Message Date
Lucas Montenegro
256ab5353b
These changes fix #30843 (#30888)
Signed-off-by: Lucas Fabián Montenegro <40044087+lucasMontenegro@users.noreply.github.com>
2023-12-20 05:57:48 +00:00
Samson
604979e367
Replace script_plugins with a clippy like rustc driver (named crown) (#30508)
* Remove script_plugins

* Use crown instead of script_plugins

* crown_is_not_used

* Use crown in command base

* bootstrap crown

* tidy happy

* disable sccache

* Bring crown in tree

* Install crown from tree

* fix windows ci

* fix warning

* fix mac

libscript_plugins.dylib is not available anymore

* Update components/script/lib.rs

Co-authored-by: Martin Robinson <mrobinson@igalia.com>

* Update for nightly-2023-03-18

Mostly just based off https://github.com/servo/servo/pull/30630

* Always install crown

it's slow only when there is new version

* Run crown test with `mach test-unit`

* Small fixups; better trace_in_no_trace tests

* Better doc

* crown in config.toml

* Fix tidy for real

* no sccache on rustc_wrapper

* document rustc overrides

* fixup of compiletest

* Make a few minor comment adjustments

* Fix a typo in python/servo/platform/base.py

Co-authored-by: Samson <16504129+sagudev@users.noreply.github.com>

* Proper test types

* Ignore tidy on crown/tests

---------

Co-authored-by: Martin Robinson <mrobinson@igalia.com>
2023-12-01 15:50:52 +00:00
Samson
aad2dccc9c
Strict import formatting (grouping and granularity) (#30325)
* strict imports formatting

* Reformat all imports
2023-09-11 19:16:54 +00:00
Samson
711dbbd4af
remove extern crate (#30311)
* remove extern crate

* Update components/script_plugins/lib.rs

Co-authored-by: Martin Robinson <mrobinson@igalia.com>

---------

Co-authored-by: Martin Robinson <mrobinson@igalia.com>
2023-09-08 12:11:31 +00:00
Samson
71e0372ac1
Upgrade whole webgpu stack (#29795)
* Allow noidl files in script/dom/webidls

* Upgrade wgpu to 0.16 and refresh whole webgpu implementation

* Update WebGPU test expectations

* misc

* MutNullableDom -> DomRefCell<Option<Dom for GPUTexture

* Direct use of GPUTextureDescriptor

* Remove config from GPUCanvasContext

* misc

* finally blue color

* gpubuffer "handle" error

* GPU object have non-null label

* gpu limits and info

* use buffer_size

* fix warnings

* Cleanup

* device destroy

* fallback adapter

* mach update-webgpu write webgpu commit hash in file

* Mising deps in CI for webgpu tests

* Updated expectations

* Fixups

* early reject

* DomRefCell<Option<Dom -> MutNullableDom for GPUTexture
2023-08-20 23:16:46 +00:00
Ennui Langeweile
6622b91f79
Tackle half of canvas.toDataURL's FIXMEs (#30094)
Signed-off-by: Ennui Langeweile <85590273+EnnuiL@users.noreply.github.com>
2023-08-17 06:21:53 +00:00
Tuna
4c8db6af87
bump base64 from 0.10 to 0.21 (#29804)
* bump base64 from 0.10 to 0.21

* Fix configuration of bitflags

---------

Co-authored-by: Martin Robinson <mrobinson@igalia.com>
2023-08-02 21:25:37 +00:00
Josh Matthews
dbff26bce0 Support arbitrary protos when wrapping DOM objects with constructors. 2023-05-28 23:23:12 -04:00
Martin Robinson
c021df027a Fix some build warnings
- Mark some instances of unused fields and variables as as allowed,
  when they are used for memory management.
- Remove the use of some deprecated function.s

Signed-off-by: Martin Robinson <mrobinson@igalia.com>
2023-01-11 12:50:36 +01:00
Josh Matthews
369a5c0370 Update image/png. 2022-04-01 02:07:17 -04:00
Josh Matthews
1e3d72dc82 Fix deprecation warnings. 2020-11-12 15:47:08 -05:00
Josh Matthews
1ae117f67b dom: Add stub implementation for HTMLCanvasElement.captureStream. 2020-07-14 12:48:45 -04:00
Kunal Mohan
71401e0855 Implement GPUSwapChain and GPUCanvasContext and interface with Webrender 2020-06-13 17:46:12 +05:30
Alex Touchet
5166cc35f4
Update some URLs 2020-05-04 10:26:35 -07:00
bors-servo
c9480c8e07
Auto merge of #23661 - julientregoat:i-21289, r=jdm
Refactor ImageCache::find_image_or_metadata -> ImageCache::{get_image, track_image}

<!-- Please describe your changes on the following line: -->
Updated the `ImageCache` trait to replace `find_image_or_metadata` with two new functions `track_image` and `get_image`, as well as a new enum (`ImageCacheResult`).

As a result, I was able to refactor the functions that previously called `find_image_or_metadata` pretty cleanly. For a list of these functions, please see the commit information.

---
<!-- 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 #21289  (GitHub issue number if applicable)

<!-- Either: -->
- [ ] There are tests for these changes OR
- [x] These changes do not require tests because tests already exist for these components. I ran `cargo test` in `net`, `net_traits`, `layout`, and `script` successfully.

<!-- 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/23661)
<!-- Reviewable:end -->
2020-04-17 15:56:30 -04:00
Julien Tregoat
2742fd2bea Refactor ImageCache::find_image_or_metadata API. 2020-04-17 11:58:18 -04:00
Josh Matthews
e2845a6939 Automatically enable WebGL 2 for specific domains. 2020-04-15 17:26:42 -04:00
Manish Goregaokar
fccfff11c5 Update euclid 2020-04-07 08:51:08 -07:00
Anthony Ramine
a913c6650d Reduce scope of unsafe block in LayoutHTMLCanvasElementHelpers::data 2020-03-31 19:06:25 +02:00
Anthony Ramine
5ff931d171 Introduce <LayoutDom<Element>>::attrs()
This safe method is the basic block to access element attributes from layout.
We reuse it in the other attr-related layout methods to remove a pretty big
source of rampant unsafe code between script and layout.
2020-03-31 18:46:49 +02:00
Anthony Ramine
0bda174823 Merge RawLayoutElementHelpers into LayoutElementHelpers 2020-03-31 18:30:42 +02:00
Anthony Ramine
56ef9b5170 Make LayoutHTMLCanvasElementHelpers methods take self 2020-03-29 17:18:31 +02:00
Anthony Ramine
dba6a635e5 Give a lifetime parameter to LayoutDom 2020-03-28 15:37:57 +01:00
YUAN LYU
3ea6d87bcc
Add trait DomObjectWrap to provide WRAP function 2020-03-20 22:16:56 -04:00
Anthony Ramine
9996e48500 Remove syn 0.15 from our crate graph (fixes #24421)
This required bumps of:

* gleam
* image
* rust-webvr
* webrender
* webxr
2020-03-05 13:01:13 +01:00
Kunal Mohan
02c1612cb0
Add accountable-refcell as optional build time feature 2020-01-08 09:44:41 +05:30
Simon Sapin
bea73951db Use #![register_tool] instead of #![register_attr]
CC https://github.com/rust-lang/rust/issues/66079
2019-11-15 17:24:42 +01:00
Bailey Blankenship
ec2961920b Addresses issues raised in #24465; removes redundancy in set_bitmap_dimensions
Removed passing test .ini files and moved euclid extensions to euclidext.rs to factor out redundant code
2019-11-10 18:37:14 -05:00
Josh Matthews
1df8d57dc6 Support CORS attributes for image elements. 2019-10-04 15:08:40 -04:00
Josh Matthews
81a67aed9e Double key image cache by requesting origin, and store CORS status with cached images. 2019-10-04 09:22:21 -04:00
marmeladema
1d92796b03 Remove some usage of unsafe code in HTMLCanvasElement 2019-08-09 00:02:08 +01:00
marmeladema
2c5d0a6ebc Convert CGTraitInterface to use safe JSContext instead of raw JSContext 2019-07-24 08:24:50 +01:00
marmeladema
808fa65aef Convert internal methods to handle safe JSContext instead of raw JSContext 2019-07-24 08:18:22 +01:00
Emilio Cobos Álvarez
3d57c22e9c Update euclid.
There are a few canvas2d-related dependencies that haven't updated, but they
only use euclid internally so that's not blocking landing the rest of the
changes.

Given the size of this patch, I think it's useful to get this landed as-is.
2019-07-23 23:09:55 +02:00
Peter Hall
8bfd4dc1e2 #8539 Config preferences backend restructure 2019-03-20 15:01:26 +00:00
Josh Matthews
3121f42d52 Remove offscreen_gl_context dependency from canvas_traits and script. 2019-03-07 09:27:36 -05:00
Simon Sapin
be69f9c3e6 Rustfmt has changed its default style :/ 2018-12-28 13:17:47 +01:00
Anthony Ramine
9a8d03a0f3 Make HTMLCanvasElement::fetch_all_data return a shared memory blob 2018-11-21 12:53:50 +01:00
Jan Andre Ikenmeyer
a1a14459c1
Update MPL license to https (part 3) 2018-11-19 14:47:12 +01:00
Simon Sapin
9f977c5287 Remove useless use crate_name; imports.
A `crate_name::foo` path always works in 2018
2018-11-08 09:29:52 +01:00
Simon Sapin
2012be4a8b cargo fix --edition-idioms 2018-11-08 09:28:00 +01:00
Pyfisch
9e92eb205a Reorder imports 2018-11-06 22:35:07 +01:00
Pyfisch
cb07debcb6 Format remaining files 2018-11-06 22:30:31 +01:00
Simon Sapin
45f7199eee cargo fix --edition 2018-11-06 15:26:02 +01:00
Anthony Ramine
6c469b90b1 Share some code between 2D canvas and WebGL 2018-10-09 14:57:02 +02:00
Anthony Ramine
05ef233097 Add a couple of bug links 2018-10-08 13:13:24 +02:00
Anthony Ramine
551c405b0f Avoid ctx.getImageData in canvas.toDataURL 2018-10-08 12:19:10 +02:00
Anthony Ramine
241dba064d Align ctx.createImageData and ctx.getImageData with the spec 2018-10-06 11:41:48 +02:00
Anthony Ramine
75e6f5dfaa Avoid copying pixels in ctx.putImageData sometimes 2018-10-06 02:59:25 +02:00
Anthony Ramine
5efbeea61c Reindent the WebGL 2 case of canvas.toDataURL 2018-10-03 10:44:36 +02:00