1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-31 08:48:11 +00:00
serenity/Userland/Libraries/LibWeb/Layout
Andreas Kling b79bc25a1f LibWeb: Use DOM Selection instead of ad-hoc layout tree selection
Before this patch, we were expressing the current selection as a range
between two points in the layout tree. This was a made-up concept I
called LayoutRange (2x LayoutPosition) and as it turns out, we don't
actually need it!

Instead, we can just use the Selection API from the Selection API spec.
This API expresses selection in terms of the DOM, and we already had
many of the building blocks implemented.

To ensure that selections get visually updated when the underlying Range
of an active Selection is programmatically manipulated, Range now has
an "associated Selection". If a range is updated while associated with
a selection, we recompute layout tree selection states and repaint the
page to make it user-visible.
2023-01-12 19:55:10 +01:00
..
AvailableSpace.cpp LibWeb: Convert FormattingContext to new pixel units 2023-01-05 17:42:31 +01:00
AvailableSpace.h LibWeb: Convert FormattingContext to new pixel units 2023-01-05 17:42:31 +01:00
BlockContainer.cpp LibWeb: Make the paint tree GC-allocated 2023-01-11 12:55:00 +01:00
BlockContainer.h LibWeb: Make the paint tree GC-allocated 2023-01-11 12:55:00 +01:00
BlockFormattingContext.cpp LibWeb: Fix y position calculation for blocks with clearance 2023-01-10 10:24:05 +01:00
BlockFormattingContext.h LibWeb: Remove redundant BFC::is_block_formatting_context() method 2023-01-07 11:49:04 +00:00
Box.cpp LibWeb: Make the paint tree GC-allocated 2023-01-11 12:55:00 +01:00
Box.h LibWeb: Make the paint tree GC-allocated 2023-01-11 12:55:00 +01:00
BoxModelMetrics.cpp Everything: Move to SPDX license identifiers in all files. 2021-04-22 11:22:27 +02:00
BoxModelMetrics.h LibWeb+Browser+WebContent: Convert BoxModelMetrics to new pixel units 2023-01-05 17:42:31 +01:00
BreakNode.cpp LibWeb: Remove Layout::Node::set_inline() 2022-10-06 15:29:38 +02:00
BreakNode.h LibWeb: Make the layout tree GC-allocated 2022-10-20 15:16:23 +02:00
ButtonBox.cpp LibWeb: Make the paint tree GC-allocated 2023-01-11 12:55:00 +01:00
ButtonBox.h LibWeb: Make a handful of layout node leaf classes final 2023-01-11 14:03:18 +01:00
CanvasBox.cpp LibWeb: Make the paint tree GC-allocated 2023-01-11 12:55:00 +01:00
CanvasBox.h LibWeb: Make a handful of layout node leaf classes final 2023-01-11 14:03:18 +01:00
CheckBox.cpp LibWeb: Make the paint tree GC-allocated 2023-01-11 12:55:00 +01:00
CheckBox.h LibWeb: Make a handful of layout node leaf classes final 2023-01-11 14:03:18 +01:00
FlexFormattingContext.cpp LibWeb: Take used width into account in flex item intrinsic cross sizing 2023-01-07 19:41:21 +01:00
FlexFormattingContext.h LibWeb: Store flex item used sizes as Optional<CSSPixels> 2023-01-07 19:41:21 +01:00
FormAssociatedLabelableNode.h LibWeb: Make the layout tree GC-allocated 2022-10-20 15:16:23 +02:00
FormattingContext.cpp LibWeb: Fix abspos flex container with height:auto getting zero height 2023-01-06 21:12:55 +01:00
FormattingContext.h LibWeb: Fix abspos flex container with height:auto getting zero height 2023-01-06 21:12:55 +01:00
FrameBox.cpp LibWeb: Make the paint tree GC-allocated 2023-01-11 12:55:00 +01:00
FrameBox.h LibWeb: Make the paint tree GC-allocated 2023-01-11 12:55:00 +01:00
GridFormattingContext.cpp LibWeb: Convert LayoutState to new pixel units 2023-01-05 17:42:31 +01:00
GridFormattingContext.h LibWeb: Convert GridFormattingContext to new pixel units 2023-01-05 17:42:31 +01:00
ImageBox.cpp LibWeb: Make the paint tree GC-allocated 2023-01-11 12:55:00 +01:00
ImageBox.h LibWeb: Make the paint tree GC-allocated 2023-01-11 12:55:00 +01:00
InitialContainingBlock.cpp LibWeb: Use DOM Selection instead of ad-hoc layout tree selection 2023-01-12 19:55:10 +01:00
InitialContainingBlock.h LibWeb: Use DOM Selection instead of ad-hoc layout tree selection 2023-01-12 19:55:10 +01:00
InlineFormattingContext.cpp LibWeb: Respect box-sizing: content-box inside inline-blocks 2023-01-09 10:54:20 +01:00
InlineFormattingContext.h LibWeb: Convert InlineFormattingContext to new pixel units 2023-01-05 17:42:31 +01:00
InlineLevelIterator.cpp LibWeb: Convert InlineLevelIterator/LineBox/LineBuilder to new px units 2023-01-05 17:42:31 +01:00
InlineLevelIterator.h LibWeb: Convert InlineLevelIterator/LineBox/LineBuilder to new px units 2023-01-05 17:42:31 +01:00
InlineNode.cpp LibWeb: Make the paint tree GC-allocated 2023-01-11 12:55:00 +01:00
InlineNode.h LibWeb: Make a handful of layout node leaf classes final 2023-01-11 14:03:18 +01:00
Label.cpp LibWeb: Convert Paintable coordinates to new pixel units 2022-12-14 16:47:57 +00:00
Label.h LibWeb+WebContent+headless-browser: Use CSSPixels for PageClient events 2022-12-10 12:03:19 +00:00
LabelableNode.cpp LibWeb: Move mouse event and label logic from layout to painting tree 2022-03-11 00:21:49 +01:00
LabelableNode.h LibWeb: Make the layout tree GC-allocated 2022-10-20 15:16:23 +02:00
LayoutPosition.cpp LibWeb: Make the layout tree GC-allocated 2022-10-20 15:16:23 +02:00
LayoutPosition.h LibWeb: Make the layout tree GC-allocated 2022-10-20 15:16:23 +02:00
LayoutState.cpp LibWeb: Convert LayoutState to new pixel units 2023-01-05 17:42:31 +01:00
LayoutState.h LibWeb: Convert LayoutState to new pixel units 2023-01-05 17:42:31 +01:00
LineBox.cpp LibWeb: Convert InlineLevelIterator/LineBox/LineBuilder to new px units 2023-01-05 17:42:31 +01:00
LineBox.h LibWeb: Convert InlineLevelIterator/LineBox/LineBuilder to new px units 2023-01-05 17:42:31 +01:00
LineBoxFragment.cpp LibWeb: Use DOM Selection instead of ad-hoc layout tree selection 2023-01-12 19:55:10 +01:00
LineBoxFragment.h LibWeb: Convert Paintable coordinates to new pixel units 2022-12-14 16:47:57 +00:00
LineBuilder.cpp LibWeb: Convert Layout::Node to new pixel units 2023-01-05 17:42:31 +01:00
LineBuilder.h LibWeb: Convert InlineLevelIterator/LineBox/LineBuilder to new px units 2023-01-05 17:42:31 +01:00
ListItemBox.cpp LibWeb: Make the layout tree GC-allocated 2022-10-20 15:16:23 +02:00
ListItemBox.h LibWeb: Make the layout tree GC-allocated 2022-10-20 15:16:23 +02:00
ListItemMarkerBox.cpp LibWeb: Make the paint tree GC-allocated 2023-01-11 12:55:00 +01:00
ListItemMarkerBox.h LibWeb: Make the paint tree GC-allocated 2023-01-11 12:55:00 +01:00
Node.cpp LibWeb: Make the paint tree GC-allocated 2023-01-11 12:55:00 +01:00
Node.h LibWeb: Make the paint tree GC-allocated 2023-01-11 12:55:00 +01:00
Progress.cpp LibWeb: Make the paint tree GC-allocated 2023-01-11 12:55:00 +01:00
Progress.h LibWeb: Make a handful of layout node leaf classes final 2023-01-11 14:03:18 +01:00
RadioButton.cpp LibWeb: Make the paint tree GC-allocated 2023-01-11 12:55:00 +01:00
RadioButton.h LibWeb: Make the paint tree GC-allocated 2023-01-11 12:55:00 +01:00
ReplacedBox.cpp LibWeb: Remove Layout::Node::set_inline() 2022-10-06 15:29:38 +02:00
ReplacedBox.h LibWeb: Convert Layout Boxes to new pixel units 2023-01-05 17:42:31 +01:00
SVGBox.cpp LibWeb: Make SVG <svg> elements behave as CSS replaced elements 2022-03-19 12:42:10 +01:00
SVGBox.h LibWeb: Make the layout tree GC-allocated 2022-10-20 15:16:23 +02:00
SVGFormattingContext.cpp LibWeb: Convert LayoutState to new pixel units 2023-01-05 17:42:31 +01:00
SVGFormattingContext.h LibWeb: Convert FormattingContext to new pixel units 2023-01-05 17:42:31 +01:00
SVGGeometryBox.cpp LibWeb: Make the paint tree GC-allocated 2023-01-11 12:55:00 +01:00
SVGGeometryBox.h LibWeb: Make the paint tree GC-allocated 2023-01-11 12:55:00 +01:00
SVGGraphicsBox.cpp LibWeb: Let Paintable perform the painting 2022-03-11 00:21:49 +01:00
SVGGraphicsBox.h LibWeb: Make the layout tree GC-allocated 2022-10-20 15:16:23 +02:00
SVGSVGBox.cpp LibWeb: Make the paint tree GC-allocated 2023-01-11 12:55:00 +01:00
SVGSVGBox.h LibWeb: Make the paint tree GC-allocated 2023-01-11 12:55:00 +01:00
TableBox.cpp LibWeb: Remove inheritance of TableBox from BlockContainer 2023-01-09 11:47:31 +01:00
TableBox.h LibWeb: Remove inheritance of TableBox from BlockContainer 2023-01-09 11:47:31 +01:00
TableCellBox.cpp LibWeb: Take rowspan into account while table formatting 2022-12-05 17:47:48 +01:00
TableCellBox.h LibWeb: Remove unused TableCellBox::next_cell() 2023-01-09 11:47:31 +01:00
TableFormattingContext.cpp LibWeb: Use table_box() to get root box in TFC 2023-01-09 15:06:27 +01:00
TableFormattingContext.h LibWeb: Use table_box() to get root box in TFC 2023-01-09 15:06:27 +01:00
TableRowBox.cpp Libraries: Use default constructors/destructors in LibWeb 2022-03-17 17:23:49 +00:00
TableRowBox.h LibWeb: Make the layout tree GC-allocated 2022-10-20 15:16:23 +02:00
TableRowGroupBox.cpp LibWeb: Remove inheritance of TableRowGroupBox from BlockContainer 2023-01-09 11:47:31 +01:00
TableRowGroupBox.h LibWeb: Remove inheritance of TableRowGroupBox from BlockContainer 2023-01-09 11:47:31 +01:00
TextNode.cpp LibWeb: Make the paint tree GC-allocated 2023-01-11 12:55:00 +01:00
TextNode.h LibWeb: Make a handful of layout node leaf classes final 2023-01-11 14:03:18 +01:00
TreeBuilder.cpp LibWeb: Move clear property from table-root to table-wrapper 2023-01-09 15:47:59 +01:00
TreeBuilder.h LibWeb: Use HashMap::try_ensure_capacity in StyleComputer 2022-12-10 14:29:46 +01:00