Граф коммитов

875 Коммитов

Автор SHA1 Сообщение Дата
Sunny Sidhu cfa8942015 Bug 1220873 - Make Layer::mVisibleRegion a LayerIntRegion. r=botond
--HG--
extra : source : dc46048f7a9e9cc008c97e2d9e0a100944743055
extra : amend_source : 63783bc076e5969ebacdc8c74f9b5194a1891d9e
2015-11-29 02:07:55 -05:00
Matt Woodrow 4946a3c907 Bug 1168263 - Add nsDisplayPerspective and build separate layers for perspective. r=roc 2015-11-26 22:32:36 +13:00
Ting-Yu Lin 79afc81f6e Bug 1226875 - Remove nsIFrame::GetFirstChild(). r=mats
--HG--
extra : commitid : J8NTL74JosY
extra : rebase_source : 50a196905ac06d09fea17bb1aa17efe821cc7cbb
2015-11-26 17:12:39 +08:00
Timothy Nikkel 15ecc61b70 Bug 1222880. Followup to the followup to handle the case when aStopAtAnimatedGeometryRoot isn't an ancestor of aAnimatedGeometryRoot the same way we did before the patches of this bug. r=mattwoordrow (more or less)
Which is to return an empty scroll clip (instead of whatever scroll clip was accumulated in the for loop).

This patch is actually even slightly better than what we did before in that we can stop when we hit the root AGR (which is also the root reference frame) instead of the root of the frame tree. These would be different when painting a popup frame, or when not painting to the window.
2015-11-24 22:21:10 -06:00
Matt Woodrow e486b02c34 Bug 1222880 - Followup to handle the case when aStopAtAnimatedGeometryRoot isn't an ancestor of aAnimatedGeometryRoot. CLOSED TREE 2015-11-25 16:24:42 +13:00
Matt Woodrow 41a4ad2285 Bug 1222880 - Build a tree of AnimatedGeometryRoots to speed up traversal of ancestors. r=roc,tn 2015-11-25 11:53:51 +13:00
David Anderson 7e9cf5355c Decouple CairoImage from ImageContainer. (bug 1222910, r=roc) 2015-11-17 00:09:00 -08:00
Nicholas Nethercote e48ef7f5e0 Bug 1224482 (part 4) - Make GetClientSize() return a LayoutDeviceIntSize. r=kats.
--HG--
extra : rebase_source : 6364076d0924ed1cd5a952ffa1fcb0543c05c0f7
2015-11-13 01:37:02 -08:00
Nicholas Nethercote 489c83b1dd Bug 1223690 - Remove implicit Rect conversions. r=jrmuizel.
gfxRect can be implicitly constructed from IntRect, which hides a number of
implicit conversion points, makes Moz2Dification harder, and has some
surprising effects.

This patch removes the implicit constructor and replaces it with an explicit
conversion function:

  gfxRect ThebesRect(const IntRect&)

This is the obvious outcome of removing the constructor.

But there is also a second, less obvious outcome: currently we do a number of
IntRect-to-Rect conversions using ToRect(), which (surprisingly) works because
it turns into an implicit IntRect-to-gfxRect conversion (via the implicit
constructor) combined with an explicit gfxRect-to-Rect conversion (via
ToRect()). I.e. we do two conversions, going from a Moz2D type to a Thebes
type and back to a Moz2D type!

So this patch also changes these conversion. It moves this existing function:

  Rect ToRect(const IntRect&)

from gfx2DGlue.h -- where it doesn't really belong because it doesn't involve
any Thebes types -- to gfx/2d/Rect.h, templatifying and renaming it as
IntRectToRect() in the process.

The rest of the patch deals with fall-out from these changes. The call sites
change as follows:

- IntRect-to-gfxRect conversions:
  - old: implicit
  - new: ThebesRect()

- IntRect-to-Rect conversions:
  - old: ToRect()
  - new: IntRectToRect()

