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
|
|
|
|
|
|
|
/**
|
2019-01-02 16:05:23 +03:00
|
|
|
* This is the enum used by Document::FlushPendingNotifications to
|
2004-05-28 02:08:42 +04:00
|
|
|
* 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 {
|
2019-08-07 06:51:20 +03:00
|
|
|
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 */
|
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
|