Commit Graph

27336 Commits

Author SHA1 Message Date
Hiroyuki Ikezoe
5141a8fe39 Bug 1194028 - Part 2: Use KeyFrameEffect SetTiming. r=bbirtles
Now KeyframeEffect.SetTiming() updates the owning animation timing and relavance, so
we don't need to call each methods respectively for the animation any more.
2015-08-18 03:57:00 -04:00
Jonathan Watt
4ceb40ce40 Bug 1180509 - Fix judder of icons in Australis doorhanger menu at the end of its scale-in animation. r=roc 2015-08-09 22:23:06 +01:00
Jonathan Watt
9e92d2e0ca Bug 1182414, part 2 - Add printing crash test. r=dholbert 2015-08-03 12:19:34 +01:00
Jonathan Watt
179d0aeed2 Bug 1182414, part 1 - Fix printing crash with range input controls. r=dholbert 2015-08-03 12:08:32 +01:00
Jonathan Kew
fe31ceeacb Bug 1194055 - GetSysFontInfo should return MS Shell Dlg 2 for eFont_Field and eFont_List on Windows. r=masayuki 2015-08-18 17:21:38 +01:00
Masayuki Nakano
84ee60a0ff Bug 299603 part.5 nsTextFrame should use system foreground or background color when painting IME selections if whose style defines only one of foreground color or background color r=roc 2015-08-19 16:37:39 +09:00
Masayuki Nakano
9bfb2a4edf Bug 299603 part.4 Some global methods in nsTextFrame.cpp should be members of nsTextFrame class r=roc 2015-08-19 16:37:39 +09:00
Benjamin Smedberg
1851cc4c35 Bug 1098064 part C - remove SimpleTest and reftest testPluginIsOOP and related usage, r=jimm 2015-08-14 14:10:17 -04:00
Benoit Girard
0ad7de6e30 Bug 1195884 - Reject CSS 'will-change: will-change' for spec compliance. r=dholbert 2015-08-18 16:07:01 -04:00
Daniel Holbert
c2f9caa032 Bug 1195857: Make nsPresContext::HasAuthorSpecifiedRules()'s arg 'const', to remove need for const_cast in callers. r=jwatt 2015-08-18 15:41:24 -07:00
Wes Kocher
e350be705b Backed out changeset de7aa6b08234 (bug 1194055) for windows 8 reftest failures CLOSED TREE 2015-08-18 12:09:56 -07:00
Kartikaya Gupta
36de569f91 Bug 1180295 - Stop clipping the content while the toolbar is in the process of sliding off. r=rbarker 2015-08-18 14:27:19 -04:00
Kartikaya Gupta
534c0e0e27 Bug 1180295 - Rip out call to setContentDocumentFixedPositionMargins. r=rbarker 2015-08-18 14:27:18 -04:00
Kartikaya Gupta
315d745a42 Bug 1192616 - Skip over some reftests which fail on the pandaboards with the new dynamic toolbar implementation due to the screen size being too small. r=gbrown 2015-08-18 14:27:17 -04:00
Nathan Froyd
bc01544a1c Bug 968923 - part 5b - add nsIDOMWindowUtils::forceUseCounterFlush; r=bz
Use counter submission normally happens at document destruction.  For
testing use counters, however, we need to have use counters updated in
telemetry at deterministic points.  Therefore, we provide a method on
nsIDOMWindowUtils that forces use counters out to telemetry so we can
examine them.
2015-03-17 15:25:35 -04:00
Yury Delendik
101cf20d37 Bug 1192831 - Remove PlayPreview API. r=jet, r=peterv 2015-08-20 15:15:18 -05:00
Jonathan Kew
ffe4d8dc9b Bug 1196887 - Compare the writing-mode property, not only whether it is horizontal or vertical, when deciding whether to compute display:inline as inline-block. r=dholbert 2015-08-21 09:55:43 +01:00
Ting-Yu Lin
33b6db5bc0 Bug 1195672 - Revise the logic of long tap on empty content. f=mtseng, r=roc
The only logic change is that we now call UpdateCaret() before
dispatching CaretStateChangedEvent.

This resolves a bug that the text selection dialog flashes when long
tapping on an empty content.
2015-08-19 15:54:10 +08:00
Ting-Yu Lin
7ef132683a Bug 1195672 - Move the check that frame is selectable into SelectWord. f=mtseng, r=roc
There's a bug that when a frame is focusable but not selectable, we
won't focus on it because we call IsSelectable() before ChangeFocus().

By moving the check into SelectWord(), we'll have a chance to focus on
it.

This resolves a issue that when long press to select a word on a new
opened app, the selection highlight is gray instead of blue.
2015-08-19 15:54:10 +08:00
Ting-Yu Lin
a52d8e0b25 Bug 1195672 - Make focus changing by long tap behaves like by single tap. f=mtseng, r=roc
We want the focus changing behavior by long tap as close as to the one
by single tap.

The only functional change is that we always clear old focus and
re-focus the window if a focusable frame cannot be found. This behavior
is the same as the single tap implemented in
EventStateManager::PostHandleEvent().

Besides, ChangeFocus now returns the new focusable frame instead of bool
which provides more information.
2015-08-19 15:54:10 +08:00
Ting-Yu Lin
f6d8e741db Bug 1195672 - Add |nsAutoCString nsIFrame::ListTag()| for debugging. f=mtseng, r=roc
This make it easier to print a frame tag name in one debug log line.
2015-08-19 15:54:10 +08:00
Benoit Girard
620f200e11 Bug 1186662 - Part 1: Add SuppressDisplayport painting and use it during tab switch. r=kats,mconley 2015-08-19 17:08:41 -04:00
Mats Palmgren
d173e7eafb Bug 1194733 - Don't honor DefaultPrevented for mouseup events in list control frames. r=enndeakin@gmail.com 2015-08-20 18:45:17 +02:00
Jonathan Kew
d393294329 Bug 1196206 - Add Windows 10 font Yu Gothic to the font list in fwid-spaces.html. r=jdaggett. 2015-08-20 15:52:40 +01:00
Cameron McCormack
2cb5b9b157 Bug 968923 - part 3d - record use counter information from the CSS parser; r=dbaron 2015-06-03 15:21:24 -04:00
Cameron McCormack
4a236adb80 Bug 968923 - part 3b - propagating use counters from SVG images into owning/parent documents; r=seth 2015-06-03 13:42:07 -04:00
Jonathan Kew
25f52e700a Bug 1194055 - GetSysFontInfo should return MS Shell Dlg 2 for eFont_Field and eFont_List on Windows. r=masayuki 2015-08-18 17:21:38 +01:00
Mason Chang
b5774eeed6 Bug 1190257. Use the previous vsync timestamp on windows 10. r=jrmuizel 2015-08-18 09:11:12 -07:00
Markus Stange
b58b4730d9 Bug 1187804 - Reftests for async scrolling with position:fixed in an iframe. r=kats 2015-06-23 23:18:33 -07:00
Markus Stange
fec0b4f324 Bug 1187804 - Annotate fixed-position layers with the scroll id of the scroll frame that they are fixed with respect to. r=mattwoodrow 2015-08-17 19:44:42 -04:00
Ryan VanderMeulen
5e10ab4b5c Merge m-c to inbound. a=merge 2015-08-18 10:58:07 -04:00
Ryan VanderMeulen
cd959e19f8 Merge b2g-inbound to m-c. a=merge 2015-08-18 10:41:52 -04:00
Andrew Osmond
124352f3cf Bug 1186273 - Part 1. Move preferences and observers into dedicated threadsafe module. r=dhylands 2015-08-18 07:42:12 -04:00
Brian Birtles
7d4d926aa6 Bug 1188251 part 12 - Use RestyleType::Layer in UpdateCascade; r=dholbert
When updating the cascade results between transitions and animations, if we
detect a change we force an update by taking the following steps:

 a. Updating the animation generation on the restyle manager
 b. Updating the animation generation on the collection
 c. Iterating over all the properties animated by the collection and, for
    each property that we can animate on the compositor, posting a restyle
    event with the appropriate change hint (nsChangeHint_UpdateTransformLayer
    or nsChangeHint_UpdateTransformOpacity)
 d. Marking the collection as needing refreshes
 e. Clearing the style rule refresh time so we generate a new style rule in
    EnsureStyleRuleFor

As it turns out, the newly-added
AnimationCollection::RequestRestyle(RestyleType::Layer) already performs a, b,
d, and e. It also:

