Commit Graph

45 Commits

Author SHA1 Message Date
Robert O'Callahan
73b97e72c4 Bug 641426. Part 2: Remove a bunch of direct gfxRect::pos/size usage. r=joe 2011-04-19 15:07:21 +12: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
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
Ehsan Akhgari
931bd6ee19 Back out bug 622072 because it caused bug 645987 2011-03-29 14:31:53 -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
20b9397753 Bug 630835. Make BuildLayer responsible for setting a visible region on the layer, and let FrameLayerBuilder only reduce it. r=tnikkel,a=blocking
This avoids problems with FrameLayerBuilder making the visible region bigger than we expected, invalidating CONTENT_OPAQUE flags set on the layer.
In particular, we had been using TransformBounds to compute the new visible region, and for non-axis-aligned transforms this gives us a visible
region which contains areas not actually painted by the layer contents.
2011-02-23 18:38:09 +13:00
Alon Zakai
eb6d3ef5f2 Bug 610727 - Mark canvas layers inactive when relevant. r=roc a=blocking-fennec 2011-02-04 10:11:24 -08:00
Robert O'Callahan
e946441ff1 Bug 602757. Part 3: Change IsOpaque to GetOpaqueRegion so we can get useful opaque regions for content that uses border-radius. r=tnikkel,sr=dbaron,a=blocking 2011-01-03 14:48:09 +13:00
Felipe Gomes
c1ad5cb316 Bug 601603. Part 5 - Ensure that the layer that holds the window background is never opaque for glass windows. r=roc a=beta8 2010-10-19 15:02:25 -02:00
L. David Baron
40d60928c6 Fix miscellaneous reflow methods to use new overflow area APIs. (Bug 542595, patch 19) r=roc a2.0=blocking2.0:beta8 2010-10-06 21:25:46 -07:00
L. David Baron
d99ac32acf Clip replaced elements (for now, images, canvases, videos, and windowless plugins) to the border radius. (Bug 485501) r=roc a2.0=blocking:beta6 2010-09-09 08:21:47 -07:00
L. David Baron
27b2504e3c Make nsIFrame::DisplaySelectionOverlay take an nsDisplayList* instead of nsDisplayListSet&. (Bug 485501) r=roc a2.0=blocking:beta6 2010-09-09 08:21:46 -07:00
Robert O'Callahan
812e6204ae Bug 584282. Use nsDisplayItem::ToReferenceFrame() instead of calling nsDisplayListBuilder::ToReferenceFrame, wherever possible. r=tnikkel,a=dbaron
--HG--
extra : rebase_source : 730ba8640cb37bd8484ff069b5d6fd46d9bc3e84
2010-08-13 22:01:58 +12:00
Robert O'Callahan
a581cd6197 Bug 584282. Add nsDisplayItem::mToReferenceFrame and initialize it in the constructor. r=tnikkel,a=dbaron
--HG--
extra : rebase_source : 496cbde7c495eb8872c3d0ffc0ca4c57c2a6a777
2010-08-13 22:01:13 +12:00
Chris Jones
3b7ff8f6bc Bug 570620, part a: Fix an assertion that will soon no longer hold and remove obsoleted already_AddRefed idiom in two places. r=roc 2010-08-05 17:11:23 -05:00
Robert O'Callahan
d09c39d0a9 Bug 564991. Part 23: Introduce the concept of 'inactive' layers. r=mats,sr=dbaron 2010-07-16 09:08:05 +12:00
Michael Ventnor
8139bee929 Bug 564991. Part 3: Create unique nsDisplayItem types for every single display item. r=tnikkel 2010-07-16 09:07:49 +12:00
Robert O'Callahan
a7c0fe60ac Bug 564991. Part 2: Create retained layer API: methods on FrameLayerBuilder that frames can use to access, reuse and invalidate retained layers. r=mats,sr=vlad 2010-07-16 09:07:46 +12:00
Robert O'Callahan
7bb17dc925 Bug 572623. Rename nsDisplayItemCanvas to nsDisplayCanvas. r=vlad 2010-07-16 09:07:44 +12:00
Alexander Surkov
1b2bbba526 Bug 573706 - make frame based accessible creation more pellucid, r=davidb, sr=roc 2010-06-28 21:02:03 +09:00
L. David Baron
b0cc96df08 Fix spew of 'couldn't get canvas size' assertions. (Bug 566603) r=vlad 2010-05-18 10:12:33 -07:00
Vladimir Vukicevic
e80faabc40 b=561168; convert canvas to use layers for rendering - followup #2; r=roc 2010-05-17 21:04:22 -07:00
Vladimir Vukicevic
b99bb96c47 b=561168; convert canvas to use layers for rendering; r=roc,bas 2010-05-17 21:04:22 -07:00
Timothy Nikkel
0df2b80d29 Bug 520427. Improvements to debug output List for frames. r=dbaron
--HG--
extra : rebase_source : f7723925a24937bb1989344805e9fda01ae0eded
2009-10-15 21:47:03 -05:00
Robert O'Callahan
d56dfa741e Bug 513082. Instead of passing aDirtyRect to nsDisplayItem::Paint, have nsDisplayList::OptimizeVisibility (renamed to ComputeVisibility) compute the intersection of the visible region with the bounds of each display item and store the result in the item's mVisibleRect. This lets us do less work to paint display items which have a small intersection with the visible region but a large intersection with the bounding-box of the visible region. r=dbaron
--HG--
extra : rebase_source : 76db4b87ef9e5a6e9de7677edc08c26e2cbc462e
2009-09-07 12:35:14 +12:00
Mats Palmgren
948203eb7d Replace PR_MIN/PR_MAX with NS_MIN/NS_MAX. b=512106 r=roc 2009-09-16 17:01:36 +02:00
Zack Weinberg
17eb5a6efc Bug 497495 part 3: Add methods to every nsFrame subclass that expose the as-allocated identity of every frame object. Also some cleanups to the QueryFrame implementation. r=dbaron sr=roc 2009-09-12 17:49:24 +01:00
Robert O'Callahan
85e1db093e Bug 503813. Events targeted at generated content frames should get the non-generated ancestor as target element. r=dbaron
--HG--
extra : rebase_source : ee218effc8b98ba19b9b2ce9ff29ce4e8dfe0a2e
2009-09-02 14:46:33 +12:00
Robert O'Callahan
d523d1c325 Bug 339548. Part 6: Uninline IsMovingFrame so nsDisplayList.h doesn't have to include nsLayoutUtils.h. r=dbaron 2009-07-22 12:44:57 +12:00
Robert Longson
1973deec58 Bug 486936 - image-rendering style should apply to canvas element. r=vladimir 2009-06-17 21:31:18 +01:00
Vladimir Vukicevic
75d85ea612 b=488692; full page zoom broken with canvas; r=roc 2009-05-06 13:02:59 -07:00
Vladimir Vukicevic
008463d971 b=483412; don't overaggressively invalidate on canvas drawWindow; r=roc 2009-04-08 13:27:20 -07:00
Stuart Parmenter
75e52ee8cb bug 480233. Make the display list item that canvas uses for painting know about the opacity of the canvas. r/sr=roc 2009-03-05 05:43:45 -08:00
Jeremy Lea
1800930122 Bug 448830. Make nsIntRect/nsIntMargin/nsIntSize/nsIntPoint different types from nsRect/nsMargin/nsSize/nsPoint different types for better compile-type unit checking. r+sr=roc
--HG--
extra : rebase_source : a331a9e49fbc5931f546919281fcca7f008ab615
2009-01-15 16:27:09 +13:00
Robert O'Callahan
f79290bb0e Bug 450930. Fire a DOM event when painting so that content and chrome can track what's being repainted. r=smaug,sr=dbaron 2008-09-18 21:47:21 +12:00
vladimir@pobox.com
1f7f3e59ed b=406458; code cleanup: add new ThebesContext() call as opposed to NATIVE_THEBES_CONTEXT hackery, r=stuart 2007-12-18 15:01:15 -08:00
jwatt@jwatt.org
4d976af81a Fixing bug 294086. <svg> should be a replaced element. r+sr=dbaron@mozilla.com blocking1.9=tor@acm.org 2007-11-18 04:09:03 -08:00
vladimir@pobox.com
4dd2e87496 b=396972, clean up canvas API to avoid using internal API in contexts, r/a=stuart 2007-09-25 13:46:08 -07:00
bzbarsky@mit.edu
21e0d65a42 Introduce a setter for nsHTMLReflowState::mComputedHeight so that we're sure to
update the resize flags properly.  Bug 388084, r+sr+a=dbaron
2007-08-02 11:08:05 -07:00
vladimir@pobox.com
d297746481 b=386799, crash with zero-width canvas, r=stuart,sr=roc 2007-07-18 07:40:19 -07:00
jwalden@mit.edu
e3c4baccae Bug 348748 - Replace all instances of NS_STATIC_CAST and friends with C++ casts (and simultaneously bitrot nearly every patch in existence). r=bsmedberg on the script that did this. Tune in next time for Macro Wars: Episode II: Attack on the LL_* Macros. 2007-07-08 00:08:04 -07:00
dbaron@dbaron.org
9e2fef4c30 Implement correct intrinsic width calculation (for container) for elements with specified height properties and an intrinsic ratio. b=364066 r+sr=bzbarsky 2007-06-12 11:27:09 -07:00
dbaron@dbaron.org
7dc7c89d6c Add support for -moz-intrinsic, -moz-min-intrinsic, -moz-shrink-wrap, and -moz-fill for width, min-width, and max-width. b=311415 r+sr=bzbarsky 2007-05-03 16:11:00 -07:00
bzbarsky@mit.edu
2fd17c94d8 Rename nsIFrame::GetPresContext to nsIFrame::PresContext. Bug 376042, patch byTaras Glek <tglek@mozilla.com>, rs=roc. 2007-03-30 14:11:41 -07:00
hg@mozilla.com
465265d0d4 Free the (distributed) Lizard! Automatic merge from CVS: Module mozilla: tag HG_REPO_INITIAL_IMPORT at 22 Mar 2007 10:30 PDT, 2007-03-22 10:30:00 -07:00