1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-31 13:48:12 +00:00
serenity/Userland/Libraries/LibWeb
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
..
Bindings LibWeb: Generate exposed Window/Worker interfaces as lazy objects 2023-01-10 16:08:14 +01:00
Cookie LibIPC+Everywhere: Change IPC::encode's return type to ErrorOr 2023-01-04 11:49:15 +01:00
Crypto LibWeb: Move setting of Web object prototypes to initialize() 2023-01-10 16:08:14 +01:00
CSS LibWeb: Move passing of Web object prototypes out of constructors 2023-01-10 16:08:14 +01:00
DOM LibWeb: Use DOM Selection instead of ad-hoc layout tree selection 2023-01-12 19:55:10 +01:00
DOMParsing LibWeb: Move setting of Web object prototypes to initialize() 2023-01-10 16:08:14 +01:00
Encoding LibWeb: Move setting of Web object prototypes to initialize() 2023-01-10 16:08:14 +01:00
Fetch LibWeb: Move setting of Web object prototypes to initialize() 2023-01-10 16:08:14 +01:00
FileAPI LibWeb: Move passing of Web object prototypes out of constructors 2023-01-10 16:08:14 +01:00
Geometry LibWeb: Move passing of Web object prototypes out of constructors 2023-01-10 16:08:14 +01:00
HighResolutionTime LibWeb: Move setting of Web object prototypes to initialize() 2023-01-10 16:08:14 +01:00
HTML LibWeb: Implement BrowsingContext::select_all() in terms of Selection 2023-01-12 19:55:10 +01:00
Infra LibWeb: Remove all whitespace from input in decode_forgiving_base64 2023-01-10 17:54:01 +00:00
IntersectionObserver LibWeb: Move setting of Web object prototypes to initialize() 2023-01-10 16:08:14 +01:00
Layout LibWeb: Use DOM Selection instead of ad-hoc layout tree selection 2023-01-12 19:55:10 +01:00
Loader LibWeb: Store cookies for every HTTP response 2022-12-30 21:56:54 -05:00
MimeSniff Everywhere: Rename to_{string => deprecated_string}() where applicable 2022-12-06 08:54:33 +01:00
NavigationTiming LibWeb: Move setting of Web object prototypes to initialize() 2023-01-10 16:08:14 +01:00
Page LibWeb: Use DOM Selection instead of ad-hoc layout tree selection 2023-01-12 19:55:10 +01:00
Painting LibWeb: Make Paintable visit its cached containing block pointer 2023-01-11 14:36:27 +01:00
Platform Userland: Replace remaining Core::Timer::construct()s with try_create() 2023-01-12 11:25:51 +01:00
ReferrerPolicy LibWeb: Implement 'Determine request’s Referrer' AO 2022-10-30 20:10:29 +00:00
RequestIdleCallback LibWeb: Move setting of Web object prototypes to initialize() 2023-01-10 16:08:14 +01:00
ResizeObserver LibWeb: Move setting of Web object prototypes to initialize() 2023-01-10 16:08:14 +01:00
Scripts Libraries: Move to Userland/Libraries/ 2021-01-12 12:17:46 +01:00
SecureContexts Everywhere: Rename to_{string => deprecated_string}() where applicable 2022-12-06 08:54:33 +01:00
Selection LibWeb: Use DOM Selection instead of ad-hoc layout tree selection 2023-01-12 19:55:10 +01:00
Streams LibWeb: Move setting of Web object prototypes to initialize() 2023-01-10 16:08:14 +01:00
SVG LibWeb: Move setting of Web object prototypes to initialize() 2023-01-10 16:08:14 +01:00
Tests Everywhere: Rename WrapperGenerator to BindingsGenerator 2022-09-21 23:06:08 +01:00
UIEvents LibWeb: Move setting of Web object prototypes to initialize() 2023-01-10 16:08:14 +01:00
URL LibWeb: Move setting of Web object prototypes to initialize() 2023-01-10 16:08:14 +01:00
WebAssembly LibWeb: Generate dedicated methods to create Web constructors/prototypes 2023-01-10 16:08:14 +01:00
WebDriver LibJS+Everywhere: Make PrimitiveString and Utf16String fallible 2023-01-08 12:13:15 +01:00
WebGL LibWeb: Move setting of Web object prototypes to initialize() 2023-01-10 16:08:14 +01:00
WebIDL LibWeb: Move setting of Web object prototypes to initialize() 2023-01-10 16:08:14 +01:00
WebSockets LibWeb: Move setting of Web object prototypes to initialize() 2023-01-10 16:08:14 +01:00
XHR LibWeb: Move setting of Web object prototypes to initialize() 2023-01-10 16:08:14 +01:00
XML AK+Everywhere: Rename FlyString to DeprecatedFlyString 2023-01-09 23:00:24 +00:00
CMakeLists.txt AK+LibWeb: Move decode forgiving base64 under Web::Infra namespace 2023-01-10 17:54:01 +00:00
Dump.cpp AK+Everywhere: Rename FlyString to DeprecatedFlyString 2023-01-09 23:00:24 +00:00
Dump.h LibWeb: Implement initial CSSFontFaceRule and FontFace classes 2022-03-28 22:25:25 +02:00
FontCache.cpp LibGfx: Move other font-related files to LibGfx/Font/ 2022-04-09 23:48:18 +02:00
FontCache.h AK+Everywhere: Rename FlyString to DeprecatedFlyString 2023-01-09 23:00:24 +00:00
Forward.h LibWeb: Generate dedicated methods to create Web constructors/prototypes 2023-01-10 16:08:14 +01:00
idl_files.cmake LibWeb: Sketch out basic support for SVG <foreignObject> elements 2022-11-16 13:01:21 +01:00
Namespace.cpp AK+Everywhere: Rename FlyString to DeprecatedFlyString 2023-01-09 23:00:24 +00:00
Namespace.h AK+Everywhere: Rename FlyString to DeprecatedFlyString 2023-01-09 23:00:24 +00:00
PixelUnits.h LibWeb: Only allow DevicePixels operators to work with integers 2022-12-14 16:47:57 +00:00
TreeNode.h LibWeb: Make the layout tree GC-allocated 2022-10-20 15:16:23 +02:00