Commit Graph

5299 Commits

Author SHA1 Message Date
Nicholas Nethercote
8bc2be4de1 Bug 1189156 (part 1) - Don't use enumeration style for PLDHashTable::SizeOf{In,Ex}cludingThis(). r=froydnj.
After this change, we have PLDHashTable::ShallowSizeOf{In,Ex}cludingThis(),
which don't do anything to measure children. (They can be combined with
iteration to measure children.)

This patch also removes the PL_DHashTableSizeOf{In,Ex}cludingThis() functions.
They're not necessary because the methods can be used instead.

Finally, the patch deliberately converts some SizeOfExcludingThis() calls to
SizeOfIncludingThis(). These are all done on heap pointers so this change is
valid.
2015-07-29 22:28:20 -07:00
Kyle Huey
7eb387aa87 Bug 1186780: ifdef DEBUG fixes on a CLOSED TREE. r=me 2015-07-30 14:01:49 -07:00
Kyle Huey
e9c5c7928e Bug 1186780: Replace EnumerateRead with new iterators in ImageLoader. r=dbaron 2015-07-30 13:48:10 -07:00
Nicholas Nethercote
242308999c Bug 1188745 - Rename nsTArray::SizeOfExcludingThis() as ShallowSizeOfExcludingThis(). r=froydnj.
This makes it clearer that, unlike how SizeOf*() functions usually work, this
doesn't measure any children hanging off the array.

And do likewise for nsTObserverArray.
2015-07-28 23:24:24 -07:00
Carsten "Tomcat" Book
2f532eb802 Backed out changeset fb39baea4559 (bug 1180125) for causing Bug 1188799 on a CLOSED TREE 2015-07-29 17:32:50 +02:00
Carsten "Tomcat" Book
9b0901dbbb Backed out changeset 79bcd4f744c0 (bug 1180125) 2015-07-29 17:32:24 +02:00
Carsten "Tomcat" Book
4862dc6ee3 Backed out changeset 41d45871d805 (bug 1180125) 2015-07-29 17:32:21 +02:00
Carsten "Tomcat" Book
bf173a58e8 Backed out changeset a4fb4e4b1c8b (bug 1180125) 2015-07-29 17:32:19 +02:00
Carsten "Tomcat" Book
b6aba75ea3 Backed out changeset 5996d0e410a7 (bug 1180125) 2015-07-29 17:32:17 +02:00
Carsten "Tomcat" Book
0419e2866e Backed out changeset 587b33b52ee0 (bug 1180125) 2015-07-29 17:32:15 +02:00
Carsten "Tomcat" Book
0001ff1dc9 Backed out changeset 99d1cfef2722 (bug 1180125) 2015-07-29 17:32:12 +02:00
Carsten "Tomcat" Book
25c6ea2746 Backed out changeset 658e49586449 (bug 1180125) 2015-07-29 17:32:08 +02:00
Carsten "Tomcat" Book
ff62d14db0 Backed out changeset ad38421023a9 (bug 1180125) 2015-07-29 17:31:59 +02:00
Carsten "Tomcat" Book
80b3328fbc Backed out changeset 677efdac9819 (bug 1180125) 2015-07-29 17:31:57 +02:00
Brian Birtles
3f73ccc047 Bug 1180125 part 8 - Dispatch transition events from refresh driver; r=dbaron
This patch causes transition events to be dispatched as a separate step after
sampling the transitions. Eventually this will allow us to sample transitions
from their timeline (independently of where they came from and in potentially
any order) by separating the concepts of sampling and event dispatch.
2015-07-29 10:57:40 +09:00
Brian Birtles
49a48fbf3a Bug 1180125 part 7 - Queue transition events from CSSTransition::Tick; r=dbaron
This patch moves the logic for queueing events out of the logic for flushing
transitions making it a separate step. It still doesn't delay the dispatch of
those events into a separate step, however. That is done in a subsequent patch.

This patch also makes sure to clear any queued events when the nsPresShell that
owns the transition manager is destroyed. We don't expect CSSTransition::Tick to
be called anywhere except nsTransitionManger::FlushTransitions so there
shouldn't be any orphaned events but for completeness it seems best to add this
now. (Later, when we tick transitions from their timeline we will need this.)

This patch introduces a separate flag to CSSTransition for tracking if a
transition is newly-finished so we can correctly dispatch the transitionend
event. Although, this may seem to be redundant with the "IsFinishedTransition"
we also track, that state will soon be removed in bug 1181392 and hence this
flag will be needed then.

Note that Animation already has flags mIsPreviousStateFinished and
mFinishedAtLastComposeStyle which would appear to be similar however,

- mIsPreviousStateFinished will be removed in bug 1178665 and is updated more
  often than we queue events so it is not useful here.
- mFinishedAtLastComposeStyle is used to determine if we can throttle a style
  update and is also updated more frequently than we queue events and hence
  can't be used here.

