Граф коммитов

46792 Коммитов

Автор SHA1 Сообщение Дата
Daniel Holbert 14faf6467e 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 f84455e83a Backed out changeset de7aa6b08234 (bug 1194055) for windows 8 reftest failures CLOSED TREE 2015-08-18 12:09:56 -07:00
Kartikaya Gupta 3fd3f3cf8e Bug 1180295 - Stop clipping the content while the toolbar is in the process of sliding off. r=rbarker
--HG--
extra : commitid : IMjRmklIhXd
2015-08-18 14:27:19 -04:00
Kartikaya Gupta 056c55b10f Bug 1180295 - Rip out call to setContentDocumentFixedPositionMargins. r=rbarker
--HG--
extra : commitid : 7uU6xgPVZom
2015-08-18 14:27:18 -04:00
Kartikaya Gupta ab181715ad 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
--HG--
extra : commitid : FQlOBuH0lQN
2015-08-18 14:27:17 -04:00
Nathan Froyd 797182f90f 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 d5e63ae0b8 Bug 1192831 - Remove PlayPreview API. r=jet, r=peterv 2015-08-20 15:15:18 -05:00
Jonathan Kew ba8a9d5901 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 eebda9bb00 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.

--HG--
extra : commitid : JHAxvifqpZS
extra : rebase_source : 9ae578f616eedc939839bc056c5437a84e8fedea
2015-08-19 15:54:10 +08:00
Ting-Yu Lin 8dbb5ca794 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.

--HG--
extra : commitid : Fmupbt6gIQ9
extra : rebase_source : 0c427bf767c9d44e9467469e929f27e743e7d013
2015-08-19 15:54:10 +08:00
Ting-Yu Lin 1fc80119ff 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.

--HG--
extra : commitid : 3y2smyRZQCW
extra : rebase_source : 36e7b65cf67f3148ea24668eef7078ee4daadb3c
2015-08-19 15:54:10 +08:00
Ting-Yu Lin ef51f04d19 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.

--HG--
extra : commitid : 5bl8GhmTLQi
extra : rebase_source : f151c98dc99c33e8050b106ab8695a9053dbb3ad
2015-08-19 15:54:10 +08:00
Benoit Girard 074eb08eb1 Bug 1186662 - Part 1: Add SuppressDisplayport painting and use it during tab switch. r=kats,mconley
--HG--
extra : commitid : 9fUfVIK8ikm
extra : rebase_source : e45570f97a25f965d2caf24f152da02efcf6495f
2015-08-19 17:08:41 -04:00
Mats Palmgren 1b43a8a43a 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 c59e0c81c8 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 81c7895606 Bug 968923 - part 3d - record use counter information from the CSS parser; r=dbaron 2015-06-03 15:21:24 -04:00
Cameron McCormack 2e3473ca07 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 2800ce3e55 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 bb25bd45bf Bug 1190257. Use the previous vsync timestamp on windows 10. r=jrmuizel 2015-08-18 09:11:12 -07:00
Markus Stange 14484176b5 Bug 1187804 - Reftests for async scrolling with position:fixed in an iframe. r=kats
--HG--
extra : commitid : 7IsHJNrMn5D
2015-06-23 23:18:33 -07:00
Markus Stange 6fab3abcb1 Bug 1187804 - Annotate fixed-position layers with the scroll id of the scroll frame that they are fixed with respect to. r=mattwoodrow
--HG--
extra : commitid : GjQ1Npqd8Ss
2015-08-17 19:44:42 -04:00
Ryan VanderMeulen ec7cb5f4fc Merge m-c to inbound. a=merge 2015-08-18 10:58:07 -04:00
Ryan VanderMeulen 29ef75cefa Merge b2g-inbound to m-c. a=merge 2015-08-18 10:41:52 -04:00
Andrew Osmond 12d520af6a Bug 1186273 - Part 1. Move preferences and observers into dedicated threadsafe module. r=dhylands 2015-08-18 07:42:12 -04:00
Brian Birtles 7f6947284e 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 3cc3ae622c 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 6e18b672e3 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 5715bb1092 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 c11420c4df Merge inbound to central, a=merge 2015-08-17 17:00:42 -07:00
Wes Kocher 06e280b35d Merge fx-team to central, a=merge 2015-08-17 16:54:21 -07:00
Ryan VanderMeulen 47217eaaec Bug 1195474 - Annotate 759249-1.html and 415394-1.xhtml as asserting in e10s mode. a=me
--HG--
extra : amend_source : 6f6f04e2566e9e74bad340ceb9238566e3a55f5e
2015-08-17 15:48:20 -04:00
Ryan VanderMeulen 2b80504f9c Bug 1195472 - Annotate 505912-1.html to expect one assertion in e10s mode. 2015-08-17 15:36:20 -04:00
Ryan VanderMeulen 0169e05964 Merge inbound to m-c. a=merge 2015-08-17 09:06:59 -04:00
Ben Tian a0a229d80d Bug 1192693 - [02] Remove bluetooth1 folder and rename webidl files, r=joliu, r=mrbkap
--HG--
rename : dom/webidl/BluetoothAdapter2.webidl => dom/webidl/BluetoothAdapter.webidl
rename : dom/webidl/BluetoothDevice2.webidl => dom/webidl/BluetoothDevice.webidl
rename : dom/webidl/BluetoothManager2.webidl => dom/webidl/BluetoothManager.webidl
2015-08-17 15:30:34 +08:00
Brian Birtles 8ab108c3be 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 d263e17945 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 d65e0109bc 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 999f5441cb 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 7c39c22a6b 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 0cf13fbef2 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 b71ee27f2f 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 ab1cd7b690 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 148ff86273 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 999beb4acd 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 ce551a9f32 Bug 1181130 - Part 1: Add support for -moz-user-select: -moz-text; r=dbaron 2015-08-14 10:49:27 -07:00
Gijs Kruitbosch ecccf6ff1a Bug 1157292 - include XBL stylesheets in the inspector's list of stylesheets, r=dholbert,heycam
--HG--
extra : commitid : FaWwCEWPkKA
extra : rebase_source : 4d4568f1c30cb8d062106f71099e21a3c33f25ab
2015-08-12 13:43:39 +01:00
Arthur Edelstein 09a03e1039 Bug 1192090 - Add 'aero-lite' Windows theme to 418986 tests. r=heycam
--HG--
extra : rebase_source : 91ec7e91f8eab4033a1f183d61b1f5461fd2a7f3
2015-08-13 13:02:00 -04:00
Aryeh Gregor 0ccef27b6a Bug 1179451 - Part 1: Rewrite some ternary operators as if/else. r=froydnj
--HG--
extra : rebase_source : 161e415b6f518bf2b82e45b6f7f8d21298712d81
2015-08-13 15:22:48 +03:00
Gijs Kruitbosch 60c46f11cf Bug 1088637 - check we get the right transition event, r=Enn
--HG--
extra : commitid : zbwmIObuaT
extra : rebase_source : 9670ce6066a7daecc850e788c4ca72d2f1fbd1e9
extra : amend_source : 527852122ba938e40dfc8ce74804daec9485b994
2015-08-17 13:43:28 +01:00
Ting-Yu Lin 903d6e6bff Bug 1194063 - Update link to point to the diagram directly. r=mtseng
--HG--
extra : commitid : 6QKaQjcgR74
2015-08-17 21:22:00 +08:00
Ting-Yu Lin f5102fc4ca 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.

