Commit Graph

4216 Commits

Author SHA1 Message Date
L. David Baron
89ead0b4bb Bug 996796 patch 3 - Move the knowledge of when we last updated main-thread-suppressed animation styles into the restyle manager rather than have two separate but always equal timestamps for animations and transitions. r=birtles 2014-07-24 21:35:34 -07:00
L. David Baron
50a5e634d3 Bug 996796 patch 1 - Perform a miniflush on both animations and transitions before processing restyles. r=birtles
This affects the correctness of transitions that take over from a
running animation.  (In the current code this can happen on a single
element; once the cascading changes in bug 960465 are complete it can
only happen via inheritance.)

This version of the patch changes to do the test using opacity rather
than transform, since testing using transforms encountered issues
related to bug 1031688:  the presence of phantom transitions due to the
interaction of the computed value rules for transforms distinguishing
between values that the interpolation rules consider identical.  (These
problems only appear after patch 24 in this bug changes the coalescing
order between a parent with animations and a child with transitions so
that the parent is handled before the child, instead of transitions
being handled before animations.)

The final two added tests fail without the patch and pass with the patch.
(With the opacity version, the third to last test also fails without the
patch, probably due to the value not having yet been sent to the layer.
This was not an issue pre-patch with the original test using transform,
though.  I haven't tested that this happened with patch 0, though, so it
might have been the issue patch 0 fixes.)
2014-07-24 21:35:33 -07:00
L. David Baron
9b5a877c75 Bug 996796 patch 0 - Fix test_animations_omta_start.html so that additional tests will involve onscreen layers. r=birtles
This removes each test element when we're done with it so that each
successive test element isn't 100px lower.  This is required to keep the
third test element (added in the next patch) onscreen when running tests
on the B2G emulator (other than when running a single test at a time).
This, in turn, is required to get animations in that test properly
shipped to the compositor thread, which is required for the test to
pass.
2014-07-24 21:35:33 -07:00
Cameron McCormack
72bb3ddd42 Bug 1043181 - Copy mValues and mGeneration in the nsCSSCounterStyleRule copy constructor. r=dbaron 2014-07-25 11:50:24 +10:00
L. David Baron
6192667c45 Bug 1041075 - Request longer timeout for test_value_storage.html. r=dholbert
I think this has become needed due to changes in the configuration of
the VMs on which we're running tests.

--HG--
extra : transplant_source : %83%CE%27M%CF2%0E%A9%0B%B4%9E%BC%AB%E45g%C9J%D4%17
2014-07-24 15:02:21 -07:00
William Chen
8136e0337d Bug 1041880 - Use GetParentElementCrossingShadowRoot() when initializing style scopes. r=heycam 2014-07-24 01:12:38 -07:00
Brian Birtles
532c1e8eff Bug 1002332 - Make AnimationTimeline record the last refresh time and use that when there is no refresh driver; r=bz
A document that belongs to an iframe that is display:none as no associated pres
context from which to get a refresh driver. However, in this case
document.timeline.currentTime should still never go backwards (since document
timelines are supposed to be monotonically increasing).

This patch makes AnimationTimeline record the last value returned for the
current time so that if the document becomes display:none we can still return
the most recently used time.
2014-07-24 13:37:38 +09:00
Alexandre Poirot
5a3800bc64 Bug 1027242 - Blacklist mulet's failing tests + expose 'mulet' to ini files; fix previous bustage on a CLOSED TREE, r=ahal 2014-07-02 15:40:56 -07:00
Carsten "Tomcat" Book
f2360c7833 merge mozilla-inbound to mozilla-central a=merge 2014-07-23 15:50:58 +02:00
Susanna Bowen
a573f478da Bug 1021952 - Ensure that direct children of ruby elements are inline. r=bz 2014-07-22 19:08:13 -07:00
Susanna Bowen
4d501abc1e Bug 1021952 - Generate anonymous boxes to preserve proper ruby structure r=bz 2014-07-22 19:08:08 -07:00
Susanna Bowen
4e66a798af Bug 1021952 - Add ruby display values and ruby frames. r=dholbert,bz 2014-07-22 19:08:01 -07:00
Cameron McCormack
5ee62664da Bug 1031206 - Part 2: Split out creation of font faces in nsUserFontSet. r=jdaggett 2014-07-23 15:05:50 +10:00
Cameron McCormack
3ecb723a73 Bug 1031206 - Part 1: Split out creation and addition of font faces in gfxUserFontSet. r=jdaggett 2014-07-23 15:05:50 +10:00
Brian Birtles
b784c29a93 Bug 1037316 part 2 - When updating animations, match existing animations one-by-one starting from the beginning of each list; r=dbaron
This patch changes the order in which we look for matches when updating existing
animations. Previously we would iterate through new animations in a forwards
direction but match old animations by going through the list of animations
backwards.

