Commit Graph

180 Commits

Author SHA1 Message Date
Matt Woodrow
011bd0697f Bug 1510853 - Make VsyncId available to compositor. r=jrmuizel
MozReview-Commit-ID: 8wBDg39R4nZ

Differential Revision: https://phabricator.services.mozilla.com/D13350

--HG--
extra : moz-landing-system : lando
2018-12-07 23:28:03 +00:00
Ciure Andrei
22c96f2cb4 Backed out 4 changesets (bug 1510853) for TelemetryHistogramEnums.h build bustages CLOSED TREE
Backed out changeset 80baa7b09930 (bug 1510853)
Backed out changeset d1ef6db7fc28 (bug 1510853)
Backed out changeset ae190948ad73 (bug 1510853)
Backed out changeset 0ade0aa77b2f (bug 1510853)
2018-12-07 19:38:47 +02:00
Matt Woodrow
e553ae49ac Bug 1510853 - Make VsyncId available to compositor. r=jrmuizel
MozReview-Commit-ID: 8wBDg39R4nZ

Differential Revision: https://phabricator.services.mozilla.com/D13350

--HG--
extra : moz-landing-system : lando
2018-12-07 17:06:09 +00:00
Daniel Holbert
7c3b31a25d Bug 1512112: Remove redundant includes from source files in layout. r=TYLin
All of the removed includes are redundant (i.e. they're #included elsewhere in
the same file).

In most cases, I'm removing the second (redundant) copy of the
#include, except when that copy makes more sense (i.e. if it's in better sorted
order, or if it's paired alongside a closely-associated header while the
earlier copy is not).

Here's the script that I used to generate candidates here -- I ran this in
every subdirectory of layout, on my linux machine (warning, this writes two
files to your /tmp directory):

