1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-31 09:48:11 +00:00
serenity/Libraries/LibWeb/DOM
AnotherTest 4a2da10e38 ProtocolServer: Stream the downloaded data if possible
This patchset makes ProtocolServer stream the downloads to its client
(LibProtocol), and as such changes the download API; a possible
download lifecycle could be as such:
notation = client->server:'>', server->client:'<', pipe activity:'*'
```
> StartDownload(GET, url, headers, {})
< Response(0, fd 8)
* {data, 1024b}
< HeadersBecameAvailable(0, response_headers, 200)
< DownloadProgress(0, 4K, 1024)
* {data, 1024b}
* {data, 1024b}
< DownloadProgress(0, 4K, 2048)
* {data, 1024b}
< DownloadProgress(0, 4K, 1024)
< DownloadFinished(0, true, 4K)
```

Since managing the received file descriptor is a pain, LibProtocol
implements `Download::stream_into(OutputStream)`, which can be used to
stream the download into any given output stream (be it a file, or
memory, or writing stuff with a delay, etc.).
Also, as some of the users of this API require all the downloaded data
upfront, LibProtocol also implements `set_should_buffer_all_input()`,
which causes the download instance to buffer all the data until the
download is complete, and to call the `on_buffered_download_finish`
hook.
2020-12-30 13:31:55 +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: Expect IDL namespace to end with semicolon 2020-12-10 11:02:46 +01:00
Comment.cpp LibWeb: Rename LayoutNode classes and move them into Layout namespace 2020-11-22 15:56:27 +01:00
Comment.h LibWeb: Add Comment and DocumentFragment bindings, move querySelector... 2020-08-17 22:57:05 +02:00
Comment.idl LibWeb: Expect IDL namespace to end with semicolon 2020-12-10 11:02:46 +01:00
Document.cpp LibWeb: Put final foreground/background colors in LayoutStyle 2020-12-15 19:33:53 +01:00
Document.h LibWeb: Add hack to disable StyleInvalidator while parsing document 2020-12-15 19:33:53 +01:00
Document.idl LibWeb: Expect IDL namespace to end with semicolon 2020-12-10 11:02:46 +01:00
DocumentFragment.cpp LibWeb: Add Comment and DocumentFragment bindings, move querySelector... 2020-08-17 22:57:05 +02:00
DocumentFragment.h LibWeb: Make event dispatching spec-compliant 2020-11-22 18:20:56 +01:00
DocumentFragment.idl LibWeb: Expect IDL namespace to end with semicolon 2020-12-10 11:02:46 +01: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: Expect IDL namespace to end with semicolon 2020-12-10 11:02:46 +01:00
DOMImplementation.cpp LibWeb: Make event dispatching spec-compliant 2020-11-22 18:20:56 +01:00
DOMImplementation.h LibWeb: Add initial implementation of document.implementation 2020-11-13 09:51:07 +01:00
DOMImplementation.idl LibWeb: Expect IDL namespace to end with semicolon 2020-12-10 11:02:46 +01:00
Element.cpp LibWeb: Escape text nodes in innerHTML getter 2020-12-17 19:39:48 +01:00
Element.h LibWeb: Expose three more attribute methods on Element 2020-12-29 23:38:14 +01:00
Element.idl LibWeb: Expose three more attribute methods on Element 2020-12-29 23:38:14 +01:00
ElementFactory.cpp LibWeb: Add almost all obsolete but required IDL attributes 2020-11-12 10:38:26 +01:00
ElementFactory.h LibWeb: Add namespace to Element 2020-10-22 15:24:42 +02:00
Event.cpp LibWeb: Make event dispatching spec-compliant 2020-11-22 18:20:56 +01:00
Event.h LibWeb: Make event dispatching spec-compliant 2020-11-22 18:20:56 +01:00
Event.idl LibWeb: Replace IDL 'void' return type with 'undefined' 2020-12-10 11:02:46 +01:00
EventDispatcher.cpp Everywhere: Switch from (void) to [[maybe_unused]] (#4473) 2020-12-21 00:09:48 +01:00
EventDispatcher.h LibWeb: Make event dispatching spec-compliant 2020-11-22 18:20:56 +01:00
EventListener.cpp LibWeb: Move DOM classes into the Web::DOM namespace 2020-07-26 20:05:15 +02:00
EventListener.h LibWeb: Make event dispatching spec-compliant 2020-11-22 18:20:56 +01:00
EventTarget.cpp LibWeb: Make event dispatching spec-compliant 2020-11-22 18:20:56 +01:00
EventTarget.h LibWeb: Make event dispatching spec-compliant 2020-11-22 18:20:56 +01:00
EventTarget.idl LibWeb: Replace IDL 'void' return type with 'undefined' 2020-12-10 11:02:46 +01:00
Node.cpp LibWeb: Limit style update tree traversal to dirty subtrees 2020-12-14 12:04:30 +01:00
Node.h LibWeb: Simplify <iframe> content frame construction 2020-12-14 13:45:57 +01:00
Node.idl LibWeb: Expect IDL namespace to end with semicolon 2020-12-10 11:02:46 +01: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: Expose ParentNode.{first,last}ElementChild 2020-11-22 18:20:56 +01:00
ParentNode.h LibWeb: Expose ParentNode.{first,last}ElementChild 2020-11-22 18:20:56 +01:00
Position.cpp LibWeb: Make DOM::Range more suitable for JS. 2020-12-09 21:05:06 +01:00
Position.h LibWeb: Make DOM::Range more suitable for JS. 2020-12-09 21:05:06 +01:00
Range.cpp LibWeb: Expose DOM::Range to JavaScript. 2020-12-09 21:05:06 +01:00
Range.h LibWeb: Expose DOM::Range to JavaScript. 2020-12-09 21:05:06 +01:00
ShadowRoot.cpp LibWeb: Make event dispatching spec-compliant 2020-11-22 18:20:56 +01:00
ShadowRoot.h LibWeb: Make event dispatching spec-compliant 2020-11-22 18:20:56 +01:00
ShadowRoot.idl LibWeb: Expect IDL namespace to end with semicolon 2020-12-10 11:02:46 +01:00
Text.cpp LibWeb: Rename LayoutNode classes and move them into Layout namespace 2020-11-22 15:56:27 +01:00
Text.h LibWeb: Rename LayoutNode classes and move them into Layout namespace 2020-11-22 15:56:27 +01:00
Text.idl LibWeb: Expect IDL namespace to end with semicolon 2020-12-10 11:02:46 +01:00
Timer.cpp LibWeb: Deallocate DOM timer ID's when the timer goes away 2020-11-30 11:40:35 +01:00
Timer.h LibWeb: Move DOM classes into the Web::DOM namespace 2020-07-26 20:05:15 +02:00
Window.cpp Everywhere: Switch from (void) to [[maybe_unused]] (#4473) 2020-12-21 00:09:48 +01:00
Window.h LibWeb: Complete the URL in href_setter() before trying to load it 2020-12-02 10:08:29 +01:00
XMLHttpRequest.cpp ProtocolServer: Stream the downloaded data if possible 2020-12-30 13:31:55 +01:00
XMLHttpRequest.h LibWeb: Make event dispatching spec-compliant 2020-11-22 18:20:56 +01:00