Commit Graph

210824 Commits

Author SHA1 Message Date
Ting-Yu Lin
142b3b8d13 Bug 1082486 - Part 4 - Check whether nsCaret shows in the scroll frame. r=roc
This patch check whether nsCaret shows in scroll frame. If yes, touch
caret will show, and its position will be clamp to scroll frame as
before. Otherwise, we hide it since the nsCaret will not be seen in this
case.
2014-10-16 22:03:00 +02:00
Ting-Yu Lin
7cd6cb94a0 Bug 1082486 - Part 5 - Hide touch caret when PresShell is suppressing painting. r=roc
When loading an html, painting is suppressed in PresShell. Therefore the
rect of nsCaret or the rect of nearest ancestor scroll frames will not
be correct. Touch caret will hide incorrectly because it cannot get the
necessary rect to calculate its position.

I added a condition in IsDisplayable() to skip when painting is
suppressed. Touch caret should sync its visibility with nsCaret again
when painting is unsuppressed, and those rects needed by touch caret
should be ready then.
2014-10-16 05:08:00 +02:00
Ting-Yu Lin
1f8db9d46f Bug 1082486 - Part 3 - Refactor UpdatePosition(). r=roc
GetTouchCaretPosition() is needed in a later patch.
2014-10-15 03:05:00 +02:00
Ting-Yu Lin
8ebb8ad565 Bug 1082486 - Part 2 - Make GetCanvasFrame() returns nsCanvasFrame*. r=roc
PresShell::GetCanvasFrame() already returns nsCanvasFrame*, and it's
needed to access nsCanvasFrame's method in a later patch.
2014-10-14 03:07:00 +02:00
Ting-Yu Lin
521e2843ab Bug 1082486 - Part 1 - Clean up for Mozilla coding style. r=roc
Also, check mVisible before calling UpdatePosition() in
SyncVisibilityWithCaret().
2014-10-14 03:07:00 +02:00
Guilherme Goncalves
85d38b4e9c Bug 1082199 - Recompute stats in jemalloc_stats when using jemalloc3. r=glandium 2014-10-17 15:55:00 +02:00
Lebedev Maksim
1264d63972 Bug 1078327 - Test for correct detecting capturing content. r=smaug 2014-10-17 00:47:00 +02:00
Lebedev Maksim
dbbd86cb66 Bug 1078327 - Add check for correct detecting capturing content. r=smaug 2014-10-06 09:16:00 +02:00
Mason Chang
8732c0ef2f Bug 1069037 - Prevent touch events from piling up on the main thread. r=mwu 2014-10-16 14:02:00 +02:00
Viral Wang
bea5e0ba9a Bug 932698 - hold a wakelock when we receive key events. r=mwu 2014-10-17 03:44:00 +02:00
James Kitchener
821dc0e115 Bug 670334 - Set a minimum size for mfence's fences and separators. r=karlt 2014-10-17 18:01:00 +02:00
Cykesiopka
63327b6ddd Bug 622859 - Reject EV certificates with key sizes below RSA 2048. r=briansmith 2014-10-18 15:18:00 +02:00
Cykesiopka
da52458817 Bug 622859 - Tests for bug 622859. r=briansmith,keeler 2014-10-16 05:22:00 +02:00
Brian Birtles
f71c3c8dee Bug 1078122 part 9 - Move queuing of CSS animation events to CSSAnimationPlayer; r=dholbert
This patch moves the code for queuing CSS animation events from
nsAnimationManager to CSSAnimationPlayer. In doing so, it also moves the
mLastNotification member and associated enum values.
2014-10-20 13:55:47 +09:00
Brian Birtles
ce354c28fb Bug 1078122 part 8 - Use the new GetTarget overload in AnimationPlayer; r=dholbert 2014-10-20 13:55:47 +09:00
Brian Birtles
f9ea9d1df5 Bug 1078122 part 7 - Add method to Animation to get the target element and pseudo; r=dholbert 2014-10-20 13:55:47 +09:00
Brian Birtles
081e37723f Bug 1078122 part 6 - Store the previous finished state; r=dholbert
AnimationPlayer::CanThrottle determines if an animation player has just finished
by inspecting the value of mLastNotification. This is problematic for two
reasons:

1. mLastNotification is intended to be used for events (as the XXX comment
   notes)
2. mLastNotification is specific to CSS Animations and should be moved to
   CSSAnimationPlayer.