* Ensures we are observing the refresh driver if need be (should have no effect
  in this case)
* Clears the last animation style update time on the pres context so that
  subsequent calls to FlushPendingNotifications will update animation style
  (it seems like we probably should have been doing this for changes to cascade
  results anyway)
* Posts a restyle event with restyle hint eRestyle_CSSTransitions or
  eRestyle_CSSAnimations
* Marks the document as needing a style flush (irrelevant since posting
  a restyle event does this anyway)

The only missing piece that would prevent using RequestRestyle in place of this
code when updating cascade results is (c) from the list above. However, (c)
should not be necessary since ElementRestyler::AddLayerChangesForAnimation()
explicitly checks for out-of-date layer animation generation numbers and adds
the appropriate change hints (nsChangeHint_UpdateTransformLayer etc.) to the
change list.
2015-08-18 16:11:55 +09:00
Brian Birtles
735ff9144b Bug 1188251 part 11 - Add RestyleType::Layer; r=dholbert
We currently have a series of methods that clobber various bits of animation
state to force animations on layers to be updated. This aligns closely with
the restyle code introduced in this patch series.

By re-using RequestRestyle when updating animations on layers, not only should
we be able to simplify the code somewhat but, in future, we should also be able
to have Animation objects use the same mechanism to update layers during
a regular tick.

