2015-05-03 22:32:37 +03:00
|
|
|
/* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
|
|
|
|
/* vim: set ts=8 sts=2 et sw=2 tw=80: */
|
2012-05-21 15:12:37 +04:00
|
|
|
/* This Source Code Form is subject to the terms of the Mozilla Public
|
|
|
|
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
|
|
|
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
2017-01-05 10:31:56 +03:00
|
|
|
|
|
|
|
#ifndef mozilla_FlushType_h
|
|
|
|
#define mozilla_FlushType_h
|
|
|
|
|
|
|
|
#include <stdint.h>
|
|
|
|
#include "X11UndefineNone.h"
|
|
|
|
|
|
|
|
namespace mozilla {
|
2004-05-28 02:08:42 +04:00
|
|
|
|
|
|
|
/**
|
|
|
|
* This is the enum used by nsIDocument::FlushPendingNotifications to
|
|
|
|
* decide what to flush.
|
2010-05-20 03:22:19 +04:00
|
|
|
*
|
|
|
|
* Please note that if you change these values, you should sync it with the
|
|
|
|
* flushTypeNames array inside PresShell::FlushPendingNotifications.
|
2004-05-28 02:08:42 +04:00
|
|
|
*/
|
2017-01-05 10:31:56 +03:00
|
|
|
enum class FlushType : uint8_t {
|
|
|
|
None = 0, /* Actually don't flush anything */
|
2017-08-11 09:58:08 +03:00
|
|
|
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
|
2017-01-05 10:31:56 +03:00
|
|
|
construction and other nsIMutationObserver
|
|
|
|
notifications. */
|
2017-08-11 09:58:08 +03:00
|
|
|
Style = 4, /* As above, plus flush style reresolution */
|
2017-01-05 10:31:56 +03:00
|
|
|
Frames = Style,
|
2017-08-11 09:58:08 +03:00
|
|
|
EnsurePresShellInitAndFrames = 5, /* As above, plus ensure the pres shell is alive */
|
|
|
|
InterruptibleLayout = 6, /* As above, plus flush reflow,
|
2017-01-05 10:31:56 +03:00
|
|
|
but allow it to be interrupted (so
|
|
|
|
an incomplete layout may result) */
|
2017-08-11 09:58:08 +03:00
|
|
|
Layout = 7, /* As above, but layout must run to
|
2017-01-05 10:31:56 +03:00
|
|
|
completion */
|
2017-08-11 09:58:08 +03:00
|
|
|
Display = 8, /* As above, plus flush painting */
|
2017-01-05 10:31:56 +03:00
|
|
|
Count
|
|
|
|
};
|
2012-12-12 01:12:43 +04:00
|
|
|
|
|
|
|
struct ChangesToFlush {
|
2017-01-05 10:31:56 +03:00
|
|
|
ChangesToFlush(FlushType aFlushType, bool aFlushAnimations)
|
2012-12-12 01:12:43 +04:00
|
|
|
: mFlushType(aFlushType)
|
|
|
|
, mFlushAnimations(aFlushAnimations)
|
|
|
|
{}
|
|
|
|
|
2017-01-05 10:31:56 +03:00
|
|
|
FlushType mFlushType;
|
2012-12-12 01:12:43 +04:00
|
|
|
bool mFlushAnimations;
|
|
|
|
};
|
|
|
|
|
2015-07-13 18:25:42 +03:00
|
|
|
} // namespace mozilla
|
|
|
|
|
2017-01-05 10:31:56 +03:00
|
|
|
#endif // mozilla_FlushType_h
|