The existing code contains a comment about needing to add transitions before
animations. However, this is unnecessary since the interaction between
transitions and animations is handled by the mWinsInCascade member that is
checked in AddAnimationsForProperty.
This patch also moves AnimationUtils out of the dom namespace since it seems
unnecessary. We typically only put actual DOM interfaces in the dom namespace.
In this process, TransformTo() and UntransformTo() are renamed TransformedBy()
and UntransformBy() so calls to them continue to read sensibly.
--HG--
extra : rebase_source : a2a4b36514cc54533757c075fcf2c53ab3020939
extra : source : 826da3dc12baeb84b32be50f4b2c0591ca73ab37
Call sites (all in APZ and related code) were modified accordingly. Some of
these modifications involved changing some matrices stored in APZ to be typed.
--HG--
extra : rebase_source : 6f1cf33a5550987097fcd386c77765d046f5ec34
extra : source : 8f66bdc8e6e86f482a06b9c7a160740026cf24b4
This requires adding a new overloading of LayoutDevicePixel::ToAppUnits and a
new PixelCastJustification: LayoutDeviceIsParentLayerForRCDRSF.
--HG--
extra : rebase_source : b6d044619918818815b40c1173aa4e0551db28a1
The document structure of when printing is as follows:
ViewportFrame
nsSimplePageSequenceFrame
nsPageFrame
(the content of the page)
nsPageFrame
(the content of the page)
(further pages)
The nsSimplePageSequenceFrame calls nsLayoutUtils::PaintFrame with each nsPageFrame as the frame to paint.
nsPageFrame::BuildDisplayList will build display lists inside sibling nsPageFrames if it needs to descend into those sibling page frames to find placeholder frames for out of flow frames that are on the actual current page frame. Since these are sibling page frames they are not in the original page frame subtree, and hence we can't find an AGR for them that is in the original page frames subtree.
However, when printing we don't retain painted content, so there is no point in having more than one AGR. So if we aren't retaining (IsPaintingToWindow is necessary for that) then just have the root AGR.
This patch also fixes two other bugs.
1) We should always set mAnimatedGeometryRootForChildren for nsDisplayTransform items.
2) If the AGR choosen for a nsDisplayTransform is already the root AGR, then that is it's AGR. Don't try to set the AGR to the parent (which is null).
Use mozilla::dom::FillMode and mozilla::dom::PlaybackDirection
in AnimationTiming.
--HG--
extra : rebase_source : 8210d002d6f116793f439d88b0325ab6fb880048
We need such frames to get fixed pos annotation by FLB, and FLB can only determine that if the AGR is inside the fixed pos frame subtree.
Bug 1156238 made transformed frames into AGRs, whereas fixed pos frames in a displayport were already AGRs.
So fixed pos and transformed frames are AGRs twice over. We can think of the AGR parent of fixed pos transformed frame as the fixed pos frame itself, but outside the transform.
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.
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>