To address this, this patch adds an extra member mIsPreviousStateFinished. The
Web Animations spec already defines animation players as having such a member:

  http://w3c.github.io/web-animations/#previous-finished-state

We set it to true when we calculate the style for an animation that has
finished. This differs slightly from the code it is replacing as explained
below.

In the case of CSS Animations we perform the following sequence of steps on each
sample.

  1. EnsureStyleRuleFor (calls CanThrottle, and maybe ComposeStyle)
  2. GetEventsForCurrentTime

In the existing code, we update mLastNotification in (2) which happens on every
sample, even throttled samples.

In this patch, however, we update mIsPreviousStateFinished in (1) during the
ComposeStyle step which only happens for unthrottled samples. So, as of this
patch, in CanThrottle, we ask "have we newly entered the finished state since
the last *unthrottled* sample?", whereas previously we simply looked for
a change since the last sample, throttled or not. However, if the answer to the
question is "yes", then we'll run an unthrottled sample and update
mIsPreviousStateFinished so these should be functionally equivalent.

Another subtle difference is that this patch looks at the player's finished
state rather than the animation phase of its source content, and these will
produce different results in the case where the player is paused. However, since
paused animations are not run on the compositor, this should not matter.

In the case of CSS Transitions, AnimationPlayer::CanThrottle() is not currently
used and so mIsPreviousStateFinished is irrelevant.

Ultimately, both the existing and the new code is somewhat fragile but hopefully
this will be addressed by:
* Replacing mIsPreviousStateFinished with inspecting whether the finished
  promise is settled (bug 1074630),
* Merging more of the code in nsAnimationManager and nsTransitionManager and
  applying a unified approach to sampling that better accommodates these
  considerations.
2014-10-20 13:55:47 +09:00
Brian Birtles
1ad72fcf4d Bug 1078122 part 5 - Move CSSAnimationPlayer to nsAnimationManager; r=dholbert
This patch takes the CSSAnimationPlayer object, currently defined in
dom/animation/AnimationPlayer.{cpp,h}, and moves it to
layout/style/nsAnimationManager.{cpp,h} where the rest of the CSS
Animations-specific code lives.

At the same time it extends the scope of the mozilla namespace block in
nsAnimationManager.h to also include the AnimationEventInfo and EventArray types
since these classes, which don't have an ns* prefix, probably should be in the
mozilla namespace anyway.
2014-10-20 13:55:46 +09:00
Brian Birtles
842be1cdb4 Bug 1078122 part 4 - Make the mSource and mTimeline members of AnimationPlayer protected; r=dholbert 2014-10-20 13:55:46 +09:00
Brian Birtles
6208ce0f1d Bug 1078122 part 3 - Move animation value building down to the Animation objects; r=dholbert
This patch extracts the logic for calculating animation styles from
AnimationPlayerCollection and puts the bulk of it into the Animation objects.
Some of the initial logic surrounding the animation player state (e.g. is it
paused or not, etc.) is put into AnimationPlayer.

In future we may shift this logic even further down to the AnimationEffect
objects but currently we don't create such objects unless necessary.
2014-10-20 13:55:46 +09:00
Brian Birtles
3f434b554e Bug 1078122 part 2 - Encapsulate mIsRunningOnCompositor in AnimationPlayer; r=dholbert 2014-10-20 13:55:46 +09:00
Brian Birtles
de25cd0dbb Bug 1078122 part 1 - Move checks for animation throttling to AnimationPlayer; r=dholbert
This patch moves code from AnimationPlayerCollection to AnimationPlayer.

However, there is one subtle change in logic involved. Previously, we would test
if the player had finished by getting the computed time of its source content
and checking if it was in the after phase or not. In this patch, however, we
simply check the play state to see if it is finished or not.

These two approaches differ in the case where an animation is paused after it
has finished. The animation phase approach will indicate the player has
finished, but the play state approach will indicate the player has paused (since
the "paused" state trumps the "finished" state). This, however, should not
produce any observable effect because when an animation is paused
mIsRunningOnCompositor will be false (we don't put paused animations on the
compositor).
2014-10-20 13:55:45 +09:00
Brian Birtles
95a9a512d3 Bug 1078119 - Rename AnimationTimeline/AnimationPlayer GetCurrentTimeDuration; r=bz
This patch performs the following renaming:

  AnimationPlayer::GetCurrentTime -> GetCurrentTimeAsDouble
  AnimationPlayer::GetCurrentTimeDuration -> GetCurrentTime
  AnimationTimeline::GetCurrentTime -> GetCurrentTimeAsDouble
  AnimationTimeline::GetCurrentTimeDuration -> GetCurrentTime