--HG--
extra : rebase_source : e4e4c2ad10b36ecad4d57d1630158f3374e403be
2015-11-11 14:23:14 -08:00
Robert O'Callahan edb9491a4f Bug 1213582. Skip display items in ProcessDisplayItems if we only need items for event regions, and this item isn't one and doesn't have descendants. r=mattwoodrow
--HG--
extra : commitid : D9SFSCHrIJ4
extra : rebase_source : c64355a56ce4a5710d9f4acfd268be1a5277bd28
2015-11-11 15:09:21 +13:00
Botond Ballo a592a77364 Bug 1222661 - Replace ToUntyped(obj) calls with obj.ToUnknown*(). r=nical
--HG--
extra : rebase_source : 1cab46638599d8c4e6183c42a6fa9d41702392cb
extra : source : cabc28a2200b9b4e5e137d331ee5b86b3c09f065
2015-11-06 22:13:40 -05:00
Thinker K.F. Li 8f0e450b12 Bug 1210784 - Layer tree invalidation with Preserves3D. r=roc
--HG--
extra : rebase_source : 0272b4a05d8c502fcb8afa7bc9ad5ea168967fd2
2015-11-02 18:28:00 +01:00
Kartikaya Gupta 795d8736fd Bug 1205087 - Cache the AnimatedGeometryRoot on DisplayItem. r=roc 2015-10-05 17:09:34 -04:00
Timothy Nikkel ee21c076c2 Bug 1156238. Skip setting async scroll clips if we aren't painting to the window because they are useless then. r=mstange
Displayports only get acted upon when painting to the window, and the async scroll clips only get computed when we use a displayport.

In addition we change an assert because if we are painting to the window then our root reference frame is either a root frame, or a popup frame. In either case we should not be able to get to out of flows outside of the frame subtree rooted at the root reference frame by following placeholders.
2015-11-03 02:03:47 -06:00
Timothy Nikkel fab15510f7 Bug 1156238. Fix the computation of animated geometry roots for transform items. r=mattwoodrow
Removing the "stop at ancestor" parameter from functions that compute AGR meant that nsLayoutUtils::GetAnimatedGeometryRootFor could no longer pass the display item's reference frame as the "stop at ancestor" which meant that the AGR could cross the reference frame for the item, which we don't want. So we make transformed frames into AGRs.

