Commit Graph

346 Commits

Author SHA1 Message Date
Matt Woodrow
c3bd0c4533 Bug 740072 - Make perspective-origin check the style parent instead of frame parent. r=roc 2012-04-27 12:24:53 +12:00
Chris Lord
ab68da5d27 Bug 745177 - Retain and re-use uploaded GL tiles. r=ajuma
Rather than discarding uploaded tiles once they fall outside of the valid
region, shuffle them off into a separate tile-store with all the metadata they
need to render them, and render them in the areas that our current valid
region doesn't cover in TiledThebesLayerOGL::RenderLayer.
2012-04-24 22:48:33 -04:00
Matt Brubeck
cd95a32e35 Back out 4114c654f5d0 (bug 745177) because of Mac build errors 2012-04-24 20:18:50 -07:00
Chris Lord
6ecd30a481 Bug 745177 - Retain and re-use uploaded GL tiles. r=ajuma
Rather than discarding uploaded tiles once they fall outside of the valid
region, shuffle them off into a separate tile-store with all the metadata they
need to render them, and render them in the areas that our current valid
region doesn't cover in TiledThebesLayerOGL::RenderLayer.
2012-04-24 22:48:33 -04:00
Jeff Muizelaar
4c6a9736de Bug 745864. Add SAMPLE_LABELs to layout code. r=roc, a=joe
--HG--
extra : rebase_source : d826780c34692d333442b6bf563791b53bf3aa3d
2012-04-16 14:37:59 -04:00
Jeff Muizelaar
75f19e9b5e Bug 744901 - Store the page size in FrameMetrics in CSS pixels in addition to device pixels. r=cjones
--HG--
extra : rebase_source : ac38e2ff9dda55bd5dc44d757b67cb1550da1eaa
2012-04-12 15:55:26 -04:00
Robert O'Callahan
d80b8c7095 Bug 745934. Update bounds of nsDisplayOpacity after we've mutated its list. r=mattwoodrow,a=blocking-fennec 2012-04-19 14:40:43 +12:00
Ehsan Akhgari
b7a2142579 Backout changeset 0b25ccd32a49 (bug 745934) for reftest failures; a=bustage 2012-04-18 23:52:59 -04:00
Ehsan Akhgari
7d3551ed83 Backout changeset 5f1b5ab7afb5 (bug 735898) for reftest failures 2012-04-18 23:52:23 -04:00
Robert O'Callahan
c50d1ac412 Bug 735898. Part 8: Speed up SortByZOrder. r=dbaron,a=blocking-fennec 2012-04-19 14:40:43 +12:00
Robert O'Callahan
54470c0981 Bug 745934. Update bounds of nsDisplayOpacity after we've mutated its list. r=mattwoodrow,a=blocking-fennec 2012-04-19 14:40:43 +12:00
Robert O'Callahan
e2b8881b6e Bug 735898. Part 7: Remove expensive nsIFrame::HasBorder checks, just check style instead. r=dbaron,a=blocking-fennec 2012-04-18 17:14:31 +12:00
Robert O'Callahan
709a687eeb Bug 735898. Part 6: Avoid nsIFrame::GetOffsetTo calls by caching a frame/offset pair in nsDisplayListBuilder, using the cache from nsDisplayListBuilder::ToReferenceFrame, and having BuildDisplayListForChild efficiently update the cached frame from parent to child when possible. Also, use display items' precalculated ToReferenceFrame() instead of calling nsDisplayListBuilder::ToReferenceFrame where possible. r=mattwoodrow,a=blocking-fennec 2012-04-18 17:14:14 +12:00
Robert O'Callahan
a2f616b216 Bug 735898. Part 5.9: Remove nsDisplaySVGEffects::mEffectsFrame since it's always the same as mFrame. r=mattwoodrow,a=blocking-fennec 2012-04-18 17:12:53 +12:00
Robert O'Callahan
a172ec5e66 Bug 728983. Part 1: Add nsDisplayItem::GetMergedFrames. r=mattwoodrow 2012-04-17 17:44:32 +12:00
Robert O'Callahan
bce7c6d862 Bug 735898. Part 1: Cache bounds (union of all child item bounds) in nsDisplayWrapList. r=mattwoodrow 2012-04-13 23:44:06 +12:00
Robert O'Callahan
d97a81aaec Bug 744607. Intersect a display item's layer-pixels draw-rect with the snapped clip rect. r=tnikkel 2012-04-13 23:44:05 +12:00
Mark Capella
1839be84c0 Bug 740688 - Use uintptr_t instead of PRUword, and intptr_t instead of PRWord. r=jwalden
--HG--
extra : rebase_source : 648a581323d2c2893df780f71fe34dadcc4bbaab
2012-04-11 17:17:44 -07:00
Robert O'Callahan
540be00480 Backing out changesets ef599d7f3f11, 70ef464f50e3 and 1a204c38918e (bug 735898) due to test failures. 2012-04-12 00:34:23 +12:00
Robert O'Callahan
b235b954de Bug 735898. Part 1: Cache bounds (union of all child item bounds) in nsDisplayWrapList. r=mattwoodrow 2012-04-11 16:48:47 +12:00
Robert O'Callahan
833e8a244f Bug 733607. Restructure logic to compute snapped bounds of display items in layer coordinates. Moves responsibility for computing snapped bounds from within the display items to callers of GetBounds/GetOpaqueRegion. r=tnikkel
Previously we snapped the results of nsDisplayItem::GetBounds and
nsDisplayItem::GetOpaqueRegion internally. By tracking which display items were
inside transforms, we disabled snapping quite conservatively whenever an ancestor
had a transform, which is undesirable.

