Backed out changeset b71c8c052463 (bug 1943846) for causing mass failures. CLOSED...
[gecko.git] / layout / base / CaretAssociationHint.h
blobcd0320e4fc7c7792e590e9425ad3613c6b898038
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 mozilla_CaretAssociationHint_h
8 #define mozilla_CaretAssociationHint_h
10 namespace mozilla {
12 template <typename PT, typename CT>
13 class RangeBoundaryBase;
15 namespace intl {
16 class BidiEmbeddingLevel;
19 /**
20 * Hint whether a caret is associated with the content before a
21 * given character offset (Before), or with the content after a given
22 * character offset (After).
24 enum class CaretAssociationHint { Before, After };
26 /**
27 * Return better caret association hint for aCaretPoint than aDefault.
28 * This computes the result from layout. Therefore, you should flush pending
29 * layout before calling this.
31 template <typename PT, typename CT>
32 CaretAssociationHint ComputeCaretAssociationHint(
33 CaretAssociationHint aDefault, intl::BidiEmbeddingLevel aBidiLevel,
34 const RangeBoundaryBase<PT, CT>& aCaretPoint);
36 } // namespace mozilla
38 #endif