Commit graph

18878 commits

Author SHA1 Message Date
Gunnar Beutner
400cc41176 LibCore: Make Core::System::{send,recv}fd work on macOS
All the required bits were already there. Also, this would probably
work on FreeBSD without modification but I don't currently have
a system to test this on.
2022-10-07 18:14:48 +01:00
MacDue
35809ef400 LibGfx: Remove unnecessary divides in MatrixFilter 2022-10-07 13:08:24 +01:00
MacDue
b877d71db7 LibWeb: Add missing hue-rotate() filter spec comment 2022-10-07 13:08:24 +01:00
MacDue
60cc96d243 LibWeb: Support painting the saturate() filter effect 2022-10-07 13:08:24 +01:00
MacDue
f77a84a5f6 LibGfx: Implement SaturateFilter
This implements the saturate operation as defined in the SVG filter
specification.

(https://drafts.fxtf.org/filter-effects-1/#feColorMatrixElement)
2022-10-07 13:08:24 +01:00
MacDue
97f66562cc LibGfx: Add MatrixFilter and convert HueRotateFilter to be one
This moves the apply a matrix operation to each [r,g,b] vector in an
image to a general class.
2022-10-07 13:08:24 +01:00
Andreas Kling
78bc856e07 LibWeb: Treat cross min/max sizes better in flexbox layout
For percentage cross min/max sizes that resolve against indefinite
available space, we now essentially ignore them instead of resolving
them to 0 at the start of layout.
2022-10-07 14:03:17 +02:00
matcool
104b51b912 LibUnicode: Fix Hangul syllable composition for specific cases
This fixes `combine_hangul_code_points` which would try to combine
a LVT syllable with a trailing consonant, resulting in a wrong
character.

Also added a test for this specific case.
2022-10-07 07:53:27 -04:00
Andreas Kling
ce0e4b71a3 LibWeb: Floating boxes with width:auto don't have definite width
Since layout is required in order to determine the width of such boxes,
they should not be marked as having definite width initially.
2022-10-07 13:08:44 +02:00
Andreas Kling
913d9221aa LibWeb: Don't insert inline nodes directly under inline-flex container
Yet another legacy "is inline-block?" condition was causing us to insert
inline nodes directly as children of inline-flex containers (instead of
wrapping them in anonymous blocks, which would then cause them to become
flex items.)
2022-10-07 12:47:46 +02:00
Andreas Kling
90b66533d0 LibWeb: Don't hit test all child stacking contexts twice
We're supposed to hit test positive z-index stacking contexts first,
and negative z-index stacking contexts later. Instead, we were hit
testing all stacking contexts both times.

This made hit testing unbearably slow on some websites.

While we're here, also add an extra comment about why stacking contexts
are traversed in reverse order. It tripped me up while looking at this,
so I'm sure it could trip someone else up too.

Regressed in 44057c9482.
2022-10-07 12:10:59 +02:00
Luke Wilde
102e02d336 LibWeb: Use DOM manipulation task source for <script> src parsing errors
See: https://github.com/whatwg/html/commit/5d34cb8

We were already using queue_an_element_task here.
2022-10-06 22:21:17 +01:00
Timothy Flynn
7fc03e8967 LibJS: Use Unicode normalization within String.prototype.normalize 2022-10-06 22:14:44 +01:00
Timothy Flynn
19b758ce8b LibUnicode: Add to-and-from string converters for NormalizationForm 2022-10-06 22:14:44 +01:00
Sam Atkins
462c49ad55 LibWeb: Remove duplicate reference to SVGElement.cpp 2022-10-06 21:45:07 +01:00
Sam Atkins
ab19c5fab8 LibWeb: Implement DOMPoint/DOMPointReadOnly.fromPoint() 2022-10-06 21:45:07 +01:00
Sam Atkins
0823a3c422 BindingsGenerator+LibWeb: Pass a VM to static IDL-based functions
This saves us from having to yoink the VM out of thin air.
2022-10-06 21:45:07 +01:00
Sam Atkins
8a78679152 LibWeb: Correct types in DOMPoint IDL files, and add FIXMEs
Also, the `w` parameters for the constructor default to 1, not 0.
2022-10-06 21:45:07 +01:00
Sam Atkins
a6f0508f9f BindingsGenerator+LibIDL: Parse "inherit" attributes
An "inherit attribute" calls an ancestor's getter with the same name,
but defines its own setter. Since a parent class's public methods are
exposed to child classes, we don't have to do any special handling here
to call the parent's methods, it just works. :^)
2022-10-06 21:45:07 +01:00
Itamar
c30c6eb1c1 HackStudio: Use a single global tooltip window
Previously, every Editor instance had two instances of tooltip windows
& `OutOfProcessWebView`s, one for documentation and one for parameter
hints.

They were initialized with the Editor, which slowed down creation of new
tabs.

We use a single global tooltip & OOPWV instance that is shared between
tabs.

Closes #15488

Co-authored-by: Sam Atkins <atkinssj@serenityos.org>
2022-10-06 21:27:40 +01:00
Itamar
2046a670b3 HackStudio: Remove adjustment of text range for documentation tooltip
We no longer need to adjust the hovered span's range to get the correct
hovered text. This fixes the "documentation tooltip" feature.
2022-10-06 21:27:40 +01:00
martinfalisse
84290ed7c8 Base+LibWeb: Make sure grid positions don't cause out of bounds
Add some tests to the test page to make sure that different combinations
of GridTrackPlacement don't cause out of bounds issues.
2022-10-06 21:16:01 +02:00
martinfalisse
97230c4ddb LibWeb: Clean up grid track placement shorthand parser
Use the implemented non-shorthand version of the GridTrackPlacement
parser to clean up the shorthand version and deduplicate code.
2022-10-06 21:16:01 +02:00
martinfalisse
56f50c9cde Base+LibWeb: Deal with zero-positioned grid items
If a grid item has as its position value a 0 then it should be
invalidated.
2022-10-06 21:16:01 +02:00
martinfalisse
9051a56554 Base+LibWeb: Stub out negative spans
Ensure that when a grid item is passed with a span and a fixed end
position, that if the resulting start of this item is less than 0 then
it won't throw. This is a temporary measure until the correct
functionality is implemented.
2022-10-06 21:16:01 +02:00
martinfalisse
a764e43db3 LibWeb: Factor out OccupationGrid functions
Clean up the code by using an OccupationGrid class. This was a neat idea
proposed by MacDue.
2022-10-06 21:16:01 +02:00
martinfalisse
db19570b94 LibWeb: Truncate oversized grid spans
If a span makes a CSS Grid item overflow vertically, then it should be
truncated as done on other web engines.
2022-10-06 21:16:01 +02:00
martinfalisse
f3bf01f265 LibWeb: Fix bug in placing row-constrained grid items
For row-constrained items (with a row position defined in the CSS),
should be checking for an available position in that row and not in
another..
2022-10-06 21:16:01 +02:00
martinfalisse
a528ea71d1 LibWeb: Use span values for auto-positioned grid items
Auto-positioned items should also take into account the span attributes
passed to them.
2022-10-06 21:16:01 +02:00
martinfalisse
4dc2bd3df0 LibWeb: Handle different span properties for GridTrackPlacement parsing
These changes improve the parsing of the span property, including
handling negative values for the span (defaults to 1), as well as when
no number is passed (also defaults to 1).
2022-10-06 21:16:01 +02:00
martinfalisse
6c22f9bf3f LibWeb: Use ident instead of to_string in parser
Use the ident() function instead of to_string() for parsing. Fix this up
in the rect parser as well.
2022-10-06 21:16:01 +02:00
martinfalisse
330af1a769 LibWeb: Fix bug in spec implementation auto_placement_cursor 2022-10-06 21:16:01 +02:00
martinfalisse
93824edeb7 LibWeb: Fix implementation bugs of grid track is_span()
After having corrected the tracking of span variables in the
GridTrackPlacement class, now can fix some small bugs for its correct
implementation in the GridFormattingContext class.
2022-10-06 21:16:01 +02:00
martinfalisse
9fd07e9cb1 LibWeb: Make it easier to check if grid track is auto positioned
Add some helper functions for checking if a grid-track is
auto-positioned. I think this makes the code more legible.
2022-10-06 21:16:01 +02:00
martinfalisse
236795e931 LibWeb+Base: Re-implement grid track span
Implement span correctly when indicated in the grid-column-start,
grid-row-start, etc. CSS properties. Previously it had been implemented
as if span was something that went alongside the position property, but
actually it seems like if you do 'span 3' in the grid-column-start
property, for example, this means it literally spans 3 blocks, and the
3 has nothing to do with position.
2022-10-06 21:16:01 +02:00
martinfalisse
86ce1b64f0 LibWeb: Fix bug in checking if GridTrackPlacement is auto-positioned
This fixes something I thought I had already fixed everywhere, where
previously there wasn't the possibility to have an Auto
GridTrackPlacement and so the Auto "implementation" was simply checking
if the position of the track was 0.
2022-10-06 21:16:01 +02:00
Andreas Kling
b6ab9a261f LibWeb: Make TreeBuilder treat inline-flex's children correctly
We were skipping over inline flex containers when looking for an
insertion parent. This made us not generate flex items in those cases.

This commit changes the behavior, so that non-inline-level items can
get inserted into an inline-outside parent, as long as the parent isn't
just flow-inside.
2022-10-06 21:08:50 +02:00
Andreas Kling
71f7bb619d LibWeb: Use text node's own display value when inserting CSS content
This ensures that the pseudo element wrapper is transformed into a block
container with inline children if needed.
2022-10-06 21:08:50 +02:00
Andreas Kling
d3069bceeb LibWeb: Only consider inline-outside flag when choosing insertion type
Now that we don't have to deal with the ad-hoc "inline" flag on layout
nodes anymore, we're free to simply obey the inline-outside flag from
the CSS display value when choosing whether to insert as an inline-level
node or not.
2022-10-06 21:08:50 +02:00
Andreas Kling
82df793d5d LibWeb: Use correct cache key for pseudo elements
We were incorrectly caching both ::before and ::after pseudo elements
with the ::before key.

This regressed in 1ab7a8e0db.
2022-10-06 21:08:50 +02:00
Andreas Kling
c7d592dd01 LibWeb: Generate a BlockContainer box for display:inline-flex
We were previously generating an InlineNode, which is not a Box. We need
some type of Box to do flex layout, so let's just make a BlockContainer.
2022-10-06 21:08:50 +02:00
Andreas Kling
97bbb630c8 LibWeb: Make IFC happy to layout anything as long as it's inline outside
Before this, whenever encountering something other than dumb text
content in an inline flow, we assumed it had to be either a replaced
element, or an inline-block.

This removes the special-casing of inline-block so that IFC can size and
layout anything as long as it's inline on the outside.
2022-10-06 21:08:50 +02:00
Gunnar Beutner
be80ac619f Browser: Add a custom icon for the "New Window" action 2022-10-06 20:51:04 +02:00
Andreas Kling
19494b436b LibWeb: Fix unsafe capture in fetch_external_module_script_graph()
We can't be capturing the AK::URL by reference here, since on_complete
may be called later, after the value is no longer alive.
2022-10-06 18:29:52 +02:00
Andreas Kling
b9a45cf1aa LibWeb: Don't try to layout inside of replaced elements in BFC 2022-10-06 18:29:52 +02:00
Andreas Kling
5ff1fc4347 LibWeb: Make sure replaced elements never create a BFC 2022-10-06 18:29:52 +02:00
Andreas Kling
829ba4afb9 LibWeb: Remove unnecessary verify_cast in greatest_child_width() 2022-10-06 18:29:52 +02:00
Kemal Zebari
90719d34af Browser: Provide ability to create new browser windows
This change allows a user to spawn new browser processes by either
going to "File -> New Window" or by the shortcut "Ctrl + N".
2022-10-06 16:52:57 +01:00
Andreas Kling
7354ac724e WebContent: Don't pthread_setname_np() non-SerenityOS platforms 2022-10-06 17:15:28 +02:00
Andreas Kling
2baad565ca LibWeb: Remove bogus verify_cast when dimensioning inline-blocks
There's no need to make the assumption that any inline-block box will
be represented by a BlockContainer. Nothing we do with the box here
requires that specific type anyway.
2022-10-06 17:15:28 +02:00
Andreas Kling
9d50191dca LibWeb: Tidy up FormattingContext::creates_block_formatting_context()
We use comments from MDN here, since the rules for creating a BFC are
inconsistently spread across many different specifications.
2022-10-06 17:15:28 +02:00
EWouters
7c93eabffe LibC: Implement mkstemps() in stdlib and add a test
`mkstemps` generates a unique temporary file name from a pattern like
`prefixXXXXXXsuffix` where `prefix` and `suffix` can be any string with
only characters that are valid in a filename. The second parameter is
the length of the suffix.

`mkstemp` is `mkstemps` with suffix length 0, so to avoid code
duplication it calls `mkstemps`. It is unlikely this has any
significant performance impact on SerenityOS.

`generate_unique_filename` now takes the suffix length as a `size_t`.
The original behavior of this function is preserved when specifying a
suffix length of 0. All original uses of this function have been
adapted.

`mkstemps()` was added because it is required by version 4.6.3 of the
ccache port.
2022-10-06 16:14:40 +01:00
Thomas Voss
b556bfe8eb rev: Read from stdin if the filename '-' is given
The implementation of `rev` found on Linux systems does not have this
behavior, however other utilities do offer this behavior and so there
really isn't too much of an argument to be made for *not* having this as
a feature.
2022-10-06 16:06:50 +01:00
networkException
a182bc9806 LibWeb: Push the realm execution context before linking modules
This patch adds a non standard step pushing the realm execution context
of fetching client's settings object onto the execution context stack
before linking a module script. Without the realm execution context
there is no current settings object, leading to a crash in
HostResolveImportedModule.
2022-10-06 16:41:36 +02:00
networkException
f92d95224e LibWeb: Add support for type module in HTMLScriptElement
This patch adds support for script elements with the type attribute set
to "module". As a first cut the changes are mainly focused around inline
scripts.

Co-authored-by: davidot <davidot@serenityos.org>
2022-10-06 16:41:36 +02:00
networkException
c51cf66347 LibWeb: Implement two module related host hooks
This patch adds support for the HostGetSupportedImportAssertions and
HostResolveImportedModule host hooks.

Co-authored-by: davidot <davidot@serenityos.org>
2022-10-06 16:41:36 +02:00
networkException
f0c4f8931c LibWeb: Implement fetching module scripts
This patch adds various algorithms required to fetch and link module
scripts.

Some parts such as actually creating a request and error handling are
not implemented or use temporary non spec compliant code to get us
further.

Co-authored-by: davidot <davidot@serenityos.org>
2022-10-06 16:41:36 +02:00
networkException
4de4e1828a LibWeb: Implement ModuleScript and JavaScriptModuleScript
This patchs adds the Web::HTML::Script subclass ModuleScript and
JavaScriptModuleScript as a type of ModuleScript as well as various
algorithms related to JavaScript module scripts.

Co-authored-by: davidot <davidot@serenityos.org>
2022-10-06 16:41:36 +02:00
networkException
ea34cb302d LibJS: Add accessor for requested modules to CyclicModule 2022-10-06 16:41:36 +02:00
networkException
992311c0ee LibWeb: Implement ModuleMap and expose it on EnvironmentSettingsObject
This patch adds the ModuleMap class used to keep track of the type and
url of a module as well as the fetching state associated. Each
environment settings object now also has a module map.
2022-10-06 16:41:36 +02:00
networkException
83554526f0 LibWeb: Allow all Script types to be used as [[HostDefined]] values
This patch adds support for all child classes of Web::HTML::Script to be
used in the [[HostDefined]] field of JS::Modules and JS::Scripts.
2022-10-06 16:41:36 +02:00
networkException
5a3e079deb LibJS: Mark [[HostDefined]] accessor on scripts as const 2022-10-06 16:41:36 +02:00
networkException
fb6de442c6 LibJS: Add [[HostDefined]] field to Modules
This patch adds the [[HostDefined]] field defined in
https://tc39.es/ecma262/#table-module-record-fields to module records.

Co-authored-by: davidot <davidot@serenityos.org>
2022-10-06 16:41:36 +02:00
networkException
cfa0c9bf9f LibWeb: Implement module type allowed
This patch adds the module type allowed steps given a module type string
and an environment settings object.
2022-10-06 16:41:36 +02:00
networkException
297e293a3f LibWeb: Implement more close to spec javascript mime type checking
Previously we would simply check the an input string against a list of
mime type essences, ignoring that the input might not be a valid mime
type or contain parameters.

This patch moves the helpers into the MimeSniff namespace and properly
parses an input string before comparing the essence.
2022-10-06 16:41:36 +02:00
networkException
93464d4e41 LibJS: Visit GC allocated members of ModuleEnvironment 2022-10-06 16:41:36 +02:00
Andreas Kling
b4c90e35df LibWeb: Use CSS::Display::is_flow_inside() in InlineLevelIterator
This is a more correct check than !is_inline_block(), as it now enters
all elements that have inline behavior on the outside and flow behavior
on the inside.
2022-10-06 16:25:26 +02:00
Andreas Kling
13834cfdff LibWeb: Use Layout::Node::display() everywhere 2022-10-06 16:25:26 +02:00
Andreas Kling
49eb324535 LibWeb: Add Layout::Node::display()
This will return something sensible for style-less nodes as well.
2022-10-06 16:25:26 +02:00
Andreas Kling
a0e6882d99 LibWeb: Remove Layout::Node::set_inline()
Now that this flag is no longer used, we can stop setting it.
2022-10-06 15:29:38 +02:00
Andreas Kling
8a3ca6416d LibWeb: Make labels be display: inline-block in the default UA style
This is weird, but matches the behavior we've had so far. Leaving a
FIXME about how this doesn't seem right.
2022-10-06 15:29:38 +02:00
Andreas Kling
34a2797211 LibWeb: Remove ad-hoc <hr> element rule from default UA style
This element is already covered by spec rules. :^)
2022-10-06 15:29:38 +02:00
Andreas Kling
0cd82d2da7 LibWeb: Add a little header to the top of the default UA stylesheet
Since all the spec sections are annotated with comments already, let's
also have a comment mentioning that the file starts with ad-hoc rules.
2022-10-06 15:29:38 +02:00
Andreas Kling
5989a3ee77 LibWeb: Honor CSS display value in is_inline() and is_inline_block()
These were totally ad-hoc before, is_inline() was based on a boolean
flag on Layout::Node that we set in various situations.