2014-10-20 13:55:45 +09:00
David Zbarsky
2ad3a40b91 Bug 1037321 - Implement playState on AnimationPlayer; r=birtles, r=bz 2014-10-20 13:55:45 +09:00
Brian Birtles
aeed2b51f7 Bug 1070745 part 9 - Tests for play/pause behavior; r=dholbert 2014-10-20 13:55:45 +09:00
Brian Birtles
aaa1d00335 Bug 1070745 part 8 - Use play/pause from nsAnimationManager; r=dholbert
This patch uses the PlayFromStyle/PauseFromStyle methods on CSSAnimationPlayer
to perform play/pause control. (This allows us to encapsulate mHoldTime and
mPaused. We will encapsulate mStartTime etc. in subsequent bugs.

The override behavior of play()/pause() with regard to animation-play-state is:
* pause()/play() override the current animation-play-state
* pause() causes the player to remain paused until play() is called regardless
  of changes to animation-play-state
(* Calling play() will override the animation-play-state but won't "stick". i.e.
   subsequently setting animation-play-state: paused will pause the animation.)

These different permutations are tested in the next patch in this series.

This interaction will probably become more complicated once we introduce
finishing behavior (since we might not want animations to restart when
setting animation-play-state: running).
2014-10-20 13:55:44 +09:00
Brian Birtles
0ee8b989d3 Bug 1070745 part 7 - Add style flush at the beginning of Play(); r=dholbert
For players running CSS animations and CSS transitions we should perform a style
flush before running play() so that we are operating on the most up-to-date
state of animation-play-state.

For transitions, which don't have a play-state property, we will still need to
run this style flush before running play() to get the right finishing behavior
if transition-duration has changed. We haven't implemented finishing yet (that's
bug 1074630) but I've kept the flush for both cases now since I'm afraid we'll
forget it later.

Also, since we don't have a subclass of AnimationPlayer for transitions yet I've
put the style flush in the base class. In future, when we add
CSSTransitionPlayer we can move the flush to only those players that need up to
date style information.
2014-10-20 13:55:44 +09:00
Brian Birtles
c979c6788e Bug 1070745 part 6 - Add means of marking a CSSAnimationPlayer as being paused by style; r=dholbert
When an animation player is paused by script this overrides whatever
animation-play-state is set by style. The logic for producing the correct
override behavior will be added to nsAnimationManager but first we need
to record in the player where it was paused.
2014-10-20 13:55:44 +09:00
David Zbarsky
40ff58231d Bug 1070745 part 5 - Add CSSAnimationPlayer subclass; r=dholbert
This patch introduces a CSSAnimationPlayer subclass of AnimationPlayer. This is
because when we have an animation player running a CSS animation it has some
special behavior not needed in the general case such as:

* Flushing style before performing certain operations to ensure we are using
  the latest information.
* Dispatching CSS Animation events when we start/end.
* Storing extra state with regards to "how" the animation was paused.
  This is because, for example, if an animation is paused by script this
  overrides specified style.
2014-10-20 13:55:44 +09:00
David Zbarsky
bdcf5cda59 Bug 1070745 part 4 - Add AnimationPlayer::Play and AnimationPlayer::Pause; r=dholbert
This patch introduces the basic implementation of play() and pause().

There are a lot of gaps still because we don't yet:
* Support the pending state (to be covered in bug 927349)
* Support finishing behavior (to be covered in bug 1074630)
* Have a good way of updating animation state outside of style resolution (bug
  1073336)

Also, we don't call these methods from CSS yet because the interaction between
play()/pause() and animation-play-state requires storing some extra state which
we introduce in subsequent patches in this series.