Once we guarantee one call to Tick() per frame we may be able to simplify this
by tracking "state on last tick" but for now we need this additional flag on
CSSTransition. CSSAnimation has a similar flag for this
(mPreviousPhaseOrIteration) which we may be able to unify at the same point.
2015-07-29 10:57:40 +09:00
Brian Birtles
29c39635b6 Bug 1180125 part 6 - Use DelayedEventDispatcher in nsTransitionManager; r=dbaron
This simply uses the DelayedEventDispatcher in place of the previous array of
TransitionEventInfo objects. Doing the actual delayed dispatch is performed in
a separate patch.
2015-07-29 10:57:40 +09:00
Brian Birtles
5e5e9d6e03 Bug 1180125 part 5 - Move TransitionEventInfo to nsTransitionManager.h; r=dbaron
This is needed so we can allocate storage in nsTransitionManager for the
transition events we will queue for delayed dispatch.
2015-07-29 10:57:40 +09:00
Brian Birtles
e6a266fe1a Bug 1180125 part 4 - Move PseudoTypeAsString to AnimationCollection and reuse; r=dbaron
Prior to this patch, CSSAnimation defined a method for converting an
nsCSSPseudoElements::Type to a nsString (but only for the set of
pseudo-elements that can have animations). We would like to re-use this
when setting up transition events so this patch moves it to
AnimationCollection. Re-using this method more widely means we can make
a few further simplifications to the code.
2015-07-29 10:57:40 +09:00
Brian Birtles
987e6e2843 Bug 1180125 part 3 - Extract DelayedEventDispatcher; r=dbaron
This patch extracts a utility class for queueing up a series of EventInfo
objects (of templated type) and then dispatching them. This covers the event
queuing behavior in nsAnimationManager so that we can reuse it in
nsTransitionManager.
2015-07-29 10:57:39 +09:00
Brian Birtles
94af843455 Bug 1180125 part 2 - Move AnimationCommon classes out of CSS namespace; r=dbaron
The long-term plan is to drop the mozilla::css namespace altogether. Before we
go to much further with refactoring code in AnimationCommon, we should drop
usage of the mozilla::css namespace. Specifically, this patch moves the
CommonAnimationManager and AnimValuesStyleRule classes to the mozilla namespace.
2015-07-29 10:57:39 +09:00
Brian Birtles
5d57d9c223 Bug 1180125 part 1b - Hook nsAnimationManager's list of events up to the cycle collector; r=dbaron 2015-07-29 10:57:39 +09:00
Brian Birtles
fae3fe0766 Bug 1180125 part 1 - Queue and dispatch CSS animation events as a separate step; r=dbaron
This patch prepares the way for script-generated events by making
event dispatch a separate process that happens after sampling animations.
This will allow us to sample animations from their associated timeline
(removing the need for a further manager to tracker script-generated
animations).

Furthermore, once we sample animations from timelines the order in which they
are sampled is likely to be more or less random so by making event dispatch at
separate step, we have an opportunity to sort the events and dispatch in
a consistent and sensible order. It also ensures that event callbacks will
not be run until all animations (including transitions) have been updated
ensuring they see a consistent view of timing properties.

This patch only affects event handling for CSS animations. Transitions will
be dealt with in a subsequent patch.
2015-07-29 10:57:39 +09:00
Brian Birtles
247206e2d0 Bug 1180125 part 0 - Fix an obvious bug in animation_utils.js; r=dbaron
There was a bug introduced in to animation_utils.js in
https://hg.mozilla.org/mozilla-central/rev/496e867cd2cd (bug 1070745). This
patch fixes this bug so we can be sure testing events correctly before messing
with them.
2015-07-29 10:57:38 +09:00
Jonathan Kew
4b65ef3e85 Bug 1184295 - Ensure the containing block has a constrained size during logical-properties tests, to suppress unconstrained-isize warnings. r=heycam 2015-07-27 08:06:46 +01:00
Cameron McCormack
a04ae597e0 Bug 1181011 - Don't use cached rule node structs for animations within pseudo-elements. r=dbaron a=abillings 2015-07-27 16:43:44 +10:00
Masatoshi Kimura
4b52004fb6 Bug 1186636 - Add a pref to configure -moz prefixed gradients support. r=dholbert 2015-07-24 20:29:52 +09:00
Robert O'Callahan
d84beb0e09 Bug 1172239. Use nsChangeHint_UpdateComputedBSize to only dirty intrinsic sizes when necessary. r=bz 2015-07-22 16:36:56 +12:00
Robert O'Callahan
f745685e54 Bug 1172239. Make vertically-resizing scrollframes reflow their percent-height descendants if necessary, and remove nsChangeHint_NeedDirtyReflow for height changes. r=bz 2015-07-17 17:08:54 +12:00
Robert O'Callahan
df233af6b7 Bug 1172239. Expand height change hint to its components. r=heycam 2015-07-17 15:21:29 +12:00
Kearwood (Kip) Gilbert
2f3187fc3a Bug 1181240 - Part 2: Replace gfx3DMatrix with Matrix4x4 in layout,r=vlad
- Refactored code to use Matrix4x4 instead of gfx3DMatrix.
- There is not expected to be any functional effect.
2015-07-10 17:05:47 -07:00
L. David Baron
d65561b509 Bug 1186061 patch 2 - Disable compositor thread animation of transforms when backface-visibility is hidden. r=mattwoodrow
We don't currently have a mechanism for rerendering when the front/back
flips, so we should disable running such animations on the compositor
thread for now until we do.

