1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-31 09:08:12 +00:00
serenity/Userland/Libraries/LibWeb/DOM
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
..
AbortController.cpp LibWeb: Move setting of Web object prototypes to initialize() 2023-01-10 16:08:14 +01:00
AbortController.h LibWeb: Move setting of Web object prototypes to initialize() 2023-01-10 16:08:14 +01:00
AbortController.idl LibWeb: Add imports to all IDL files that depend on others 2022-02-16 22:48:32 +03:30
AbortSignal.cpp LibWeb: Move setting of Web object prototypes to initialize() 2023-01-10 16:08:14 +01:00
AbortSignal.h LibWeb: Move setting of Web object prototypes to initialize() 2023-01-10 16:08:14 +01:00
AbortSignal.idl LibWeb: Replace ad-hoc EventHandler type with callback function typedef 2022-03-31 01:10:47 +02:00
AbstractRange.cpp LibWeb: Move passing of Web object prototypes out of constructors 2023-01-10 16:08:14 +01:00
AbstractRange.h LibWeb: Move passing of Web object prototypes out of constructors 2023-01-10 16:08:14 +01:00
AbstractRange.idl LibWeb: Remove the NoInstanceWrapper extended IDL attribute 2022-09-06 00:27:09 +02:00
AccessibilityTreeNode.cpp LibWeb: Add Function To Build Accessiblity Tree 2023-01-07 10:51:53 +00:00
AccessibilityTreeNode.h LibWeb: Add Function To Build Accessiblity Tree 2023-01-07 10:51:53 +00:00
ARIAMixin.cpp AK+Everywhere: Rename FlyString to DeprecatedFlyString 2023-01-09 23:00:24 +00:00
ARIAMixin.h AK+Everywhere: Rename FlyString to DeprecatedFlyString 2023-01-09 23:00:24 +00:00
ARIAMixin.idl LibWeb: Add Support for the ARIA Element Properties 2023-01-07 10:51:53 +00:00
ARIARoleNames.cpp AK+Everywhere: Rename FlyString to DeprecatedFlyString 2023-01-09 23:00:24 +00:00
ARIARoleNames.h AK+Everywhere: Rename FlyString to DeprecatedFlyString 2023-01-09 23:00:24 +00:00
Attr.cpp LibWeb: Move setting of Web object prototypes to initialize() 2023-01-10 16:08:14 +01:00
Attr.h LibWeb: Move setting of Web object prototypes to initialize() 2023-01-10 16:08:14 +01:00
Attr.idl LibWeb: Rename Attribute to Attr 2022-09-18 02:08:01 +02:00
CDATASection.cpp LibWeb: Move setting of Web object prototypes to initialize() 2023-01-10 16:08:14 +01:00
CDATASection.h LibWeb: Move setting of Web object prototypes to initialize() 2023-01-10 16:08:14 +01:00
CDATASection.idl LibWeb: Add CDATASection 2022-06-27 22:53:04 +01:00
CharacterData.cpp LibWeb: Move setting of Web object prototypes to initialize() 2023-01-10 16:08:14 +01:00
CharacterData.h LibWeb: Move setting of Web object prototypes to initialize() 2023-01-10 16:08:14 +01:00
CharacterData.idl LibWeb: Add Exposed attribute and IDL spec links where missing 2022-10-09 10:14:57 +02:00
ChildNode.h AK+Everywhere: Rename String to DeprecatedString 2022-12-06 08:54:33 +01:00
ChildNode.idl LibWeb: Resolve circular IDL imports 2022-07-30 13:20:47 +02:00
Comment.cpp LibJS: Convert Heap::allocate{,_without_realm}() to NonnullGCPtr 2022-12-15 06:56:37 -05:00
Comment.h AK+Everywhere: Rename FlyString to DeprecatedFlyString 2023-01-09 23:00:24 +00:00
Comment.idl LibWeb: Add Exposed attribute and IDL spec links where missing 2022-10-09 10:14:57 +02:00
CustomEvent.cpp LibWeb: Move setting of Web object prototypes to initialize() 2023-01-10 16:08:14 +01:00
CustomEvent.h LibWeb: Move setting of Web object prototypes to initialize() 2023-01-10 16:08:14 +01:00
CustomEvent.idl LibWeb: Remove the NoInstanceWrapper extended IDL attribute 2022-09-06 00:27:09 +02:00
Document.cpp LibWeb: Use DOM Selection instead of ad-hoc layout tree selection 2023-01-12 19:55:10 +01:00
Document.h LibWeb: Move setting of Web object prototypes to initialize() 2023-01-10 16:08:14 +01:00
Document.idl LibWeb: Add Document.createProcessingInstruction() 2022-12-14 15:21:48 +01:00
DocumentFragment.cpp LibWeb: Move setting of Web object prototypes to initialize() 2023-01-10 16:08:14 +01:00
DocumentFragment.h LibWeb: Move setting of Web object prototypes to initialize() 2023-01-10 16:08:14 +01:00
DocumentFragment.idl LibWeb: Add Exposed attribute and IDL spec links where missing 2022-10-09 10:14:57 +02:00
DocumentLoadEventDelayer.cpp LibWeb+LibJS: Make the EventTarget hierarchy (incl. DOM) GC-allocated 2022-09-06 00:27:09 +02:00
DocumentLoadEventDelayer.h LibWeb+LibJS: Make the EventTarget hierarchy (incl. DOM) GC-allocated 2022-09-06 00:27:09 +02:00
DocumentType.cpp LibWeb: Move setting of Web object prototypes to initialize() 2023-01-10 16:08:14 +01:00
DocumentType.h LibWeb: Move setting of Web object prototypes to initialize() 2023-01-10 16:08:14 +01:00
DocumentType.idl LibWeb: Add Exposed attribute and IDL spec links where missing 2022-10-09 10:14:57 +02:00
DOMEventListener.cpp LibWeb+LibJS: Make the EventTarget hierarchy (incl. DOM) GC-allocated 2022-09-06 00:27:09 +02:00
DOMEventListener.h AK+Everywhere: Rename FlyString to DeprecatedFlyString 2023-01-09 23:00:24 +00:00
DOMImplementation.cpp LibWeb: Move passing of Web object prototypes out of constructors 2023-01-10 16:08:14 +01:00
DOMImplementation.h LibWeb: Move passing of Web object prototypes out of constructors 2023-01-10 16:08:14 +01:00
DOMImplementation.idl LibWeb: Add Exposed attribute and IDL spec links where missing 2022-10-09 10:14:57 +02:00
DOMTokenList.cpp LibWeb: Move passing of Web object prototypes out of constructors 2023-01-10 16:08:14 +01:00
DOMTokenList.h LibWeb: Move passing of Web object prototypes out of constructors 2023-01-10 16:08:14 +01:00
DOMTokenList.idl LibWeb: Add Exposed attribute and IDL spec links where missing 2022-10-09 10:14:57 +02:00
Element.cpp LibWeb: Move setting of Web object prototypes to initialize() 2023-01-10 16:08:14 +01:00
Element.h AK+Everywhere: Rename FlyString to DeprecatedFlyString 2023-01-09 23:00:24 +00:00
Element.idl LibWeb: Add Support for the ARIA Element Properties 2023-01-07 10:51:53 +00:00
ElementFactory.cpp AK+Everywhere: Rename FlyString to DeprecatedFlyString 2023-01-09 23:00:24 +00:00
ElementFactory.h AK+Everywhere: Rename FlyString to DeprecatedFlyString 2023-01-09 23:00:24 +00:00
Event.cpp LibWeb: Move passing of Web object prototypes out of constructors 2023-01-10 16:08:14 +01:00
Event.h LibWeb: Move passing of Web object prototypes out of constructors 2023-01-10 16:08:14 +01:00
Event.idl LibWeb: Add Exposed attribute and IDL spec links where missing 2022-10-09 10:14:57 +02:00
EventDispatcher.cpp LibJS+LibWeb: Remove NonnullGCPtr<T>::operator=(GCPtr<T>) footgun 2022-12-14 15:21:15 +01:00
EventDispatcher.h LibWeb+LibJS: Make the EventTarget hierarchy (incl. DOM) GC-allocated 2022-09-06 00:27:09 +02:00
EventHandler.idl LibWeb: Implement WindowEventHandlers 2022-06-29 21:21:50 +01:00
EventTarget.cpp AK+Everywhere: Rename FlyString to DeprecatedFlyString 2023-01-09 23:00:24 +00:00
EventTarget.h AK+Everywhere: Rename FlyString to DeprecatedFlyString 2023-01-09 23:00:24 +00:00
EventTarget.idl LibWeb: Add Exposed attribute and IDL spec links where missing 2022-10-09 10:14:57 +02:00
HTMLCollection.cpp LibWeb: Move passing of Web object prototypes out of constructors 2023-01-10 16:08:14 +01:00
HTMLCollection.h LibWeb: Move passing of Web object prototypes out of constructors 2023-01-10 16:08:14 +01:00
HTMLCollection.idl LibWeb: Add imports to all IDL files that depend on others 2022-02-16 22:48:32 +03:30
IDLEventListener.cpp LibJS: Convert Heap::allocate{,_without_realm}() to NonnullGCPtr 2022-12-15 06:56:37 -05:00
IDLEventListener.h LibWeb: Move CallbackType from Bindings/ to WebIDL/ 2022-09-24 19:31:39 +01:00
InnerHTML.idl LibWeb: Resolve circular IDL imports 2022-07-30 13:20:47 +02:00
LiveNodeList.cpp LibJS: Convert Heap::allocate{,_without_realm}() to NonnullGCPtr 2022-12-15 06:56:37 -05:00
LiveNodeList.h LibWeb: Remove unecessary dependence on Window from DOM and WebIDL 2022-10-01 21:05:32 +01:00
MutationObserver.cpp LibWeb: Move setting of Web object prototypes to initialize() 2023-01-10 16:08:14 +01:00
MutationObserver.h LibWeb: Move setting of Web object prototypes to initialize() 2023-01-10 16:08:14 +01:00
MutationObserver.idl LibWeb: Introduce Mutation{Record,Observer} and observer microtasks 2022-07-11 22:35:08 +02:00
MutationRecord.cpp LibWeb: Move setting of Web object prototypes to initialize() 2023-01-10 16:08:14 +01:00
MutationRecord.h LibWeb: Move setting of Web object prototypes to initialize() 2023-01-10 16:08:14 +01:00
MutationRecord.idl LibWeb: Introduce Mutation{Record,Observer} and observer microtasks 2022-07-11 22:35:08 +02:00
MutationType.cpp AK+Everywhere: Rename FlyString to DeprecatedFlyString 2023-01-09 23:00:24 +00:00
MutationType.h AK+Everywhere: Rename FlyString to DeprecatedFlyString 2023-01-09 23:00:24 +00:00
NamedNodeMap.cpp LibWeb: Move passing of Web object prototypes out of constructors 2023-01-10 16:08:14 +01:00
NamedNodeMap.h LibWeb: Move passing of Web object prototypes out of constructors 2023-01-10 16:08:14 +01:00
NamedNodeMap.idl LibWeb: Add NamedNodeMap::setNamedItemNS() method 2022-12-17 18:27:57 +01:00
Node.cpp AK+Everywhere: Rename FlyString to DeprecatedFlyString 2023-01-09 23:00:24 +00:00
Node.h LibWeb: Remove unused declaration Node::removed_last_ref() 2023-01-11 12:55:00 +01:00
Node.idl LibWeb: Add Exposed attribute and IDL spec links where missing 2022-10-09 10:14:57 +02:00
NodeFilter.cpp LibJS: Convert Heap::allocate{,_without_realm}() to NonnullGCPtr 2022-12-15 06:56:37 -05:00
NodeFilter.h LibWeb: Move CallbackType from Bindings/ to WebIDL/ 2022-09-24 19:31:39 +01:00
NodeFilter.idl LibWeb: Expose NodeFilter on the Window object 2022-10-28 16:17:08 +01:00
NodeIterator.cpp LibWeb: Move passing of Web object prototypes out of constructors 2023-01-10 16:08:14 +01:00
NodeIterator.h LibWeb: Move passing of Web object prototypes out of constructors 2023-01-10 16:08:14 +01:00
NodeIterator.idl LibWeb: Remove the NoInstanceWrapper extended IDL attribute 2022-09-06 00:27:09 +02:00
NodeList.cpp LibWeb: Move passing of Web object prototypes out of constructors 2023-01-10 16:08:14 +01:00
NodeList.h LibWeb: Move passing of Web object prototypes out of constructors 2023-01-10 16:08:14 +01:00
NodeList.idl LibWeb: Add imports to all IDL files that depend on others 2022-02-16 22:48:32 +03:30
NodeOperations.cpp LibJS: Convert Heap::allocate{,_without_realm}() to NonnullGCPtr 2022-12-15 06:56:37 -05:00
NodeOperations.h AK+Everywhere: Rename String to DeprecatedString 2022-12-06 08:54:33 +01:00
NonDocumentTypeChildNode.h Everywhere: Run clang-format 2022-04-01 21:24:45 +01:00
NonElementParentNode.h AK+Everywhere: Rename FlyString to DeprecatedFlyString 2023-01-09 23:00:24 +00:00
ParentNode.cpp AK+Everywhere: Rename FlyString to DeprecatedFlyString 2023-01-09 23:00:24 +00:00
ParentNode.h AK+Everywhere: Rename FlyString to DeprecatedFlyString 2023-01-09 23:00:24 +00:00
ParentNode.idl LibWeb: Resolve circular IDL imports 2022-07-30 13:20:47 +02:00
Position.cpp Everywhere: Rename to_{string => deprecated_string}() where applicable 2022-12-06 08:54:33 +01:00
Position.h Everywhere: Rename to_{string => deprecated_string}() where applicable 2022-12-06 08:54:33 +01:00
ProcessingInstruction.cpp LibWeb: Move setting of Web object prototypes to initialize() 2023-01-10 16:08:14 +01:00
ProcessingInstruction.h LibWeb: Move setting of Web object prototypes to initialize() 2023-01-10 16:08:14 +01:00
ProcessingInstruction.idl LibWeb: Add Exposed attribute and IDL spec links where missing 2022-10-09 10:14:57 +02:00
QualifiedName.cpp AK+Everywhere: Rename FlyString to DeprecatedFlyString 2023-01-09 23:00:24 +00:00
QualifiedName.h AK+Everywhere: Rename FlyString to DeprecatedFlyString 2023-01-09 23:00:24 +00:00
Range.cpp LibWeb: Use DOM Selection instead of ad-hoc layout tree selection 2023-01-12 19:55:10 +01:00
Range.h LibWeb: Use DOM Selection instead of ad-hoc layout tree selection 2023-01-12 19:55:10 +01:00
Range.idl LibWeb: Stub Range.getBoundingClientRect 2022-12-10 00:21:10 +00:00
ShadowRoot.cpp AK+Everywhere: Rename String to DeprecatedString 2022-12-06 08:54:33 +01:00
ShadowRoot.h AK+Everywhere: Rename FlyString to DeprecatedFlyString 2023-01-09 23:00:24 +00:00
ShadowRoot.idl LibWeb: Add Exposed attribute and IDL spec links where missing 2022-10-09 10:14:57 +02:00
StaticNodeList.cpp LibJS: Convert Heap::allocate{,_without_realm}() to NonnullGCPtr 2022-12-15 06:56:37 -05:00
StaticNodeList.h LibWeb: Remove unecessary dependence on Window from DOM and WebIDL 2022-10-01 21:05:32 +01:00
StaticRange.cpp LibWeb: Move setting of Web object prototypes to initialize() 2023-01-10 16:08:14 +01:00
StaticRange.h LibWeb: Move setting of Web object prototypes to initialize() 2023-01-10 16:08:14 +01:00
StaticRange.idl LibWeb: Remove the NoInstanceWrapper extended IDL attribute 2022-09-06 00:27:09 +02:00
Text.cpp LibWeb: Move setting of Web object prototypes to initialize() 2023-01-10 16:08:14 +01:00
Text.h LibWeb: Move setting of Web object prototypes to initialize() 2023-01-10 16:08:14 +01:00
Text.idl LibWeb: Add Exposed attribute and IDL spec links where missing 2022-10-09 10:14:57 +02:00
TreeWalker.cpp LibWeb: Move passing of Web object prototypes out of constructors 2023-01-10 16:08:14 +01:00
TreeWalker.h LibWeb: Move passing of Web object prototypes out of constructors 2023-01-10 16:08:14 +01:00
TreeWalker.idl LibWeb: Remove the NoInstanceWrapper extended IDL attribute 2022-09-06 00:27:09 +02:00