With this patch, we don't snap inside GetBounds or GetOpaqueRegion, but just return
a boolean flag indicating whether the item will draw with snapping or not. This flag
is conservative so that "true" means we will snap (if the graphics context has a transform
that allows snapping), but "false" means we might or might not snap (so it's always safe
to return false).

FrameLayerBuilder takes over responsibility for snapping item bounds. When it converts
display item bounds to layer pixel coordinates, it checks the snap flag returned from
the display item and checks whether the transform when we draw into the layer will be
a known scale (the ContainerParameters scale factors) plus integer translation. If both
are true, we snap the item bounds when converting to layer pixel coordinates. With
this approach, we can snap item bounds even when the items have ancestors with active
transforms.
2012-04-10 23:24:18 +12:00
Matt Woodrow
28e71e1f9a Bug 731777 - Correctly recompute overflow areas for frames with transform perspective applied. r=roc 2012-03-12 15:04:25 +13:00
Matt Woodrow
3cb6f0db4e Bug 730166 - Mark frames with a hidden backface as transformed. r=roc 2012-03-12 15:03:29 +13:00
Mats Palmgren
79c30ea840 Bug 717521 - Limit pre-rendering to max 4096 x 4096 pixels (post-transform) to avoid hang. r=tnikkel 2012-03-01 13:34:20 +01:00
Chris Lord
087669fc88 Bug 729534 - Semi-fix scroll layer retention. r=mats
When flattening the display list, the last child frame in a scroll layer is
used to retain the associated ThebesLayer. Instead, use the first child, which
tends to be more stable. This fixes retaining layers when scrolling through
engadget.com.