For example, currently we have a bug where when an animation starts after
a delay with the same value as the backwards fill then we don't send the
animation to the compositor right away (see
https://dxr.mozilla.org/mozilla-central/rev/d6ea652c579992daa9041cc9718bb7c6abefbc91/layout/style/test/test_animations_omta.html#287).
By adding this Restyle::Layer value we should be able to fix that in future.
2015-08-18 16:11:55 +09:00
Brian Birtles
603a09ba64 Bug 1188251 part 10 - Remove throttling from EnsureStyleRuleFor; r=dholbert
EnsureStyleRuleFor contains logic for performing throttled updates to the style
rule but it is only used in one case: inside
nsTransitionManager::UpdateCascadeResults to determine what properties are
being animated by CSS animations.

We would like to remove throttling logic from EnsureStyleRuleFor altogether but
if that one case where it is currently used is run on every tick then removing
this logic could effectively mean we end up updating the style rule on every
tick. Fortunately nsTransitionManager::UpdateCascadeResults is only called
in the following cases:

1. From nsTransitionManager::StyleContextChanged (via
   TransitionManager::UpdateCascadeResultsWithTransitions), when we are
   processing style changes for transitions.

2. From AnimationCollection::EnsureStyleRuleFor (via
   nsAnimationManager::MaybeUpdateCascadeResults and
   nsTransitionManager::UpdateCascadeResultsWithAnimations), when we are
   updating the animation style rule from CSS animations.

3. From nsAnimationManager::CheckAnimationRule (via
   TransitionManager::UpdateCascadeResultsWithAnimationsToBeDestroyed), when
   we are processing style changes for CSS animations.

None of these things should be happenning on a regular throttle-able tick so by
removing this logic we shouldn't be causing any additional work.

I have verified, using a test case that combines transitions and animations on
the same property, that we have the same behavior with regard to calling
EnsureStyleRuleFor both before and after this patch (specifically we avoid
calling it altogether while running only the transition but when the animation
starts and clobbers the transition we end up calling EnsureStyleRuleFor once on
each tick).
2015-08-18 16:11:55 +09:00
Brian Birtles
0959beed1d Bug 1188251 part 9 - Request restyles from Animation::Tick; r=dholbert
In preparation for ultimately being able to run animations without a manager,
this patch moves the request restyle code from FlushAnimations to
Animation::Tick. (Ultimately most of this functionality should move to the
KeyframeEffect but for now Animation is fine.)
2015-08-18 16:11:55 +09:00
Wes Kocher
f6a10b2301 Merge inbound to central, a=merge 2015-08-17 17:00:42 -07:00
Wes Kocher
a766cb3417 Merge fx-team to central, a=merge 2015-08-17 16:54:21 -07:00
Ryan VanderMeulen
fa6ffdfa08 Bug 1195474 - Annotate 759249-1.html and 415394-1.xhtml as asserting in e10s mode. a=me 2015-08-17 15:48:20 -04:00
Ryan VanderMeulen
7512870e81 Bug 1195472 - Annotate 505912-1.html to expect one assertion in e10s mode. 2015-08-17 15:36:20 -04:00
Ryan VanderMeulen
e32420bdb9 Merge inbound to m-c. a=merge 2015-08-17 09:06:59 -04:00
Ben Tian
cac4eb9266 Bug 1192693 - [02] Remove bluetooth1 folder and rename webidl files, r=joliu, r=mrbkap 2015-08-17 15:30:34 +08:00
Brian Birtles
3801a43ea4 Bug 1188251 part 8 - Remove call to Animation::Tick from CheckAnimationRule; r=dholbert
We want to move the newly-introduced RequestRestyle call from FlushAnimations
to Animation::Tick. However, nsAnimationManager::CheckAnimationRule calls
Animation::Tick so this would cause us to start posting animation restyles
within a restyle.

Typically, Animations have an effect (currently there is only one type of
effect: KeyframeEffectReadOnly) and when there is any change in timing they
pass it down to their effect. However, the Animation is dependent on the
duration of the effect for determining if it is "finished" or not. As a result,
when an effect's timing changes, the owning Animation needs to know.

(The way this *should* work is that effects should tell their animation or
trigger some chain of events that causes animation's to update themselves.
However, the current implementation of effects is fairly primitive and does
not do this or even have a reference to the owning Animation. When we
implement the script API for updating the timing properties of effects we will
have to fix this but for now it is up to code in layout/style to update the
Animation when it touches the corresponding effect's timing.)

nsAnimationManager::CheckAnimationRule currently does this by calling
Animation::Tick() which ensures the Animation's finished state is updated
accordingly.

Ultimately we want to ensure that Animation::Tick is called exactly once per
frame (and at the appropriate point in that frame) so we'd like to remove this
call from CheckAnimationRule.

This patch achieves that by:

* Making Animation::SetEffect update the animation's timing - this is necessary
  for animations that are created by CheckAnimationRule and will be
  necessary when once we make Animation.effect writeable from script anyway.

* Calling Animation::SetEffect even for the case when we are updating the
  existing effect.

Another side-effect of calling Animation::Tick within
nsAnimationManager::CheckAnimationRule is that CSSAnimation::Tick queues
events. There are some tests (e.g. layout/style/test/test_animations.html) that
assume that animationstart events are dispatched immediately when new
animations are created. That will change with bug 1134163 but for now we
should maintain this existing behavior since changing this might introduce
compatibility issues that are best dealt with as a separate bug rather than
blocking this refactoring. To that end, this patch also explicitly queues
animationstart events for newly-created animations.
2015-08-17 13:59:45 +09:00
Brian Birtles
206e592672 Bug 1188251 part 7 - Move WillRefresh to CommonAnimationManager; r=dholbert
nsTransitionManager::WillRefresh and nsAnimationManager::WillRefresh are now
identical and all methods they call exist on CommonAnimationManager so we
can unify them there.
2015-08-17 13:59:44 +09:00
Brian Birtles
2e299dca17 Bug 1188251 part 6 - Unify FlushAnimations and FlushTransitions; r=dholbert
The implementations of FlushAnimations and FlushTransitions should now be all
but equivalent so this patch combines them into a single implementation on
CommonAnimationManager.

Regarding some of the minor differences between the two methods:

* The combined implementation drops the check for an empty list of collections
  found only in FlushTransitions. This seems like a very minor optimization
  that could possibly cause us to fail to unregister from the refresh driver
  if we forgot to do so when removing the last collection.

* The combined implementation uses the loop implementation from FlushAnimations
  since it is more compact.

This patch also removes the extra nested scope since it doesn't seem necessary.
2015-08-17 13:59:44 +09:00
Brian Birtles
ed5bbcb0c5 Bug 1188251 part 5 - Move some assertions from FlushTransitions to RequestRestyle; r=dholbert
There are a couple of assertions that only exist in FlushTransitions (and not
FlushAnimations). This patch moves them to RequestRestyle since they appear to
apply to either transitions or animations equally. By eliminating this
difference between FlushTransitions and FlushAnimations we should then be
in a position to combine them into a common method on the base class.
2015-08-17 13:59:44 +09:00
Brian Birtles
e903710ab6 Bug 1188251 part 4 - Move throttling checks to AnimationCollection::RequestRestyle; r=dholbert
This patch moves the additional checks (beyond those of Animation::CanThrottle)
from FlushAnimations/FlushTransitions to AnimationCollection::RequestRestyle.
These checks are on a per-collection basis hence it makes sense for the
collection to perform them. This also moves logic out of the managers which is
needed if we want to support script-based animations without introducing another
manager.
2015-08-17 13:59:44 +09:00
Brian Birtles
23e1fbe1ec Bug 1188251 part 3 - Add AnimationCollection::RequestRestyle; r=dholbert
Ultimately we want to move throttling logic to AnimationCollection and
Animation::Tick (and later to KeyframeEffect::SetParentTime). This is so that
we can support script-generated animations without having to introduce yet
another manager.

To that end this patch introduces a method on AnimationCollection that can be
called from Animation::Tick to perform the necessary notifications needed to
update style.

Later in this patch series we will extend RequestRestyle to incorporate more of
the throttling logic and further extend it to cover some of the other
notifications such as updating layers.

This patch tracks whether or not we have already posted a restyle for animation
to avoid making redundant calls. Calls to nsIDocument::SetNeedStyleFlush are
cheap and more difficult to detect when they have completed so we don't filter
redundant calls in the Restyle::Throttled case.

If mHasPendingAnimationRestyle is set and AnimationCommon::EnsureStyleRuleFor
is *never* called then we could arrive at situation where we fail to make post
further restyles for animation.

I have verified that if we fail to reset mHasPendingAnimationRestyle at the
appropriate point (e.g. resetting it at the end of EnsureStyleRuleFor *after*
the early-returns) then a number of existing tests fail.

Furthermore, I have observed that it is reset by the beginning of each tick
in almost every case except for a few instances of browser mochitests such as
browser/components/customizableui/test/browser_1007336_lwthemes_in_customize_mode.js.
In this case, during the async cleanup of the test, we have an opacity
transition on a vbox element that becomes display:none and appears to be skipped
during restyling. However, even in this case, EnsureStyleRuleFor is called
within one or at most two ticks and mHasPendingAnimationRestyle flag is cleared
(i.e. it does not get stuck).
2015-08-17 13:59:44 +09:00
Brian Birtles
31b93e48b4 Bug 1188251 part 2 - Check if a tick can be throttled in FlushAnimations using Animation::CanThrottle; r=dholbert
In FlushTransitions and FlushAnimations we use different mechanisms to see if a
transition/animation can be throttled on the current tick.

FlushTransitions calls Animation::CanThrottle whilst FlushAnimations calls
EnsureStyleRuleFor and checks if the rule has changed or not. These are not as
completely different as they might seem at first since, internally,
EnsureStyleRuleFor calls Animation::CanThrottle.

We would like to unify this behavior and simply use Animation::CanThrottle in
FlushAnimations as we do in FlushTransitions.

First, however, we have to account for the differences in these approaches:

1. Using the result of EnsureStyleRuleFor means we may *not* call
   PostRestyleForAnimation if an animation collection's mNeedsRefreshes member
   is false.

   This member is false when all animations have finished (or there are no
   animations in the collection). In this case EnsureStyleRuleFor will not
   update the style rule and we will end up assuming the tick can be throttled.
   *However*, in the case that all animations are finished
   Animation::CanThrottle will *also* return true (technically it will return
   false until we compose style for the first time after becoming finished but
   beyond that one moment it will return true) so skipping this check by using
   Animation::CanThrottle instead of EnsureStyleRuleFor should not
   make a significant difference.

2. Using the result of EnsureStyleRuleFor will mean that if we have already
   updated the style rule within a given tick we will avoid calling
   PostRestyleForAnimation (and call SetNeedStyleFlush instead). This can
   happen the first time we call FlushAnimations from
   PresShell::FlushPendingNotifications. (When we call FlushAnimations from
   nsAnimationManager::WillRefresh mStyleRuleRefreshTime will be stale and we
   won't apply this optimization. Furthermore after the first call to
   PresShell::FlushPendingNotifications we will typically skip calling
   FlushAnimations since PresShell::StyleUpdateForAllAnimationsIsUpToDate will
   typically return true).

   This seems like a possibly useful optimization although it is surprising we
   don't do the same for transitions. Note that this optimization applies
   regardless of whether we are performing a throttleable flush or not. That is,
   even if we pass CommonAnimationManager::Cannot_Throttle we will still end up
   throttling the tick in this case. Furthermore, we will mark the document as
   needing a style flush even though this does not appear to be necessary.

   This patch copies this optimization (checking if mStyleRuleRefreshTime) to
   FlushAnimations so we can maintain this behavior when calling
   Animation::CanThrottle instead of EnsureStyleRuleFor. It also applies the
   same behavior to FlushTransitions for consistency (and so we can later
   combine FlushAnimations and FlushTransitions).

   Note that we apply this optimization *before* calling Tick since it should
   only apply once we have already Tick'ed the animations in the collection.
   We will first hit FlushAnimations as a result of the refresh driver calling
   nsAnimationManager/nsTransitionManager::WillRefresh at which point
   mStyleRuleRefreshTime should be stale. Using this order not only saves
   redundant work but also makes moving the restyle code to Animation later on
   more straightforward.

   (In future we will divorce WillRefresh and FlushAnimations and only call
   Tick in WillRefresh and only perform this optimization FlushAnimations.)

3. Using the result of EnsureStyleRuleFor means that while checking if we can
   throttle or not we also update the style rule in FlushAnimations. That seems
   like an odd side-effect particularly since FlushTransitions doesn't do the
   same thing.
2015-08-17 13:59:44 +09:00
Brian Birtles
e801f2fcb1 Bug 1188251 part 1 - Remove transitions cleanup from FlushTransitions; r=dholbert
There is no longer anything in FlushTransitions that modifies the set of
transitions. I believe this changed as of bug 960465, specifically changeset
https://hg.mozilla.org/mozilla-central/rev/b2ee72589c18, so that this code is
no longer needed.

By removing this we can further align FlushAnimations and FlushTransitions.
2015-08-17 13:59:44 +09:00
William Chen
161ace8311 Bug 1181130 - Part 3: Keep track of editable descendants per node and prevent NS_STYLE_USER_SELECT_ALL selection for nodes with editable descendants. r=bz 2015-08-14 10:52:38 -07:00
Ehsan Akhgari
d2501342c4 Bug 1181130 - Part 2: Mark editable regions inside non-editable regions as -moz-user-select: -moz-text; r=dbaron 2015-08-14 10:52:33 -07:00
Ehsan Akhgari
51d7676c1e Bug 1181130 - Part 1: Add support for -moz-user-select: -moz-text; r=dbaron 2015-08-14 10:49:27 -07:00
Gijs Kruitbosch
308fed7444 Bug 1157292 - include XBL stylesheets in the inspector's list of stylesheets, r=dholbert,heycam 2015-08-12 13:43:39 +01:00
Arthur Edelstein
c35d3471c8 Bug 1192090 - Add 'aero-lite' Windows theme to 418986 tests. r=heycam 2015-08-13 13:02:00 -04:00
Aryeh Gregor
a0d8e26be1 Bug 1179451 - Part 1: Rewrite some ternary operators as if/else. r=froydnj 2015-08-13 15:22:48 +03:00
Gijs Kruitbosch
80e8233e2d Bug 1088637 - check we get the right transition event, r=Enn 2015-08-17 13:43:28 +01:00
Ting-Yu Lin
f5099d4b51 Bug 1194063 - Update link to point to the diagram directly. r=mtseng 2015-08-17 21:22:00 +08:00
Ting-Yu Lin
2603203275 Bug 1194063 - Always launch caret timer in cursor mode. r=mtseng
If the timer is not launched when the content is empty, the first caret
will always has Appearance::NormalNotShown, which is not consistent with
the behavior when the caret is shown when the content is not empty.

After this patch, Gaia will always receive an update event after 3
seconds timeout. Hence fixed a bug that the shortcut text dialog does
not hide after 3 seconds timeout.
2015-08-17 21:20:00 +08:00
Ryan VanderMeulen
0e0af6dbb2 Merge m-c to inbound. a=merge 2015-08-17 09:07:43 -04:00
Masayuki Nakano
7f356ebad3 Bug 555642 part.1 nsCaret should have a way to override the caret visible state for hiding caret temporarily and nsEditor should hide caret if composition string doesn't have caret information r=roc 2015-08-17 20:58:38 +09:00
L. David Baron
ecd4aaf948 Bug 1146002 - Increase fuzzy-if(Android) max-difference for box-sizing-replaced-003 to match box-sizing-replaced-002 to fix frequent intermittent failure. No review. 2015-08-16 23:12:43 +02:00
Jonathan Kew
af085b7586 Bug 1194493 - Ensure the 'mVertical' flag is set appropriately on the nsFontMetrics we use to draw text for an nsTextBoxFrame. r=smontagu 2015-08-16 15:09:08 +01:00
Kartikaya Gupta
453b31e327 Bug 1191277 - Ensure that we don't find clusters of clickable elements when there is no possible way for the heuristic to actually target those elements. r=domivinc 2015-08-15 11:15:29 -04:00
Cameron McCormack
6e7ec6c889 Bug 1146101 - Test. r=dbaron a=abillings 2015-08-14 12:24:49 +10:00
Mason Chang
8e20cbd768 Bug 1144946 - Delete PreciseRefreshDriverTimerWindowsDwmVsync refresh driver timer. r=roc 2015-08-13 08:22:28 -07:00
Xidorn Quan
ecdc64fc29 Bug 1186721 - Suppress line break due to soft hyphen inside ruby. r=jfkthame 2015-08-13 22:39:51 +10:00
Francois Marier
6349d3c212 Bug 992096 - Implement Sub Resource Integrity [1/2]. r=baku,r=ckerschb
Code changes
2015-08-12 20:19:11 -07:00
L. David Baron
f812cebb7e Bug 1195142 patch 3 - Link to correct specification URLs so the CSSWG test suite system is happy. 2015-08-18 08:20:35 +02:00
Ms2ger
f0d59f4600 Remove prefixed properties. No bug.
(Imported from https://hg.csswg.org/test/ by dbaron.)
2015-08-11 12:21:28 +02:00
L. David Baron
b4ca127aea Bug 1195142 patch 2 - Add reftests for will-change creating a stacking context. r=BenWa 2015-08-18 08:13:56 +02:00
L. David Baron
6574de9487 Bug 1195142 patch 1 - Set CSS_PROPERTY_CREATES_STACKING_CONTEXT for the opacity property. r=BenWa
This isn't actually needed for the only caller (which ensures that
frames with will-change: opacity create a stacking context), since
nsIFrame::BuildDisplayListForChild checks HasOpacity, which checks for
NS_STYLE_WILL_CHANGE_OPACITY.  However, it's good to have the bit set
for consistency in case we use it elsewhere.
2015-08-18 08:13:56 +02:00
Robert O'Callahan
b12ac5e986 Bug 1179288. Make position:fixed induce a stacking context. r=heycam 2015-08-17 11:02:54 +12:00
Wes Kocher
9eb02381a9 Merge m-c to inbound, a=merge 2015-08-17 17:15:24 -07:00
Mike Hommey
71dfb17528 Bug 1194497 - Convert a few remaining PRUnichar to char16_t. r=roc 2015-08-18 08:09:14 +09:00
Tom Tromey
a609b68474 Bug 1013814 - add inIDOMUtils.getRelativeRuleLine; r=heycam,pbrosset 2015-08-17 15:19:21 -07:00
Arnaud Bienner
d99c4429a7 Bug 1190086 - Use new String::Contains(char) method more widely r=froydnj 2015-08-14 00:49:15 +02:00
Ryan VanderMeulen
d36bbe2fa9 Bug 1172123 - Mark image-scrolling-zoom-1.html as fuzzy on OSX. r=seth
CLOSED TREE
2015-08-12 14:01:56 -04:00
Aryeh Gregor
f5961e4a6b Bug 874842 - Return Event instead of nsIDOMEvent 2015-08-12 14:39:31 +03:00
Jonathan Kew
f32d84ec5b Bug 1191185 - Simplify nsHypotheticalBox, eliminating obsolete/redundant fields, and rename to nsHypotheticalPosition. r=dholbert 2015-08-12 11:02:02 +01:00
Jonathan Kew
98815c8022 Bug 1191109 - Clean up use of writing-modes in GetHypotheticalBoxContainer, eliminating a redundant ConvertTo call. r=dholbert 2015-08-12 11:02:02 +01:00
Jonathan Kew
ae1c75cb4e Bug 1191855 - Make the intrinsic size of <iframe> remain physical 300x150, regardless of writing mode. r=dholbert 2015-08-12 11:02:02 +01:00
Cameron McCormack
e5b00ee850 Bug 1193019 - Rename CSSFontFaceLoadEvent to FontFaceSetLoadEvent. r=khuey 2015-08-11 12:19:52 +10:00
Benoit Girard
6e8f2c1528 Bug 1191412 - Fix logic and text for the WillChange warning. r=roc 2015-08-07 16:05:19 -04:00
Nick Robson
07b38ad250 Bug 1075089 - Move popup menu frame offset to LookAndFeel and fix default offset for OS X. r=Enn 2015-08-04 16:41:00 -04:00
Birunthan Mohanathas
fd290c6aa3 Bug 1185763 - Part 3: Rename nsTArray::MoveElementsFrom to AppendElements. r=froydnj 2015-08-11 08:29:46 -07:00
Birunthan Mohanathas
0e83cd889c Bug 1185763 - Part 1: Always use mozilla::Move with nsTArray::MoveElementsFrom. r=froydnj 2015-08-11 08:29:46 -07:00
Kyle Huey
1ffb03e8dc Bug 1179909: Refactor stable state handling. r=smaug
This is motivated by three separate but related problems:

1. Our concept of recursion depth is broken for things that run from AfterProcessNextEvent observers (e.g. Promises). We decrement the recursionDepth counter before firing observers, so a Promise callback running at the lowest event loop depth has a recursion depth of 0 (whereas a regular nsIRunnable would be 1). This is a problem because it's impossible to distinguish a Promise running after a sync XHR's onreadystatechange handler from a top-level event (since the former runs with depth 2 - 1 = 1, and the latter runs with just 1).

2. The nsIThreadObserver mechanism that is used by a lot of code to run "after" the current event is a poor fit for anything that runs script. First, the order the observers fire in is the order they were added, not anything fixed by spec. Additionally, running script can cause the event loop to spin, which is a big source of pain here (bholley has some nasty bug caused by this).

3. We run Promises from different points in the code for workers and main thread. The latter runs from XPConnect's nsIThreadObserver callbacks, while the former runs from a hardcoded call to run Promises in the worker event loop. What workers do is particularly problematic because it means we can't get the right recursion depth no matter what we do to nsThread.

The solve this, this patch does the following:

1. Consolidate some handling of microtasks and all handling of stable state from appshell and WorkerPrivate into CycleCollectedJSRuntime.
2. Make the recursionDepth counter only available to CycleCollectedJSRuntime (and its consumers) and remove it from the nsIThreadInternal and nsIThreadObserver APIs.
3. Adjust the recursionDepth counter so that microtasks run with the recursionDepth of the task they are associated with.
4. Introduce the concept of metastable state to replace appshell's RunBeforeNextEvent. Metastable state is reached after every microtask or task is completed. This provides the semantics that bent and I want for IndexedDB, where transactions autocommit at the end of a microtask and do not "spill" from one microtask into a subsequent microtask. This differs from appshell's RunBeforeNextEvent in two ways:
a) It fires between microtasks, which was the motivation for starting this.
b) It no longer ensures that we're at the same event loop depth in the native event queue. bent decided we don't care about this.
5. Reorder stable state to happen after microtasks such as Promises, per HTML. Right now we call the regular thread observers, including appshell, before the main thread observer (XPConnect), so stable state tasks happen before microtasks.
2015-08-11 06:10:46 -07:00
Kartikaya Gupta
7f7e3ef215 Bug 1189443 - Don't round down the margin amounts when inflating the displayport. r=dvander 2015-08-10 18:30:45 -04:00
Kartikaya Gupta
7558b16fd6 Bug 1191961 - Ensure scrollframes are activated similarly in test and reference pages. r=kip
With APZ enabled, these tests activate scrollframes (by scrolling them) in the
test pages but not the reference pages. This causes differences in layerization
which causes reftests to fail by a few pixel differences in the scrollbars. By
making the scrollboxes will-change:scroll-position both the test and reference
pages have activated scrollframes, and so the layerization is the same in both.
2015-08-10 10:59:47 -04:00
Neil Deakin
ee72237cfe Bug 1186972, use correct coordinates when comparing mouse position with menu anchor rectangle so that select element popups close properly, r=tn 2015-08-10 08:31:37 -04:00
Phil Ringnalda
44b7668948 Merge f-t to m-c, a=merge 2015-08-09 15:45:11 -07:00
Phil Ringnalda
cb5b880c6f Bug 1192575 - Update bug418986-2.js with the value of -moz-os-version for Windows 10 2015-08-07 22:23:30 -07:00
Cameron McCormack
be550d0652 Bug 1149542 - Part 3: Crashtest. r=dholbert 2015-08-08 11:40:04 +10:00
Brian Grinstead
6cc33a7f9a Bug 1175606 - Disable tracking protection for reftests;r=philor 2015-08-08 23:16:27 -07:00
Matt Woodrow
cd8614201c Bug 1187432 - Avoid scheduling main-thread paints for scrolls handled by apz. r=tn 2015-08-07 15:37:56 -04:00
L. David Baron
45d17c03ac Add missing match/mismatch links to reftests submitted to CSS WG test suite, so that they work correctly as CSSWG reftests in addition to working as our reftests. No bug. 2015-08-07 12:18:57 -07:00
Kartikaya Gupta
a08d86c0a3 Bug 1168487 - Update the last use site of ScrollbarAreaToExcludeFromCompositionBoundsFor to use LD pixels. r=tn 2015-08-07 14:23:13 -04:00
Mats Palmgren
a4131836eb Bug 1178575 - tests. 2015-08-07 14:05:48 +02:00
Mats Palmgren
5a0dd61b96 Bug 1178575 - Intersect the clip rect with aDirtyRect. r=roc 2015-08-07 14:05:48 +02:00
Lee Salzman
bfe0ffd48b Bug 1191609 - Always stroke CSS border sides separately from corner fills. r=mstange 2015-08-06 00:33:44 -04:00
Xidorn Quan
73ea534251 Backout unrelated code landed in dee3e26cc1c0 by mistake. 2015-08-07 14:40:16 +10:00
Xidorn Quan
221fbffb2a Bug 1186890 - Ensure parent always know when the child exit fullscreen. r=Dolske 2015-08-07 13:38:10 +10:00
Brian Birtles
658a7e1a29 Bug 1181392 part 9 - Remove use of IsFinishedTransition from nsTransitionManager::FlushTransitions; r=dbaron
This patch updates the logic in nsTransitionManager::FlushTransitions that deals
with detecting newly-started (i.e. when the delay phase has just finished) or
newly-finished animations. The existing logic had the following behavior:

* Calling SetIsFinishedTransition for newly-finished transitions.
  This is no longer needed since by this point all consumers of
  IsFinishedTransition have been updated to use alternative means for testing
  if an animation is relevant.

* Setting transitionStartedOrEnded to true so that we would post an animation
  restyle.
  We can achieve this same effect by simplying updating the canThrottleTick
  flag using the result of calling Animation::CanThrottle on each animation.
  Animation::CanThrottle will return false for a newly-started or
  newly-finished animation (it returns false for a newly-started animation
  since the animation's mIsRunningOnCompositor flag won't yet be true at that
  point.)

* Updating the animation generation for newly-started and newly-finished
  animations in order to trigger a layer update.
  At least that appears to be the intention of this code. However, it currently
  has no effect since the animation generation on the pres context is not
  incremented in any context I could find where a newly started/finished
  animation might be detected.

For this third case, this patch adds tests to ensure that transitions are
correctly added and removed from the compositor when they start and finish.
This is because most of the existing tests in test_animations_omta.html cover
only CSS animations.

As noted in the comments in the test, if a tick lands at the exact beginning of
a transition we will typically not send it to the layer until the following tick
because the RestyleManager will filter out the seemingly redundant change (i.e.
no change to the computed style). Presumably updating the animation generation
was intended to avoid this.

