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

46682 Коммитов

Автор SHA1 Сообщение Дата
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
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
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
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
Brian Birtles eb9973b07f 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 83a7cbf448 Merge m-c to inbound, a=merge 2015-08-06 18:11:16 -07:00
Brian Birtles 4de3f5331e 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 c7db517bd2 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 82fde485df 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 d3b8e26214 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 a229140582 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 cd380ce4a3 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 774abfc8fe 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 c2a72bf2cd 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