Fix by Robert O'Callahan <robert@ocallahan.org>
2012-02-29 16:45:50 +00:00
Jonathan Watt
ed4909c4c4 Bug 727805 - Give aFactor in nsDisplayList.cpp a more meaningful name. r=mattwoodrow. 2012-02-17 06:08:33 +00:00
Matt Woodrow
8281079024 Bug 721082 - Make perspective-origin relative to the parent elements border box. r=roc 2012-02-15 22:28:22 +13:00
Chris Jones
c843622aa6 Bug 724189: Add a little fuzz factor to the max pre-render size for transformed frames, in case the frame has borders or shadows. r=roc 2012-02-05 08:34:10 -08:00
Chris Jones
a6b0e63fb3 Bug 725580: Fluff out the bounds of pre-rendered nsDisplayTransforms to their visual overflow rect in order to avoid killing their dedicated layer mid-activity, when part of the frame isn't painted. r=roc 2012-02-09 01:39:30 -08:00
Matt Woodrow
21044bde5e Bug 722603 - Part 2: Use cached transform as much as possible (r=roc). 2012-02-14 01:12:49 -08:00
Matt Woodrow
85108f477a Bug 722603 - Part 1: Use cached transform in nsDisplayTransform::GetBounds() (r=roc) 2012-02-14 01:11:31 -08:00
Matt Woodrow
3f94d9daf7 Bug 704469 - Use style context parent instead of frame parent when looking up perspective for 3d transforms. r=roc 2012-01-04 13:38:57 +13:00
Robert O'Callahan
755acd5237 Bug 591718. Part 1: rename some poorly-named methods, rework global-transform methods to avoid computing bounding-boxes more than once when there are are multiple transformed ancestors, make sure nsIFrame::GetTransformMatrix can stop at any desired ancestor. r=mats 2011-12-28 16:24:18 +13:00
Tatiana Meshkova
25b9b50fbd Bug 701190 - position:fixed items disappear due to wrong translation. r=roc 2011-11-09 14:47:23 -08:00
William Chen
95cab2faf0 Bug 497995: Part 1 - Implement border-image revisions in latest css3-background spec. r=dbaron
--HG--
extra : rebase_source : 5a6cdac6a4b1353170f23f39dd2a209374e72531
2011-12-22 18:34:45 -05:00
Robert O'Callahan
ad97077239 Bug 702739. When a element has an active transform and the element's content (before being transformed) is no larger than the window, prerender its entire contents into layers when any of it is visible, so we don't have to rerender it and/or resize its layers as it moves into or out of view. r=mats 2011-12-19 10:57:35 +13:00
Matt Brubeck
5d8466250b Back out bug 710521, bug 672013, bug 702739 because of Mac reftest failures 2011-12-18 08:15:09 -08:00
Robert O'Callahan
cfb3b20ff2 Bug 702739. When a element has an active transform and the element's content (before being transformed) is no larger than the window, prerender its entire contents into layers when any of it is visible, so we don't have to rerender it and/or resize its layers as it moves into or out of view. r=mats 2011-12-18 21:46:44 +13:00
Matt Woodrow
a9f03a567f Bug 701656 - Include the preserve-3d parent content in preserve-3d sorting. r=roc 2011-11-17 16:45:44 +13:00
Matt Woodrow
5e4f447cc2 Bug 700240 - Print nsSVGEffects types. r=roc 2011-11-17 16:44:16 +13:00
Matt Woodrow
42dcd2e02c Bug 695832 - Perpsective origin offset should be relative to the transform origin. r=roc 2011-10-31 13:38:46 +13:00
Robert O'Callahan
f772cbd274 Bug 678859. Don't create layers for content less than 16x16 pixels. r=tn 2011-10-27 09:10:48 +13:00
Phil Ringnalda
60af64d0c8 Back out cc6b39f2b512 and f2b1103e5177 (bug 695832) for reftest failures 2011-10-25 23:18:47 -07:00
Matt Woodrow
c65a7204c6 Bug 695832 - Perpsective origin offset should be relative to the transform origin. r=roc 2011-10-26 16:20:08 +13:00
Oleg Romashin
7d10ff4495 Bug 693938 - Force mark PuppetWidget root scroll layer as opaque. r=roc 2011-10-23 10:57:47 +02:00
Robert O'Callahan
a77425a482 Bug 681867. Part 2: remove nsDisplayForcePaintOnScroll. r=mats 2011-10-21 14:41:36 +13:00
Ehsan Akhgari
2a602a5685 Bug 690892 - Replace PR_TRUE/PR_FALSE with true/false on mozilla-central; rs=dbaron
Landing on a CLOSED TREE
2011-10-17 10:59:28 -04:00
Matt Woodrow
911c9a449a Bug 693520 - Fix backface visibility calculations, and share can-hit checks. r=derf 2011-10-12 16:16:06 +13:00
Matt Woodrow
3345b1be69 Bug 693519 - Don't call GetHitDepthAtPoint if we didn't hit anything. r=roc 2011-10-12 16:16:05 +13:00
Matt Woodrow
165e24528f Bug 684759 - Part 3b - Add event handling for sorted preserve-3d layers. r=roc 2011-10-07 10:24:02 +13:00
Matt Woodrow
5725b611f5 Bug 684759 - Part 3a - Sort preserve-3d layers using their z depth at points where they intersect in 2d space. r=roc 2011-10-07 10:23:18 +13:00
Matt Woodrow
da4a9cda9a Bug 691106 - Merge sequential nsDisplayTransforms and give them unique frame keys. r=roc 2011-10-03 17:02:25 +13:00
Michael Wu
d8e503c38b Bug 675553 - Switch from PRBool to bool on a CLOSED TREE , r=bsmedberg,khuey,bz,cjones
--HG--
rename : tools/trace-malloc/bloatblame.c => tools/trace-malloc/bloatblame.cpp
2011-09-28 23:19:26 -07:00
Justin Lebar
ba7be2f99c Bug 688624 - Use nsAutoTArray in nsDisplayList::HitTest. r=roc 2011-09-22 23:50:57 -04:00
Jonathan Watt
c6f1afaf71 Bug 664130 - Clarify some display list comments and code. r=roc. 2011-09-08 12:15:00 +01:00
Felix Fung
9bb0edf799 Bug 577266 - Correct misspellings in source code 2011-09-06 17:20:35 -07:00
Matt Woodrow
a5e0a1b39b Bug 682922 - Disable preserve-3d on scroll frames. r=roc 2011-09-05 10:25:35 +12:00
Matt Woodrow
f9d4b0bc4e Bug 505115 - Part 15 - Add 4D Vectors, Quaternions and gfx3DMatrix functions. r=derf 2011-08-27 12:06:03 +12:00
Matt Woodrow
ec5a391004 Bug 505115 - Part 14b - Layout support for -moz-transform-style. r=roc 2011-08-27 12:01:46 +12:00
Mats Palmgren
6894179e71 Bug 653649 - New way of getting child lists from frames. (part 4/5) r=roc
Remove the nsIAtom* child list names and use child list ID enum instead.
2011-08-24 22:54:30 +02:00
Matt Woodrow
6ed2caca3d Bug 677878 - Round untransformed rects outwards. r=roc 2011-08-16 15:44:22 +12:00
Markus Stange
dd80086631 Bug 676387 - XUL elements with -moz-appearance should ignore clicks in their overflow. r=roc 2011-08-08 20:31:52 +02:00
Matt Woodrow
05f861d628 Bug 505115 - Part 12b - Layout changes to use -moz-perspective-origin. r=roc 2011-08-03 15:04:24 +12:00
Matt Woodrow
62d1425e0b Bug 505115 - Part 11b - Layout changes to use a z component for -moz-transform-origin. r=roc 2011-08-03 15:04:23 +12:00
Matt Woodrow
fe4345bd93 Bug 505115 - Part 10 - Implement the backface-visibility CSS property. r=dbaron 2011-08-03 15:04:22 +12:00
Matt Woodrow
7b27325b26 Bug 505115 - Part 9 - Implement the perspective() transform function and the perspective CSS property. r=dbaron 2011-08-03 15:04:22 +12:00
Matt Woodrow
fd49690163 Bug 505115 - Part 8c - Use ray tracing to untransform 2d points on a 3d plane. r=roc 2011-08-03 15:04:21 +12:00
Matt Woodrow
cd05bbfd33 Bug 505115 - Part 7 - Layers support for 3d transforms. r=roc 2011-08-03 15:04:20 +12:00
Matt Woodrow
6366c7e2e7 Bug 505115 - Part 5 - Use gfx3DMatrix in layout. r=roc 2011-07-23 10:28:51 +12:00
Matt Woodrow
f00688318f Bug 505115 - Part 3 - Convert nsStyleTransformMatrix to be backed by a 4x4 matrix. r=dbaron 2011-07-23 10:28:07 +12:00
Craig Topper
cfe91e4f31 Bug 654369 - Part 11: Remove OOM checks from layout/base r=bz
--HG--
extra : rebase_source : a725d78f3e128d6d4ca1eb48eec1cfc78f7762bf
2011-04-28 22:02:40 -07:00
Mats Palmgren
b19080bd1f Bug 312156 - Implement CSS3 text-overflow. r=roc 2011-06-22 20:11:48 +02:00
Robert O'Callahan
ae6647d4d2 Bug 637852. Part 26: Ensure that FrameMetrics coordinates are correctly stored as layer coordinates. r=tnikkel 2011-06-23 00:11:28 +12:00
Robert O'Callahan
59cfc47b23 Bug 637852. Part 17: Tighten up AreLayersMarkedActive so we track exactly what properties are changing. Also, clamp resolution to power-of-2 only if the frame's transform has a scale. r=tnikkel
This lets us avoid clamping the scale in more situations. We should only clamp the scale when we think
the scale is changing due to a changing transform --- the goal of clamping is to not have to redraw the content
too often when the content is zooming in or out.
2011-06-23 00:11:28 +12:00
Robert O'Callahan
fcf2510a5d Bug 637852. Part 6: Implement resolution scaling in FrameLayerBuilder. r=tnikkel
FrameLayerBuilder::BuildContainerLayerFor takes responsibility for resolution scaling. The ContainerParameters
passed in are added to any transform requested. Then we extract the scale part of the transform, round the scale
up to the nearest power of two if the transform may be actively animated (so we don't have to redraw layer contents
constantly), pass that scale down to be applied by each child and set the residual transform on the ContainerLayer.

