aboutsummaryrefslogtreecommitdiffstats
path: root/components/script/canvas_state.rs
Commit message (Collapse)AuthorAgeFilesLines
* fixes dereferencing on an immutable reference (#31864)Aarya Khandelwal2024-03-261-5/+5
|
* clippy: Fix `unnecessary_cast` warnings in `components/script` (#31823)Oluwatobi Sofela2024-03-221-1/+1
| | | | | | | * clippy: Fix unnecessary cast warnings * clippy: Replace redundant field names with their shorthand alternatives * clippy: Delete struct pattern dereferencings
* Fixed the .clone() warnings. (#31819)Aarya Khandelwal2024-03-221-1/+1
|
* clippy: Fix dereferenced warnings (#31770)Oluwatobi Sofela2024-03-201-1/+1
|
* clippy: Fix many warnings in `components/script` (#31717)Richard Dushime2024-03-191-2/+2
| | | | | | | | | | | | | | | | | * Fix Several clippy warnings * Fix Build errors * Fix Unused import * Fix requested changes * Fix rustfmt * Minor fixes --------- Co-authored-by: Martin Robinson <mrobinson@igalia.com>
* Update Stylo to 2023-09-01 (#31609)Oriol Brufau2024-03-181-20/+21
| | | | | | | | | | | | | | | | | | | | | * Update Stylo to 2023-09-01 * Fixup for https://phabricator.services.mozilla.com/D184929 * Fixup for https://phabricator.services.mozilla.com/D184526 * Fixup for https://phabricator.services.mozilla.com/D184525 * Fixup for https://phabricator.services.mozilla.com/D185154 * Fixup for https://phabricator.services.mozilla.com/D184685 * Fixup for https://phabricator.services.mozilla.com/D185916 * Fixup for https://phabricator.services.mozilla.com/D185492 * Fixup for https://phabricator.services.mozilla.com/D186626 * Update test expectations
* clippy: Fix some warnings in the `script` crate (#31719)Rosemary Ajayi2024-03-181-2/+2
| | | | | | | | | | | | | | | | | | | | | * Fix InlineFormatting error * BoxFrament * fix clippy error * clippy:fix clipy errors * fix clippy errors * fix clippy errors * fix clippy errors * Remove changes to `layout_2020` --------- Co-authored-by: Martin Robinson <mrobinson@igalia.com>
* style: Remove dependency on servo_url (#31358)Martin Robinson2024-02-161-1/+2
| | | | | In order for stylo to be a separate crate, it needs to depend on less things from Servo. This change makes it so that stylo no longer depends on servo_url.
* canvas2d: Implement `.reset()` (#31258)Smitty2024-02-051-1/+8
| | | | | | | | | | | * Implement Canvas2D reset * Update WPT tests * Apply suggestions from code review --------- Co-authored-by: Martin Robinson <mrobinson@igalia.com>
* rustdoc: Fix many rustdoc errors (#31147)Martin Robinson2024-01-221-1/+1
| | | | This fixes many rustdoc errors that occur due to raw URLs in rustdoc comments as well as unescaped Rust code that should be in backticks.
* Replace script_plugins with a clippy like rustc driver (named crown) (#30508)Samson2023-12-011-4/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * 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>
* Further changes required by ServoOriol Brufau2023-11-241-0/+1
|
* Further changes required by ServoOriol Brufau2023-11-241-1/+1
|
* Further changes required by ServoOriol Brufau2023-11-211-18/+12
|
* Further changes required by ServoOriol Brufau2023-11-211-3/+12
|
* Enable new color functions from CSS Color 4 (#30752)Oriol Brufau2023-11-201-33/+43
| | | | | | | | I will need to do most of the work anyways during the style updates, so by enabling this it will be easier to detect mistakes. Also, canvas colors are now parsed as <color>, precisely to support these new features. This is according to the HTML spec: https://html.spec.whatwg.org/multipage/infrastructure.html#parsed-as-a-css-color-value
* Allow currentColor in canvas context's shadowColor (#30754)Oriol Brufau2023-11-201-53/+38
| | | | | | This allows unifying the parse_color function and method, aligns Servo with other browsers, and obeys the HTML spec: - https://html.spec.whatwg.org/multipage/canvas.html#shadows - https://html.spec.whatwg.org/multipage/infrastructure.html#parsed-as-a-css-color-value
* Further changes required by ServoOriol Brufau2023-11-061-3/+3
|
* Further changes required by ServoOriol Brufau2023-11-061-7/+7
|
* Clean up and merge some canvas-related WebIDLs (#30606)Ennui Langeweile2023-10-261-2/+1
| | | | | | | * Clean up and merge some canvas-related WebIDLs * Apply `./mach fmt` * WebIDL has `test-tidy` support???
* Use `IpcSharedMemory` for `Canvas2dMsg::DrawImage` (#30544)Ennui Langeweile2023-10-181-13/+9
| | | | | | | | | * Use `IpcSharedMemory` for `Canvas2DMsg::DrawImage` * Fix `Canvas2dMsg::DrawEmptyImage` crashes * Do not premultiply canvas image data * Move `image_data` back to its original position
* Further changes required by ServoOriol Brufau2023-10-021-1/+1
|
* Strict import formatting (grouping and granularity) (#30325)Samson2023-09-111-35/+31
| | | | | * strict imports formatting * Reformat all imports
* No tracing of nop traceable fields (#29926)Samson2023-08-041-1/+16
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Add `no_trace` option to JSTraceable derive * NoTrace wrapper * Port some types to no_trace schematics * Fixing my unsafe mistakes (not tracing traceables) * Add docs & safety guards for no_trace Safety guards (trait shenanigans) guarantees safety usage of `no_trace` * Port canvas_traits to no_trace * Port servo_media to no_trace * Port net_traits to no_trace * Port style to no_trace * Port webgpu to no_trace * Port script_traits to no_trace * Port canvas_traits, devtools_traits, embedder_traits, profile_traits to no_trace * unrooted_must_root lint in seperate file * Add trace_in_no_trace_lint as script_plugin * Composable types in must_not_have_traceable * Introduced HashMapTracedValues wrapper * `HashMap<NoTrace<K>,V>`->`HashMapTracedValues<K,V>` * Port rest of servo's types to no_trace * Port html5ever, euclid, mime and http to no_trace * Port remaining externals to no_trace * Port webxr and Arc<Mutex<_>> * Fix spelling in notrace doc
* Bump euclid to 0.22Martin Robinson2023-01-261-12/+7
| | | | | | | | | | | | | - Also updates raqote to latest with an upgrade of font-kit to 0.11 applied on as a patch - Update lyon_geom to the latest version Major change: - All matrices are now stored in row major order. This means that parameters to rotation functions no longer should be negated. - `post_...()` functions are now named `then()`. `pre_transform()` is removed, so `then()` is used and the order of operations changed.
* Fix ./mach build --release --with-layout-2020Utsav Oza2020-06-101-2/+8
|
* Enable textAlign, textBaseline and direction attributes for canvasUtsav Oza2020-06-101-5/+93
|
* Implement CanvasRenderingContext2D.font propertyUtsav Oza2020-06-101-3/+35
|
* Store resolved font style in canvas context stateUtsav Oza2020-06-101-10/+25
|
* Add todos for missing steps while processing parse font queryUtsav Oza2020-06-101-2/+9
|
* Query layout to resolve canvas font property valueUtsav Oza2020-06-101-0/+10
|
* Check for valid arguments before processing canvas.fillTextUtsav Oza2020-06-101-2/+6
|
* Refactor ImageCache::find_image_or_metadata API.Julien Tregoat2020-04-171-19/+7
|
* Resolve mach build warningsUtsav Oza2020-04-101-8/+0
|
* Update euclidManish Goregaokar2020-04-071-1/+0
|
* Implement CanvasRenderingContext2D.getTransform()pylbrecht2020-02-121-0/+10
|
* Make create_pattern() return None for incomplete imagespylbrecht2020-02-101-6/+8
|
* Add canvas usability checks to drawImage()pylbrecht2020-02-031-0/+10
|
* Add image usability checks to drawImage()pylbrecht2020-02-031-0/+8
|
* Send fill/stroke style along with drawing messagepylbrecht2020-01-251-28/+20
|
* Update fill and stroke style only when requiredpylbrecht2020-01-251-18/+23
| | | | | | | | | | | | So far fill and stroke style updates have been sent to the canvas paint thread by `SetFillStyle()` and `SetStrokeStyle()`. This resulted in fill/stroke style updates not being considered by the canvas paint thread between the latest call of `SetFillStyle()`/`SetStrokeStyle()` and the drawing operation (e.g. fill or stroke). This issue is solved by making `SetFillStyle()` and `SetStrokeStyle()` update the local canvas state and propagating the state to the canvas paint thread right before any drawing operation that requires it.
* Addresses Issue: Support OffscreenCanvas as CanvasImageSource #24269Bailey Blankenship2019-12-041-2/+70
| | | | | | Added methods to canvas_data to support drawing an offscreen canvas onto another canvas Bug fix: Swapped OffscreenCanvas width and height parameters to match Mozilla spec Tests: Updated metadata for 866 tests
* Auto merge of #24426 - servo:wrup, r=jdm,noxbors-servo2019-11-201-1/+2
|\ | | | | | | | | | | | | | | Update webrender <!-- 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/24426) <!-- Reviewable:end -->
| * Update webrender and serde_bytesAnthony Ramine2019-11-131-1/+2
| |
* | Use `#![register_tool]` instead of `#![register_attr]`Simon Sapin2019-11-151-3/+3
|/ | | | CC https://github.com/rust-lang/rust/issues/66079
* Addresses issues raised in #24465; removes redundancy in set_bitmap_dimensionsBailey Blankenship2019-11-101-6/+20
| | | | Removed passing test .ini files and moved euclid extensions to euclidext.rs to factor out redundant code
* Return false from CanvasState::IsPointInPath for NaN/infinite valuesteapotd2019-10-281-0/+4
|
* Moved CanvasState out of canvasrenderingcontextHanif Bin Ariffin2019-10-251-0/+1536
Cleaned up imports... Applied clang-tidy Moved CanvasState and some other files Next commit should remove pub modifier from members of CanvasState and use getters/setters instead. Members of CanvasState are now private and applied test-tidy Now have getters that return an immutable reference. Also, I have no idea what to name some_func.rs Removed need for some_func and made pub(crate)