This patch makes us iterate through both lists in a backwards direction. That
means that if we have:

  animation: anim 100s

and later we make it

  animation: anim 100s, anim 100s

Then the new animation will be added to the *start* of the list, i.e. prepended,
and the resulting animation will not restart.
2014-07-23 10:51:12 +09:00
Brian Birtles
699a8025c6 Bug 1037316 part 1 - Return the same object when updating animations; r=dbaron
Previously when updating animations we'd generate a new list of animation
objects then try to match up animations from the existing list and copy across
state such as start times and notification flags. However, this means that from
the API we end up returning different objects.

This patch makes us maintain the same object identity when updating an existing
animation. It does this by looking for matching animations in both lists. If it
finds a match it copies the necessary information from the *new* animation to
the *existing* animation (but preserving the start time, last notification
etc.). Then, finally, it puts the *existing* animation in the list of *new*
animations and removes the corresponding *new* animation. The existing
animation is also removed from the list of existing animations so that it only
matches once.

The method used for matching is probably not intuitive but this is addressed in
a subsequent patch in this series.
2014-07-23 10:51:12 +09:00
Daniel Holbert
2e68738f9f Bug 984711 part 9: Rename file_flexbox_min_size_auto.html to test_flexbox_min_size_auto.html, now that its obsolete wrapper is gone. (no review)
--HG--
rename : layout/style/test/file_flexbox_min_size_auto.html => layout/style/test/test_flexbox_min_size_auto.html
2014-07-22 08:24:36 -07:00
Daniel Holbert
1fac6f39ef Bug 984711 part 8: Remove pref-setting mochitest wrapper for min-[size]:auto mochitest. (no review; tweaking existing test) 2014-07-22 08:24:35 -07:00
Daniel Holbert
be7a975c00 Bug 984711 part 7: Add back mochitest for min-[size]:auto. (no review; just an unbitrotted backout)
This reverts changeset edd98255e81d from bug 848539.
2014-07-22 08:24:35 -07:00
Daniel Holbert
875d23afcb Bug 984711 part 6: Add back special handling for min-width:auto in nsHTMLReflowState & getComputedStyle. (no review; just an unbitrotted backout)
This reverts changeset 1eae876d6c3a from bug 848539.
2014-07-22 08:24:35 -07:00
Daniel Holbert
1cf03699a9 Bug 984711 part 4: Add back handling for nsStylePosition::mMinHeight having "eStyleUnit_Auto" in style system & general layout code. (no review; just an unbitrotted backout)
This reverts changeset 5db313632268 from bug 848539.
2014-07-22 08:24:35 -07:00
Daniel Holbert
c050208bb4 Bug 984711 part 3: Add back handling for nsStylePosition::mMinWidth having "eStyleUnit_Auto" in style system & general layout code. (no review; just an unbitrotted backout)
This reverts changeset f8b5090d02e5 from bug 848539.
2014-07-22 08:24:34 -07:00
Daniel Holbert
3d7a185d7f Bug 984711 part 2: Add back min-width:auto & min-height:auto in the parser and as default value (just computing to '0' for now). (no review; just an unbitrotted backout)
This reverts changeset e7a9e30409eb from bug 848539.
2014-07-22 08:24:34 -07:00
Jonathan Griffin
efbbf73c27 Backed out changeset 64586374a208 on a CLOSED TREE 2014-07-22 18:29:57 -07:00
Susanna Bowen
1cc13144df Bug 1038928 - Mochitests for CSS 2.1 9.7. r=bz 2014-07-21 18:28:04 -07:00
Geoff Brown
46b9329156 Bug 1041017 - Skip test_animations_omta_start.html on b2g desktop; r=trivial 2014-07-21 16:10:53 -06:00
Brian Grinstead
a4b54ccb8b Bug 1037519 - Allow matching pseudo-elements in inIDOMUtils.selectorMatchesElement. r=bz 2014-07-18 14:30:00 -04:00
Alexandre Poirot
09c66c2ebd Bug 1027242 - Blacklist mulet's failing tests + expose 'mulet' to ini files; fix previous bustage on a CLOSED TREE, r=ahal 2014-07-02 15:40:56 -07:00
Jonathan Griffin
0cd20a2c49 Backout 4f6d9db92389 for bustage on a CLOSED TREE 2014-07-22 17:55:50 -07:00
Mike Hommey
d10b15b035 Bug 1041860 - Avoid setting FINAL_LIBRARY to libraries that further use a FINAL_LIBRARY. r=mshal 2014-07-23 08:37:51 +09:00
Alexandre Poirot
c044256760 Bug 1027242 - Blacklist mulet's failing tests + expose 'mulet' to ini files. r=ahal 2014-07-02 15:40:56 -07:00
L. David Baron
fe52357edf Bug 1040386: Fix hopefully-harmless CSS syntax error in isOMTAWorking(). r=birtles
I noticed this in the logs of a B2G emulator mochitest run.
2014-07-18 21:22:20 -07:00
L. David Baron
e2cf09f168 Bug 1041060: Use AllocateByObjectID/FreeByObjectID for nsInheritedStyleData and nsResetStyleData. r=heycam
This is similar to bug 1038488, which did the same for style structs.
This means the entire path from frame to style struct should be
allocated using frame IDs or object IDs.
2014-07-18 21:22:20 -07:00
Michael Ratcliffe
4969ae2773 Bug 1035106 - Add new APIs to DOMUtils: colorToRGBA, isValidCSSColor & cssPropertyIsValid r=bz 2014-07-17 15:08:07 +01:00
Ahmed Kachkach
68c23f6dff Bug 886570 - Initial integration of structured logs in mochitest; r=ahal,Ms2ger 2014-07-17 09:02:00 +02:00
Brian Birtles
1b647974c5 Bug 1038032 part 2 - Add test case for overflowing TimeDuration; r=dholbert 2014-07-18 10:31:18 +09:00
Brian Birtles
22fb85ab54 Bug 1038032 part 1 - Add temporary workaround to avoid overflow when calculating the active end of an animation; r=dholbert 2014-07-18 10:31:17 +09:00
Chris Lord
d54493310a Bug 1038781 - Don't reflow/repaint frame when clip changes. r=roc
If an element's existing clip changes, just update overflow areas and let
DLBI handle invalidation.
2014-07-16 13:28:50 +02:00
Brian Birtles
07325fcbbf Bug 1037314 - Include animation-play-state in animation shorthand; r=dbaron
This patch is basically a reversal of attachment 530792 from bug 654890.
2014-07-17 10:04:56 +09:00
L. David Baron
47535266ed Bug 1038488 patch 3 - Use AllocateByObjectID/FreeByObjectID for style structs. r=heycam 2014-07-15 22:27:13 -07:00
L. David Baron
84da8eeaa5 Bug 1038488 patch 2 - Remove memset from the operator new of the 4 style structs that have it. r=heycam
This also moves those 4 operator new methods to be inline to match the
style of all of the others.