--HG--
extra : commitid : BwUbPSfjZs2
2015-08-17 21:20:00 +08:00
Ryan VanderMeulen 1caf889687 Merge m-c to inbound. a=merge 2015-08-17 09:07:43 -04:00
Masayuki Nakano 3645c1dbaf 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 a58048f446 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 054796730b 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 36f86db358 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
--HG--
extra : commitid : BcmblW2Avbd
2015-08-15 11:15:29 -04:00
Cameron McCormack 0423ad42b1 Bug 1146101 - Test. r=dbaron a=abillings 2015-08-14 12:24:49 +10:00
Mason Chang aefa45f713 Bug 1144946 - Delete PreciseRefreshDriverTimerWindowsDwmVsync refresh driver timer. r=roc
--HG--
extra : histedit_source : ae7f29c200c78e60695e87eb272c9c4d4abf51b9
2015-08-13 08:22:28 -07:00
Xidorn Quan 8c9c798a7f Bug 1186721 - Suppress line break due to soft hyphen inside ruby. r=jfkthame
--HG--
extra : source : dfcc7df95f21d7b22705ebb24b9f693d70989167
2015-08-13 22:39:51 +10:00
Francois Marier 34de332db0 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 ef223d57a2 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 132c5b2f05 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 792c0d9ece Bug 1195142 patch 2 - Add reftests for will-change creating a stacking context. r=BenWa
--HG--
extra : commitid : 7mGPUbhsYeC
2015-08-18 08:13:56 +02:00
L. David Baron d6fd5cd910 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.