For child layers built via BuildLayer, we just pass the requested scale factor in via the ContainerParameters.
If the returned layer is a ContainerLayer then BuildLayer is guaranteed to have already done necessary scaling.
If the returned layer is not a ContainerLayer then we apply the scale ourselves by adding the scale to the
child layer's transform.

For child ThebesLayers containing non-layer display items, we scale the drawing of those display items so that
the child ThebesLayers are simply larger or smaller (larger or smaller visible regions).

We have to scale all visible rects, clip rects etc that are in the coordinates of ThebesLayers or the parent
ContainerLayer. To keep things simple we do this whenever we convert from appunits to integer layer coordinates.

When a ThebesLayer's resolution changes we need to rerender the whole thing.

nsDisplayList::PaintForFrame needs to respect the presshell's resolution setting. We do that by building a layer tree
with a ContainerParameters requesting a scale up by the presshell resolution; once that layer tree is built, we
adjust the root layer transform to scale back down by the resolution.
2011-06-23 00:11:27 +12:00
Robert O'Callahan
93793566d0 Bug 637852: Part 5: Create ContainerParameters structure to carry resolution scale factors through layer creation. r=tnikkel
This patch shouldn't change any behavior. It just passes the ContainerParameters around, which will contain scale factors that should have been
applied when BuildLayer returns a ContainerLayer.

