Commit Graph

736 Commits

Author SHA1 Message Date
Ehsan Akhgari
a6cda7cb5c Merge cedar into mozilla-central 2011-04-08 22:28:05 -07:00
Ms2ger
daeb0e2616 Bug 630029 - Throw INDEX_SIZE_ERR instead of SYNTAX_ERR when calling CanvasGradient.addColorStop with non-finite values; r=?sicking 2011-04-02 20:50:14 +02:00
Saint Wesonga ext:(%2C%20Ms2ger%20%3Cms2ger%40gmail.com%3E)
27054f013a Bug 392751 - Allow out of bounds rects in getImageData; r=bz 2011-04-07 21:45:18 -07:00
Matt Woodrow
22b53f05ed Bug 591358 - Report canvas element allocation sizes to the GC. r=gal 2011-04-07 16:58:08 -07:00
Matheus Kerschbaum
93480c6366 Bug 639754 - Remove MOZ_IPC checks since IPC is always built now; r=bsmedberg 2011-04-02 19:14:00 -07:00
Ms2ger
c0904e3ca3 Bug 629894 - createImageData and getImageData should work for sizes smaller than one pixel; r=bz 2011-04-02 20:42:07 +02:00
Yury
f5ac501833 Bug 630040 - Implement createImageData(ImageData); r=bz 2011-04-02 20:45:26 +02:00
Ms2ger
9da7592a07 Bug 630052, part c: Handle non-finite and negative arguments to createImageData and getImageData according to spec; r=bz 2011-04-02 14:19:03 -04:00
Ms2ger
6adaa50ff9 Bug 630052, part b: Reduce code duplication between CreateImageData and GetImageData; r=bz 2011-04-02 14:18:49 -04:00
Ms2ger
48d0794225 Bug 630052, part a: Add NS_finite API to nsMathUtils; r=bz 2011-04-02 14:18:40 -04:00
Ms2ger
75157756af Bug 632516 - Handle non-finite values for translate per spec; r=roc 2011-04-01 15:31:35 -04:00
Ms2ger
5580363e6a Bug 632515 - Handle non-finite values for transform per spec; r=roc 2011-04-01 15:31:35 -04:00
Ms2ger
52e0a6ab6d Bug 632503 - Handle non-finite values for rect per spec; r=roc 2011-04-01 15:31:35 -04:00
Ms2ger
a621fafa13 Bug 632502 - Handle non-finite values for quadraticCurveTo per spec; r=roc 2011-04-01 15:31:35 -04:00
Ms2ger
09c1e8b000 Bug 632495 - Handle non-finite values for moveTo per spec; r=roc 2011-03-29 14:12:00 -04:00
Ms2ger
9c0180628b Bug 632493 - Handle non-finite values for lineTo per spec; r=roc 2011-03-29 14:05:00 -04:00
Ms2ger
3cb1f8077b Bug 630271 - Throw a TYPE_MISMATCH_ERR on createPattern(null); r=smaug 2011-04-01 15:31:34 -04:00
Ms2ger
938d8be616 Bug 630034 - Throw when attempting to create a radial gradient with negative radii; r=jmuizelaar 2011-03-31 11:47:00 -04:00
Ms2ger
93402fcdce Bug 632474 - Throw a TYPE_MISMATCH_ERR on drawImage(null); r=sicking 2011-03-31 15:38:30 -04:00
Ehsan Akhgari
49fceed112 Backout the latest cedar merge wholesale until I test the correctness of the merge locally. This commit takes the tree state back to changeset 8d3f6093c425 (the last known good changeset before the merge) 2011-04-01 12:23:48 -04:00
Ehsan Akhgari
f2b4323534 Merge cedar into mozilla-central 2011-04-01 11:37:50 -04:00
Robert O'Callahan
c6e4498a20 Bug 622072. Part 3: Support empty transactions for canvas layers. r=tnikkel
The basic idea is that whenever a layer transaction updates the window, we clear out the invalidation state for the canvas rendering context,
using a DidTransactionCallback registered on the layer(s) for the canvas, which calls MakeContextClean.