This same behavior is true of CSS animations (and the same kind of comment
appears elsewhere in test_animations_omta.html). Long-term this is probably
worth fixing so that when a transition is triggered we get it to the compositor
one tick earlier which should improve responsiveness when the main thread is
busy and the interval between ticks is long. Furthermore, we should do the same
for both all type of animations, not just transitions.

Currently, however, this patch preserves the existing behavior and helps narrow
the difference between transitions and animations so we can apply this
optimization to both.
2015-08-07 12:29:36 +09:00
Brian Birtles
007fe9cc21 Bug 1181392 part 8 - Remove use of IsFinishedTransition from nsTransitionManager::PruneCompletedTransitions; r=dbaron
This patch generalizes the logic in
nsTransitionManager::PruneCompletedTransitions to consider all transitions that
are no longer current (i.e. not running or scheduled to run) rather than
those marked as finished.
2015-08-07 12:29:36 +09:00
Brian Birtles
77ac1c41b7 Bug 1181392 part 7 - Remove use of IsFinishedTransition from nsTransitionManager::ConsiderStartingTransition; r=dbaron
Of particular note, this patch removes the check for finished transitions in
the case when we can't animate the current change. This case occurs when either
we have a non-transition style change that happens to coincide with the current
transition value, or a style change to something we can't interpolate to. In
either case it's not clear why we would cancel the existing transition only if
it is still in motion and not if it is finished. It seems like it should be
cancelled in either case and hence this patch removes this check.

The other change relates to detecting reversing transitions. In this case we do
need to distinguish between transitions that have finished and those that have
not. For this purpose, checking if the animation is current should be
sufficient. (Note that comparing for PlayState() == Finished would not be enough
since we want to also exclude *idle*, i.e. cancelled, animations too.)
2015-08-07 12:29:36 +09:00
Brian Birtles
99c8462d7f Bug 1181392 part 6 - Remove use of IsFinishedTransition from nsTransitionManager::StyleContextChanged; r=dbaron
In StyleContextChanged, when we drop a transition, we also update the animation
generation, unless the transition is finished. This is so that we will update
animations on layers accordingly. For all intents and purposes this is
equivalent to only updating the animation generation if the animation is
current.

Even in the case where the transition has *just* finished, it will either
already be considered finished and the regular animation tick (which uses the
same refresh driver time as we see in StyleContextChanged) will have triggered
an unthrottled sample to take the animation off the compositor (since
Animation::CanThrottle detects newly finished animations), or it will be not yet
finished in which case HasCurrentEffect will return true. If anything changed
timing properties in the time between running the refresh driver tick and
calling StyleContextChanged (such as seeking the Animation) it will also trigger
a layer update.

This patch also removes an unncessary assertion in
ElementPropertyTransition::CurrentValuePortion. This functions operates
sensibly even for finished transitions (due to the way it manages the fill
mode). It is up to the call site to determine whether it should be calling this
function on a finished transition or not.
2015-08-07 12:29:36 +09:00
Brian Birtles
b75f33037c Bug 1181392 part 5 - Remove use of IsFinishedTransition from AnimationCollection::HasAnimationOfProperty; r=dbaron
AnimationCollection::HasAnimationOfProperty uses IsFinishedTransition to filter
out transitions that should otherwise be ignored. This is used in the following
places:

1. nsLayoutUtils::HasAnimations

   The is only used by nsIFrame::BuildDisplayListForStackingContext to see if
   there are any opacity animations

   For this case, simply returning *current* animations would be sufficient
   (since finished but filling animations should have already filled in the
   display opacity)