for FILE in *.h *.cpp; do
  nonunique=$(grep \#include $FILE | grep -v List\.h | cut -f2 -d'"'  | cut -f2- -d'/'| cut -f2- -d'/' | sort | wc -l)
  unique=$(   grep \#include $FILE | grep -v List\.h | cut -f2 -d'"'  | cut -f2- -d'/'| cut -f2- -d'/' | sort | uniq | wc -l)
  if [[ "$unique" != "$nonunique" ]]; then
    echo "$FILE: $nonunique / $unique"
    grep \#include $FILE | cut -f2 -d'"'  | grep -v List\.h | cut -f2- -d'/'| cut -f2- -d'/' | sort  > /tmp/nonunique.txt
    grep \#include $FILE | cut -f2 -d'"'  | grep -v List\.h | cut -f2- -d'/'| cut -f2- -d'/' | sort | uniq  > /tmp/unique.txt
    diff /tmp/nonunique.txt /tmp/unique.txt
    echo
  fi
done

Depends on D13773

Differential Revision: https://phabricator.services.mozilla.com/D13774

--HG--
extra : moz-landing-system : lando
2018-12-05 18:55:59 +00:00
Sylvestre Ledru
265e672179 Bug 1511181 - Reformat everything to the Google coding style r=ehsan a=clang-format
# ignore-this-changeset

--HG--
extra : amend_source : 4d301d3b0b8711c4692392aa76088ba7fd7d1022
2018-11-30 11:46:48 +01:00
Mats Palmgren
f29a7e848d Bug 1494745 part 3 - Make nsRefreshDriver::AddTimerAdjustmentObserver void since it's infallible. r=bz
mTimerAdjustmentObservers is a nsTObserverArray which is infallible,
so no need to check the return value from AppendElement
(which a later patch in this series will remove).
2018-10-14 18:12:23 +02:00
Mats Palmgren
83361ab4ba Bug 1494745 part 2 - Make nsRefreshDriver::AddRefreshObserver void since it's infallible. r=bz
nsRefreshDriver::ObserverArray is a nsTObserverArray which is
infallible, so no need to check the return value from AppendElement
(which a later patch in this series will remove).
2018-10-14 18:12:22 +02:00
Xidorn Quan
afd201db11 Bug 1489385 part 2 - Make the refresh driver event dispatching specific to fullscreen events. r=smaug
The mechanism was added in bug 1168705 for fullscreen, and is only used
for this since then. The spec now has a specific step for this in the
event loop, so specialize this mechanism to match the spec closer.

This patch also changes the caller type of the fullscreenchange event
from non-system to system (via using DispatchTrustedEvent rather than
EventTarget::DispatchEvent(Event&)).

Differential Revision: https://phabricator.services.mozilla.com/D5235

--HG--
extra : source : 179f5fbd9db08518804b613f5e3fefa659c1e0a2
2018-09-08 08:53:33 +10:00
Mantaroh Yoshinaga
1deccd7ac1 Bug 1445570 - Remove EnsureEventualAfterPaint timer. r=tnikkel
MozReview-Commit-ID: C7WICJ5Q0ES

Differential Revision: https://phabricator.services.mozilla.com/D5005

--HG--
extra : moz-landing-system : lando
2018-09-06 02:21:39 +00:00
Hiroyuki Ikezoe
9f85c749a3 Bug 1475769 - Bail out from nsRefreshDriver::Tick before updating mMostRecentRefresh when the refresh driver is waiting for paint. r=mattwoodrow
Before this patch, there is a race condition that the refresh driver updates
the most recent refresh time but animations corresponding to the refresh driver
don't update their internal state, that causes the inconsistency that such
animations are regarded as finished on the most recent time whereas their
internal states represent the animations are still in active.  This is the one
of the cause of bug 1466010, i.e. the display item corresponding to the
animation is going to be rebuilt without calling MarkNeedsDisplayItemRebuild.

MozReview-Commit-ID: 9adzDV9E3ka

--HG--
extra : rebase_source : 7120e9f462309d1c4efe995ef64aeead9e29ff8f
2018-07-15 20:19:29 +09:00
Hiroyuki Ikezoe
95a7be33f5 Bug 1474721 - Drop epoch times in nsRefreshDriver. r=bz
These epoch times were introduced for beforepaint event in bug 569520, and
haven't used since we dropped mozRequestAnimationFrame in bug 909154.

MozReview-Commit-ID: CGOGeH0rrdi

--HG--
extra : rebase_source : 43905538a39c9618d95cc0513f3ffa2cf813a970
2018-07-11 06:15:00 +09:00
Hiroyuki Ikezoe
5b05fdd61a Bug 1472076 - Introduce nsATimerAdjustmentObserver in nsRefreshDriver. r=birtles
mMostRecentRefresh is changed not only in Tick() but also in
EnsureTimerStarted().  In the case where it happens in Tick() refresh observers
can know it through WillRefresh(), but there is no way in the case of
EnsureTimerStarted().  This patch introduces a new abstract class to be notified
when mMostRecentRefresh was changed in EnsureTimerStarted() so that animations
can use the *real* most recent refresh time until the next tick happens.

The reason why we have another observer array in parallel with existing array
(mObservers) is that the refresh driver should stop the timer if there is no
normal observes but there are still any timer adjustment observes.

MozReview-Commit-ID: FaDcl5GrvI3

--HG--
extra : rebase_source : a6a362366f4eda9fb51003ef4cff5bea886836f0
2018-07-03 10:57:12 +09:00
Kartikaya Gupta
f70c1bbb80 Bug 1461946 - Remove more unused code. r=mattwoodrow
MozReview-Commit-ID: Ji5L1Ce2utN

--HG--
extra : rebase_source : 31d1c82b51ecadeceb9e3974837458521882d397
2018-05-16 14:58:56 -04:00
Kartikaya Gupta
a251efe15a Bug 1461946 - Remove unused function and parameter. r=mattwoodrow
MozReview-Commit-ID: CJ9ObpuRJCD

--HG--
extra : rebase_source : d8014372b7c6c17f7a34c6dc50b8df1a4a443460
2018-05-16 08:32:18 -04:00
Bobby Holley
3cbcfdf4cd Bug 1457325 - Expose time to DOMContentFlushed on the timeline. r=bholley,r=mstange
MozReview-Commit-ID: E6QPjgfUKdo
2018-04-27 11:15:27 -07:00
Xidorn Quan
8af9d264aa Bug 1456364 part 1 - Reduce dependencies to nsCSSProps.h. r=emilio
So that hacking on this header can be less painful...

MozReview-Commit-ID: LmpMnF7q9RG
2018-04-26 16:24:30 +02:00
Andreea Pavel
87bf18c74d Backed out 4 changesets (bug 1456364) for build bustages at /builds/worker/workspace/build/src/obj-firefox/dist/include/mozilla/dom/AnimationEffectReadOnlyBinding.h:35 on a CLOSED TREE
Backed out changeset 020151240bb8 (bug 1456364)
Backed out changeset bc0aa5224d91 (bug 1456364)
Backed out changeset d919bbe7440c (bug 1456364)
Backed out changeset ab1472823e8a (bug 1456364)
2018-04-26 08:27:45 +03:00
Xidorn Quan
0d91cc33ac Bug 1456364 part 1 - Reduce dependencies to nsCSSProps.h. r=emilio
So that hacking on this header can be less painful...

MozReview-Commit-ID: LmpMnF7q9RG

--HG--
extra : source : b68215ade7403ae9c6fbf20cb64a64c04a67ee66
2018-04-26 15:00:50 +10:00
Kartikaya Gupta
697a7719d0 Bug 1455691 - Make the transaction id a struct instead of a uint64_t. r=mattwoodrow
MozReview-Commit-ID: 9yZknygQvFr

--HG--
extra : rebase_source : 8b7a2398bdabf52f2de1c5dbd30b6868c1e0bed0
2018-04-20 15:13:06 -04:00
Boris Zbarsky
4292bca4ee Bug 1449631 part 6. Remove nsIDOMEventTarget::DispatchEvent. r=smaug
MozReview-Commit-ID: 8YMgmMwZkAL
2018-04-05 13:42:41 -04:00
Emilio Cobos Álvarez
751c09d888 Bug 1443339: Stop observing the refresh driver when inserting into the BFCache. r=bz
The nsCSSFrameConstructor bits are now handled in PresShell::Destroy along with
the other refresh driver observers.

I cleaned up the nsRefreshDriver methods because they were using infallible
append anyway, and that simplified the logic.

MozReview-Commit-ID: 1eDUUXjUUS9
2018-03-17 16:11:52 +01:00
Hiroyuki Ikezoe
175bc2d176 Bug 1415780 - Let AnimationEventDispatcher observe nsRefreshDriver. r=birtles
So that we can now ensure nsRefreshDriver ticks (i.e. nsRefreshDriver doesn't
stop its timer) for all queued events.
Before this patch, dispatching CSS animation/transition events relied on the
fact that DocumentTimeline observes nsRefreshDriver.  For this fact,
animationcancel or transitioncancel event did not dispatch properly in some
cases, i.e. the case where the animation was dropped from the DocumentTimeline.

MozReview-Commit-ID: 7JYro0MY2U2

--HG--
extra : rebase_source : 28c8e2a50d29c5344e2c5ca3c43af41f4692fa0f
2018-01-27 21:17:27 +09:00
Hiroyuki Ikezoe
357f94c98c Bug 1415780 - Don't count all observers for nsRefreshDriver. r=smaug
We just need information whether there is still an observer or not in most
cases.  The only case we need to know the count is in an assertion in the
dtor of nsRefreshDriver.  In the dtor we are checking there remains no
observers other than early runners.

Note that the order in HasObserver() was adjusted to reflect that we check
boolean flag first (mViewManagerFlushIsPending) and subsequently check observer
which is likey happen to.  mFrameRequestCallbackDocs should have checked prior
to mResizeEventFlushObservers though.

MozReview-Commit-ID: E1qplusqw1Y

--HG--
extra : rebase_source : ebd9e6eb08952df954c55860638233c9a8729856
2018-01-27 21:17:26 +09:00
Cosmin Sabou
887d9fa276 Backed out 12 changesets (bug 1415780) for build bustages nsRefreshDriver.cpp:1606:1 and AnimationCommon.h:168:51 on a CLOSED TREE
Backed out changeset 1fa2f138319e (bug 1415780)
Backed out changeset 6bad89a17566 (bug 1415780)
Backed out changeset a88250ad7a3e (bug 1415780)
Backed out changeset 43d42ca7308f (bug 1415780)
Backed out changeset 79e980195ee8 (bug 1415780)
Backed out changeset f0cc29e7ccd7 (bug 1415780)
Backed out changeset c6567e4196f6 (bug 1415780)
Backed out changeset ae7be65f3c88 (bug 1415780)
Backed out changeset 621b9aaf4a8f (bug 1415780)
Backed out changeset e298f242ce7c (bug 1415780)
Backed out changeset 027a7ed3c948 (bug 1415780)
Backed out changeset 433a6f0d0ac3 (bug 1415780)
2018-01-27 12:47:29 +02:00
Hiroyuki Ikezoe
51d411f1b6 Bug 1415780 - Let AnimationEventDispatcher observe nsRefreshDriver. r=birtles
So that we can now ensure nsRefreshDriver ticks (i.e. nsRefreshDriver doesn't
stop its timer) for all queued events.
Before this patch, dispatching CSS animation/transition events relied on the
fact that DocumentTimeline observes nsRefreshDriver.  For this fact,
animationcancel or transitioncancel event did not dispatch properly in some
cases, i.e. the case where the animation was dropped from the DocumentTimeline.

MozReview-Commit-ID: 7JYro0MY2U2

--HG--
extra : rebase_source : e1963d9eef996cdf5d64c64f80eb1b93ac6fd18a
2018-01-27 16:55:45 +09:00
Hiroyuki Ikezoe
57ae7e8090 Bug 1415780 - Don't count all observers for nsRefreshDriver. r=smaug
We just need information whether there is still an observer or not in most
cases.  The only case we need to know the count is in an assertion in the
dtor of nsRefreshDriver.  In the dtor we are checking there remains no
observers other than early runners.

Note that the order in HasObserver() was adjusted to reflect that we check
boolean flag first (mViewManagerFlushIsPending) and subsequently check observer
which is likey happen to.  mFrameRequestCallbackDocs should have checked prior
to mResizeEventFlushObservers though.

MozReview-Commit-ID: E1qplusqw1Y

--HG--
extra : rebase_source : 11feb64350e69649eb1eea5c68b1d950f05c19d9
2018-01-27 16:55:42 +09:00
Hiroyuki Ikezoe
471558b3c1 Bug 1433336 - Collect only documents which are observerd by IntersectionObserver in nsRefreshDriver::Tick(). r=smaug
We don't need to collect whole descendants documents.

This patch intentionally leaves animation events handling which is another
caller of CollectDocuments in nsRefreshDriver since the animation part will
be fixed in a different way in bug 1415780.

MozReview-Commit-ID: INAJm1NHLuI

--HG--
extra : rebase_source : 4e255cef604d4455d6efa5dc2ebddd5dc649ee65
2018-01-26 20:11:17 +09:00
Olli Pettay
e84d7b7ef4 Bug 1149555 - Update resize event firing to follow the specs, dispatch right before rAF callbacks, r=dbaron
MozReview-Commit-ID: GFnj2du2bWJ
2015-05-05 17:56:01 +03:00
Markus Stange
ae94ae81a4 Bug 1350930 - Move profiler markers for reflow and style flushes from the refresh driver into the PresShell. r=bz
MozReview-Commit-ID: FQs2zsIU2zO

--HG--
extra : rebase_source : 166617f5966cbad18401bc590a266ce00d858bab
2017-11-15 16:10:32 -05:00
Daniel Holbert
680815cd6e Bug 1412346 part 5: (automated patch) Switch a bunch of C++ files in layout to use our standard mode lines. r=jfkthame
This patch was generated automatically by the "modeline.py" script, available
here: https://github.com/amccreight/moz-source-tools/blob/master/modeline.py

For every file that is modified in this patch, the changes are as follows:
 (1) The patch changes the file to use the exact C++ mode lines from the
     Mozilla coding style guide, available here:
https://developer.mozilla.org/en-US/docs/Mozilla/Developer_guide/Coding_Style#Mode_Line

 (2) The patch deletes any blank lines between the mode line & the MPL
     boilerplate comment.

 (3) If the file previously had the mode lines and MPL boilerplate in a
     single contiguous C++ comment, then the patch splits them into
     separate C++ comments, to match the boilerplate in the coding style.

MozReview-Commit-ID: EuRsDue63tK

--HG--
extra : rebase_source : 3356d4b80ff6213935192e87cdbc9103fec6084c
2017-10-27 10:33:53 -07:00
Nicholas Nethercote
8a68e6fb83 Bug 1403868 (part 4) - Reduce tools/profiler/public/*.h to almost nothing in non-MOZ_GECKO_PROFILER builds. r=mstange.
Currently the Gecko Profiler defines a moderate amount of stuff when
MOZ_GECKO_PROFILER is undefined. It also #includes various headers, including
JS ones. This is making it difficult to separate Gecko's media stack for
inclusion in Servo.

This patch greatly simplifies how things are exposed. The starting point is:

- GeckoProfiler.h can be #included unconditionally;

- everything else from the profiler must be guarded by MOZ_GECKO_PROFILER.

In practice this introduces way too many #ifdefs, so the patch loosens it by
adding no-op macros for a number of the most common operations.

The net result is that #ifdefs and macros are used a bit more, but almost
nothing is exposed in non-MOZ_GECKO_PROFILER builds (including
ProfilerMarkerPayload.h and GeckoProfiler.h), and understanding what is exposed
is much simpler than before.

Note also that in BHR, ThreadStackHelper is now entirely absent in
non-MOZ_GECKO_PROFILER builds.
2017-10-04 09:11:18 +11:00
Ethan Lin
2a82b402b3 Bug 1404091 - In layers-free mode, we should do NotifyInvalidation after EndTransaction if there is any scheduled flush. r=kats
MozReview-Commit-ID: D0LNF0LgWYq

--HG--
extra : rebase_source : e005389de5d2b2b9e0a8ecf5b4de58ae7f9f21a9
2017-10-03 16:00:38 +08:00
Wes Kocher
91f1f19054 Merge m-c to autoland, a=merge
MozReview-Commit-ID: IMdYxijQ9ie
2017-08-21 17:20:06 -07:00
Stone Shih
7646d41f1d Bug 1361067 Part2: Coalesce mouse move events to be once per refresh cycle. r=smaug.
MozReview-Commit-ID: 6jwQxxNIC2n
2017-08-11 14:58:08 +08:00
Botond Ballo
ba4ac53b51 Bug 1340684 - Fire the scroll event before the style flush. r=mstange
This ensures that if the scroll event triggers style changes, they are
reflected on the same paint.

This is accomplished by having the refresh driver fire scroll events as
an explicit step after FlushType::Style observers and rAF callbacks, and
before the actual style flush.

MozReview-Commit-ID: 4kgauD5SgVo

--HG--
extra : rebase_source : 5f2c869c0749c1e1473797f2e202c075907a45fd
2017-08-09 21:08:38 -04:00
Stone Shih
de7f705042 Bug 1351148 Part2: Add a priority queue for input events. r=smaug.
MozReview-Commit-ID: 5ud1Ex9UNVo
2017-03-21 15:44:12 +08:00
Stone Shih
7de447a25a Backed out changeset 46d8f42863af (bug 1351148) 2017-08-11 15:19:44 +08:00
Stone Shih
9d1d77d849 Bug 1351148 Part2: Add a priority queue for input events. r=smaug.
MozReview-Commit-ID: 5ud1Ex9UNVo
2017-03-21 15:44:12 +08:00
Carsten "Tomcat" Book
de369deb98 Backed out changeset 284af26c1b53 (bug 1351148) 2017-07-28 09:20:27 +02:00
Stone Shih
9573b6e439 Bug 1351148 Part2: Add a priority queue for input events. r=smaug.
MozReview-Commit-ID: 5ud1Ex9UNVo
2017-03-21 15:44:12 +08:00
Kartikaya Gupta
6d0c0db395 Bug 1378966 - Don't cause immediate throttling of the refresh driver on repeat transactions. r=mattwoodrow
MozReview-Commit-ID: 8orAmdpIRTF

--HG--
extra : rebase_source : 2988a9faced2648cd182ebe8adff791634af519f
2017-07-12 09:10:25 -04:00
Olli Pettay
da0ec0a364 Bug 1375491, make child process to cache ime properties only at animation tick time, r=masayuki
--HG--
extra : rebase_source : 6f13f4d91fc4873d135824431adb4b0b2843b738
2017-06-29 14:46:11 +03:00
Olli Pettay
70cd98776b Bug 1375484 - ScrollSelectionIntoViewEvent should be called during refresh driver tick, r=ehsan 2017-06-25 00:38:42 +03:00
Olli Pettay
ce6010c7d6 Bug 1367905 - Try to run GC/CC slices, including forgetSkippable, during idle time, r=mccr8
--HG--
extra : rebase_source : 2ee14a0cc890b91f405a5b4741030dbad6989018
2017-06-10 02:38:50 +03:00
Wes Kocher
43acd1b6e6 Backed out 2 changesets (bug 1367905) for a spike in Windows reftest failures a=backout
Backed out changeset c5aaa3f7b79e (bug 1367905)
Backed out changeset 1c66da2b1e88 (bug 1367905)

MozReview-Commit-ID: IX632WoWHrO
2017-06-08 16:09:28 -07:00
Olli Pettay
5361fd6640 Bug 1367905 - Try to run GC/CC slices, including forgetSkippable, during idle time, r=mccr8 2017-06-07 23:46:31 +03:00
Carsten "Tomcat" Book
8fb20a5801 Backed out changeset ff33e6c6f6a5 (bug 1367905) for memory leaks 2017-06-07 15:13:37 +02:00
Olli Pettay
03c8a070c4 Bug 1367905 - Try to run GC/CC slices, including forgetSkippable, during idle time, r=mccr8
--HG--
extra : rebase_source : b7248c5b45fe43eb733d73965a49c1cd69a1c72d
2017-06-06 20:41:34 +03:00
Andreas Farre
0833711613 Bug 1311425 - Prepare for handling several sources of idleness, r=smaug
--HG--
extra : rebase_source : 7f771167ae460a50715f23c587eea10d5fe7e815
2017-05-24 21:11:12 -04:00
Timothy Nikkel
3f354b21bf Bug 1352074. Remove high precision timer mode from refresh driver because it is not needed with vsync based refresh drivers. r=mchang
Bug 731974 added this code to get more accurate timer callbacks back when the refresh driver was based on timers. It shouldn't be needed anymore now that the refresh driver is based on vsync.
2017-04-04 00:14:28 -05:00