Commit graph

180 commits

Author SHA1 Message Date
Emilio Cobos Álvarez
0c102e2350
style: Unbox a bunch of color properties.
This builds on https://github.com/servo/rust-cssparser/pull/118.
2017-02-14 20:18:31 +01:00
Prudhvi Rampey
e3d8131698 Error handled canvas closing 2016-12-28 23:14:46 +05:30
Corey Farwell
449f6337d4 Rename Reflectable to DomObject.
Fixes https://github.com/servo/servo/issues/8473.
2016-12-08 08:50:35 -10:00
Emilio Cobos Álvarez
913c874cb5
Urlmageddon: Use refcounted urls more often. 2016-11-17 18:34:23 +01:00
Glenn Watson
acfdfd2fa9 Remove old rendering backend.
This removes paint threads, rust-layers dependency, and changes
optional webrender types to be required.

The use_webrender option has been removed, however I've left
the "-w" command line option in place so that wpt
runner can continue to pass that. Once it's removed from there
we can also remove the -w option.

Once this stage is complete, it should be fine to change the
display list building code to generate webrender display
lists directly and avoid the conversion step.
2016-10-18 10:21:27 +10:00
Anthony Ramine
0b3ab875f4 Remove intrinsic Root::r() 2016-10-11 19:44:32 +02:00
Anthony Ramine
d8e92bb271 Rename Reflectable::global_scope to global 2016-10-06 21:36:41 +02:00
Anthony Ramine
a8c05c6962 Make CanvasRenderingContext2d::new take a &GlobalScope 2016-10-06 21:35:39 +02:00
Anthony Ramine
ae6af5172b Introduce Reflectable::global_scope 2016-10-06 21:35:38 +02:00
Anthony Ramine
f789e73fd2 Introduce GlobalScope::constellation_chan 2016-10-06 20:59:12 +02:00
Anthony Ramine
fcb59d3057 Make reflect_dom_object take a &GlobalScope 2016-10-06 20:59:09 +02:00
Arthur Marble
dbec9d8454 More code refactoring (exampleVar to example_var) 2016-09-18 01:02:57 -05:00
UK992
93a103ba73 Reorder use statements 2016-09-09 04:55:19 +02:00
Anthony Ramine
2400b91d05 Don't bother with the global in ImageData::get_image_data 2016-08-30 19:06:41 +02:00
Glenn Watson
119716acb2 Fix canvas image tests when using webrender.
When webrender is enabled, image decoding doesn't pre-multiply by
alpha, but the canvas code expects the image data to be
pre-multiplied form.
2016-08-30 09:57:38 +10:00
Anthony Ramine
51768844ed Update euclid to 0.10.1 2016-08-21 03:03:45 +02:00
Anthony Ramine
e77efb93c1 Move util::vec::byte_swap to canvas_traits 2016-07-04 16:48:15 +02:00
Anthony Ramine
f8c3fe1076 Make canvas send their data themselves to other canvas 2016-06-16 18:24:04 +01:00
Anthony Ramine
b45f1918d1 Remove JS::from_rooted 2016-05-31 14:43:58 +02:00
Josh Matthews
3cb8af20c2 Remove empty lines following braces. 2016-05-27 13:32:05 -04:00
Anthony Ramine
cdc7bca944 Move DOMString back to script
This entirely removes the 'non-geckolib' feature of the util crate.
2016-05-24 10:54:57 +02:00
Ms2ger
cc2b2b50a7 Remove ConstellationChan.
It's a pointless abstraction that propagates the obsolete chan terminology,
swaps the order in which the sender and receiver are returned, and hides a
source of panics.
2016-05-19 17:13:44 +02:00
Per Lundberg
2f7ed1d73e Removed unused imports
This fixes #11185.
2016-05-15 22:24:26 +03:00
David Raifaizen
b5159dc7ff Setting current color to black if canvas is not rendered in document 2016-04-22 09:59:49 -04:00
Ms2ger
03d4bacc05 Use num-traits in script. 2016-04-20 15:23:43 +02:00
Di Xu
76f57efb58 replace Fallible<()> with ErrorResult 2016-04-13 19:56:52 +08:00
Ms2ger
63a00f4dbf Stop sending the renderer id to script. 2016-03-21 17:55:08 +01:00
Ms2ger
7e2e54326f Remove renderer_id fields. 2016-03-21 17:49:47 +01:00
Ms2ger
3c04bca0f4 Remove get_renderer_id functions. 2016-03-21 17:45:42 +01:00
Saurav Sachidanand
939560bd6e Update some canvas properties as enums instead of DOMString 2016-02-19 22:19:09 +05:30
Alexander Lopatin
2be49404be Fix #9508: Beautify our union enums constructors 2016-02-07 02:55:21 +03:00
jmr0
167ffa7a95 adding image metadata notification capabilities to image cache 2016-01-29 20:54:49 -05:00
Kishor Bhat
1ca2073979 Remove unused imports in script 2016-01-17 12:41:28 +05:30
Chad Kimes
ce6075825d Add global default method for Reflectable trait 2016-01-11 20:23:47 -05:00
Chad Kimes
d90141a8f6 Remove global field from CanvasRenderingContext2D 2016-01-10 21:53:18 -05:00
rohan.prinja
1f02c4ebbb task -> thread 2016-01-10 17:58:13 +09:00
bors-servo
9da739acef Auto merge of #9123 - karyon:clippy_cleanup, r=Manishearth
Fix a bunch of clippy lints