2. CommonAnimationManager::GetAnimationsForCompositor

   This should really only return *current* animations--that is, animations that
   are running or scheduled to run. Finished animations never run on the
   compositor. Indeed, only *playing* animations run on the compositor but, as
   we will see in some of the cases below, it is sometimes useful to know that
   an animation *will* run on the compositor in the near future (e.g. so we can
   pre-render content).

   The places where GetAnimationsForCompositor is used are:

   - When building layers to add animations to layers in nsDisplayList--in this
     case we skip any animations that aren't playing so if
     GetAnimationsForCompositor only returned current animations that would be
     more than sufficient.

   - In nsLayoutUtils::HasAnimationsForCompositor. This in turn is used:

     - In ChooseScaleAndSetTransform to see if the transform is being animated
       on the compositor. If so, it calls
       nsLayoutUtils::ComputeSuitableScaleForAnimation (which also calls
       GetAnimationsForCompositor) and passes the result to
       GetMinAndMaxScaleForAnimationProperty which we have already adjusted in
       part 4 of this patch series to only deal with *relevant* animations

       Relevant animations include both current animations and in effect
       animations but we don't run forwards-filling animations on the compositor
       so GetAnimationsForCompositor should NOT return them. Current animations
       should be enough. In fact, playing animations should be enough but we
       might want to pre-render layers at a suitable size during their delay
       phase so returning current animations is probably ok.

     - In nsDisplayListBuilder::MarkOutOfFlowFrameForDisplay to add a fuzz
       factor to the overflow rect for frames undergoing a transform animation
       on the compositor. In this case too current animations should be
       sufficient.

     - In nsDisplayOpacity::NeedsActiveLayer to say "yes" if we are animating
       opacity on the compositor. Presumably in this case it would be good to
       say "yes" if the animation is in the delay phase too (as it currently
       does). After the animation is finished, we should drop the layer, i.e.
       current animations should be sufficient.

     - In nsDisplayTransform::ShouldPrerenderTransformedContent. As with
       nsDisplayOpacity::NeedsActiveLayer, we only need to pre-render
       transformed content for animations that are current.

     - In nsDisplayTransform::GetLayerState. As with
       nsDisplayOpacity::NeedsActiveLayer, we only need to return active here
       for current animations.

     - In nsIFrame::IsTransformed. Here we test the display style to see if
       there is a transform and also check if transform is being animated on the
       compositor. As a result, we really only need HasAnimationsForCompositor
       to return true for animations that are playing--otherwise the display
       style will tell us if we're transformed or not. Returning true for all
       current compositor animations (which is a superset of playing), however,
       should not cause problems (we already return true for even more than
       that).

     - In nsIFrame::HasOpacityInternal which is much the same as
       nsIFrame::IsTransformed and hence current should be fine.

3. AnimationCollection::CanThrottleAnimation

   Here, HasAnimationOfProperty is used when looking for animations that would
   disqualify us from throttling the animation by having an out-of-date layer
   generation or being a transform animation that affects scroll and so requires
   that we do the occasional main thread sample to update scrollbars.

   It would seem like current animations are enough here too. One interesting
   case is where we *had* a compositor animation but it has finished or been
   cancelled. In that case, the animation won't be current and we should not
   throttle the animation since we need to take it off its layer.

   It turns out checking for current animations is still ok in this case too.
   The reasoning is as follows:

   - If the animation is newly-finished, we'll pick that up in
     Animation::CanThrottle and return false then.

   - If the animation is newly-idle then there are two cases:

     If the cancelled animation was the only compositor animation then
     AnimationCollection::CanPerformOnCompositorThread will notice that there
     are no playing compositor animations and return false and
     AnimationCollection::CanThrottleAnimation will never be called.

     If there are other compositor animations running, then
     AnimationCollection::CanThrottleAnimation will still return false because
     whatever cancelled the animation will update the animation generation and
     we'll notice the mismatch between the layer animation generation and the
     animation generation on the collection.

Based on the above analysis it appears that making
AnimationCollection::HasAnimationOfProperty return only current animations (and
simulatneously renaming it to HasCurrentAnimationOfProperty) is safe. Indeed, in
effect, we already do this for transitions but not for animations. This patch
generalizes this behavior to all animations.

This patch also updates test_animations_omta.html since it was incorrectly
testing that a finished opacity animation was still running on the compositor.
Finished animations should not run on the compositor and the changes in this
patch cause that to happen. The reason we don't just update this test to check
for RunningOn.MainThread is that for opacity animations, unlike transform
animations, we can't detect if an opacity on a layer was set by animation or
not. As a result, for opacity animations we typically test the opacity on
either the main thread or compositor in order to allow for the case where an
animation-set opacity is still lingering on the compositor.
2015-08-07 12:29:36 +09:00
Brian Birtles
d21a5ec32c Bug 1181392 part 4 - Remove use of IsFinishedTransition from nsLayoutUtils; r=dbaron
GetMinAndMaxScaleForAnimationProperty in nsLayoutUtils uses IsFinishedTransition
to ignore finished transitions since they should not have any effect on current
or future scale values. We can generalize this, however, and say we are only
interested in animations that are *either*:

a) running or scheduled to run in the future, i.e. "current", OR
b) applying a value, including a finished animation with a forwards fill,
   i.e. "in effect"

Elsewhere, animations that fulfil *either* of this conditions are referred to as
"relevant animations" so we can simply test for relevance in this function.
2015-08-07 12:29:36 +09:00
Wes Kocher
470f734e39 Merge m-c to inbound, a=merge 2015-08-06 18:11:16 -07:00
Brian Birtles
a8682cf4b0 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
256f836f71 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
3916e22f2d 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
86b3fb5040 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
7fac27c8f2 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
61f8b5877d 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
e4cb3c7353 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
20feb8ddef 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
4b7b196882 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
4e3e752017 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
d9a2deabb6 Bug 1183431 - Ensure hypothetical box has a writing mode with the same block direction as the absolute containing block. r=dholbert 2015-08-06 21:01:31 +01:00
Jonathan Kew
5c700944e2 Bug 1183431 - Tests for hypothetical box computation (to determine static position of abspos element) where orthogonal writing modes are involved. r=dholbert 2015-08-06 21:00:45 +01:00
Jonathan Kew
f302fe931b Backout changesets 1639af64e372, 74ecf0f57a56, 94831690f525, 27eab13d3cf2 (bug 1183431) for Android-specific failure in reftest 1183431-orthogonal-modes-5a.html. 2015-08-06 17:32:20 +01:00
Jonathan Kew
e99b30bfad Bug 1183431 followup - Crashtest no longer asserts, so mark it appropriately on the CLOSED TREE. 2015-08-06 16:36:50 +01:00
Jonathan Kew
e258325cd4 Bug 1183431 followup - Add the test files that I failed to "hg add" when updating the reftest patch, because it's going to burn the CLOSED TREE. 2015-08-06 16:25:07 +01:00
Jonathan Kew
6b8a7315f4 Bug 1183431 - Ensure hypothetical box has a writing mode with the same block direction as the absolute containing block. r=dholbert 2015-08-06 15:44:50 +01:00
Jonathan Kew
722aa62919 Bug 1183431 - Tests for hypothetical box computation (to determine static position of abspos element) where orthogonal writing modes are involved. r=dholbert 2015-08-06 15:44:48 +01:00
Jeremy Chen
29b1ef5c80 Bug 1181418 - Send selectionEditable info to app_text_selection_dialog. r=tlin, r=kanru, sr=smaug 2015-07-31 04:34:00 +08:00
John Daggett
fee8ab207f Bug 1176275 - fixup reftests that will fail without fontconfig platform fontlist. r=heycam 2015-08-06 14:33:15 +09:00
L. David Baron
200c0cb919 Bug 451791 patch 2 - Report block non-empty to its parent block during margin collapsing if we encounter clearance. r=roc
The goal of ComputeCollapsedBStartMargin is to collapse all of the
margins that collapse with a block's top margin.  It does this by
scanning forward through the child list until it finds something that
blocks collapsing; it descends into children through recursion.  When we
find a non-empty block or line, we stop collapsing and report to the
parent that the child is non-empty so that it stops collapsing as well.

