We store the original value of duration in AnimationTiming, and add
computed duration in ComputedTiming, so both the Timing model and
AnimationEffectTimingReadOnly can get what they want.
By the way, replace mIterationDuration with mDuration.
We want to store the original value from KeyframeEffectOptions whose
iterations is unrestricted double. Therefore, we can get the original value
of iterations by AnimationEffectTimingReadOnly.
By the way, replace mIterationCount with mIterations.
Temporarily rename GetDisplayPort to GetDisplayPortRelativeToScrollPort for the duration of this patchset.
This means that every caller of GetDisplayPort is guaranteed to be touched by this patchset (assuming it compiles), and thus each call site can be checked in review to make sure it is relative to the correct coordinate system.
This makes the one caller that needs the displayport rect have to ask for it seperately.
The reason for this is later in the patch series we need to add "RelativeToScrollFrame/Port" to all displayport getters, but there is no semantically good way to do that to the name ViewportHasDisplayPort.
Both sticky pos and transforms make a frame into an AGR. The transform item is nested inside the sticky pos item, so it should have the same AGR as the sticky pos item.
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.
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.
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).