This makes the computation of display items whose frames are transformed tricky. We need the AGR of the transform item to be the ancestor AGR, not the underlying frame of the transform item (which is now an AGR). So we modify nsLayoutUtils::GetAnimatedGeometryRootFor to handle this. (The patch from bug 1205087 didn't suffer from this problem because it special cased the computation of the AGR of transform items. Leaving anybody who called nsLayoutUtils::GetAnimatedGeometryRootFor to get the wrong result.)

The computation of the AGR for scroll metadata in ContainerState::ProcessDisplayItems specifically bypassed nsLayoutUtils::GetAnimatedGeometryRootFor to avoid it's special processing of fixed background items. However we do want the AGR for scroll metadata to do this special processing of transform items. So we add a flag to bypass the fixed background behaviour and use it for the scroll metadata AGR.
2015-11-03 02:03:47 -06:00
Matt Woodrow cf0b78ff4c Bug 1156238. Always stop at the root reference frame when looking for an animated geometry root. r=roc,mattwoodrow
This removes the "aStopAtAncestor" argument to agr computing functions. In most cases an AGR was passed for the stop at ancestor, so we'd stop at it anyway since it was an AGR. Most of the remaining cases the root reference frame was passed. And in a few cases something else was passed, which we probably don't want (returning something that isn't an AGR and isn't the root reference frame as an AGR).

The ShouldFixToViewport case is a little tricky. We want to get the AGR of the nearest viewport frame, but only if we don't have to cross our root reference frame to get it. This happens in practice for example when a select dropdown has background-attachment: fixed inside it.

Except for the ShouldFixToViewport bit, this patch is a subset of part 3 in bug 1205087 (which has more changes, and has been temporarily backed out, the remaining bits can hopefully land soon).

The ShouldFixToViewport part is by Timothy Nikkel <tnikkel@gmail.com>
2015-11-03 02:03:47 -06:00
Nigel Babu 9892fe78d6 Backed out changeset de50fec5c3a6 (bug 1219020) 2015-11-03 11:59:06 +05:30
Matt Woodrow 63db61e6ca Bug 1219020 - Don't do layer tree comparisons for inactive layer trees that have changed layers since we'll invalidate it all anyway. r=roc
--HG--
extra : rebase_source : 659233e99a8c84a7d4a097aed06adb243bd10955
2015-11-03 16:48:42 +13:00
Birunthan Mohanathas 9985829ecc Bug 1219392 - Capitalize mozilla::unused to avoid conflicts. r=froydnj 2015-11-02 07:53:26 +02:00
Markus Stange 5b914060de Bug 1216580 - Make background-position:fixed clip stealing work with display items that create their own layer. r=mattwoodrow
--HG--
extra : commitid : DDSgacDfi8Q
extra : rebase_source : 2dd3eb60ff21b2cc8f6cc588581859dc9a7fec1b
2015-10-28 18:46:40 +01:00
Milan Sreckovic 33b10a1074 Bug 1214802 - gfxEnv - consolidate environment variables used by the graphics code in one place. r=botond 2015-10-28 14:31:00 +01:00
Victor Porof 9dc0ce6b1a Bug 1202657 - Add markers for workers' message passing and serialization/deserialization, r=smaug, jsantell, tromey, ejpbruel
--HG--
rename : docshell/base/timeline/OTMTMarkerReceiver.h => docshell/base/timeline/MarkersStorage.h
2015-10-21 23:10:05 +02:00
Nathan Froyd 9f16f39c05 Bug 1217662 - part 6 - remove Layers.h #include from FrameListBuilder.h; r=mattwoodrow
This change necessitates a few other header changes around the tree:
either places that we relying on FrameLayerBuilder.h to #include
ImageLayers.h for them, or places that were bootlegging headers from
ImageLayers.h.
2015-10-22 17:02:14 -04:00
Nathan Froyd e65591b159 Bug 1217662 - part 5 - move FrameLayerBuilder and helper classes's ctors/dtors out-of-line; r=mattwoodrow
This change means that we don't have to have the definition of
LayerManager visible when FrameLayerBuilder is declared (which would be
necessary for, e.g. the ctor/dtor of ClippedDisplayItem), which means we
can get rid of the Layers.h include here in a subsequent patch.
2015-10-22 17:00:16 -04:00
Nathan Froyd 735e488da3 Bug 1217662 - part 2 - move mozilla::layers::LayerUserData to a separate header; r=mattwoodrow
Having to include all of Layers.h just to get at the definition of
LayerUserData is inconvenient, especially as most of the interesting
things in Layers.h can be forward-declared.  Let's move LayerUserData to
its own header, so clients can include a small header for that,
forward-declare anything else they need from Layers.h, and reduce header
bloat.
2015-10-22 16:04:35 -04:00
Nathan Froyd 01583602a9 Bug 1207245 - part 6 - rename nsRefPtr<T> to RefPtr<T>; r=ehsan; a=Tomcat
The bulk of this commit was generated with a script, executed at the top
level of a typical source code checkout.  The only non-machine-generated
part was modifying MFBT's moz.build to reflect the new naming.

CLOSED TREE makes big refactorings like this a piece of cake.

 # The main substitution.
find . -name '*.cpp' -o -name '*.cc' -o -name '*.h' -o -name '*.mm' -o -name '*.idl'| \
    xargs perl -p -i -e '
 s/nsRefPtr\.h/RefPtr\.h/g; # handle includes
 s/nsRefPtr ?</RefPtr</g;   # handle declarations and variables
'

 # Handle a special friend declaration in gfx/layers/AtomicRefCountedWithFinalize.h.
perl -p -i -e 's/::nsRefPtr;/::RefPtr;/' gfx/layers/AtomicRefCountedWithFinalize.h

 # Handle nsRefPtr.h itself, a couple places that define constructors
 # from nsRefPtr, and code generators specially.  We do this here, rather
 # than indiscriminantly s/nsRefPtr/RefPtr/, because that would rename
 # things like nsRefPtrHashtable.
perl -p -i -e 's/nsRefPtr/RefPtr/g' \
     mfbt/nsRefPtr.h \
     xpcom/glue/nsCOMPtr.h \
     xpcom/base/OwningNonNull.h \
     ipc/ipdl/ipdl/lower.py \
     ipc/ipdl/ipdl/builtin.py \
     dom/bindings/Codegen.py \
     python/lldbutils/lldbutils/utils.py

 # In our indiscriminate substitution above, we renamed
 # nsRefPtrGetterAddRefs, the class behind getter_AddRefs.  Fix that up.
find . -name '*.cpp' -o -name '*.h' -o -name '*.idl' | \
    xargs perl -p -i -e 's/nsRefPtrGetterAddRefs/RefPtrGetterAddRefs/g'

if [ -d .git ]; then
    git mv mfbt/nsRefPtr.h mfbt/RefPtr.h
else
    hg mv mfbt/nsRefPtr.h mfbt/RefPtr.h
fi

--HG--
rename : mfbt/nsRefPtr.h => mfbt/RefPtr.h
2015-10-18 01:24:48 -04:00
Nathan Froyd 583afa0965 Bug 1207245 - part 3 - switch all uses of mozilla::RefPtr<T> to nsRefPtr<T>; r=ehsan
This commit was generated using the following script, executed at the
top level of a typical source code checkout.

 # Don't modify select files in mfbt/ because it's not worth trying to
 # tease out the dependencies currently.
 #
 # Don't modify anything in media/gmp-clearkey/0.1/ because those files
 # use their own RefPtr, defined in their own RefCounted.h.
find . -name '*.cpp' -o -name '*.h' -o -name '*.mm' -o -name '*.idl'| \
    grep -v 'mfbt/RefPtr.h' | \
    grep -v 'mfbt/nsRefPtr.h' | \
    grep -v 'mfbt/RefCounted.h' | \
    grep -v 'media/gmp-clearkey/0.1/' | \
    xargs perl -p -i -e '
 s/mozilla::RefPtr/nsRefPtr/g; # handle declarations in headers
 s/\bRefPtr</nsRefPtr</g; # handle local variables in functions
 s#mozilla/RefPtr.h#mozilla/nsRefPtr.h#; # handle #includes
 s#mfbt/RefPtr.h#mfbt/nsRefPtr.h#;       # handle strange #includes
'

 # |using mozilla::RefPtr;| is OK; |using nsRefPtr;| is invalid syntax.
find . -name '*.cpp' -o -name '*.mm' | xargs sed -i -e '/using nsRefPtr/d'

 # RefPtr.h used |byRef| for dealing with COM-style outparams.
 # nsRefPtr.h uses |getter_AddRefs|.
 # Fixup that mismatch.
find . -name '*.cpp' -o -name '*.h'| \
    xargs perl -p -i -e 's/byRef/getter_AddRefs/g'
2015-10-18 00:40:10 -04:00
Botond Ballo ada8680578 Bug 1205630 - Translate a fixed background display item's clip rect correctly when setting it on the layer. r=mstange
--HG--
extra : source : 2ffe1c91b1cbfb3c4734128f20f0d2276c81bc30
2015-09-25 12:55:00 -04:00
Botond Ballo 4daa211ca8 Bug 1208661 - Do not assume that PaintRoot()'s contributions to the HTML paint dump will all be inside a <script> tag. r=BenWa
--HG--
extra : rebase_source : f95fafa791d4a15ec215311bda0ca16c8a951dc8
extra : source : 0148877df48d9a6b402ab26db161c55f57d47bce
2015-09-25 19:23:13 -04:00
Phil Ringnalda 463ef315b0 Back out 2 changesets (bug 1205630) for failing inactive-fixed-bg-bug1205630.xul on Mac and Windows
Backed out changeset 7ca5a29b914f (bug 1205630)
Backed out changeset 9db06671fc0d (bug 1205630)
2015-09-28 18:30:16 -07:00
Markus Stange d2decdaaf6 Bug 1105832 - Also dump inactive layer managers when display list dumping is enabled. r=mattwoodrow
--HG--
extra : source : 882bae94b575a31209a6c4b2864a9daf5b027f76
2015-09-25 18:37:30 -04:00
Botond Ballo 44e7a6c15d Bug 1205630 - Translate a fixed background display item's clip rect correctly when setting it on the layer. r=mstange
--HG--
extra : source : 58f76bcdf08a57b14dddcacab9e3049f24f7d55a
2015-09-25 12:55:00 -04:00
Kartikaya Gupta 0123b19fc5 Back out the bits of bug 1205087 that cache the AnimatedGeometryRoot on DisplayItem. r=backout
The change breaks some scenarios with APZ scrolling, in particular the code
that layerizes the scroll handoff chain for deeply nested scrollable frames.

--HG--
extra : commitid : KeQX4HyPKXd
2015-09-28 15:17:34 -04:00
James Willcox 66893d0e7a Bug 1201541 - Use SingleTiledContentClient for non-scrollable layers on Android r=mattwoodrow 2015-09-28 09:36:58 -05:00
Nicholas Nethercote 89189f2ced Bug 1208283 (part 2) - Change ColorLayer::mColor, ColorLayerProperties::mColor, ReadbackLayer::mBackgroundColor from gfxRBGA to gfx::Color. r=jwatt.
This avoids some gfxRGBA-to-Color conversions.

--HG--
extra : rebase_source : ba62db5204301e4ab57f05b9f9901f986f5b09aa
2015-09-24 18:16:45 -07:00
Markus Stange e21bd1df78 Bug 1208438 - Don't allow layers with scrolling clips to occlusion-cull layers behind them. r=mattwoodrow
--HG--
extra : commitid : LZhXvCVgeyn
2015-09-25 15:47:41 +02:00
Wes Kocher 72082a8db8 Backed out 2 changesets (bug 1208457, bug 1208438) for bg-fixed-child-mask.html failures
Backed out changeset 0499228f8fd1 (bug 1208438)
Backed out changeset 803a5e5c74ea (bug 1208457)
2015-09-25 13:01:33 -07:00
Matt Woodrow c066ccca63 Bug 1205087 - Cache the AnimatedGeometryRoot on DisplayItem. r=roc 2015-09-24 18:26:36 -04:00
Matt Woodrow d58f9e3efb Bug 1205087 - Remove LayerManager parameter for ShouldFixToViewport. r=roc 2015-09-24 18:25:08 -04:00
Markus Stange 931da3d7e3 Bug 1208438 - Don't allow layers with scrolling clips to occlusion-cull layers behind them. r=mattwoodrow
--HG--
extra : commitid : FQuVuWMFata
extra : amend_source : 7de8b2a9fd1ef7636e3a11a1b1f502f793a92ade
2015-09-25 15:47:41 +02:00
Markus Stange b42b780ed9 Bug 1203190 - Don't intersect with the visible rect for fixed background images. r=mattwoodrow
--HG--
rename : layout/reftests/async-scrolling/bg-fixed-child-clip.html => layout/reftests/async-scrolling/bg-fixed-child-clip-1.html
rename : layout/reftests/async-scrolling/bg-fixed-child-clip.html => layout/reftests/async-scrolling/bg-fixed-child-clip-2.html
extra : commitid : 4qr8EJSuYrt
2015-09-25 14:40:52 +02:00
Nicholas Nethercote 165270a482 Bug 1207944 (part 5) - Use SetColor(const Color&) when setting from a constructed gfxRGBA. r=jwatt.
In various places SetColor() gets passed a gfxRBGA that is constructed at the
call site. This patch changes these to construct a gfx::Color directly,
avoiding the subsequent conversion.

--HG--
extra : rebase_source : e2882f4af319c9541891da34da4202baee5470b0
2015-09-23 23:42:58 -07:00
Markus Stange 1c51b30d9d Bug 1144534 - If we have tiling, don't reduce layer resolution for large transforms. r=mattwoodrow
--HG--
extra : commitid : JJNzvl0j5W9
extra : histedit_source : 1269e93524a668636fbe79662e87e43a2e4d0402
2015-09-21 11:56:52 +02:00
Markus Stange 283eeaac85 Bug 1195400 - Check ancestor geometry roots when determining scrollability of a layer. r=mattwoodrow
--HG--
extra : commitid : H09nER1OCYh
extra : rebase_source : 020fd54e671dc1bc55aeeb360a27841f4fa8edcc
extra : histedit_source : 692b07c3d0182825da80209a0f14e70779b34db4
2015-09-20 18:28:18 +02:00
Thinker K.F. Li e1e17a72cb Bug 1097464 - Part 6: Handle preserves-3d by compositor. r=roc
Remove WrapPreserve3DList() and replaced it by creating a
nsDisplayTransform item for each transformed frame.

 - Add an additional item for each top frame extending 3D context to
   separate consequence contexts.

 - Effective transform of a layer is the accumulation of ancestors in
   the same 3D context.

 - The layers creating new context and extended by children need a
   temporary buffer if it's effective transform is not 2D.

 - Clip rects are accumulated along the context chain.

 - Visible rects of items are computed from dirty regions of the frame
   creating the context and accumulated transforms.

 - Bounds of items are computed from accumulated transforms and
   accumulated bounds of the descent frames.

 - Backface hidden is handled by compositor and BasicLayerManager.

--HG--
extra : rebase_source : 1a894b057a117a8520898c9f83308d92c122b180
2015-09-17 03:31:00 +02:00
Thinker K.F. Li d9c38a58c1 Bug 1097464 - Part 5: Fix preserve3d wording for nsIFrame. r=roc
--HG--
extra : rebase_source : 9d30e48106871ba631aff03afd153eaf45ac954e
2015-09-17 03:31:00 +02:00
Phil Ringnalda 7171096144 Back out 2 changesets (bug 1205087) for mass bustage
CLOSED TREE

Backed out changeset 0573cd4aed27 (bug 1205087)
Backed out changeset 11a3cb42f729 (bug 1205087)
2015-09-17 19:30:42 -07:00
Matt Woodrow 031080c187 Bug 1205087 - Cache AnimatedGeometryRoot on nsDisplayItem. r=roc
--HG--
extra : rebase_source : 75bf6cd82232dad91bfd35d2ef0f3bc5fcd3b26b
2015-09-17 21:05:20 -04:00
Matt Woodrow ad13620acc Bug 1205087 - Remove LayerManager parameter for ShouldFixToViewport. r=roc
--HG--
extra : rebase_source : a55ebf8ab3ea6cad0ff9945f9ee9857421053e0b
2015-09-17 21:03:42 -04:00
Carsten "Tomcat" Book f7534678df Backed out 6 changesets (bug 1097464) for causing OS X 10.10 Reftest Errors
Backed out changeset fbf63ce1ba88 (bug 1097464)
Backed out changeset fdaf4cfa6707 (bug 1097464)
Backed out changeset 727ebd9f744a (bug 1097464)
Backed out changeset 03f03a776042 (bug 1097464)
Backed out changeset 5ec6364b87d7 (bug 1097464)
Backed out changeset 47d056b3af7f (bug 1097464)

--HG--
extra : rebase_source : e2da133b489e4adba373303dad6e559826927e19
2015-09-17 16:24:43 +02:00