--HG--
extra : commitid : 2mKHVXRkjZL
2015-08-18 08:13:56 +02:00
Robert O'Callahan 23fec6ad97 Bug 1179288. Make position:fixed induce a stacking context. r=heycam
--HG--
extra : commitid : 7QaxW4IWItK
extra : rebase_source : 33cc2889181a70d662757c0a93a4d1438ffb3573
2015-08-17 11:02:54 +12:00
Wes Kocher 292ed85eba Merge m-c to inbound, a=merge 2015-08-17 17:15:24 -07:00
Mike Hommey 9fe13fc89a Bug 1194497 - Convert a few remaining PRUnichar to char16_t. r=roc 2015-08-18 08:09:14 +09:00
Tom Tromey 131556a889 Bug 1013814 - add inIDOMUtils.getRelativeRuleLine; r=heycam,pbrosset 2015-08-17 15:19:21 -07:00
Arnaud Bienner 2755fa9a57 Bug 1190086 - Use new String::Contains(char) method more widely r=froydnj
--HG--
extra : rebase_source : 81df1495200d3734ea1c4c13818ae764a445f4b3
2015-08-14 00:49:15 +02:00
Ryan VanderMeulen 78f968afe8 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 5aeef0231d Bug 874842 - Return Event instead of nsIDOMEvent 2015-08-12 14:39:31 +03:00
Jonathan Kew b9df47f5de Bug 1191185 - Simplify nsHypotheticalBox, eliminating obsolete/redundant fields, and rename to nsHypotheticalPosition. r=dholbert 2015-08-12 11:02:02 +01:00
Jonathan Kew 0d98ee0d97 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 b8dbdb1dbd 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 38ebbe2248 Bug 1193019 - Rename CSSFontFaceLoadEvent to FontFaceSetLoadEvent. r=khuey
--HG--
rename : dom/webidl/CSSFontFaceLoadEvent.webidl => dom/webidl/FontFaceSetLoadEvent.webidl
2015-08-11 12:19:52 +10:00
Benoit Girard f6fed1c386 Bug 1191412 - Fix logic and text for the WillChange warning. r=roc
--HG--
extra : commitid : LL1q53ZpGCQ
extra : rebase_source : 342e0bf923ec556b7abd9f7275f7d5b20400663c
2015-08-07 16:05:19 -04:00
Nick Robson 49e872dc7e Bug 1075089 - Move popup menu frame offset to LookAndFeel and fix default offset for OS X. r=Enn
--HG--
extra : rebase_source : 7817fea6ea95e9dfc486f797114e1cfb778d5230
2015-08-04 16:41:00 -04:00
Birunthan Mohanathas 2b4a52cf2e Bug 1185763 - Part 3: Rename nsTArray::MoveElementsFrom to AppendElements. r=froydnj 2015-08-11 08:29:46 -07:00
Birunthan Mohanathas edbcd5e014 Bug 1185763 - Part 1: Always use mozilla::Move with nsTArray::MoveElementsFrom. r=froydnj 2015-08-11 08:29:46 -07:00
Kyle Huey 76e3009ab8 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 136c2d72c3 Bug 1189443 - Don't round down the margin amounts when inflating the displayport. r=dvander
--HG--
extra : commitid : C4Vo2zwNRgo
2015-08-10 18:30:45 -04:00
Kartikaya Gupta b1576e7399 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.

--HG--
extra : commitid : BafhIev6bT
2015-08-10 10:59:47 -04:00
Neil Deakin 9a0bd3050d 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 2ef98b0156 Merge f-t to m-c, a=merge 2015-08-09 15:45:11 -07:00
Phil Ringnalda 6de4674783 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 bc5665176b Bug 1149542 - Part 3: Crashtest. r=dholbert 2015-08-08 11:40:04 +10:00
Brian Grinstead 3ef1e8cacf Bug 1175606 - Disable tracking protection for reftests;r=philor
--HG--
extra : commitid : 40tbnOyz9zn
2015-08-08 23:16:27 -07:00
Matt Woodrow 2ab56744ea Bug 1187432 - Avoid scheduling main-thread paints for scrolls handled by apz. r=tn
--HG--
extra : rebase_source : 343dabda5a9bbbeac0c25b69d63d0a82f595b599
2015-08-07 15:37:56 -04:00
L. David Baron 84afd21e5c 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.
--HG--
extra : transplant_source : %19Rr%005%CB%C3%D9%D7%A0j%07%F9%F2R%18%B3%E2%18%26
2015-08-07 12:18:57 -07:00
Kartikaya Gupta d2d5cdc395 Bug 1168487 - Update the last use site of ScrollbarAreaToExcludeFromCompositionBoundsFor to use LD pixels. r=tn
--HG--
extra : commitid : KOthonJxSmF
2015-08-07 14:23:13 -04:00
Mats Palmgren fc89615a88 Bug 1178575 - tests. 2015-08-07 14:05:48 +02:00
Mats Palmgren 3147ef01c4 Bug 1178575 - Intersect the clip rect with aDirtyRect. r=roc 2015-08-07 14:05:48 +02:00
Lee Salzman 20ce5ff916 Bug 1191609 - Always stroke CSS border sides separately from corner fills. r=mstange 2015-08-06 00:33:44 -04:00
Xidorn Quan d1a7c5bc3b Backout unrelated code landed in dee3e26cc1c0 by mistake.
--HG--
extra : source : d931b333d2263e19921a1e1ab331403321c21c26
2015-08-07 14:40:16 +10:00
Xidorn Quan 0b0e879cbb Bug 1186890 - Ensure parent always know when the child exit fullscreen. r=Dolske
--HG--
extra : source : b2dc98b8e5f055fb529b4821966028e558c18450
2015-08-07 13:38:10 +10:00
Brian Birtles 883db6aa8f 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 74e8061ed0 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 73a581c4b8 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 6ee2d3c990 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 937bc54615 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