#include "third_party/blink/renderer/core/paint/selection_bounds_recorder.h"
#include "third_party/blink/renderer/core/editing/frame_selection.h"
#include "third_party/blink/renderer/core/frame/local_frame.h"
#include "third_party/blink/renderer/core/html/forms/html_input_element.h"
#include "third_party/blink/renderer/core/html/forms/text_control_element.h"
#include "third_party/blink/renderer/core/layout/geometry/physical_rect.h"
#include "third_party/blink/renderer/core/layout/layout_box.h"
#include "third_party/blink/renderer/core/layout/selection_state.h"
#include "third_party/blink/renderer/core/page/focus_controller.h"
#include "third_party/blink/renderer/core/page/page.h"
#include "third_party/blink/renderer/platform/graphics/paint/paint_controller.h"
namespace blink {
namespace {
enum class RectEdge { … };
struct BoundEdges { … };
BoundEdges GetBoundEdges(WritingMode writing_mode, bool is_ltr) { … }
void SetBoundEdge(gfx::Rect selection_rect,
RectEdge edge,
PaintedSelectionBound& bound) { … }
PhysicalOffset GetSamplePointForVisibility(const PhysicalOffset& edge_start,
const PhysicalOffset& edge_end,
float zoom_factor) { … }
}
SelectionBoundsRecorder::SelectionBoundsRecorder(
SelectionState state,
PhysicalRect selection_rect,
PaintController& paint_controller,
TextDirection text_direction,
WritingMode writing_mode,
const LayoutObject& layout_object)
: … { … }
SelectionBoundsRecorder::~SelectionBoundsRecorder() { … }
bool SelectionBoundsRecorder::ShouldRecordSelection(
const FrameSelection& frame_selection,
SelectionState state) { … }
bool SelectionBoundsRecorder::IsVisible(const LayoutObject& rect_layout_object,
const PhysicalOffset& edge_start,
const PhysicalOffset& edge_end) { … }
}