ladybird/Libraries/LibWeb/DOM
Tom 75f61fe3d9 AK: Make RefPtr, NonnullRefPtr, WeakPtr thread safe
This makes most operations thread safe, especially so that they
can safely be used in the Kernel. This includes obtaining a strong
reference from a weak reference, which now requires an explicit
call to WeakPtr::strong_ref(). Another major change is that
Weakable::make_weak_ref() may require the explicit target type.
Previously we used reinterpret_cast in WeakPtr, assuming that it
can be properly converted. But WeakPtr does not necessarily have
the knowledge to be able to do this. Instead, we now ask the class
itself to deliver a WeakPtr to the type that we want.

Also, WeakLink is no longer specific to a target type. The reason
for this is that we want to be able to safely convert e.g. WeakPtr<T>
to WeakPtr<U>, and before this we just reinterpret_cast the internal
WeakLink<T> to WeakLink<U>, which is a bold assumption that it would
actually produce the correct code. Instead, WeakLink now operates
on just a raw pointer and we only make those constructors/operators
available if we can verify that it can be safely cast.

In order to guarantee thread safety, we now use the least significant
bit in the pointer for locking purposes. This also means that only
properly aligned pointers can be used.
2020-11-10 19:11:52 +01:00
..
Attribute.h LibWeb: Move Attribute to its own header file 2020-05-22 21:45:00 +02:00
CharacterData.cpp LibWeb: Move DOM classes into the Web::DOM namespace 2020-07-26 20:05:15 +02:00
CharacterData.h LibWeb: Add CharacterData and Text IDL interfaces 2020-08-03 20:50:45 +02:00
CharacterData.idl LibWeb: Add CharacterData and Text IDL interfaces 2020-08-03 20:50:45 +02:00
Comment.cpp LibWeb: Move DOM classes into the Web::DOM namespace 2020-07-26 20:05:15 +02:00
Comment.h LibWeb: Add Comment and DocumentFragment bindings, move querySelector... 2020-08-17 22:57:05 +02:00
Comment.idl LibWeb: Add Comment and DocumentFragment bindings, move querySelector... 2020-08-17 22:57:05 +02:00
Document.cpp AK: Make RefPtr, NonnullRefPtr, WeakPtr thread safe 2020-11-10 19:11:52 +01:00
Document.h LibWeb: Fix Document construction mishap in <template> element 2020-10-23 08:33:16 +02:00
Document.idl LibWeb: Implement document ready state 2020-08-31 23:05:51 +02:00
DocumentFragment.cpp LibWeb: Add Comment and DocumentFragment bindings, move querySelector... 2020-08-17 22:57:05 +02:00
DocumentFragment.h Meta+LibHTTP through LibWeb: Make clang-format-10 clean 2020-09-25 21:18:17 +02:00
DocumentFragment.idl LibWeb: Add Comment and DocumentFragment bindings, move querySelector... 2020-08-17 22:57:05 +02:00
DocumentType.cpp LibWeb: Move DOM classes into the Web::DOM namespace 2020-07-26 20:05:15 +02:00
DocumentType.h LibWeb: Move DOM classes into the Web::DOM namespace 2020-07-26 20:05:15 +02:00
DocumentType.idl LibWeb: Implement quirks mode detection 2020-07-21 01:08:32 +02:00
Element.cpp LibWeb: Add namespace to Element 2020-10-22 15:24:42 +02:00
Element.h LibWeb: Add namespace to Element 2020-10-22 15:24:42 +02:00
Element.idl LibWeb: Add namespace to Element 2020-10-22 15:24:42 +02:00
ElementFactory.cpp LibWeb: Add namespace to Element 2020-10-22 15:24:42 +02:00
ElementFactory.h LibWeb: Add namespace to Element 2020-10-22 15:24:42 +02:00
Event.h LibWeb: Add UIEvent class (base of MouseEvent, and others) 2020-07-28 19:39:17 +02:00
Event.idl LibWeb: Generate Event and MouseEvent bindings from IDL :^) 2020-06-21 16:12:28 +02:00
EventDispatcher.cpp LibWeb: Fix EventDispatcher::dispatch() 2020-10-15 20:40:35 +02:00
EventDispatcher.h LibWeb: Move DOM event dispatch to its own class 2020-09-06 14:48:14 +02:00
EventListener.cpp LibWeb: Move DOM classes into the Web::DOM namespace 2020-07-26 20:05:15 +02:00
EventListener.h LibWeb: Move DOM classes into the Web::DOM namespace 2020-07-26 20:05:15 +02:00
EventTarget.cpp LibWeb: Add Bindings::ScriptExecutionContext 2020-09-20 19:22:44 +02:00
EventTarget.h LibWeb: Add Bindings::ScriptExecutionContext 2020-09-20 19:22:44 +02:00
EventTarget.idl LibWeb: Add EventTarget.removeEventListener() 2020-06-21 12:37:34 +02:00
Node.cpp LibWeb: Break reference cycles so DOM::Document actually gets deleted 2020-10-22 23:41:32 +02:00
Node.h LibWeb: Use smart pointers between DOM and Layout tree 2020-10-22 20:26:32 +02:00
Node.idl LibWeb: Add Node.textContent 2020-08-17 21:23:11 +02:00
NonDocumentTypeChildNode.h LibWeb: Add NonDocumentTypeChildNode::next_element_in_pre_order() 2020-08-15 00:05:45 +02:00
NonElementParentNode.h LibWeb: Use RefPtrs more in getElementById() and getElementsByName() 2020-10-07 12:47:17 +02:00
ParentNode.cpp LibWeb: Add more document tests, add comment, text and mixin tests 2020-08-17 22:57:05 +02:00
ParentNode.h LibJS: Remove a whole bunch of includes of <LibJS/Interpreter.h> 2020-09-27 20:26:58 +02:00
Position.cpp LibWeb: Add a basic DOM::Position class 2020-08-02 17:34:50 +02:00
Position.h LibWeb: Allow inserting text at the cursor by typing characters :^) 2020-08-02 17:34:50 +02:00
TagNames.cpp LibWeb: Use modern namespaces and fix clang-format comments in tag names 2020-10-22 15:24:42 +02:00
TagNames.h LibWeb: Use modern namespaces and fix clang-format comments in tag names 2020-10-22 15:24:42 +02:00
Text.cpp LibWeb: Move CSS classes into the Web::CSS namespace 2020-07-26 20:05:15 +02:00
Text.h LibWeb: Add CharacterData and Text IDL interfaces 2020-08-03 20:50:45 +02:00
Text.idl LibWeb: Add CharacterData and Text IDL interfaces 2020-08-03 20:50:45 +02:00
Timer.cpp LibWeb: Remove a bunch of unnecessary <LibJS/Interpreter.h> includes 2020-09-29 17:04:16 +02:00
Timer.h LibWeb: Move DOM classes into the Web::DOM namespace 2020-07-26 20:05:15 +02:00
Window.cpp LibWeb: Make DOM::Window into an EventTarget 2020-10-18 13:43:44 +02:00
Window.h LibWeb: Make DOM::Window into an EventTarget 2020-10-18 13:43:44 +02:00
XMLHttpRequest.cpp LibWeb: Enforce Same-Origin Policy (SOP) for XMLHttpRequest requests 2020-11-01 10:23:08 +01:00
XMLHttpRequest.h LibWeb: Move DOM event dispatch to its own class 2020-09-06 14:48:14 +02:00