aboutsummaryrefslogtreecommitdiffstats
path: root/components/script/dom/canvasrenderingcontext2d.rs
Commit message (Collapse)AuthorAgeFilesLines
* Move DOMString back to scriptAnthony Ramine2016-05-241-1/+1
| | | | This entirely removes the 'non-geckolib' feature of the util crate.
* Remove ConstellationChan.Ms2ger2016-05-191-1/+1
| | | | | | 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.
* Removed unused importsPer Lundberg2016-05-151-1/+1
| | | | This fixes #11185.
* Setting current color to black if canvas is not rendered in documentDavid Raifaizen2016-04-221-1/+19
|
* Use num-traits in script.Ms2ger2016-04-201-1/+1
|
* replace Fallible<()> with ErrorResultDi Xu2016-04-131-9/+9
|
* Stop sending the renderer id to script.Ms2ger2016-03-211-1/+1
|
* Remove renderer_id fields.Ms2ger2016-03-211-3/+1
|
* Remove get_renderer_id functions.Ms2ger2016-03-211-9/+0
|
* Update some canvas properties as enums instead of DOMStringSaurav Sachidanand2016-02-191-22/+28
|
* Fix #9508: Beautify our union enums constructorsAlexander Lopatin2016-02-071-21/+21
|
* adding image metadata notification capabilities to image cachejmr02016-01-291-1/+1
|
* Remove unused imports in scriptKishor Bhat2016-01-171-1/+0
|
* Add global default method for Reflectable traitChad Kimes2016-01-111-9/+9
|
* Remove global field from CanvasRenderingContext2DChad Kimes2016-01-101-10/+8
|
* task -> threadrohan.prinja2016-01-101-3/+3
|
* Auto merge of #9123 - karyon:clippy_cleanup, r=Manishearthbors-servo2016-01-031-4/+2
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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 -->
| * Fix a bunch of clippy lintsJohannes Linke2016-01-021-4/+2
| |
* | Store state of fill or style for canvas patternIszak Bryan2016-01-021-0/+4
|/
* Auto merge of #9109 - nerith:createpattern, r=jdmbors-servo2016-01-011-1/+5
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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 -->
| * Support empty strings as the repeat argument (CreatePattern)Brandon Fairchild2015-12-311-1/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
* | Enable Pattern variant of CanvasFillOrStrokeStyleAlberto Corona2015-12-291-1/+8
|/ | | | Closes #7608
* Add origin-clean flag tracking for canvasDavid Zbarsky2015-12-171-34/+85
|
* Move ScriptMsg from msg crate into script_traitsTomas Cernaj2015-12-091-1/+1
|
* Implement IsPointInPathDavid Zbarsky2015-12-051-1/+14
|
* Reset canvas state when changing bitmap dimensionsDavid Zbarsky2015-11-301-1/+9
|
* Update Canvas webIDL to specDavid Zbarsky2015-11-281-5/+5
|
* Tidy.Simon Sapin2015-11-231-1/+1
|
* Parse currentColor as Canvas2D colorDavid Zbarsky2015-11-211-2/+24
|
* Auto merge of #8530 - KiChjang:split-constellation-msg, r=jdmbors-servo2015-11-191-1/+1
|\ | | | | | | | | | | | | | | | | | | 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 -->
| * Split ConstellationMsg into ScriptMsg and CompositorMsgKeith Yeung2015-11-161-1/+1
| |
* | Rustfmt some of script.Ms2ger2015-11-181-105/+220
|/
* Replaced DOMString constructor by conversion functions.Alan Jeffrey2015-11-121-18/+17
| | | | | | Replaced DOMString(...) by DOMString::from(...). Replaced ....0 by String::from(...). Removed any uses of .to_owner() in DOMString::from("...").
* Make DOMString a newtype around String, rather than a typedef.Ms2ger2015-11-041-9/+9
| | | | | | | | | | 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.
* Get rid of a bunch of explicit derefsDavid Zbarsky2015-11-031-9/+6
|
* merge from masterrohan.prinja2015-11-031-13/+12
|\
| * Remove JSTraceable implementation from RefCell.Eli Friedman2015-11-021-5/+5
| | | | | | | | | | The implementation wasn't really right, and we would rather just use DOMRefCell anyway.
| * Removed JS::root Fixes #8251nxnfufunezn2015-10-311-8/+7
| |
* | more refactoringrohan.prinja2015-10-301-1/+1
| |
* | move Castable into dom::bindings::inheritancerohan.prinja2015-10-301-1/+1
|/
* Make unrooted_must_root a bit more aggressive.Eli Friedman2015-10-231-0/+1
| | | | | | | | | Basically, instead of trying to check for specific kinds of statements, just check the types of all local variables. Also included are some commented-out proposals for some slightly more aggressive lints which might be useful (but trigger a little too frequently at the moment).
* Auto merge of #8086 - froydnj:premultiply-tables, r=jdmbors-servo2015-10-211-6/+5
|\ | | | | | | | | | | | | | | | | | | add (un)premultiply tables for canvas {Get,Put}ImageData operations Pretty straightforward use of lookup tables to replace a bunch of expensive float operations. <!-- Reviewable:start --> [<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/8086) <!-- Reviewable:end -->
| * add un-premultiply table for GetImageDataNathan Froyd2015-10-201-6/+5
| | | | | | | | Fixes #6969.
* | Auto merge of #8115 - nerith:canvas, r=jdmbors-servo2015-10-211-1/+1
|\ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Don't require the CanvasFillOrStrokeStyle enum to be public CanvasFillOrStrokeStyle is only used in a single file, so it does not need to be a public enum. Fixes #8105. <!-- Reviewable:start --> [<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/8115) <!-- Reviewable:end -->
| * | Don't require the CanvasFillOrStrokeStyle enum to be publicBrandon Fairchild2015-10-211-1/+1
| |/ | | | | | | | | | | | | CanvasFillOrStrokeStyle is only used in a single file, so it does not need to be a public enum. Fixes #8105.
* | Clean up the cast callsAnthony Ramine2015-10-211-3/+1
| |
* | Introduce trait CastableAnthony Ramine2015-10-211-3/+3
|/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This trait is used to hold onto the downcast and upcast functions of all castable IDL interfaces. A castable IDL interface is one which either derives from or is derived by other interfaces. The deriving relation is represented by implementations of marker trait DerivedFrom<T: Castable> generated in InheritTypes. /^[ ]*use dom::bindings::codegen::InheritTypes::.*(Base|Cast|Derived)/ { /::[a-zA-Z]+(Base|Cast|Derived);/d s/([{ ])[a-zA-Z]+(Base|Cast|Derived), /\1/g s/([{ ])[a-zA-Z]+(Base|Cast|Derived), /\1/g s/, [a-zA-Z]+(Base|Cast|Derived)([},])/\2/g s/, [a-zA-Z]+(Base|Cast|Derived)([},])/\2/g /\{([a-zA-Z]+(Base|Cast|Derived))?\};$/d s/\{([a-zA-Z_]+)\};$/\1;/ } s/([a-zA-Z]+)Cast::from_ref\(\&?\**([a-zA-Z_]+)(\.r\(\))?\)/\2.upcast::<\1>()/g s/([a-zA-Z]+)Cast::from_ref\(\&?\**([a-zA-Z_]+)(\.[a-zA-Z_]+\(\))?\)/\2\3.upcast::<\1>()/g s/\(([a-zA-Z]+)Cast::from_ref\)/\(Castable::upcast::<\1>\)/g s/([a-zA-Z]+)Cast::from_root/Root::upcast::<\1>/g s/([a-zA-Z]+)Cast::from_layout_js\(\&([a-zA-Z_.]+)\)/\2.upcast::<\1>()/g s/([a-zA-Z]+)Cast::to_ref\(\&?\**([a-zA-Z_]+)(\.r\(\))?\)/\2.downcast::<\1>()/g s/([a-zA-Z]+)Cast::to_ref\(\&?\**([a-zA-Z_]+)(\.[a-zA-Z_]+\(\))?\)/\2\3.downcast::<\1>()/g s/\(([a-zA-Z]+)Cast::to_ref\)/\(Castable::downcast::<\1>\)/g s/([a-zA-Z]+)Cast::to_root/Root::downcast::<\1>/g s/([a-zA-Z]+)Cast::to_layout_js\(&?([a-zA-Z_.]+(\(\))?)\)/\2.downcast::<\1>()/g s/\.is_document\(\)/.is::<Document>()/g s/\.is_htmlanchorelement\(\)/.is::<HTMLAnchorElement>()/g s/\.is_htmlappletelement\(\)/.is::<HTMLAppletElement>()/g s/\.is_htmlareaelement\(\)/.is::<HTMLAreaElement>()/g s/\.is_htmlbodyelement\(\)/.is::<HTMLBodyElement>()/g s/\.is_htmlembedelement\(\)/.is::<HTMLEmbedElement>()/g s/\.is_htmlfieldsetelement\(\)/.is::<HTMLFieldSetElement>()/g s/\.is_htmlformelement\(\)/.is::<HTMLFormElement>()/g s/\.is_htmlframesetelement\(\)/.is::<HTMLFrameSetElement>()/g s/\.is_htmlhtmlelement\(\)/.is::<HTMLHtmlElement>()/g s/\.is_htmlimageelement\(\)/.is::<HTMLImageElement>()/g s/\.is_htmllegendelement\(\)/.is::<HTMLLegendElement>()/g s/\.is_htmloptgroupelement\(\)/.is::<HTMLOptGroupElement>()/g s/\.is_htmloptionelement\(\)/.is::<HTMLOptionElement>()/g s/\.is_htmlscriptelement\(\)/.is::<HTMLScriptElement>()/g s/\.is_htmltabledatacellelement\(\)/.is::<HTMLTableDataCellElement>()/g s/\.is_htmltableheadercellelement\(\)/.is::<HTMLTableHeaderCellElement>()/g s/\.is_htmltablerowelement\(\)/.is::<HTMLTableRowElement>()/g s/\.is_htmltablesectionelement\(\)/.is::<HTMLTableSectionElement>()/g s/\.is_htmltitleelement\(\)/.is::<HTMLTitleElement>()/g
* Stop implementing Copy for JS<T>.Eli Friedman2015-10-151-2/+2
| | | | | A copy of a JS<T> doesn't have the rooting properties of the original, so it makes no sense for it to implement Copy.
* Link to the HTML multipage spec, not the single-page one.Eli Friedman2015-10-131-2/+2
|
* Refactor Error enum usage to consistently be qualifiedAnthony Urena2015-10-061-16/+15
|