Commit Graph

34584 Commits

Author SHA1 Message Date
Gunnar Beutner
6b9913f010 Meta: Explicitly set number of available inodes for genext2fs
According to its manpage genext2fs tries to create the file system with
as few inodes as possible. This causes SerenityOS to fail at boot time
when creating temporary files.
2022-02-19 13:13:22 +02:00
Gunnar Beutner
7a65bd8efb AK: Don't use x86 assembly when building for non-x86 targets
This allows Lagom to be built successfully for Apple M1.

Fixes #12644.
2022-02-19 13:13:22 +02:00
Vrins
12d75b10f3 LibWeb: Inspector content_size tooltip in document view
This adds a small tooltip in the browser showing the size of the
element that currently selected in the inspector view. This allows
for easier debugging since you dont have to dump the layout tree :^).
2022-02-19 11:39:41 +01:00
Debdut Chakraborty
7527b52efc Documentation: Add Userland/ to qtcreator include path 2022-02-19 11:39:08 +01:00
Maciej
3e1c1c0b16 LibWeb: Add support for CSS image-rendering property
Currently only "auto" and "pixelated" values are supported.
2022-02-19 11:38:46 +01:00
Itamar
246b42b635 LibGUI: Guard against use-after-free in Clipboard::the()
We now make sure that a VERIFY will fail if Clipboard::the() is called
after the destruction of its static-local variables.
2022-02-19 11:38:29 +01:00
Itamar
4d2357f8f3 HackStudio: Don't store a global RefPtr to the HackStudioWidget
Previously, we stored a RefPtr to the HackStudioWidget in the
global scope.

This led to a destruction-order related use-after-free bug, where the
global HackStudioWidget instance destructed after the static-local
GUI::Clipboard instance.
When HackStudioWidget destructs it attempts to use the global Clipboard
instance, which had already been freed.

This caused the Hack Studio process to spin endlessly on exit because
it attempted to access the HashTable of the freed Clipboard object.

We now store a global WeakPtr to the HackStudioWidget instead, and
limit the lifetime of the object to the main function scope.
2022-02-19 11:38:29 +01:00
Jakub Berkop
895a050e04 Kernel: Fixed argument passing for profiling_enable syscall
Arguments larger than 32bit need to be passed as a pointer on a 32bit
architectures. sys$profiling_enable has u64 event_mask argument,
which means that it needs to be passed as an pointer. Previously upper
32bits were filled by garbage.
2022-02-19 11:37:02 +01:00
Daniel Bertalan
0f2e18403c Meta: Make serenity.sh gdb work with the Clang toolchain
We now pass along the toolchain type to all subcommands. This ensures
that gdb will load the correct debug information for kernels compiled
with Clang, and the following warning won't appear with the GNU
toolchain:

> WARNING: unknown toolchain 'gdb'. Defaulting to GNU.
>         Valid values are 'Clang', 'GNU' (default)
2022-02-19 11:36:08 +01:00
Simon Danner
0787571192 Filemanager: Only enable rename if available 2022-02-19 11:35:53 +01:00
kperdlich
ad722a9f06 Shell: Use an opaque default color for BarewordLiteral
Use an opaque default color for BarewordLiteral in
Syntax Highlighter to avoid transparent barewords.
2022-02-19 11:33:28 +01:00
Adam Plumb
34825ad3d1 LibWeb: Return current document URL if form action missing or empty 2022-02-19 11:31:53 +01:00
Kenneth Myhra
4877e7593c LibWeb: Refresh text-<input> contents when pressing backspace or delete
Make sure to refresh the contents of text-<input> when pressing
backspace or delete key.

The methods 'handle_insert()' and 'handle_delete()' already had the call
to 'm_browsing_context.active_document()->force_layout()' so let us also
add it to 'handle_delete_character_after()'.
2022-02-19 11:28:59 +01:00
Idan Horowitz
e2d797dd60 gml-format: Exit with non-0 exit code when the file formatting changes
This let's CI detect when the changes include incorrect GML formatting.
We now also print a message to make it obvious why CI failed.
2022-02-19 02:15:44 +02:00
James Puleo
9f85b4ff7b Core: Remove non-existent classes from Forward.h 2022-02-18 23:31:28 +00:00
Anonymous
a97b5393d0 LibJS: Ensure we only call toString on computed properties once 2022-02-18 22:33:59 +00:00
Anonymous
c45922c637 LibJS: Unify exponentiation logic for ** operator and Math.pow
The JS behaviour of exponentiation on two number typed values is
not a simple matter of forwarding to ::pow(double, double). So,
this factors out the Math.pow logic to allow it to be shared with
Value::exp.
2022-02-18 22:31:36 +00:00
Lenny Maiorani
c0735b047e LibArchive: Use designated initializers
Benefits:
- Braced-initialization prevents unknown narrowing conversions.
- Using designated initializers will result in a compiler error when a
  member is skipped or forgotten.