Meanwhile, is_inline_block() was a combination on is_inline() plus a
type check to see if the layout node inherited from BlockContainer.

This patch replaces the above mess with simple lookups of the CSS
display value. Note that layout nodes without their own style (i.e text
nodes) are automatically assumed to be inline and non-blocks. This has
to be special-cased since layout nodes without style will consult the
style of their parent, so without short-circuiting this would break.
2022-10-06 15:29:38 +02:00
Andreas Kling
fe03149a47 LibWeb: Base Layout::TreeBuilder decisions on CSS display property
This is one of many small steps towards being able to remove the ad-hoc
Layout::Node::is_inline() in favor of honoring the CSS display value
everywhere instead.
2022-10-06 15:29:38 +02:00
Andreas Kling
1ab7a8e0db LibWeb: Simplify construction of :before and :after pseudo elements
Let create_pseudo_element_if_needed() take care of inserting the pseudo
elements into the layout tree as well.
2022-10-06 15:29:38 +02:00
Andreas Kling
4fdfaff4ca LibWeb: Split out helper functions in TreeBuilder::create_layout_tree()
Let's make this function a little easier to understand by splitting out
helpers into separate functions.
2022-10-06 15:29:38 +02:00
Andreas Kling
1e26d3d02d LibWeb: Make the initial containing block style have display:block
We always create a Layout::InitialContainingBlock for the ICB, but in a
future where we always honor the CSS::Display everywhere, we need to
make sure everyone has the right display values.
2022-10-06 15:29:38 +02:00
matcool
70d0c1616f LibUnicode: Add decomposition mappings and Unicode normalization
The mappings are exposed via `Unicode::code_point_decomposition(u32)`
and `Unicode::code_point_decompositions()`, the latter being useful for
reverse searching a code point from its decomposition.

