Commit Graph

747 Commits

Author SHA1 Message Date
Rafael Ávila de Espíndola
21a1eff2cb Bug 648871 - use NS_STDCALL_FUNCPROTO; r=bzbarsky 2011-04-14 13:51:19 -04:00
Zack Weinberg
f5a0843ac7 Bug 266236 part 9: Move nsBoundingMetrics to its own header and prune inclusions of nsRenderingContext.h.
--HG--
rename : gfx/src/nsThebesRenderingContext.cpp => gfx/src/nsRenderingContext.cpp
rename : gfx/src/nsThebesRenderingContext.h => gfx/src/nsRenderingContext.h
extra : rebase_source : 92660748436f03475e011184e2828f1db0ad63e0
2011-04-07 18:04:40 -07:00
Jan Küchler
5ef6bf26cf Bug 266236 part 3: Mechanical rename of nsIRenderingContext and nsThebesRenderingContext to nsRenderingContext. Mechanical substitution of nsRefPtr<nsRenderingContext> for nsCOMPtr<nsRenderingContext>.
--HG--
rename : gfx/src/nsThebesRenderingContext.cpp => gfx/src/nsRenderingContext.cpp
extra : rebase_source : 34884bfcafd885feaf73300bc7246cd192062a48
2011-04-07 18:04:40 -07:00
Ms2ger
6ee0b2b1da Bug 589894 - Fix a number of build warnings in content/; r=smaug 2011-04-14 14:04:12 +02:00
Simon Montagu
8ade1e195e Make all nsBidiPresUtils methods static. Bug 624798, r=roc 2011-04-13 12:23:49 +03:00
Ms2ger
c28b43a2a1 Bug 632511 - Handle non-finite values for scale per spec; r=peterv 2011-04-12 14:32:03 +02:00
Ms2ger
86c222a574 Bug 632481 - Handle non-finite values for arc per spec; r=peterv 2011-04-12 14:32:02 +02:00
Ms2ger
487af0c4c2 Bug 632476 - Handle non-finite values for fillRect, strokeRect per spec; r=peterv 2011-04-12 14:32:02 +02:00
Joe Drew
e0a8d65434 Bug 640887 - Ignore canvas-test on Windows XP, since it fails most of the time; r=bjacob 2011-04-11 09:12:17 -04:00
Marco Perez
e86148e927 Bug 647468 - make $(TAR) use stdin/stdout explicitly in content/canvas/test/webgl/Makefile.in; r=bjacob 2011-04-11 00:49:12 -04:00
Mats Palmgren
a704143976 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
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