I audited that all the members of these structs are initialized by all
their constructors (see patch 1).
2014-07-15 22:27:12 -07:00
L. David Baron
8be7bc4467 Bug 1038488 patch 1 - Explicitly initialize nsStyleMargin::mCachedMargin and nsStylePadding::mCachedPadding so that it is clear all members of nsStyleFont, nsStyleMargin, nsStylePadding, and nsStyleBorder are explicitly initialized. r=heycam
While nsMargin does 0-initialize, it's not necessarily obvious that it
does, and I think it's worth making explicit.
2014-07-15 22:27:12 -07:00
L. David Baron
ecd4ba7a2e Bug 1030604 - Use nsChangeHint_UpdateOverflow for clip-path and mask changes so we update the PreEffectsBBoxProperty and run the effect on the correct area. r=roc
The testcase is a slight simplification of dholbert's testcase 2
(attachment 8456312) in the bug.  It fails in the reftest harness
without the patch, and passes in the reftest harness with the patch.
2014-07-15 22:27:12 -07:00
Cameron McCormack
7b2ef56dd0 Bug 1039151 - Replace space-wasting use of DebugOnly<> in CSSVariableResolver with #ifdef DEBUG. r=dbaron 2014-07-16 15:24:04 +10:00
Brian Birtles
885d6252c1 Bug 1036300 - Expose AnimationPlayer.timeline; r=bz 2014-07-16 09:02:33 +09:00
Brian Birtles
8c171ff8b2 Bug 1036287 part 6 - Add a GetComputedTiming shortcut that uses the current animation timeline time; r=dholbert
This patch introduces a method GetComputedTiming that calls GetComputedTimingAt
supplying the current time of the animation's timeline.