The DidTransactionCallbacks are directed to the user data attached to the Layer, which holds a strong reference to the canvas element. This
ensures that the element lives as long as the layer. Layers are destroyed when the presentation is torn down (including if the frame is destroyed),
so we can't have a leak here. The reference to the canvas element is only strong because the layer might briefly outlive the frame (the layer
won't be destroyed until the next paint of the window).

This patch moves responsibility for calling CanvasLayer::Updated and nsFrame::MarkLayersActive from the canvas context to nsHTMLCanvasElement::InvalidateFrame.
We call Updated on the retained CanvasLayer, if there is one; any other CanvasLayers created for this canvas would only be used once, and have Updated
called on them in BuildLayer when created.
2011-03-28 12:59:47 +13:00
Robert O'Callahan
e865324942 Bug 622072. Part 1: Remove rect parameter from Updated() and change implementations to defer updates to render time. r=bas
The rectangle parameter is currently not used --- all callers always pass the full canvas bounds. In the long term,
we probably won't want this parameter since all implementations should be doing accelerated drawing direct to buffers
with no intermediate copies, hence there will be no need to optimize the size of those copies. Plus, performance-sensitive
testcases tend to paint most or all of the canvas on every frame anyway.
2011-03-28 12:59:46 +13:00
Ehsan Akhgari
de907a39be Merge mozilla-central into cedar 2011-03-30 13:55:31 -04:00
Ehsan Akhgari
a0f4acae30 Merge cedar into mozilla-central 2011-03-30 13:53:35 -04:00
Ms2ger
b23a59837e Bug 632508 - Handle non-finite values for rotate per spec; r=roc 2011-03-30 13:40:48 -04:00
Ms2ger
f50b65f0de Bug 632505 - Handle non-finite values for shadow{OffsetX|OffsetY|Blur} per spec; r=smaug 2011-03-30 13:40:48 -04:00
Ms2ger
96e851647e Bug 632464 - Handle non-finite values for globalAlpha per spec; r=smaug 2011-03-30 13:40:47 -04:00
Yury
83ae98f843 Bug 629875 - Handle negative arguments to drawImage; r=jmuizelaar 2011-03-30 14:55:13 +02:00
Ms2ger
e68c465383 Bug 632469 - Handle non-finite values for clearRect per spec; r=smaug 2011-03-29 22:24:53 -04:00
Ms2ger
bf7288aa6e Bug 630511 - Lowercase mime type argument to toDataURL; r=sicking 2011-03-29 22:24:53 -04:00
Ehsan Akhgari
73a35597a9 Merge mozilla-central into cedar 2011-03-28 14:39:03 -04:00
Robert O'Callahan
4ca813ae6e Bug 622072. Part 3: Support empty transactions for canvas layers. r=tnikkel
The basic idea is that whenever a layer transaction updates the window, we clear out the invalidation state for the canvas rendering context,
using a DidTransactionCallback registered on the layer(s) for the canvas, which calls MakeContextClean.

The DidTransactionCallbacks are directed to the user data attached to the Layer, which holds a strong reference to the canvas element. This
ensures that the element lives as long as the layer. Layers are destroyed when the presentation is torn down (including if the frame is destroyed),
so we can't have a leak here. The reference to the canvas element is only strong because the layer might briefly outlive the frame (the layer
won't be destroyed until the next paint of the window).

