Bug 1571612 - P1: Split FlushType::Style and FlushType::Frame. r=heycam

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

--HG--
extra : moz-landing-system : lando
This commit is contained in:
Dan Glastonbury 2019-08-07 03:51:20 +00:00
Родитель e306452ebf
Коммит d87e8fd612
3 изменённых файлов: 17 добавлений и 17 удалений

Просмотреть файл

@ -20,22 +20,20 @@ namespace mozilla {
* flushTypeNames array inside PresShell::FlushPendingNotifications.
*/
enum class FlushType : uint8_t {
None = 0, /* Actually don't flush anything */
Event = 1, /* Flush pending events before notify other observers */
Content = 2, /* flush the content model construction */
ContentAndNotify = 3, /* As above, plus flush the frame model
construction and other nsIMutationObserver
notifications. */
Style = 4, /* As above, plus flush style reresolution */
Frames = Style,
EnsurePresShellInitAndFrames =
5, /* As above, plus ensure the pres shell is alive */
InterruptibleLayout = 6, /* As above, plus flush reflow,
but allow it to be interrupted (so
an incomplete layout may result) */
Layout = 7, /* As above, but layout must run to
completion */
Display = 8, /* As above, plus flush painting */
None, /* Actually don't flush anything */
Event, /* Flush pending events before notify other observers */
Content, /* flush the content model construction */
ContentAndNotify, /* As above, plus flush the frame model
construction and other nsIMutationObserver
notifications. */
Style, /* As above, plus flush style reresolution */
Frames, /* As above, plus flush frame construction */
EnsurePresShellInitAndFrames, /* As above, plus ensure the pres shell is alive
*/
InterruptibleLayout, /* As above, plus flush reflow, but allow it to be
interrupted (so an incomplete layout may result) */
Layout, /* As above, but layout must run to completion */
Display, /* As above, plus flush painting */
Count
};

Просмотреть файл

@ -3994,6 +3994,7 @@ void PresShell::DoFlushPendingNotifications(mozilla::ChangesToFlush aFlush) {
"Event",
"Content",
"ContentAndNotify",
"Style",
// As far as the profiler is concerned, EnsurePresShellInitAndFrames and
// Frames are the same
"Style",
@ -4016,7 +4017,7 @@ void PresShell::DoFlushPendingNotifications(mozilla::ChangesToFlush aFlush) {
# endif
#endif
NS_ASSERTION(flushType >= FlushType::Frames, "Why did we get called?");
NS_ASSERTION(flushType >= FlushType::Style, "Why did we get called?");
mNeedStyleFlush = false;
mNeedThrottledAnimationFlush =

Просмотреть файл

@ -1494,6 +1494,7 @@ nsRefreshDriver::ObserverArray& nsRefreshDriver::ArrayFor(
case FlushType::Event:
return mObservers[0];
case FlushType::Style:
case FlushType::Frames:
return mObservers[1];
case FlushType::Layout:
return mObservers[2];