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 */
|
|
|
|
Content = 1, /* flush the content model construction */
|
|
|
|
ContentAndNotify = 2, /* As above, plus flush the frame model
|
|
|
|
construction and other nsIMutationObserver
|
|
|
|
notifications. */
|
|
|
|
Style = 3, /* As above, plus flush style reresolution */
|
|
|
|
Frames = Style,
|
|
|
|
InterruptibleLayout = 4, /* As above, plus flush reflow,
|
|
|
|
but allow it to be interrupted (so
|
|
|
|
an incomplete layout may result) */
|
|
|
|
Layout = 5, /* As above, but layout must run to
|
|
|
|
completion */
|
|
|
|
Display = 6, /* As above, plus flush painting */
|
2004-05-28 02:08:42 +04:00
|
|
|
|
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
|