1 /* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
2 /* vim: set ts=8 sts=2 et sw=2 tw=80: */
3 /* This Source Code Form is subject to the terms of the Mozilla Public
4 * License, v. 2.0. If a copy of the MPL was not distributed with this
5 * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
7 #ifndef nsAutoLayoutPhase_h
8 #define nsAutoLayoutPhase_h
14 enum class nsLayoutPhase
: uint8_t;
17 struct nsAutoLayoutPhase
{
18 nsAutoLayoutPhase(nsPresContext
* aPresContext
, nsLayoutPhase aPhase
);
25 nsPresContext
* mPresContext
;
30 # define AUTO_LAYOUT_PHASE_ENTRY_POINT(pc_, phase_) \
31 nsAutoLayoutPhase autoLayoutPhase((pc_), (nsLayoutPhase::phase_))
32 # define LAYOUT_PHASE_TEMP_EXIT() \
34 autoLayoutPhase.Exit(); \
36 # define LAYOUT_PHASE_TEMP_REENTER() \
38 autoLayoutPhase.Enter(); \
43 # define AUTO_LAYOUT_PHASE_ENTRY_POINT(pc_, phase_) PR_BEGIN_MACRO PR_END_MACRO
44 # define LAYOUT_PHASE_TEMP_EXIT() PR_BEGIN_MACRO PR_END_MACRO
45 # define LAYOUT_PHASE_TEMP_REENTER() PR_BEGIN_MACRO PR_END_MACRO
49 #endif // nsAutoLayoutPhase_h