Use selection-specific caret hit testing while starting and extending mouse selections. The public caret-position API keeps its normal line ranking, but selection drags now snap below-line movement to line edges and prefer the previous line when starting in a nearby inter-line gap. Add coverage for dragging from message text, after-text space, gutters, author names, avatar-adjacent areas, and row bottoms so these inert message regions reliably start selection.
19 lines
308 B
C++
19 lines
308 B
C++
/*
|
|
* Copyright (c) 2026-present, the Ladybird developers
|
|
*
|
|
* SPDX-License-Identifier: BSD-2-Clause
|
|
*/
|
|
|
|
#pragma once
|
|
|
|
#include <AK/Types.h>
|
|
|
|
namespace Web::Painting {
|
|
|
|
class HitTestDisplayList;
|
|
enum class CaretPositionMode : u8;
|
|
enum class HitTestType : u8;
|
|
struct CaretPosition;
|
|
struct HitTestResult;
|
|
|
|
}
|