Utsav Oza
34d0c313dc
Enable textAlign, textBaseline and direction attributes for canvas
2020-06-10 22:34:20 +05:30
Utsav Oza
15fd256302
Store resolved font style in canvas context state
2020-06-10 22:10:44 +05:30
Utsav Oza
7883718c12
Query layout to resolve canvas font property value
2020-06-10 22:10:42 +05:30
Utsav Oza
bd8fbee12c
Resolve mach build warnings
2020-04-10 23:02:31 +05:30
Utsav Oza
d98ade2a68
Remove DomRefCell wrapper for canvas_state from CanvasRenderingContext2D
2020-04-10 23:02:30 +05:30
Manish Goregaokar
fccfff11c5
Update euclid
2020-04-07 08:51:08 -07:00
Anthony Ramine
e561911066
Make LayoutCanvasRenderingContext2DHelpers::get_canvas_id be safe
2020-03-31 21:23:55 +02:00
Anthony Ramine
9d337ea013
Make LayoutCanvasRenderingContext2DHelpers methods take self
2020-03-29 16:08:53 +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
pylbrecht
588c09b580
Implement CanvasRenderingContext2D.getTransform()
2020-02-12 08:49:18 +01:00
pylbrecht
481ef46167
Make create_pattern() return None for incomplete images
2020-02-10 14:23:38 +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
Hanif Bin Ariffin
31ff2d43cc
Moved CanvasState out of canvasrenderingcontext
...
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)
2019-10-25 02:27:57 -04:00
Rasmus Viitanen
328809aebe
fix getimagedata returns empty pixels
2019-10-16 21:20:46 +02:00
Josh Matthews
1df8d57dc6
Support CORS attributes for image elements.
2019-10-04 15:08:40 -04:00
Josh Matthews
583536c940
Use the paint worklet's base URL for the 2d canvas' origin checks.
2019-10-04 09:22:21 -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
Paul Rouget
3695fb1eb4
Temporary implementation of Canvas.MeasureText
2019-09-25 13:34:48 +02: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
Emilio Cobos Álvarez
2e5078e9c5
layout: Fix servo build.
2019-06-04 01:04:02 -04:00
Maharsh
85c20db495
Extract canvas operations for reuse by OffscreenCanvas.
2019-05-22 10:24:54 -04:00
Maharsh
cbff66928f
removed comments
2019-05-13 14:17:12 -04:00
Maharsh
854ba8d514
Borrow Layout Change
2019-05-13 12:04:17 -04:00
Maharsh
65e1f1fb3e
Updated Testcases and Formatting
2019-05-11 21:58:15 -04:00
Maharsh
1de8ddd89c
Changes for sender reciever
2019-05-09 21:54:48 -04:00
Maharsh
30cc087526
Changes for gitignore
2019-05-09 18:30:25 -04:00
Maharsh
6c6fb676b7
Created CanvasRect fro OffscreenCanvas and Updated Testcases
2019-03-29 15:12:53 -04: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
Anthony Ramine
cfca906ee2
Call rgba8_byte_swap_colors_inplace on the WebGL thread
2018-11-20 10:14:52 +01:00
Anthony Ramine
2c0acf6b9b
Move PixelFormat to the pixels crate
2018-11-20 10:14:52 +01:00
Jan Andre Ikenmeyer
a1a14459c1
Update MPL license to https (part 3)
2018-11-19 14:47:12 +01:00
Anthony Ramine
a5779ad372
Prefix some pixels functions with rgba8_
2018-11-16 12:37:34 +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
76e59a46d3
Sort use
statements
2018-11-06 15:26:02 +01:00
Simon Sapin
45f7199eee
cargo fix --edition
2018-11-06 15:26:02 +01:00
Anthony Ramine
bb2101f540
Simplify ctx.drawImage a bit
...
There is no need to swap between RGBA and BGRA twice.
2018-10-11 15:46:42 +02:00
Anthony Ramine
6c469b90b1
Share some code between 2D canvas and WebGL
2018-10-09 14:57:02 +02:00
Anthony Ramine
551c405b0f
Avoid ctx.getImageData in canvas.toDataURL
2018-10-08 12:19:10 +02:00
Anthony Ramine
77c28bdfc9
Abstract some stuff common to ctx.getImageData and ctx.putImageData
2018-10-08 11:39:09 +02:00
Anthony Ramine
e62dbabb46
Handle some transparent black cases in ctx.getImageData
2018-10-07 02:52:06 +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
19f40cdf0b
Introduce ImageData::get_rect
...
We use that to send only the pixels that will be actually drawn to the
canvas thread in CanvasRenderingContext2d::PutImageData.
We also make the canvas thread byte swap and premultiply colours in-place.
2018-10-06 01:12:05 +02:00
Anthony Ramine
784fbb2bc1
Merge some byte swap/premultiply functions in their own crate
2018-10-06 01:11:55 +02:00
Anthony Ramine
82c7d71811
Improve gl.putImageData
...
This commit should allow us to send smaller blobs to the canvas thread,
I made it into its own commit just to try=wpt.
2018-10-05 17:07:58 +02:00