We still keep the GetComputedTimingAt static method since it is used for
off-main thread animation. Furthermore, we keep the second argument to
GetComputedTiming--the animation's timing properties--since on some occasions we
want to override those properties (ElementPropertyTransition::ValuePortionFor
does this). We could also add another overload that also supplies the
animation's timing properties but that can happen as a separate step.
2014-07-16 09:02:33 +09:00
Brian Birtles
bd6a5ac2de Bug 1036287 part 5 - Drop aTime param from IsRunning(At) and IsCurrent(At), since they now use the current timeline time; r=dholbert 2014-07-16 09:02:33 +09:00
Brian Birtles
cb1c2b8db6 Bug 1036287 part 4 - Make GetLocalTime(At) get the current time automatically from the timeline; r=dholbert
This patch changes ElementAnimation::GetLocalTimeAt so that instead of taking
the current time as input, it uses the animation's mTimeline member to look up
the current time of the associated timeline. As a result of this, it is possible
to remove a few instances of querying the refresh driver for the current time.
Further instances are removed in subsequent patches.

Furthermore, in order to keep the use of time sources consistent, the mStartTime
of new transitions and animations is initialized with the current time from the
animation's timeline rather than with the latest refresh driver tick.
Since this time could, in future, be null, GetLocalTime(At) is updated to check
for a null start time.

GetLocalTimeAt is also renamed to GetLocalTime in the process.
2014-07-16 09:02:32 +09:00
Brian Birtles
00b3f67470 Bug 1036287 part 3 - Make GetLocalTimeAt return a nullable time duration; r=dholbert
Once we support arbitrary timelines which can return null current time values,
the local time of an animation can also become null so this patch updates
ElementAnimation::GetLocalTimeAt to return a Nullable<TimeDuration>.
Doing this also allows us to pass the result of GetLocalTimeAt directly to
GetComputedTimingAt.
2014-07-16 09:02:32 +09:00
Brian Birtles
3d5b51ab69 Bug 1036287 part 2 - Make GetComputedTimingAt take a nullable local time; r=dholbert
As part of supporting arbitrary timelines, we'd like to pass null times to the
function that calculates computed timing. Incidentally, this also provides
a means for evaluating calculating timing parameters that are independent of the
current time (currently only the active duration) without requiring a valid
time.

This patch updates the signature of ElementAnimation::GetComputedTimingAt to
take a nullable time duration.

We use the Nullable wrapper to represent null TimeDurations since, unlike,
TimeStamp, TimeDuration does not include a null state.
2014-07-16 09:02:32 +09:00