The normalization code does not make use of `Quick_Check` props (https://www.unicode.org/reports/tr44/#Decompositions_and_Normalization),
meaning no quick check optimizations.
2022-10-06 08:24:39 -04:00
Sergiy Stupar
8a37badc42 PixelPaint: Add actions to crop layer to selection/content 2022-10-06 12:29:16 +01:00
luiz
d77ced8943 LibGfx: Make should_wrap flag default as true on convolution filters
Currently the default is false, but this is not the best strategy
for most filters producing artifacts on the borders, and wrap-around
option ends up being better, producing less artifacts.
2022-10-06 12:20:53 +01:00
FrHun
02b9461714 LibGUI: Consider spacing for Toolbar overflow calculation 2022-10-06 12:17:38 +01:00
FrHun
b868337d5e LibGUI: Include overflow button in overflow calculation only when shown
This prevents items from being put in the overflow menu, even though
there is still enough space for all items to be shown, because the
overflow button does not take up space when it is not needed.
2022-10-06 12:17:38 +01:00
FrHun
29a3ff22d7 LibGUI: Make Breadcrumbbar resizable below current size
By making proper use of the dynamic layout system, the Breadcrumbbar can
now shrink below its current (grown) size again, while still ensuring
that no icon gets cut off.
2022-10-06 12:17:38 +01:00
FrHun
6e2fc0285e FileManager: Group Toolbar overflow 2022-10-06 12:17:38 +01:00
FrHun
eefe6e35ac LibGUI: Add option to move Toolbar items to overflow menu in groups
When items are sent to the overflow menu one by one, it can happen that
buttons that are heavily related, and don't make sense without one
another (either visually or logically) are separated.
This new option enables the developer to choose the "grouping"
behavior, of sending all items that are not separated to the overflow
menu together, as soon as one of them doesn't have enough space to be
displayed. (provided the toolbar is set as collapsible)
2022-10-06 12:17:38 +01:00
Marco Cutecchia
41744a4a87 HackStudio: Prevent closing the last editor group
Previously if the user closed the last open tab in the last TabWidget
then the open file action would stop working until they explicitly
went to the View menu and added a new editor group.

Before this commit there was an attempt at preventing the user to
close the last open tab by hiding its close button, this didn't
account for the many other ways one could close it though.
2022-10-06 11:53:23 +01:00
Marco Cutecchia
f81b494182 HackStudio: Remove the 'Open in a new tab' action
This has become the default with the previous changes so it
doesn't make sense anymore
2022-10-06 11:53:23 +01:00
Marco Cutecchia
d8b54b7dd0 HackStudio: Open files in dedicated tabs
Previously when trying to open a file from the tree view the file
would open in the currently selected tab, substituting the file
we were previously reading.
This change makes it so that clicking on a file from the tree view
opens it in a new tab, or selects the tab containing that file if
it's already open in the selected editor group.
2022-10-06 11:53:23 +01:00
Andreas Kling
b5681992e1 LibIPC: Allow overriding the use of deferred_invoke()
This will allow Ladybird to use IPC::Connection without having an
actively running Core::EventLoop.

The abstraction here is not great, and we should think of something
nicer, but we have to start somewhere.
2022-10-06 09:51:04 +02:00
Andreas Kling
f877782117 WebContent: Use Web::Platform::Timer instead of Core::Timer
This will allow WebContent to operate without a Core::EventLoop.
2022-10-06 09:51:04 +02:00
Andreas Kling
e75645bbf8 WebContent: Add ConnectionFromClient::fd() accessor 2022-10-06 09:51:04 +02:00
Andreas Kling
eb709ddd63 LibCore: Add fd() and notifier() accessors to Core::Stream::LocalSocket 2022-10-06 09:51:04 +02:00
Andreas Kling
35966cabe4 LibIPC: Remove platform-specific #ifdefs around FD passing in Connection
Let the LocalSocket class decide if FD passing is supported or not.
2022-10-06 09:51:04 +02:00
Andreas Kling
ceccc2c163 LibWebView: Add abstract virtual base for WebView implementations
This patch adds WebView::ViewImplementation with all the
`notify_server_did_this_or_that()` functions from OOPWV.

This will allow us to share code between different web views, paving the
way for a Qt widget in Ladybird that can talk to a WebContent process.
2022-10-06 09:51:04 +02:00
Andreas Kling
d652794862 LibCore: Implement LocalSocket send_fd() and receive_fd() on Linux
We use a combination of SCM_RIGHTS and fcntl(FD_CLOEXEC) to implement
the equivalent functionality from SerenityOS.
2022-10-06 09:51:04 +02:00
Andreas Kling
ece1b7422f LibIPC: Allow giving Connection a separate socket for FD passing
Our IPC protocol currently relies on the behavior of recvfd() and
sendfd() on SerenityOS, which provide an out-of-band queue that can be
accessed independently of the in-band data stream.

To make LibIPC usable on other platforms, this patch adds a mechanism
where IPC::Connection can be given a dedicated socket for FD passing.
This gives us the same behavior as the syscalls on SerenityOS, without
having to change the protocol implementation.
2022-10-06 09:51:04 +02:00
Linus Groh
1c12f5c31d LibWeb: Make Fetch::Infrastructure::{Request,Response} ref-counted
With the addition of the 'fetch params' struct, the single ownership
model we had so far falls apart completely.

Additionally, this works nicely for FilteredResponse's internal response
instead of risking a dangling reference.

Replacing the public constructor with a create() function also found a
few instances of a Request being stack-allocated!
2022-10-05 09:14:49 +01:00
Linus Groh
886ca9c7b6 LibWeb: Add missing Request::policy_container() getter and setter 2022-10-05 09:14:49 +01:00
Linus Groh
16d6c62193 LibWeb: Make Fetch::Infrastructure::Request::set_client() take a pointer 2022-10-05 09:14:49 +01:00