This patch introduces, temporarily, an update flag to indicate whether
play()/pause() operations need to post a restyle event. When these methods are
triggered by processing restyles we don't want to post another (unnecessary)
restyle event. In bug 1073336 we will remove the need for this.
2014-10-20 13:55:43 +09:00
David Zbarsky
6a83000768 Bug 1070745 part 3 - Convert AnimationPlayer mPlayState to an mPaused bool; r=birtles
We only need to store if an animation is paused or not, hence a bool is
sufficient. Furthermore, the convenience of using the same type as the specified
style of animation-play-state will disappear once pausing behavior is wrapped up
behind Play() and Pause() methods.
2014-10-20 13:55:43 +09:00
Brian Birtles
62a1aab1e3 Bug 1070745 part 2 - Update AnimationPlayer IDL to enable play() and pause(); r=bz
We map play()/pause() to PlayFromJS/PauseFromJS internally so that internal
users don't accidentally call Play()/Pause() which flush style.
2014-10-20 13:55:43 +09:00
Brian Birtles
ca995a58de Bug 1070745 part 1 - Factor out new_div etc. to animation_utils.js; r=dholbert
We use new_div, check_events etc. in a number of animation-related mochitests
and with this bug we'll want to use them in a few more. This patch factors them
out into animation_utils.js and tidies them up a little.
2014-10-20 13:55:43 +09:00
L. David Baron
6f659077bd Back out changeset 197317c196cf (bug 1077301) for apparently breaking component alpha on some Windows variants (perhaps those without accelerated layers backends). 2014-10-20 00:23:46 -04:00
L. David Baron
ba145b33a0 Bug 1083461 - Convert nsCSSValue{,Pair}List::operator== back to a static Equal method so that it can be validly called on null pointers. r=bzbarsky
--HG--
extra : transplant_source : %CD%5D%9BE%FE%DE%A4%F2%B8%CF%D7%AE%84%90%3B%E8%A0d%D7%2B
2014-10-19 23:31:39 -04:00
Boris Zbarsky
1a926e4133 Bug 1083591 followup. Remove not-yet-implemented stringifier. 2014-10-19 22:55:08 -04:00
Boris Zbarsky
0d9ab82c4b Bug 1083950. Add a way to get the promises that depend on a given promise via PromiseDebugging. r=nsm 2014-10-19 22:27:36 -04:00
Boris Zbarsky
aeef299e3c Bug 1083851 part 4. Expose promise stacks on PromiseDebugging. 2014-10-19 22:27:12 -04:00
Boris Zbarsky
65952abced Bug 1083851 part 3. Capture stacks at promise fulfillment time. r=nsm 2014-10-19 22:27:12 -04:00
Boris Zbarsky
291eec377f Bug 1083851 part 2. Capture stacks at promise rejection time. r=nsm 2014-10-19 22:27:12 -04:00
Boris Zbarsky
e9c2a91b2f Bug 1083851 part 1. Capture allocation stacks at promise creation time. r=nsm 2014-10-19 22:27:12 -04:00
Boris Zbarsky
95de8d240f Bug 1083591. Support stringifiers and jsonifiers on non-concrete Web IDL interfaces as well, since they make sense there. r=peterv 2014-10-19 22:26:20 -04:00
Boris Zbarsky
be0f05f0b6 Bug 1084439. Remove ResolveWorkerClasses in favor of [Exposed=System] annotations. r=bholley 2014-10-19 22:25:49 -04:00
Phil Ringnalda
8c0ffee828 Backed out 4 changesets (bug 1062963, bug 1079139) for failures in 427129-table-caption.html in b2g reftest-6 and Android 2.3 reftest-5
Backed out changeset a9672db96a5d (bug 1079139)
Backed out changeset 241c23570a62 (bug 1062963)
Backed out changeset 90172cc0b012 (bug 1062963)
Backed out changeset 71211c4a4acc (bug 1062963)
2014-10-19 18:44:16 -07:00
Phil Ringnalda
29c89dff4e Back out 820188e039a0 (bug 1067748) for Android reftest-2 failures 2014-10-19 13:50:29 -07:00
Simon Montagu
3424f6ace3 Bug 1079139: make nsFlowAreaRect.mRect a LogicalRect. r=jfkthame 2014-10-19 12:32:17 -07:00
Simon Montagu
55d0940cfd Bug 1062963 patch 3: make nsFloatManager's origin a LogicalPoint, adapt GetFlowAreas, AddFloats, ClearFloats, etc. to use it and make nsFloatManager region functions work with logical region. r=jfkthame 2014-10-19 12:32:17 -07:00
Simon Montagu
238caccf89 Bug 1062963 patch 2: changes and additions to WritingModes.h. r=jfkthame 2014-10-19 12:32:17 -07:00
Simon Montagu
baa40f7f21 Bug 1062963 patch 1: Logical coordinates in nsLineLayout:ReflowFrame and CanPlaceFrame. r=jfkthame 2014-10-19 12:32:16 -07:00
Jonathan Watt
90cf86d3ac Bug 1083753, part 2 - Port the code that uses nsRenderingContext::FillRect(nsRect) to Moz2D. r=mattwoodrow 2014-10-19 13:22:22 +01:00