mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-07-29 20:29:18 +00:00
LibWeb: Add the IDL for the GenericTransformStream mixin
This commit is contained in:
parent
5a2260a0bc
commit
35ba7c7e00
Notes:
github-actions[bot]
2024-11-17 22:22:14 +00:00
Author: https://github.com/trflynn89
Commit: 35ba7c7e00
Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/2370
4 changed files with 78 additions and 0 deletions
40
Libraries/LibWeb/Streams/GenericTransformStream.cpp
Normal file
40
Libraries/LibWeb/Streams/GenericTransformStream.cpp
Normal file
|
@ -0,0 +1,40 @@
|
|||
/*
|
||||
* Copyright (c) 2024, Tim Flynn <trflynn89@ladybird.org>
|
||||
*
|
||||
* SPDX-License-Identifier: BSD-2-Clause
|
||||
*/
|
||||
|
||||
#include <LibWeb/Streams/GenericTransformStream.h>
|
||||
#include <LibWeb/Streams/ReadableStream.h>
|
||||
#include <LibWeb/Streams/TransformStream.h>
|
||||
#include <LibWeb/Streams/WritableStream.h>
|
||||
|
||||
namespace Web::Streams {
|
||||
|
||||
GenericTransformStreamMixin::GenericTransformStreamMixin(GC::Ref<TransformStream> transform)
|
||||
: m_transform(transform)
|
||||
{
|
||||
}
|
||||
|
||||
GenericTransformStreamMixin::~GenericTransformStreamMixin() = default;
|
||||
|
||||
void GenericTransformStreamMixin::visit_edges(GC::Cell::Visitor& visitor)
|
||||
{
|
||||
visitor.visit(m_transform);
|
||||
}
|
||||
|
||||
// https://streams.spec.whatwg.org/#dom-generictransformstream-readable
|
||||
GC::Ref<ReadableStream> GenericTransformStreamMixin::readable()
|
||||
{
|
||||
// The readable getter steps are to return this's transform.[[readable]].
|
||||
return m_transform->readable();
|
||||
}
|
||||
|
||||
// https://streams.spec.whatwg.org/#dom-generictransformstream-writable
|
||||
GC::Ref<WritableStream> GenericTransformStreamMixin::writable()
|
||||
{
|
||||
// The writable getter steps are to return this's transform.[[writable]].
|
||||
return m_transform->writable();
|
||||
}
|
||||
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue