Commit Graph

943 Commits

Author SHA1 Message Date
Robert O'Callahan
fdc41c7a5a Bug 641426. Part 3: Convert gfxRect::pos/size to x/y/width/height. r=joe,sr=cjones 2011-04-19 15:07:21 +12:00
Robert O'Callahan
ffd5268cd1 Bug 641426. Part 2: Remove a bunch of direct gfxRect::pos/size usage. r=joe 2011-04-19 15:07:21 +12:00
Robert O'Callahan
e43243e84a Bug 641426. Part 1: Create Point and Size templates. r=joe,sr=cjones 2011-04-19 15:07:21 +12:00
Rafael Ávila de Espíndola
9084802659 Bug 648871 - use NS_STDCALL_FUNCPROTO; r=bzbarsky 2011-04-14 13:51:19 -04:00
Zack Weinberg
3e3bff664d Bug 266236 part 9: Move nsBoundingMetrics to its own header and prune inclusions of nsRenderingContext.h. 2011-04-07 18:04:40 -07:00
Jan Küchler
8774547613 Bug 266236 part 3: Mechanical rename of nsIRenderingContext and nsThebesRenderingContext to nsRenderingContext. Mechanical substitution of nsRefPtr<nsRenderingContext> for nsCOMPtr<nsRenderingContext>. 2011-04-07 18:04:40 -07:00
Ms2ger
2dbeb5a474 Bug 589894 - Fix a number of build warnings in content/; r=smaug 2011-04-14 14:04:12 +02:00
Simon Montagu
d03542b94f Make all nsBidiPresUtils methods static. Bug 624798, r=roc 2011-04-13 12:23:49 +03:00
Ms2ger
7ff95e7586 Bug 632511 - Handle non-finite values for scale per spec; r=peterv 2011-04-12 14:32:03 +02:00
Ms2ger
7cbdb1d69d Bug 632481 - Handle non-finite values for arc per spec; r=peterv 2011-04-12 14:32:02 +02:00
Ms2ger
a22b52bcf6 Bug 632476 - Handle non-finite values for fillRect, strokeRect per spec; r=peterv 2011-04-12 14:32:02 +02:00
Mats Palmgren
63b11c48c3 Bug 647480 - Don't try to create a textrun using a null font. Setup a default font also when there is no pres shell. r=jfkthame 2011-04-10 22:01:01 +02:00
Ehsan Akhgari
c217e1552d Merge cedar into mozilla-central 2011-04-08 22:28:05 -07:00
Ms2ger
c9af19f2a0 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
fcb6bda0f8 Bug 392751 - Allow out of bounds rects in getImageData; r=bz 2011-04-07 21:45:18 -07:00
Matt Woodrow
13b0c4590f Bug 591358 - Report canvas element allocation sizes to the GC. r=gal 2011-04-07 16:58:08 -07:00
Matheus Kerschbaum
9014e25ac7 Bug 639754 - Remove MOZ_IPC checks since IPC is always built now; r=bsmedberg 2011-04-02 19:14:00 -07:00
Ms2ger
b61a54bec6 Bug 629894 - createImageData and getImageData should work for sizes smaller than one pixel; r=bz 2011-04-02 20:42:07 +02:00
Yury
64f4b8b9f9 Bug 630040 - Implement createImageData(ImageData); r=bz 2011-04-02 20:45:26 +02:00
Ms2ger
1dbcb7849f 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
a14e902d24 Bug 630052, part b: Reduce code duplication between CreateImageData and GetImageData; r=bz 2011-04-02 14:18:49 -04:00
Ms2ger
2e32fb2060 Bug 630052, part a: Add NS_finite API to nsMathUtils; r=bz 2011-04-02 14:18:40 -04:00
Ms2ger
4b58fe5c44 Bug 632516 - Handle non-finite values for translate per spec; r=roc 2011-04-01 15:31:35 -04:00
Ms2ger
a10869f560 Bug 632515 - Handle non-finite values for transform per spec; r=roc 2011-04-01 15:31:35 -04:00
Ms2ger
cc7e3070ad Bug 632503 - Handle non-finite values for rect per spec; r=roc 2011-04-01 15:31:35 -04:00
Ms2ger
fc72ec5edd Bug 632502 - Handle non-finite values for quadraticCurveTo per spec; r=roc 2011-04-01 15:31:35 -04:00
Ms2ger
bbbb96686d Bug 632495 - Handle non-finite values for moveTo per spec; r=roc 2011-03-29 14:12:00 -04:00
Ms2ger
bfd5b90e38 Bug 632493 - Handle non-finite values for lineTo per spec; r=roc 2011-03-29 14:05:00 -04:00
Ms2ger
9131b09a59 Bug 630271 - Throw a TYPE_MISMATCH_ERR on createPattern(null); r=smaug 2011-04-01 15:31:34 -04:00
Ms2ger
be28318564 Bug 630034 - Throw when attempting to create a radial gradient with negative radii; r=jmuizelaar 2011-03-31 11:47:00 -04:00
Ms2ger
8276fdc0be Bug 632474 - Throw a TYPE_MISMATCH_ERR on drawImage(null); r=sicking 2011-03-31 15:38:30 -04:00
Ehsan Akhgari
a37a42a15a 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
55db7cfddc Merge cedar into mozilla-central 2011-04-01 11:37:50 -04:00
Robert O'Callahan
8ea3739c3b 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
ef9053b5ee 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
46e8001b77 Merge mozilla-central into cedar 2011-03-30 13:55:31 -04:00
Ehsan Akhgari
fc16ed833a Merge cedar into mozilla-central 2011-03-30 13:53:35 -04:00
Ms2ger
0801e6b3bd Bug 632508 - Handle non-finite values for rotate per spec; r=roc 2011-03-30 13:40:48 -04:00
Ms2ger
684a331355 Bug 632505 - Handle non-finite values for shadow{OffsetX|OffsetY|Blur} per spec; r=smaug 2011-03-30 13:40:48 -04:00
Ms2ger
89c164fbe9 Bug 632464 - Handle non-finite values for globalAlpha per spec; r=smaug 2011-03-30 13:40:47 -04:00
Yury
a03e806dba Bug 629875 - Handle negative arguments to drawImage; r=jmuizelaar 2011-03-30 14:55:13 +02:00
Ms2ger
935b9b1a06 Bug 632469 - Handle non-finite values for clearRect per spec; r=smaug 2011-03-29 22:24:53 -04:00
Robert O'Callahan
9e0875a296 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
b5a39262e1 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
8dc249999d Bug 632474 - Throw a TYPE_MISMATCH_ERR on drawImage(null); r=sicking 2011-03-31 15:38:30 -04:00
Benjamin Smedberg
2ecdcc2c6e Bug 617539 - Merge nsIDOMWebGLRenderingContext_MOZILLA_2_0_BRANCH, r=jrmuizel 2011-03-25 11:03:35 -04:00
Robert O'Callahan
c992d1b747 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
bbe3531c48 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
ed5d6fa847 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
a347c5a998 Bug 639689. Part 2: Some trivial cleanup and microoptimizations. r=joe 2011-03-24 16:13:58 +13:00