This fixes about 130 clippy lints. Let me know if i should split up the commit.

I wasn't sure about some of the changes, especially map_or instead of map(...).unwrap_or(...) and if let instead of single arm match were not always a strict improvement in my opinion, but i'll leave that decision to the reviewer :)

There are about 150 lints left which i thought were clippy bugs or i didn't know how to fix.

cc @Manishearth

<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/9123)
<!-- Reviewable:end -->
2016-01-03 09:16:34 +05:30
Iszak Bryan
1fa3d36167 Store state of fill or style for canvas pattern 2016-01-02 23:35:04 +00:00
Johannes Linke
6b215f38ee Fix a bunch of clippy lints 2016-01-02 23:27:15 +01:00
bors-servo
11d160fc73 Auto merge of #9109 - nerith:createpattern, r=jdm
Support empty strings as the repeat argument (CreatePattern)

According to the third step in the specification [1], createPattern
should let the repetition argument be "repeat" when it is the empty
string.

The code in CanvasRenderingContext2D::CreatePattern did not implement
this step and instead threw a SyntaxError exception when an empty
string was supplied as the repetition argument.

Fixes #9079.

[1] https://html.spec.whatwg.org/multipage/#dom-context-2d-createpattern

<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/9109)
<!-- Reviewable:end -->
2016-01-01 21:04:51 +05:30
Brandon Fairchild
1ccab328f9 Support empty strings as the repeat argument (CreatePattern)
According to the third step in the specification [1], createPattern
should let the repetition argument be "repeat" when it is the empty
string.

The code in CanvasRenderingContext2D::CreatePattern did not implement
this step and instead threw a SyntaxError exception when an empty
string was supplied as the repetition argument.

Fixes #9079.

[1] https://html.spec.whatwg.org/multipage/#dom-context-2d-createpattern
2015-12-31 11:48:15 -05:00
Alberto Corona
e6a3c16e9a Enable Pattern variant of CanvasFillOrStrokeStyle
Closes #7608
2015-12-29 10:38:00 -05:00
David Zbarsky
b8e9064fe6 Add origin-clean flag tracking for canvas 2015-12-17 11:40:38 -08:00
Tomas Cernaj
5507be2653 Move ScriptMsg from msg crate into script_traits 2015-12-09 20:50:11 +01:00
David Zbarsky
789a90a82f Implement IsPointInPath 2015-12-05 17:49:49 -08:00
David Zbarsky
302f41d34b Reset canvas state when changing bitmap dimensions 2015-11-30 21:23:51 -08:00
David Zbarsky
ee3f7ad451 Update Canvas webIDL to spec 2015-11-28 20:03:48 -08:00
Simon Sapin
18ecf54d10 Tidy. 2015-11-23 16:16:35 +01:00
David Zbarsky
8408891ec5 Parse currentColor as Canvas2D color 2015-11-21 11:59:19 -08:00
bors-servo
acbe413052 Auto merge of #8530 - KiChjang:split-constellation-msg, r=jdm
Split ConstellationMsg into ScriptMsg and CompositorMsg

Fixes #8356.

<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/8530)
<!-- Reviewable:end -->
2015-11-19 04:39:20 +05:30