This patch changes our behavior when we have clearance to do the same
thing that we do for non-empty lines or blocks (which makes both
occurrences of |goto done| be preceded by the same code).  Without the
patch we would fail to report being non-empty to the parent (and instead
report emptiness based on the IsEmpty() method).  This meant that,
without the patch, if a block has a child with clearance but also has
IsEmpty() true, we would stop scanning margins in that block after the
clearance, but start searching again for margins in the block's parent,
starting with the block's bottom margin.  This patch sets *aBlockIsEmpty
to true in that case so that we do not pick up again in the block's
parent (or, potentially, grandparent, etc.).
2015-08-05 21:04:38 -07:00
L. David Baron
8b50f0495a Bug 451791 patch 1 - Remove write-only nsHTMLReflowState::mFlags::mHasClearance. r=roc
This was introduced in bug 209694 (gecko-dev 13a65028) but became unused
through bug 292295 (gecko-dev 4593df2a57) and bug 300030 (gecko-dev
31f18988).
2015-08-05 21:04:38 -07:00
Cameron McCormack
2527b5f2f1 Bug 1190254 - Use same conditions to call ReparentStyleContext in RestyleUndisplayedNodes as in RestyleSelf. r=mats 2015-08-06 09:16:00 +10:00
Kartikaya Gupta
86ef51386e Bug 1189837 - Subtract scrollbars in LD pixels rather than CSS pixels. r=mstange 2015-08-05 14:39:42 -04:00
Cameron McCormack
6e3e83210a Bug 1180118 - Part 11: Use ReparentStyleContext even if eRestyle_SomeDescendants is used. r=bzbarsky 2015-08-05 22:42:21 +10:00
Cameron McCormack
a449d7568c Bug 1180118 - Part 10: Logging. r=bzbarsky 2015-08-05 22:42:21 +10:00
Cameron McCormack
ee642530be Bug 1180118 - Part 9: Clear nsCSSSelector pointers in the pending restyle tracker if they might be stale. r=bzbarsky 2015-08-05 22:42:21 +10:00
Cameron McCormack
bd001a68ec Bug 1180118 - Part 8: Keep track of the closest restyle root in AddPendingRestylesForDescendantsMatchingSelectors. r=bzbarsky 2015-08-05 22:42:21 +10:00
Cameron McCormack
613625e1b5 Bug 1180118 - Part 7: Split out FindClosestRestyleRoot and allow passing in a pre-computed restyle root to AddPendingRestyle. r=bzbarsky 2015-08-05 22:42:21 +10:00
Cameron McCormack
1a33569ab2 Bug 1180118 - Part 6: Return eRestyle_SomeDescendants from HasAttributeDependentStyle where appropriate. r=bzbarsky 2015-08-05 22:42:21 +10:00
Cameron McCormack
9bb0cce6bd Bug 1180118 - Part 5: Add a RestyleHintData outparam to HasAttributeDependentStyle for use with eRestyle_SomeDescendants. r=bzbarsky 2015-08-05 22:42:21 +10:00
Cameron McCormack
9934218fb6 Bug 1180118 - Part 4: Store pointer to the rightmost selector for class, ID and attribute selectors in the rule cascade. r=bzbarsky 2015-08-05 22:42:20 +10:00
Cameron McCormack
9e49ce1258 Bug 1180118 - Part 3: Convert eRestyle_SomeDescendants into eRestyle_Self for elements that match selectors. r=bzbarsky 2015-08-05 22:42:20 +10:00
Cameron McCormack
b2b0c4777c Bug 1180118 - Part 2: Add eRestyle_SomeDescendants restyle hint and pass associated restyle hint data into restyle methods. r=bzbarsky 2015-08-05 22:42:20 +10:00
Cameron McCormack
c418a5428f Bug 1180118 - Part 1: Add a method to match a single nsCSSSelector (without pseudo-elements) against an Element. r=bzbarsky 2015-08-05 22:42:20 +10:00
Jonathan Kew
5e316b541c Bug 1113206 followup - Add simple test for <select> elements in vertical writing mode. r=roc 2015-08-05 12:43:24 +01:00
Mason Chang [:mchang]
09ca2626fb Bug 1073209 - Eliminate usage of CreateSamplingRestrictedDrawable on d2d backends. r=jrmuizel 2015-08-04 08:13:00 +02:00
Birunthan Mohanathas
9b6236a10a Bug 1191100 - Remove XPIDL signature comments in .cpp files. r=ehsan
Comment-only so DONTBUILD.
2015-08-04 16:17:36 -07:00
L. David Baron
9668cf3a00 Bug 1187851 patch 5 - Make dynamic changes to perspective change fixed position containing block for descendants. r=roc 2015-08-04 14:29:16 -07:00
L. David Baron
eadf224376 Bug 1187851 patch 4 - Fix URL in tests to be something that Shepherd recognizes. No review. 2015-08-04 14:29:16 -07:00
Daniel Holbert
e78e37814f Bug 1187110 part 5: re-enable mochitest test_extra_inherit_initial.html on b2g debug. (no review) 2015-07-22 07:59:23 -07:00
Daniel Holbert
4e5781d626 Bug 1187110 part 4: In test_extra_inherit_initial.html, only test every special-keyword with the first few values of each property (and then test one keyword per value). r=heycam 2015-08-04 14:05:22 -07:00
Daniel Holbert
2ed0e4495f Bug 1187110 part 3: Iterate across array of special keyword values, instead of hardcoded function-arguments, in test_extra_inherit_initial.html. r=heycam 2015-08-04 14:05:22 -07:00
Daniel Holbert
92ebef1b50 Bug 1187110 part 2: Use "let" instead of "var" in test_extra_inherit_initial.html, to make scoping more explicit. r=heycam 2015-08-04 14:05:22 -07:00
Daniel Holbert
87015bb329 Bug 1187110 part 1: Use "for of" instead of "for in" to loop over an array in test_extra_inherit_initial.html. r=heycam 2015-08-04 14:05:12 -07:00
Robert O'Callahan
f0331f0a98 Bug 1190635. Don't early-return for an mHeight change, since width changes can add extra change hints. r=heycam
Don't return early for an mWidth change either.
2015-08-04 16:41:50 +12:00
Carsten "Tomcat" Book
22c46d8958 Backed out 13 changesets (bug 1180118) for crashes on a CLOSED TREE
Backed out changeset c65d298d7cfa (bug 1180118)
Backed out changeset 7c5ebadc3fc9 (bug 1180118)
Backed out changeset 91a3e2205388 (bug 1180118)
Backed out changeset 15ad6049b940 (bug 1180118)
Backed out changeset 9b41cd9f2bc5 (bug 1180118)
Backed out changeset 37493f6eef20 (bug 1180118)
Backed out changeset b7ec8d4d2d7e (bug 1180118)
Backed out changeset cfeeae42d514 (bug 1180118)
Backed out changeset 9bcc3233f3c8 (bug 1180118)
Backed out changeset b99c358a6fea (bug 1180118)
Backed out changeset 4a7b79980353 (bug 1180118)
Backed out changeset 20984dfa4302 (bug 1180118)
Backed out changeset ef165b896cf4 (bug 1180118)
2015-08-04 12:20:20 +02:00
Cameron McCormack
0fddbc0824 Bug 1180118 - Second followup warning-as-error build fix. 2015-08-04 17:50:32 +10:00
Cameron McCormack
6bec42f7ac Bug 1180118 - Followup warning-as-error build fix. 2015-08-04 17:49:53 +10:00
Cameron McCormack
e0954cacf9 Bug 1180118 - Part 11: Use ReparentStyleContext even if eRestyle_SomeDescendants is used. r=bzbarsky 2015-08-04 17:27:53 +10:00
Cameron McCormack
1249db8d6f Bug 1180118 - Part 10: Logging. r=bzbarsky 2015-08-04 17:27:53 +10:00
Cameron McCormack
3d207db04f Bug 1180118 - Part 9: Clear nsCSSSelector pointers in the pending restyle tracker if they might be stale. r=bzbarsky 2015-08-04 17:27:53 +10:00
Cameron McCormack
0dfed4ea0c Bug 1180118 - Part 8: Keep track of the closest restyle root in AddPendingRestylesForDescendantsMatchingSelectors. r=bzbarsky 2015-08-04 17:27:53 +10:00
Cameron McCormack
429fc23695 Bug 1180118 - Part 7: Split out FindClosestRestyleRoot and allow passing in a pre-computed restyle root to AddPendingRestyle. r=bzbarsky 2015-08-04 17:27:53 +10:00
Cameron McCormack
068cf441ab Bug 1180118 - Part 6: Return eRestyle_SomeDescendants from HasAttributeDependentStyle where appropriate. r=bzbarsky 2015-08-04 17:27:53 +10:00
Cameron McCormack
d24ea39dec Bug 1180118 - Part 5: Add a RestyleHintData outparam to HasAttributeDependentStyle for use with eRestyle_SomeDescendants. r=bzbarsky 2015-08-04 17:27:53 +10:00
Cameron McCormack
fb05dd4326 Bug 1180118 - Part 4: Store pointer to the rightmost selector for class, ID and attribute selectors in the rule cascade. r=bzbarsky 2015-08-04 17:27:53 +10:00
Cameron McCormack
8e552e06ea Bug 1180118 - Part 3: Convert eRestyle_SomeDescendants into eRestyle_Self for elements that match selectors. r=bzbarsky 2015-08-04 17:27:52 +10:00
Cameron McCormack
4d7ed09b82 Bug 1180118 - Part 2: Add eRestyle_SomeDescendants restyle hint and pass associated restyle hint data into restyle methods. r=bzbarsky 2015-08-04 17:27:52 +10:00
Cameron McCormack
9e9dd010c3 Bug 1180118 - Part 1: Add a method to match a single nsCSSSelector (without pseudo-elements) against an Element. r=bzbarsky 2015-08-04 17:27:52 +10:00
Nicholas Nethercote
845b474b3c Bug 1189156 (part 4) - Don't use enumeration style for nsBaseHashtable::SizeOf{In,Ex}cludingThis(). r=erahm,jfkthame.
After this change, we have ShallowSizeOf{In,Ex}cludingThis(), which don't do
anything to measure children. (They can be combined with iteration to measure
children.)
2015-07-30 21:19:57 -07:00
Nicholas Nethercote
f23a15f104 Bug 1189156 (part 2) - Don't use enumeration style for nsTHashtable::SizeOf{In,Ex}cludingThis(). r=erahm.
After this change, we have ShallowSizeOf{In,Ex}cludingThis(), which don't do
anything to measure children. (They can be combined with iteration to measure
children.)

