aboutsummaryrefslogtreecommitdiffstats
path: root/components/script/dom/canvasgradient.rs
Commit message (Collapse)AuthorAgeFilesLines
* Add trait DomObjectWrap to provide WRAP functionYUAN LYU2020-03-201-6/+1
|
* Rustfmt has changed its default style :/Simon Sapin2018-12-281-3/+3
|
* Update MPL license to https (part 3)Jan Andre Ikenmeyer2018-11-191-1/+1
|
* Reorder importsPyfisch2018-11-061-3/+5
|
* Sort `use` statementsSimon Sapin2018-11-061-2/+2
|
* `cargo fix --edition`Simon Sapin2018-11-061-9/+9
|
* Format script componentchansuke2018-09-191-19/+25
|
* Replace all uses of the `heapsize` crate with `malloc_size_of`.Nicholas Nethercote2017-10-181-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Servo currently uses `heapsize`, but Stylo/Gecko use `malloc_size_of`. `malloc_size_of` is better -- it handles various cases that `heapsize` does not -- so this patch changes Servo to use `malloc_size_of`. This patch makes the following changes to the `malloc_size_of` crate. - Adds `MallocSizeOf` trait implementations for numerous types, some built-in (e.g. `VecDeque`), some external and Servo-only (e.g. `string_cache`). - Makes `enclosing_size_of_op` optional, because vanilla jemalloc doesn't support that operation. - For `HashSet`/`HashMap`, falls back to a computed estimate when `enclosing_size_of_op` isn't available. - Adds an extern "C" `malloc_size_of` function that does the actual heap measurement; this is based on the same functions from the `heapsize` crate. This patch makes the following changes elsewhere. - Converts all the uses of `heapsize` to instead use `malloc_size_of`. - Disables the "heapsize"/"heap_size" feature for the external crates that provide it. - Removes the `HeapSizeOf` implementation from `hashglobe`. - Adds `ignore` annotations to a few `Rc`/`Arc`, because `malloc_size_of` doesn't derive those types, unlike `heapsize`.
* Remove use of unstable box syntax.Simon Sapin2017-10-161-1/+1
| | | | | | | | | | | | | | | | | | | | http://www.robohornet.org gives a score of 101.36 on master, and 102.68 with this PR. The latter is slightly better, but probably within noise level. So it looks like this PR does not affect DOM performance. This is expected since `Box::new` is defined as: ```rust impl<T> Box<T> { #[inline(always)] pub fn new(x: T) -> Box<T> { box x } } ``` With inlining, it should compile to the same as box syntax.
* Rename Root<T> to DomRoot<T>Anthony Ramine2017-09-261-2/+2
| | | | | | | In a later PR, DomRoot<T> will become a type alias of Root<Dom<T>>, where Root<T> will be able to handle all the things that need to be rooted that have a stable traceable address that doesn't move for the whole lifetime of the root. Stay tuned.
* Rename DOMRefCell<T> to DomRefCell<T>Anthony Ramine2017-09-261-3/+3
| | | | | | | | I don't want to do such a gratuitous rename, but with all the other types now having "Dom" as part of their name, and especially with "DomOnceCell", I feel like the other cell type that we already have should also follow the convention. That argument loses weight though when we realise there is still DOMString and other things.
* Rename dom::bindings::js to dom::bindings::rootAnthony Ramine2017-09-261-1/+1
|
* order derivable traits listsClément DAVID2017-08-231-1/+1
| | | | | | Ignoring : - **generated**.rs - python/tidy/servo_tidy_tests/rust_tidy.rs
* Revert "Auto merge of #18114 - emilio:revert-webgl-refactor, r=nox"Anthony Ramine2017-08-161-1/+1
| | | | | This reverts commit 4d10d39e8fe841c5fe2ac58da2daaa13c10c140e, reversing changes made to ee94e2b7c0bd327abe8f9545b2a1f792f67a2bdd.
* Revert "Auto merge of #17891 - MortimerGoro:webgl_move, r=glennw,emilio"Emilio Cobos Álvarez2017-08-161-1/+1
| | | | | This reverts commit 90f55ea4580e2a15f7d70d0491444f18b972d450, reversing changes made to 2e60b27a2186a8cba4b952960155dfcf3f47d7db.
* Improve WebGL architecture.Imanol Fernandez2017-08-151-1/+1
|
* Thread ParseError return values through CSS parsing.Josh Matthews2017-06-091-2/+3
|
* Make #[dom_struct] a proc_macro attributeAnthony Ramine2017-02-241-0/+1
|
* style: Unbox a bunch of color properties.Emilio Cobos Álvarez2017-02-141-1/+1
| | | | This builds on https://github.com/servo/rust-cssparser/pull/118.
* Make reflect_dom_object take a &GlobalScopeAnthony Ramine2016-10-061-2/+2
|
* Reorder `use` statementsUK9922016-09-091-1/+1
|
* Move DOMString back to scriptAnthony Ramine2016-05-241-1/+1
| | | | This entirely removes the 'non-geckolib' feature of the util crate.
* Parse currentColor as Canvas2D colorDavid Zbarsky2015-11-211-4/+12
|
* Rustfmt some of script.Ms2ger2015-11-181-12/+17
|
* Make DOMString a newtype around String, rather than a typedef.Ms2ger2015-11-041-1/+2
| | | | | | | | | | This should make it somewhat easier to experiment with alternative representations in the future. To reduce churn, this commit leaves the String field public, though. Also, this will allow us to use the default String type to represent the IDL USVString type, which explicitly forbids unpaired surrogates, ans as such is a better match to the Rust String type.
* more refactoringrohan.prinja2015-10-301-1/+1
|
* Refactor Error enum usage to consistently be qualifiedAnthony Urena2015-10-061-4/+3
|
* Make the traits for the IDL interfaces take &selfAnthony Ramine2015-08-271-2/+2
|
* make dom_struct derive HeapSizeOf,João Oliveira2015-08-271-1/+0
| | | | closes #7357
* Measure heap memory usage for more types. Fixes #6951Bogdan Cuza2015-08-131-1/+2
|
* CanvasGradient#addColorStop should throw for invalid colors and offsetsDavid Zbarsky2015-08-091-8/+12
|
* Refactor #[jstraceable] to #[derive(JSTraceable)]David Winslow2015-07-011-2/+1
| | | | fixes #6524
* Upgrade to SM 39Michael Wu2015-06-191-6/+6
|
* Replace fill_color and stroke_color with fill_style and stroke_style in ↵Hyowon Kim2015-06-061-0/+1
| | | | | | | CanvasContextState. The fillStyle and strokeStyle attributes can be either strings(color), CanvasGradients, or CanvasPatterns.
* Layerize canvasecoal952015-05-201-1/+1
| | | | | | | Note that this keeps using readback right now, `NativeSurface` painting will be implemented soon. Also see https://github.com/servo/servo/issues/6142
* Fix CanvasGradient.addColorStop()Anthony Ramine2015-04-271-1/+1
| | | | The argument should be a double.
* Add/update comments with links to specCorey Farwell2015-04-141-0/+2
| | | | | | | | | | Extracted out of #5649 * add more hyperlinks to associated specification for structs/methods * follow redirects and update links * replace broken links * removal of WHATWG multipage page name since the page name is not guaranteed to be stable
* Remove some unnecessary uses of `as_slice`Corey Farwell2015-03-291-1/+1
| | | | | | | | | | | For the majority of these cases, `as_slice` can be removed due to `Deref`. In particular, `Deref` for: * `String` -> `str` * `Atom` -> `str` The latter of those two requires, a bump of the locked `string-cache` library
* Enable `unrestricted` types for `CanvasRenderingContext2D`.Tetsuharu OHZEKI2015-03-251-2/+3
|
* Implement gradient fill styles for canvas.Mátyás Mustoha2015-03-191-1/+71
|
* script: Implement enough 2D canvas support to render basic SVGs such as the ↵Patrick Walton2015-02-221-0/+11
tiger.