Commit graph

3 commits

Author SHA1 Message Date
Timothy Flynn
843f8f04a5 LibWeb: Implement the DataTransferItemList length attribute 2024-08-22 14:21:13 +02:00
Timothy Flynn
f7c4165dde LibWeb: Make the drag data store reference counted
Ownership of the drag data store is a bit weird. In a normal drag-and-
drop operation, the DragAndDropEventHandler owns the store. When events
are fired for the operation, the DataTransfer object assigned to those
events are "associated" with the store. We currently represent that with
an Optional<DragDataStore&>.

However, it's also possible to create DataTransfer objects from scripts.
Those objects create their own drag data store. This puts DataTransfer
in a weird situation where it may own a store or just reference one.

Rather than coming up with something like Variant<DDS, DDS&> or using
MaybeOwned<DDS> here, we can get by with just making the store reference
counted.
2024-08-22 14:21:13 +02:00
Timothy Flynn
9e98e63559 LibWeb: Begin implementing the drag data store 2024-08-19 13:29:19 +02:00