And we still have the existing single-arg SizeOf{In,Ex}cluding() functions,
which work if the entry type itself defines SizeOfExcludingThis().
2015-07-29 01:50:52 -07:00
L. David Baron
24a04c0947 Bug 1187851 patch 3 - Rename nsChangeHint_AddOrRemoveTransform to nsChangeHint_UpdateContainingBlock. r=roc
This is because patch 4 now uses AddAndRemoveTransform hints for changes
that are other than adding and removing a transform.  There's still a
little bit of transform-related stuff there too (which I did make
conditional in patch 2).
2015-08-03 20:18:00 -07:00
L. David Baron
9fa4e071c6 Bug 1187851 patch 2 - Cleanup to prepare for making dynamic changes to filter and perspective change fixed position containing block for descendants. r=roc 2015-08-03 20:18:00 -07:00
L. David Baron
09e1edef79 Bug 1187851 patch 1 - Tests for making dynamic changes to filter and perspective change fixed position containing block for descendants. r=roc
As expected, without the patch in patch 4, the filter and perspective
tests fail, but the added transform test passes.  All the tests pass
locally with patch 4.
2015-08-03 20:18:00 -07:00
Daniel Holbert
ccf479d5b1 Bug 1183786 - Part 4: Drop unnecessary '!!' boolification. r=tn 2015-08-03 17:13:08 -07:00
Daniel Holbert
e67b0fe9eb Bug 1183786 - Part 3: Make nsPresContext helper-function return already_AddRefed instead of bool+outparam. r=tn 2015-08-03 17:13:07 -07:00
Eric Rahm
38da96738d Bug 1183786 - Part 2: Delay updating after prefs changed if detached. r=tn r=dholbert 2015-07-30 20:47:26 -07:00
Eric Rahm
6ea570b8b8 Bug 1183786 - Part 1: Refactor timer setup code into a helper function. r=dholbert 2015-07-30 14:24:51 -07:00
Robert O'Callahan
727bfb81dc Bug 1184842. Restyling should consider only the classes that have changed. r=heycam 2015-07-25 17:56:58 +12:00
Robert O'Callahan
c0b6fcd9ee Bug 1184842. Route aOldValue/aNewValue to AttributeData. r=heycam 2015-07-22 15:54:07 +12:00
Robert O'Callahan
3e3003e4ce Bug 1184842. Add aNewValue to nsIMutationObserver::AttributeWillChange. r=peterv 2015-07-25 18:05:19 +12:00
Robert O'Callahan
9fb2247b78 Bug 1184842. Pass preparsed attribute values to nsNodeUtils::AttributeWillChange. r=peterv 2015-07-22 15:53:35 +12:00
Robert O'Callahan
53c0044a87 Bug 1184842. Pass aOldValue to all mutation observers. r=peterv 2015-07-25 18:01:19 +12:00
Robert O'Callahan
60019c952c Bug 1184842. Remove frameset mVisibilityOverride since it's always false now. r=mats 2015-07-21 16:22:02 +12:00
Robert O'Callahan
01b69ed910 Bug 1184842. Remove layout.frames.force_resizability pref. r=mats 2015-07-21 16:18:17 +12:00
Ryan VanderMeulen
7adbd17a19 Merge m-c to inbound. a=merge 2015-08-03 15:03:34 -04:00
Ryan VanderMeulen
fa2176eb4f Merge inbound to m-c. a=merge 2015-08-03 15:02:19 -04:00
Carsten "Tomcat" Book
0724563b89 Merge mozilla-central to fx-team 2015-08-03 16:16:12 +02:00
L. David Baron
2bc4edbca0 Backed out changeset f24dbdeeaef1 (Bug 1187851 patch 1) for reflow counting failures in Gaia integration tests apps/system/test/marionette/edges_gesture_test.js and apps/system/test/marionette/homescreen_navigation_test.js . 2015-08-02 22:35:28 -07:00
L. David Baron
3e99b50ca7 Backed out changeset 5dcb38c7f1b8 (Bug 1187851 patch 2) for reflow counting failures in Gaia integration tests apps/system/test/marionette/edges_gesture_test.js and apps/system/test/marionette/homescreen_navigation_test.js . 2015-08-02 22:34:49 -07:00
L. David Baron
117833e7c4 Bug 1187851 patch 2 - Rename nsChangeHint_AddOrRemoveTransform to nsChangeHint_UpdateContainingBlock. r=roc 2015-08-02 21:03:09 -07:00
L. David Baron
6d69ebfdfe Bug 1187851 patch 1 - Make dynamic changes to filter and perspective change fixed position containing block for descendants. r=roc
Note that this now uses AddAndRemoveTransform hints for changes that are
other than adding and removing a transform.  Since there's still a
little bit of transform-related stuff there too (which I did make
conditional), I figure it's probably best to leave the name as-is,
although I'd be open to renaming it as well.

As expected, without the patch, the filter and perspective tests fail,
but the added transform test passes.  All the tests pass locally with
the patch.
2015-08-02 21:03:09 -07:00
L. David Baron
1e265de04a Bug 538194 patch 2 - Redo block reflow below floats when the height of a block that does not intersect floats pushes it into the way of other floats. r=roc
This adds an additional retry loop in block reflow that we can only
trigger when reflowing a block formatting context (replacedBlock
non-null).  It can retry in two different ways, either with a narrower
width but at the same vertical position (when
ReplacedBlockFitsInAvailSpace is still true) or at a new vertical
position (which is treated as a form of clearance).

Fortunately we don't have to worry about margins collapsing *through*
such a boundary since we're dealing with a new block formatting context.

Note that Chromium passes all of the new bfc-displace-* tests, although
it moves the block formating context down unnecessarily in
bfc-shrink-1.html (which we do neither before nor after the patch),
though agrees with the width we have after the patch (but not before the
patch).
2015-08-02 21:03:09 -07:00
L. David Baron
88915cde1f Bug 538194 patch 1 - Refactor some code dealing with fitting block formatting contexts around floats into separate functions. r=roc 2015-08-02 21:03:09 -07:00
Kartikaya Gupta
fef03e9d58 Bug 1188172 - Don't update the resolution/SPCSPS for meta-viewport changes before the first-paint. r=botond 2015-08-02 22:50:54 -04:00
dominique vincent
80e6d6368f Bug 1188185 - Zoomed View appears when the two links are the same link. r=kats 2015-07-31 15:22:46 +02:00
Mike Taylor
f6b6db0b55 Bug 1189922. Add a preference to enable global whitelisting of the CSSUnprefixingService. r=dholbert
This is a temporary preference to allow for testing-in-the-wild by a larger
audience, for nightly builds. When 1177263 is fixed this can be removed.
---
 layout/style/nsCSSParser.cpp | 14 ++++++++++++++
 modules/libpref/init/all.js  |  6 ++++++
 2 files changed, 20 insertions(+)
2015-08-02 10:27:44 -07:00
Daniel Holbert
21228e762d Bug 1023344: Tweak asserts() annotation for crashtest 876074-1.html, to allow for occasional no-assertion & extra-assertion. 2015-07-31 16:29:50 -07:00
Drew Willcoxon
742ed4be70 Bug 1188665 - Make nsIDOMWindowUtils.disableDialogs() disable onbeforeunload dialogs. r=bz 2015-07-31 16:13:01 -07:00