This patch also adds an aTransform parameter to BuildContainerLayerFor, which nsDisplayTransform uses to set the
transform for the ContainerLayer. This way BuildContainerLayerFor knows what the container's transform is going to be
before constructing the children, which in the next patch will let us construct the children with the right resolution.
2011-06-23 00:11:27 +12:00
Robert O'Callahan
177089e111 Bug 646757. Don't snap display item bounds during hit-testing. r=tnikkel 2011-05-31 09:44:10 +12:00
Ed Morley
9e71e5b9ac Bug 614515 - Remove MOZ_SVG conditions. r=roc 2011-05-30 09:34:50 +02:00
Robert O'Callahan
e9b914654e Bug 656749. Only optimize away zero-opacity elements when we're painting, not for any other kind of display list construction such as plugin geometry. r=tnikkel 2011-05-23 12:28:47 +12:00
Tatiana Meshkova
7542ad5654 Bug 656167 - Temporarily disable or back out fixed layers. Visibility part. r=roc 2011-05-13 16:21:59 +03:00
Jim Mathies
9b7daaeb53 Bug 633282 - manual backout of 'fixup UpdatePossiblyTransparentRegion v.3' in bug 622328 due to merge conflicts. r=tn 2011-05-13 11:40:46 -05:00
Mounir Lamouri
a497a31e83 Merging cedar with mozilla-central. 2011-05-13 10:59:05 +02:00
Robert O'Callahan
d70f70f234 Bug 654641. Make nsDisplaySolidColor::GetBounds reflect any snapping that's going on. r=tnikkel 2011-05-13 02:59:09 +12:00
Tatiana Meshkova
52765d2b7e Bug 653133 - Fennec crashes when loading a page with huge background-attachment:fixed background r=roc 2011-05-09 11:40:09 +03:00
Benjamin Stover
5eedd38c01 Bug 640048 Fix edge case for z-ordering for async scrollable elements r=roc 2011-05-01 18:53:01 -07:00
Mark Finkle
03e5a556ee Backed out changeset c7f62d818af2. Causes content crashes Bug 653889 2011-04-30 00:01:29 -04:00
Benjamin Stover
95028ef26c Bug 640048 Fix edge case for z-ordering for async scrollable elements r=roc 2011-04-29 10:15:44 -07:00
Robert O'Callahan
72627bced2 Bug 641426. Part 6: Rename Empty to SetEmpty. r=cjones 2011-04-19 15:07:23 +12:00
Robert O'Callahan
c957ae039e Bug 641426. Part 5: Avoid operator== where possible to distinguish between 'equal edges' and 'equal areas' for rectangles. r=dbaron,sr=cjones 2011-04-19 15:07:23 +12: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
Zack Weinberg
c3400ef3c4 Bug 266236 part 7: Simplify calling convention of SetClipRect and SetClipRegion.
--HG--
rename : gfx/src/nsThebesRenderingContext.cpp => gfx/src/nsRenderingContext.cpp
rename : gfx/src/nsThebesRenderingContext.h => gfx/src/nsRenderingContext.h
extra : rebase_source : b1c68e23a4fa67cdc09b151ad39d7560cdd8baf7
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
Benjamin Stover
3dc5b1f7a2 Bug 642246 Don't build ThebesLayers for elements with no displayports r=roc 2011-04-11 13:53:01 -07:00
L. David Baron
ad4318958b Back out 1edfae12015b (Bug 642246) due to mobile unittest orange. 2011-04-09 18:21:27 -07:00
Benjamin Stover
3270dd31cd Bug 642246 Don't build ThebesLayers for elements with no displayports r=roc 2011-04-09 12:38:28 -07:00
Tatiana Meshkova
29ab414108 Bug 607417 - Part 3: Visibility tricks for fixed items r=roc
--HG--
extra : rebase_source : 7545070d6af5ef10dd4d1504f0d456ece4fd8edb
2011-04-08 09:35:16 -07:00
Oleg Romashin
631800dfd2 Bug 607417 - Part1: position:fixed frames mark layers r=roc
--HG--
extra : rebase_source : dbbff8810bafd165a48c34924d98f5c87702ef3f
2011-04-05 23:00:25 -06: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
Benjamin Stover
6fc39e3260 Bug 618975 Follow-up: Fix for non-IPC builds and remove warning r=blassey a=fix-comm-builds 2011-03-15 18:58:28 -07:00
Benjamin Stover
a646bb5913 Bug 618975 Followup: bitrot and remove mDisplayport from nsDisplayScrollLayer r=cjones r=tn a=blocking-fennec 2011-03-09 13:35:27 -08:00