1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-31 14:38:11 +00:00
serenity/Userland/Libraries/LibWeb/DOM
Max Wipfli 7181cb3a9c LibWeb: Frame/Position: Implement cursor increment/decrement methods
This introduces methods to increment and decrement the cursor position.
This is non-trivial as the cursor position is specified in bytes rather
than codepoints. Thus, it sometimes needs to be incremented or
decremented by more than one, depending on the codepoint to "jump over".

Because the cursor blink cycle needs to be reset after moving the
cursor, methods calling the ones in DOM::Position are implemented in
Frame. Furthermore, this allows the cursor_position() getter to stay
const. :^)

Additionally, it adds a offset_is_at_end_of_node() method which checks
if the current offset points to the end of the node.
2021-05-21 21:57:03 +02:00
..
Attribute.h Everything: Move to SPDX license identifiers in all files. 2021-04-22 11:22:27 +02:00
CharacterData.cpp Everything: Move to SPDX license identifiers in all files. 2021-04-22 11:22:27 +02:00
CharacterData.h Everything: Move to SPDX license identifiers in all files. 2021-04-22 11:22:27 +02:00
CharacterData.idl Libraries: Move to Userland/Libraries/ 2021-01-12 12:17:46 +01:00
Comment.cpp Everything: Move to SPDX license identifiers in all files. 2021-04-22 11:22:27 +02:00
Comment.h Everything: Move to SPDX license identifiers in all files. 2021-04-22 11:22:27 +02:00
Comment.idl Libraries: Move to Userland/Libraries/ 2021-01-12 12:17:46 +01:00
Document.cpp LibWeb: Fix "adopt" => "adopt_ref" change in adoptNode exceptions 2021-05-16 22:08:49 +01:00
Document.h LibWeb: Change Document's m_encoding to Optional<String> 2021-05-18 21:02:07 +02:00
Document.idl LibWeb: Add Document.{images,embeds,plugins,links,forms,scripts} 2021-05-04 23:40:43 +01:00
DocumentFragment.cpp LibWeb+HackStudio: Use lukew@serenityos.org for my copyright headers 2021-04-22 23:15:33 +02:00
DocumentFragment.h Everything: Move to SPDX license identifiers in all files. 2021-04-22 11:22:27 +02:00
DocumentFragment.idl LibWeb: Move element_child_count to ParentNode and add its IDL attribute 2021-04-11 18:32:42 +02:00
DocumentType.cpp Everything: Move to SPDX license identifiers in all files. 2021-04-22 11:22:27 +02:00
DocumentType.h LibWeb: Add createDocument and createDocumentType for DOMImplementation 2021-05-04 22:59:15 +01:00
DocumentType.idl Libraries: Move to Userland/Libraries/ 2021-01-12 12:17:46 +01:00
DOMException.h AK: Rename adopt() to adopt_ref() 2021-04-23 16:46:57 +02:00
DOMException.idl LibWeb: Add support for optional default values and optional bools in IDL 2021-04-11 18:27:52 +02:00
DOMImplementation.cpp LibWeb: Add createDocument and createDocumentType for DOMImplementation 2021-05-04 22:59:15 +01:00
DOMImplementation.h LibWeb: Add createDocument and createDocumentType for DOMImplementation 2021-05-04 22:59:15 +01:00
DOMImplementation.idl LibWeb: Add createDocument and createDocumentType for DOMImplementation 2021-05-04 22:59:15 +01:00
Element.cpp LibWeb: Use HTML-uppercased qualified name for the Element node name 2021-05-04 23:24:03 +01:00
Element.h LibWeb: Make Element::tag_name return the HTML uppercased qualified name 2021-05-11 18:01:36 +02:00
Element.idl LibWeb: Expose Element.{prefix,localName} 2021-05-11 18:01:36 +02:00
ElementFactory.cpp AK: Rename adopt() to adopt_ref() 2021-04-23 16:46:57 +02:00
ElementFactory.h Everything: Move to SPDX license identifiers in all files. 2021-04-22 11:22:27 +02:00
Event.cpp Everything: Move to SPDX license identifiers in all files. 2021-04-22 11:22:27 +02:00
Event.h AK: Rename adopt() to adopt_ref() 2021-04-23 16:46:57 +02:00
Event.idl LibWeb: Add Event.initEvent 2021-04-11 18:27:52 +02:00
EventDispatcher.cpp LibJS: Add VM::on_call_stack_emptied callback 2021-04-24 20:11:04 +02:00
EventDispatcher.h Everything: Move to SPDX license identifiers in all files. 2021-04-22 11:22:27 +02:00
EventListener.cpp Everything: Move to SPDX license identifiers in all files. 2021-04-22 11:22:27 +02:00
EventListener.h Everything: Move to SPDX license identifiers in all files. 2021-04-22 11:22:27 +02:00
EventTarget.cpp LibWeb: Implement EventTarget.dispatchEvent 2021-05-04 23:41:44 +01:00
EventTarget.h LibWeb: Implement EventTarget.dispatchEvent 2021-05-04 23:41:44 +01:00
EventTarget.idl LibWeb: Implement EventTarget.dispatchEvent 2021-05-04 23:41:44 +01:00
ExceptionOr.h Everywhere: Use linusg@serenityos.org for my copyright headers 2021-04-22 22:51:19 +02:00
HTMLCollection.cpp LibWeb: Implement a slow but functional HTMLCollection :^) 2021-04-22 21:21:46 +02:00
HTMLCollection.h AK: Rename adopt() to adopt_ref() 2021-04-23 16:46:57 +02:00
HTMLCollection.idl LibWeb: Implement a slow but functional HTMLCollection :^) 2021-04-22 21:21:46 +02:00
Node.cpp LibWeb: Implement Node.replaceChild 2021-05-07 08:53:37 +02:00
Node.h LibWeb: Implement Node.replaceChild 2021-05-07 08:53:37 +02:00
Node.idl LibWeb: Implement Node.replaceChild 2021-05-07 08:53:37 +02:00
NonDocumentTypeChildNode.h Everything: Move to SPDX license identifiers in all files. 2021-04-22 11:22:27 +02:00
NonElementParentNode.h Everything: Move to SPDX license identifiers in all files. 2021-04-22 11:22:27 +02:00
ParentNode.cpp LibWeb+HackStudio: Use lukew@serenityos.org for my copyright headers 2021-04-22 23:15:33 +02:00
ParentNode.h Everything: Move to SPDX license identifiers in all files. 2021-04-22 11:22:27 +02:00
Position.cpp LibWeb: Frame/Position: Implement cursor increment/decrement methods 2021-05-21 21:57:03 +02:00
Position.h LibWeb: Frame/Position: Implement cursor increment/decrement methods 2021-05-21 21:57:03 +02:00
ProcessingInstruction.cpp Everything: Move to SPDX license identifiers in all files. 2021-04-22 11:22:27 +02:00
ProcessingInstruction.h Everything: Move to SPDX license identifiers in all files. 2021-04-22 11:22:27 +02:00
ProcessingInstruction.idl LibWeb: Add ProcessingInstruction node 2021-04-06 21:42:00 +02:00
Range.cpp AK: Rename adopt() to adopt_ref() 2021-04-23 16:46:57 +02:00
Range.h Everything: Move to SPDX license identifiers in all files. 2021-04-22 11:22:27 +02:00
Range.idl LibWeb: Add constructor to Range IDL interface 2021-02-17 23:45:07 +01:00
ShadowRoot.cpp AK: Rename adopt() to adopt_ref() 2021-04-23 16:46:57 +02:00
ShadowRoot.h Everything: Move to SPDX license identifiers in all files. 2021-04-22 11:22:27 +02:00
ShadowRoot.idl Libraries: Move to Userland/Libraries/ 2021-01-12 12:17:46 +01:00
Text.cpp AK: Rename adopt() to adopt_ref() 2021-04-23 16:46:57 +02:00
Text.h Everything: Move to SPDX license identifiers in all files. 2021-04-22 11:22:27 +02:00
Text.idl Libraries: Move to Userland/Libraries/ 2021-01-12 12:17:46 +01:00
Timer.cpp AK: Rename adopt() to adopt_ref() 2021-04-23 16:46:57 +02:00
Timer.h Everything: Move to SPDX license identifiers in all files. 2021-04-22 11:22:27 +02:00
Window.cpp LibJS: Add VM::on_call_stack_emptied callback 2021-04-24 20:11:04 +02:00
Window.h Everything: Move to SPDX license identifiers in all files. 2021-04-22 11:22:27 +02:00