2022-02-18 23:54:14 +02:00
Lenny Maiorani
484c0edafc LibArchive: Refactor zip header handling
The directory headers have some common code for reading.
2022-02-18 23:54:14 +02:00
u9g
1511e9a5a9 Spreadsheets: Add range functions to the Position class
Adds functions to get range of non-empty cells in a direction.
2022-02-18 23:26:45 +03:30
Linus Groh
3e2dd5455b LibWeb: Use more relevant WebSocket spec links
Having almost everything point to "3. The WebSocket interface" is kind
of pointless.
2022-02-18 19:34:08 +00:00
Linus Groh
fb1dca2c4b LibWeb: Move WebSocket into the Web::WebSockets namespace
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.
2022-02-18 19:34:08 +00:00
Andreas Kling
c001e3f2fd BrowserSettings: Run gml-format on ContentFilterSettingsWidget.gml 2022-02-18 19:21:12 +01:00
Andreas Kling
c04c2df0f7 LibWeb: Add missing is_length() check in FFC::is_cross_auto()
We can't access LengthPercentage::length() before verifying that it's
indeed a length.
2022-02-18 19:19:56 +01:00
Sam Atkins
f0a4b33a5e LibWeb: Resolve Lengths to pixels earlier 2022-02-18 19:04:37 +01:00
Sam Atkins
356d8bcfe8 LibWeb: Remove Length::Type::Undefined! :^) 2022-02-18 19:04:37 +01:00
Sam Atkins
b715943035 LibWeb: Remove redundant Length::resolved() calls
Now that calc() is also resolved in to_px(), code in the form
`foo.resolved(bar).to_px(bar)` can be simplified to `foo.to_px(bar)`.
2022-02-18 19:04:37 +01:00
Sam Atkins
6df3f9920d LibWeb: Calculate calc() lengths in to_px()
to_px() has the layout node available, so let's use it.
2022-02-18 19:04:37 +01:00
Sam Atkins
67066c5140 LibWeb: Remove fallback value from Length::resolved()
Nobody makes undefined Lengths now, (although actually removing
Undefined will come in a later commit) so we can remove this parameter,
and `resolved_or_auto()`/`resolved_or_zero()`.
2022-02-18 19:04:37 +01:00
Sam Atkins
5b2482a939 LibWeb: Use Optional instead of undefined-lengths for widths/heights 2022-02-18 19:04:37 +01:00
Sam Atkins
699b48ccc8 LibWeb: VERIFY when getting a length from an invalid StyleValue 2022-02-18 19:04:37 +01:00
Sam Atkins
2df8d9c609 LibWeb: Initialize BoxShadowData lengths to 0px instead of undefined 2022-02-18 19:04:37 +01:00
Sam Atkins
1093d6e2c3 LibWeb: Use a Variant for calc() percentage_basis
Depending on the type of the calc() expression, the percentage_basis has
to be the same dimension type. Several places were already passing `
{}` for this, so let's make that an empty Variant instead of an
undefined Length. :^)
2022-02-18 19:04:37 +01:00
Maciej
8aa1c7f5b0 Browser: Add option to open BrowserSettings from Browser :^) 2022-02-18 19:00:42 +01:00
Maciej
1606f70f0c BrowserSettings: Implement GUI for setting up content filters :^) 2022-02-18 19:00:42 +01:00
Maciej
4d1c28a23f Browser: Add support for disabling content filtering
Just for completeness.
2022-02-18 19:00:42 +01:00
Maciej
43e463748d Browser: Implement listener for most config options
The only option leaved as TODO is ColorScheme.
2022-02-18 19:00:42 +01:00
Maciej
d3fc3337ef Browser: Call url_from_user_input for home URL
This allows omitting HTTP scheme in home URLs.
2022-02-18 19:00:42 +01:00
Maciej
5d8cda59ae Browser: Update content filters if the config file changes 2022-02-18 19:00:42 +01:00
Timothy Flynn
2575184242 LibJS: Add a spec link for Iterator Records
This is an editorial change to the spec to strongly define this record:
https://github.com/tc39/ecma262/commit/85d910c
2022-02-18 13:57:34 +00:00
davidot
2c6183da1e LibJS: Allow methods in classes named 'async'
Also add tests for all static, setter and getter cases.
2022-02-18 13:47:47 +00:00
davidot
65bebb5241 LibJS: Allow CallExpression as left hand side of for-of/for-in loops
Although this will fail with a ReferenceError it should pass the parser
and only fail if actually assigned to.
2022-02-18 13:47:47 +00:00
Ali Mohammad Pur
ce057115fc RequestServer: Bump the ConnectionCache concurrent connection limit to 4
With ECDHE, our TLS handshake performance has increased, so we can
afford to bump this limit to 4, and get some faster loads :^)
2022-02-18 16:12:42 +03:30
thankyouverycool
cd4c11ebaf FontEditor: Remove listener client
FontEditor was relying on a hack to get notified about i32 config
changes, and scale is not a setting we want updated across all
editor instances, nor do we have any settings that make sense to
monitor universally, so let's remove listener privileges for now.
2022-02-18 07:38:29 -05:00
thankyouverycool
0d29419ed4 FontEditor: Save settings for showing metadata and unicode blocks 2022-02-18 07:38:29 -05:00
thankyouverycool
0061af170f FontEditor: Add a search box to filter Unicode blocks 2022-02-18 07:38:29 -05:00
thankyouverycool
bb23377b48 LibGUI: Let AbstractViews be activated programmatically 2022-02-18 07:38:29 -05:00
thankyouverycool
de9dfc13b1 LibGUI: Make ItemListModels filterable
Implements data_matches() for proxy filtering and handles valid parent
indices in row_count(). This fixes an infinite recursion when filtering
matches for models without any hierarchy.
2022-02-18 07:38:29 -05:00
Ali Mohammad Pur
8fa334a70c LibProtocol: Close the stream notifier unconditionally on EOF
We shouldn't wait for on_finish to close the read notifier, we'll get
the finished message when we do, no need to spin waiting for it.
2022-02-18 13:19:26 +01:00
Ali Mohammad Pur
0e173da86f WebServer: Close the socket if Connection: keep-alive isn't requested 2022-02-18 13:19:26 +01:00