Bug 1186204 covers reenabling.

The reftest fails without the patch (showing a blue almost-square
rectangle), and passes with the patch.

The use of reftest-no-flush (added in patch 1) is needed to achieve the
failure without the patch, because the flushWindow() function in
reftest-content.js calls getBoundingClientRect() to flush rendering,
which has the side-effect of flushing style updates that have been
suppressed on the main thread while we're running an animation off the
main thread, which in turn covers up the bug.
2015-07-22 08:58:42 -07:00
Ryan VanderMeulen
53f02bd660 No bug - Cleanup the layout/style mochitest manifest. 2015-07-21 23:52:48 -04:00
Ryan VanderMeulen
aac7b0d8d5 Bug 1186224 - Disable various layout mochitests on B2G debug for hitting frequent fatal mochitest hangs. r=dholbert 2015-07-21 23:52:48 -04:00
Ryan VanderMeulen
7a3ea0f0bd Bug 1186219 - Skip the test_value* tests on B2G opt as well due to causing memory explosions that often lead to timeouts. r=dholbert 2015-07-21 23:52:48 -04:00
L. David Baron
64bd13a0a4 Bug 1184452 - Correctly reject @font-face descriptors that have garbage after them. r=heycam
I confirmed that the patch fixes the original testcase (attachment
8634600).  I also confirmed that with the whole patch,
layout/style/test/test_descriptor_syntax_errors.html passes, but with
the new tests but not the code change, it reports 12 failures.
2015-07-21 07:55:42 -07:00
Seth Fowler
127aaccd04 Bug 1151359 (Part 3) - Treat nsImageFrames subject to scale animation as having an identity scale when predicting size. r=tn,birtles 2015-07-19 19:30:40 -07:00
Gijs Kruitbosch
36307b3748 Bug 452800 - use ThreeDLightShadow for borders instead of ThreeDFace or ButtonFace, r=bz 2015-07-16 16:11:09 +01:00
Cameron McCormack
cd2f33eb2f Bug 1183484 - Cycle collect FontFaceSetIterator. r=bzbarsky 2015-07-16 17:35:17 +10:00
Masatoshi Kimura
2a9f9ebd96 Backed out changeset acb7eb7f5ad4 (bug 1176496) for web compat problems 2015-07-15 23:37:22 +09:00
Cameron McCormack
c6f672c972 Bug 1182964 - Replace use of nsTHashtable::EnumerateEntries with nsTHashtable::Iterator in layout/{style,svg}/. r=njn 2015-07-14 10:13:32 +10:00
Birunthan Mohanathas
47ed3a3675 Bug 1182996 - Fix and add missing namespace comments. rs=ehsan
The bulk of this commit was generated by running:

  run-clang-tidy.py \
    -checks='-*,llvm-namespace-comment' \
    -header-filter=^/.../mozilla-central/.* \
    -fix
2015-07-13 08:25:42 -07:00
Birunthan Mohanathas
5a94cf94d2 Bug 1167418 - Check AppendElement call in MediaQueryList. r=heycam
This preemptively silences an unused result warning.
2015-07-12 23:19:12 -07:00
Birunthan Mohanathas
8e0f2d499a Bug 1167418 - Use nsTArray instead of FallibleTArray in MediaQueryList. r=heycam
We already use the mozilla::fallible parameter when we want fallibility so
this doesn't actually change anything.
2015-07-12 23:19:12 -07:00
Geoff Brown
f8e98ea39a Bug 1026290 - Update mochitest-chrome manifests for android; r=jgriffin 2015-07-10 14:41:59 -06:00
Hiroyuki Ikezoe
96c914a343 Bug 1181905 - Animation::IsPlaying should check playbackRate != 0 to stop playing on compositor animation. r=bbirtles 2015-07-09 20:54:00 +02:00
Wilmer Paulino
7b5ec68134 Bug 1081362 - Change nsStyleBasicShape pointer to an nsRefPtr, to avoid leak in unexpected case. r=dholbert 2015-07-09 10:56:31 -04:00
Masatoshi Kimura
0b8813a9e1 Bug 1176496 - Drop support for -moz-prefixed gradients. r=dbaron 2015-07-10 00:57:50 +09:00
Brian Birtles
2e0d563269 Bug 1150810 part 7 - Add Animation::SetTimeline; r=jwatt 2015-04-28 17:21:58 +09:00
Brian Birtles
7603be56ca Bug 1150810 part 4 - Store global on Animation; r=smaug, jwatt
The connection between an Animation and an AnimationTimeline is optional. That
is, it is possible to have an Animation without an AnimationTimeline. Until now
we have often just assumed the timeline will be set but eventually we need to
support the possibility of the timeline being null. Indeed, later in this patch
series we will set the timeline out-of-band (i.e. not in the constructor) using
SetTimeline which opens up the possibility that timeline will be null for
a period of time.

This patch paves the way for having an optional timeline by storing the global
used for, e.g. creating promises, on the Animation object itself.
2015-04-28 15:48:35 +09:00