#include "third_party/blink/renderer/core/editing/local_caret_rect.h"
#include "third_party/blink/renderer/core/editing/position_with_affinity.h"
#include "third_party/blink/renderer/core/editing/testing/editing_test_base.h"
#include "third_party/blink/renderer/core/editing/text_affinity.h"
#include "third_party/blink/renderer/core/editing/visible_position.h"
#include "third_party/blink/renderer/core/html/forms/text_control_element.h"
#include "third_party/blink/renderer/core/layout/layout_object.h"
#include "third_party/blink/renderer/core/layout/physical_box_fragment.h"
#include "third_party/blink/renderer/core/testing/core_unit_test_helper.h"
namespace blink {
bool operator==(const LocalCaretRect& rect1, const LocalCaretRect& rect2) { … }
std::ostream& operator<<(std::ostream& out, const LocalCaretRect& caret_rect) { … }
class LocalCaretRectTest : public EditingTestBase { … };
TEST_F(LocalCaretRectTest, DOMAndFlatTrees) { … }
TEST_F(LocalCaretRectTest, EmptyInlineFlex) { … }
TEST_F(LocalCaretRectTest, SimpleText) { … }
TEST_F(LocalCaretRectTest, MixedHeightText) { … }
TEST_F(LocalCaretRectTest, RtlText) { … }
TEST_F(LocalCaretRectTest, ClampingAndRounding) { … }
TEST_F(LocalCaretRectTest, OverflowTextLtr) { … }
TEST_F(LocalCaretRectTest, UnderflowTextLtr) { … }
TEST_F(LocalCaretRectTest, OverflowTextRtl) { … }
TEST_F(LocalCaretRectTest, UnderflowTextRtl) { … }
TEST_F(LocalCaretRectTest, VerticalRLText) { … }
TEST_F(LocalCaretRectTest, VerticalLRText) { … }
TEST_F(LocalCaretRectTest, OverflowTextVerticalLtr) { … }
TEST_F(LocalCaretRectTest, UnderflowTextVerticalLtr) { … }
TEST_F(LocalCaretRectTest, OverflowTextVerticalRtl) { … }
TEST_F(LocalCaretRectTest, UnderflowTextVerticalRtl) { … }
TEST_F(LocalCaretRectTest, TwoLinesOfTextWithSoftWrap) { … }
TEST_F(LocalCaretRectTest, SoftLineWrapBetweenMultipleTextNodes) { … }
TEST_F(LocalCaretRectTest, SoftLineWrapBetweenMultipleTextNodesRtl) { … }
TEST_F(LocalCaretRectTest, CaretRectAtBR) { … }
TEST_F(LocalCaretRectTest, CaretRectAtRtlBR) { … }
TEST_F(LocalCaretRectTest, Images) { … }
TEST_F(LocalCaretRectTest, RtlImages) { … }
TEST_F(LocalCaretRectTest, VerticalImage) { … }
TEST_F(LocalCaretRectTest, TextAndImageMixedHeight) { … }
TEST_F(LocalCaretRectTest, FloatFirstLetter) { … }
TEST_F(LocalCaretRectTest, AfterLineBreak) { … }
TEST_F(LocalCaretRectTest, AfterLineBreakInPre) { … }
TEST_F(LocalCaretRectTest, AfterLineBreakInPre2) { … }
TEST_F(LocalCaretRectTest, AfterLineBreakTextArea) { … }
TEST_F(LocalCaretRectTest, CollapsedSpace) { … }
TEST_F(LocalCaretRectTest, AbsoluteCaretBoundsOfWithShadowDOM) { … }
TEST_F(LocalCaretRectTest, AbsoluteSelectionBoundsOfWithImage) { … }
static std::pair<PhysicalRect, PhysicalRect> GetPhysicalRects(
const Position& caret) { … }
TEST_F(LocalCaretRectTest, AfterLineBreakInPreBlockLTRLineLTR) { … }
TEST_F(LocalCaretRectTest, AfterLineBreakInPreBlockLTRLineRTL) { … }
TEST_F(LocalCaretRectTest, AfterLineBreakInPreBlockRTLLineLTR) { … }
TEST_F(LocalCaretRectTest, AfterLineBreakInPreBlockRTLLineRTL) { … }
TEST_F(LocalCaretRectTest, AfterTrimedLineBreak) { … }
TEST_F(LocalCaretRectTest, MultiColumnSingleText) { … }
TEST_F(LocalCaretRectTest, UnicodeBidiPlaintextWithDifferentBlockDirection) { … }
TEST_F(LocalCaretRectTest, NextLineWithoutLeafChild) { … }
TEST_F(LocalCaretRectTest, BidiTextWithImage) { … }
TEST_F(LocalCaretRectTest, RtlMeterNoCrash) { … }
TEST_F(LocalCaretRectTest, AfterCollapsedWhiteSpaceInRTLText) { … }
TEST_F(LocalCaretRectTest, AfterIneditableInline) { … }
TEST_F(LocalCaretRectTest, LocalCaretAtBeginningOfNonEditable) { … }
TEST_F(LocalCaretRectTest,
LocalCaretAtBeginningOfNonEditableWithCollapsedWhitespace) { … }
TEST_F(LocalCaretRectTest, LocalCaretAtBeginningOfNonEditableWithSvg) { … }
TEST_F(LocalCaretRectTest, LocalCaretAtBeginningOfNonEditableInFlatTree) { … }
TEST_F(LocalCaretRectTest, LocalCaretAtEndOfNonEditable) { … }
TEST_F(LocalCaretRectTest,
LocalCaretAtEndOfNonEditableWithCollapsedWhitespace) { … }
TEST_F(LocalCaretRectTest, LocalCaretAtEndOfNonEditableWithSvg) { … }
TEST_F(LocalCaretRectTest, LocalCaretAtEndOfNonEditableInFlatTree) { … }
TEST_F(LocalCaretRectTest, AbsoluteCaretAtEndOfNonEditable) { … }
TEST_F(LocalCaretRectTest, AbsoluteCaretAtBeginningOfNonEditable) { … }
TEST_F(LocalCaretRectTest, OptionWithDisplayContents) { … }
TEST_F(LocalCaretRectTest, TextCombineOneTextNode) { … }
TEST_F(LocalCaretRectTest, TextCombineTwoTextNodes) { … }
TEST_F(LocalCaretRectTest,
LocalCaretAtStartOfNonEditableWithDifferentFontSizes) { … }
TEST_F(LocalCaretRectTest, LocalCaretAtEndOfNonEditableWithDifferentFontSizes) { … }
TEST_F(LocalCaretRectTest, LocalCaretInSvgTextWithFontScaling) { … }
TEST_F(LocalCaretRectTest, AbsoluteCaretAtStartOrEndOfNonEditableBidi) { … }
TEST_F(LocalCaretRectTest, AbsoluteCaretAtStartOrEndOfNonEditableBidiCulled) { … }
}