This patch moves responsibility for calling CanvasLayer::Updated and nsFrame::MarkLayersActive from the canvas context to nsHTMLCanvasElement::InvalidateFrame.
We call Updated on the retained CanvasLayer, if there is one; any other CanvasLayers created for this canvas would only be used once, and have Updated
called on them in BuildLayer when created.
2011-03-28 12:59:47 +13:00
Robert O'Callahan
6536947736 Bug 622072. Part 1: Remove rect parameter from Updated() and change implementations to defer updates to render time. r=bas
The rectangle parameter is currently not used --- all callers always pass the full canvas bounds. In the long term,
we probably won't want this parameter since all implementations should be doing accelerated drawing direct to buffers
with no intermediate copies, hence there will be no need to optimize the size of those copies. Plus, performance-sensitive
testcases tend to paint most or all of the canvas on every frame anyway.
2011-03-28 12:59:46 +13:00
Ms2ger
548bbd157d Bug 494744. Fix testcase to actually test what it means to test. r=roc 2011-03-28 12:49:11 -04:00
Ms2ger
ff9e7daf3f Bug 632474 - Throw a TYPE_MISMATCH_ERR on drawImage(null); r=sicking 2011-03-31 15:38:30 -04:00
Benjamin Smedberg
47387e2693 Bug 617539 - Merge nsIDOMWebGLRenderingContext_MOZILLA_2_0_BRANCH, r=jrmuizel 2011-03-25 11:03:35 -04:00
Mounir Lamouri
5c636d8313 Bug 610212 - canvas.width and canvas.height should be reflected as unsigned int. r=jst 2011-03-25 12:40:55 +01:00
Robert O'Callahan
6880cc64d6 Bug 639689. Part 5: Track whether the current path in the canvas context is empty. If it is, then optimize path save/restore to not make a copy of the current path. r=joe 2011-03-24 16:13:59 +13:00
Robert O'Callahan
6efae32538 Bug 639689. Part 4: Optimize Redraw by creating custom RedrawUser, which avoids having to do user->device rectangle transformation if we've already invalidated the full canvas. Also, if the last batch of canvas drawing operations contained many operations causing us to invalidate the full canvas, assume that the next batch will also contain many operations and invalidate the full canvas in the first operation of the batch, r=joe 2011-03-24 16:13:58 +13:00
Robert O'Callahan
3dd0479a61 Bug 639689. Part 3: Remove unnecessary full context save/restore, and redundant SetPattern call. r=joe 2011-03-24 16:13:58 +13:00
Robert O'Callahan
4bccc6ddf8 Bug 639689. Part 2: Some trivial cleanup and microoptimizations. r=joe 2011-03-24 16:13:58 +13:00
Robert O'Callahan
6826c493e7 Bug 639689. Part 1: Cache nsIImageLoadingContent pointer to avoid expensive do_QueryInterface in CanvasImageCache::Lookup hit path. r=joe 2011-03-24 16:13:58 +13:00
Robert O'Callahan
82c852c903 Bug 638241. Test that painting an <img>, changing its src attribute and then painting the <img> again paints the new image. 2011-03-24 16:13:58 +13:00
Robert O'Callahan
0788ccd0dd Bug 638241. Use a cache to avoid redoing SurfaceForElement and DoDrawImageSecurityCheck. r=bzbarsky 2011-03-24 16:13:56 +13:00
Robert O'Callahan
c83de15a66 Bug 638241. Part 1: remove useless QI. r=bzbarsky 2011-03-24 16:13:18 +13:00
L. David Baron
802da587ae Merge layout work from projects/birch, part 2. 2011-03-23 17:39:29 -07:00
Ehsan Akhgari
ca95c68a1e Merge mozilla-central into cedar 2011-03-23 18:29:19 -04:00
Craig Topper
72d7c1f754 Bug 576831 part 4. Remove nsICSSStyleRule and use mozilla::css::StyleRule instead. r=bzbarsky
--HG--
rename : layout/style/nsCSSStyleRule.cpp => layout/style/StyleRule.cpp
rename : layout/style/nsICSSStyleRule.h => layout/style/StyleRule.h
2011-03-10 21:48:57 -05:00
L. David Baron
4a7745e74d Remove tracking of which font families are quirky, since we no longer use the information. (Bug 636040) r=jdaggett 2011-03-03 13:18:42 -08:00