chromium/third_party/blink/renderer/core/layout/inline/inline_cursor.h

// Copyright 2019 The Chromium Authors
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

#ifndef THIRD_PARTY_BLINK_RENDERER_CORE_LAYOUT_INLINE_INLINE_CURSOR_H_
#define THIRD_PARTY_BLINK_RENDERER_CORE_LAYOUT_INLINE_INLINE_CURSOR_H_

#include <unicode/ubidi.h>

#include "base/check_op.h"
#include "base/dcheck_is_on.h"
#include "third_party/blink/renderer/core/core_export.h"
#include "third_party/blink/renderer/core/editing/forward.h"
#include "third_party/blink/renderer/core/layout/inline/fragment_item.h"
#include "third_party/blink/renderer/core/layout/inline/fragment_items.h"
#include "third_party/blink/renderer/platform/text/text_direction.h"
#include "third_party/blink/renderer/platform/wtf/allocator/allocator.h"
#include "third_party/blink/renderer/platform/wtf/text/string_view.h"

namespace blink {

class ComputedStyle;
class DisplayItemClient;
class FragmentItem;
class FragmentItems;
class InlineBackwardCursor;
class InlineBreakToken;
class InlineCursor;
class InlinePaintContext;
class LayoutBlockFlow;
class LayoutInline;
class LayoutObject;
class Node;
class PhysicalBoxFragment;
class ShapeResultView;
enum class StyleVariant;
struct LayoutSelectionStatus;
struct PhysicalOffset;
struct PhysicalRect;
struct PhysicalSize;

// Represents a position of |InlineCursor|. This class:
// 1. Provides properties for the current position.
// 2. Allows to save |Current()|, and can move back later. Moving to |Position|
// is faster than moving to |FragmentItem|.
class CORE_EXPORT InlineCursorPosition {};

// This class traverses fragments in an inline formatting context.
//
// When constructed, the initial position is empty. Call |MoveToNext()| to move
// to the first fragment.
class CORE_EXPORT InlineCursor {};

// This class provides the |MoveToPreviousSibling| functionality, but as a
// separate class because it consumes memory, and only rarely used.
class CORE_EXPORT InlineBackwardCursor {};

CORE_EXPORT std::ostream& operator<<(std::ostream&, const InlineCursor&);
CORE_EXPORT std::ostream& operator<<(std::ostream&, const InlineCursor*);

}  // namespace blink

#endif  // THIRD_PARTY_BLINK_RENDERER_CORE_LAYOUT_INLINE_INLINE_CURSOR_H_