summaryrefslogtreecommitdiff
path: root/Userland/Libraries/LibWeb/WebSockets
AgeCommit message (Collapse)Author
2022-10-09LibWeb: Add Exposed attribute and IDL spec links where missingAndrew Kaster
The intent is to use these to autogenerate prototype declarations for Window and WorkerGlobalScope classes. And the spec links are just nice to have :^)
2022-10-01LibWeb: Remove unecessary dependence on Window from WebGL and WebSocketAndrew Kaster
These classes only needed Window to get at its realm. Pass a realm directly to construct WebGL and WebSocket classes.
2022-09-29AK+Everywhere: Replace "protocol" with "scheme" url helpersnetworkException
URL had properly named replacements for protocol(), set_protocol() and create_with_file_protocol() already. This patch removes these function and updates all call sites to use the functions named according to the specification. See https://url.spec.whatwg.org/#concept-url-scheme
2022-09-25LibWeb: Move DOMException from DOM/ to WebIDL/Linus Groh
2022-09-25LibWeb: Move ExceptionOr from DOM/ to WebIDL/Linus Groh
This is a concept fully defined in the Web IDL spec and doesn't belong in the DOM directory/namespace - not even DOMException, despite the name :^)
2022-09-24LibWeb: Move CallbackType from Bindings/ to WebIDL/Linus Groh
Let's stop putting generic types and AOs from the Web IDL spec into the Bindings namespace and directory in LibWeb, and instead follow our usual naming rules of 'directory = namespace = spec name'. The IDL namespace is already used by LibIDL, so Web::WebIDL seems like a good choice.
2022-09-21LibWeb: Remove WRAPPER_HACK() macroLinus Groh
We no longer access Bindings::FooWrapper anywhere for a Foo platform object, so these can be removed :^)
2022-09-21LibWeb: Remove no-op impl() methods from the WEB_PLATFORM_OBJECT macroLinus Groh
These are leftovers from when wrapper objects still had an internal implementation, which is no longer the case.
2022-09-06LibWeb: Make DOMException GC-allocatedAndreas Kling
2022-09-06LibWeb: Use cached_web_prototype() as much as possibleAndreas Kling
Unlike ensure_web_prototype<T>(), the cached version doesn't require the prototype type to be fully formed, so we can use it without including the FooPrototype.h header. It's also a bit less verbose. :^)
2022-09-06LibWeb+LibJS: Make the EventTarget hierarchy (incl. DOM) GC-allocatedAndreas Kling
This is a monster patch that turns all EventTargets into GC-allocated PlatformObjects. Their C++ wrapper classes are removed, and the LibJS garbage collector is now responsible for their lifetimes. There's a fair amount of hacks and band-aids in this patch, and we'll have a lot of cleanup to do after this.
2022-09-06LibWeb: Make DOM::Event and all its subclasses GC-allocatedAndreas Kling
2022-09-06LibWeb: Move event listeners, handlers and callbacks to the GC heapAndreas Kling
This patch moves the following things to being GC-allocated: - Bindings::CallbackType - HTML::EventHandler - DOM::IDLEventListener - DOM::DOMEventListener - DOM::NodeFilter Note that we only use PlatformObject for things that might be exposed to web content. Anything that is only used internally inherits directly from JS::Cell instead, making them a bit more lightweight.
2022-08-23LibJS+LibWeb: Reduce use of GlobalObject as an intermediaryLinus Groh
- Prefer VM::current_realm() over GlobalObject::associated_realm() - Prefer VM::heap() over GlobalObject::heap() - Prefer Cell::vm() over Cell::global_object() - Prefer Wrapper::vm() over Wrapper::global_object() - Inline Realm::global_object() calls used to access intrinsics as they will later perform a direct lookup without going through the global object
2022-08-23LibWeb: Replace GlobalObject with Realm in wrapper functionsLinus Groh
Similar to create() in LibJS, wrap() et al. are on a low enough level to warrant passing a Realm directly instead of relying on the current realm from the VM, as a wrapper may need to be allocated while no JS is being executed.
2022-08-23LibJS+LibWeb: Replace GlobalObject with Realm in create() functionsLinus Groh
This is a continuation of the previous two commits. As allocating a JS cell already primarily involves a realm instead of a global object, and we'll need to pass one to the allocate() function itself eventually (it's bridged via the global object right now), the create() functions need to receive a realm as well. The plan is for this to be the highest-level function that actually receives a realm and passes it around, AOs on an even higher level will use the "current realm" concept via VM::current_realm() as that's what the spec assumes; passing around realms (or global objects, for that matter) on higher AO levels is pointless and unlike for allocating individual objects, which may happen outside of regular JS execution, we don't need control over the specific realm that is being used there.
2022-07-14LibWeb: Move Origin into the HTML namespaceLinus Groh
Origin is defined in the HTML Standard, and therefore belongs into the HTML directory and namespace in LibWeb. https://html.spec.whatwg.org/multipage/origin.html#origin
2022-05-15LibWeb: Abstract the LibProtocol WebSockets connectionDexesTTP
Much like the ImageDecoder change, this moves the underlying connection of the Web::WebSockets class from LibWeb to LibWebView, removing the need for LibProtocol in LibWeb for this specific use-case.
2022-04-01Everywhere: Run clang-formatIdan Horowitz
2022-03-31LibWeb: Replace ad-hoc EventHandler type with callback function typedefIdan Horowitz
2022-03-30LibWeb: Make WebSocket::close() arguments optional to match IDLIdan Horowitz
2022-03-17Libraries: Use default constructors/destructors in LibWebLenny Maiorani
https://isocpp.github.io/CppCoreGuidelines/CppCoreGuidelines#cother-other-default-operation-rules "The compiler is more likely to get the default semantics right and you cannot implement these functions better than the compiler."
2022-03-08LibWeb: Move Window from DOM directory & namespace to HTMLLinus Groh
The Window object is part of the HTML spec. :^) https://html.spec.whatwg.org/multipage/window-object.html
2022-03-02LibWeb: Send Origin on WebSocket connectionMichiel Visser
Some services using WebSockets require that the request contains the Origin header, otherwise these services will return a 403 Forbidden response. WebSocketServer already supports sending the Origin header, however LibWeb did not send the origin with the IPC request.
2022-02-18LibWeb: Use more relevant WebSocket spec linksLinus Groh
Having almost everything point to "3. The WebSocket interface" is kind of pointless.
2022-02-18LibWeb: Move WebSocket into the Web::WebSockets namespaceLinus Groh
WebSockets got moved from the HTML standard to their own, the new WebSockets Standard (https://websockets.spec.whatwg.org). Move the IDL file and implementation into a new WebSockets directory and C++ namespace accordingly.