Commit graph

47730 commits

Author SHA1 Message Date
Mathis Wiehl
98ee2fcd1b man: Skip shellrc when invoking pager using sh
man invokes the pager command via `sh` which, since
beaae6b420 launches `Shell` in posix mode.
As the referenced commits message indicates, launching `Shell` in posix
mode while interactive, makes it choke on the default `.shellrc`. This
made `man` spew out some shell syntax errors to stderr every time it
invoked the pager.

To fix that, invoke `sh` with `--skip-shellrc` for now as suggested by
the aforementioned commit.
2023-03-07 00:42:32 +01:00
Andreas Kling
d1371d66f7 Kernel: Use non-locking {Nonnull,}RefPtr for OpenFileDescription
This patch switches away from {Nonnull,}LockRefPtr to the non-locking
smart pointers throughout the kernel.

I've looked at the handful of places where these were being persisted
and I don't see any race situations.

Note that the process file descriptor table (Process::m_fds) was already
guarded via MutexProtected.
2023-03-07 00:30:12 +01:00
Andreas Kling
36b0ecfe9e Kernel: Remove two outdated FIXMEs about the file descriptor table mutex
These functions cannot be called without already holding the relevant
mutex these days, since m_fds is a MutexProtected object. :^)
2023-03-06 23:46:36 +01:00
Andreas Kling
5aa12da959 AK+Kernel: Remove all the Nonnull*PtrVector classes 2023-03-06 23:46:36 +01:00
Andreas Kling
be91020d0b Settings: Remove outdated comment about NonnullPtrVector 2023-03-06 23:46:36 +01:00
Andreas Kling
2973298df1 Assistant: Remove outdated comment about NonnullPtrVector 2023-03-06 23:46:36 +01:00
Andreas Kling
b4022dc844 Screensaver: Remove outdated comment about NonnullPtrVector 2023-03-06 23:46:36 +01:00
Andreas Kling
f484952167 LibCpp: Remove Nonnull*PtrVector from list of known SerenityOS types 2023-03-06 23:46:36 +01:00
Andreas Kling
d57b09b7cf AK: Remove specialized shuffle for NonnullPtrVector 2023-03-06 23:46:36 +01:00
Andreas Kling
7369d0ab5f Kernel: Stop using NonnullLockRefPtrVector 2023-03-06 23:46:36 +01:00
Andreas Kling
21db2b7b90 Everywhere: Remove NonnullOwnPtr.h includes 2023-03-06 23:46:35 +01:00
Andreas Kling
359d6e7b0b Everywhere: Stop using NonnullOwnPtrVector
Same as NonnullRefPtrVector: weird semantics, questionable benefits.
2023-03-06 23:46:35 +01:00
Andreas Kling
689ca370d4 Everywhere: Remove NonnullRefPtr.h includes 2023-03-06 23:46:35 +01:00
Andreas Kling
4c75d4af28 LibWeb: Stop using NonnullRefPtrVector for StyleValueVector 2023-03-06 23:46:35 +01:00
Andreas Kling
8a48246ed1 Everywhere: Stop using NonnullRefPtrVector
This class had slightly confusing semantics and the added weirdness
doesn't seem worth it just so we can say "." instead of "->" when
iterating over a vector of NNRPs.

This patch replaces NonnullRefPtrVector<T> with Vector<NNRP<T>>.
2023-03-06 23:46:35 +01:00
Sam Atkins
104be6c8ac less: Stop adding extra blank lines
Each time we wrapped a line, we were appending an extra blank span which
wasn't needed. This was leading to an extra blank line after every
single line.
2023-03-06 21:44:28 +01:00
timre13
eef07a411b VideoPlayer: Create submenu to set sizing mode
Also add icon to the sizing mode cycling button.
2023-03-06 20:28:22 +00:00
Matthew Olsson
b33b950e45 Lagom: Add a tool to verify correctness of the LibJS GC
This is implemented as a Clang frontend tool, and currently does two
things:
  - Ensure for all fields wrapped in {Nonnull,}GCPtr<T>, T inherits from
    JS::Cell
  - Ensure for all fields not wrapped in {Nonnull,}GCPtr, that the type
    does not inherit from JS::Cell (otherwise it should be wrapped in a
    Ptr class).

In the future, this tool could be extended further. For example, we may
consider validating all implementations of Cell::visit_impl.
2023-03-06 13:05:43 +00:00
Matthew Olsson
176beeb08e LibJS: Enforce proper const-propogation with {Nonnull,}GCPtr 2023-03-06 13:05:43 +00:00
Matthew Olsson
c0b2fa74ac LibWeb: Fix a few const-ness issues 2023-03-06 13:05:43 +00:00
Matthew Olsson
70a2ca7fc0 LibJS: Handle both const and non-const Ts in Handle<T>::create()
Again, the const-ness only really involves Heap-internal metadata, so
the callers shouldn't care about mutations here.
2023-03-06 13:05:43 +00:00
Matthew Olsson
74e93a46ea LibJS: Fix a few const-ness issues 2023-03-06 13:05:43 +00:00
Matthew Olsson
5f0ccfb499 LibJS: Accept const GCPtrs in Cell::Visitor
The const_cast in these methods should be fine since the object really
only needs to be mutable so it's Heap-internal metadata can be altered.
2023-03-06 13:05:43 +00:00
Matthew Olsson
d4b08b7196 LibJS: Use a forwarding reference in ThrowCompletion constructor
This avoids compiler complaints when trying to use const types
2023-03-06 13:05:43 +00:00
Matthew Olsson
17a528c49e LibJS: Temporarily disambiguate const-ness of GCPtr constructors
Without this change, using {Nonnull,}GCPtr<T const> would complain that
there are multiple constructors which resolve to the same type (T& and
T const&). This removes that disambiguation and allows us to slowly fix
all of the constness issues surrounding GCPtrs. This change will not be
necessary in the future as we will be able to remove all of the const
qualifiers from the Ptr classes (they'll be in the template type
instead).
2023-03-06 13:05:43 +00:00
Matthew Olsson
a9372de972 WebContent: Add missing LibGfx include 2023-03-06 13:05:43 +00:00
Matthew Olsson
6003bcfd2d Browser: Add a missing include in InspectorWidget 2023-03-06 13:05:43 +00:00
Matthew Olsson
bab883bf8e LibJS+LibWeb: Add a bunch of missing includes 2023-03-06 13:05:43 +00:00
Matthew Olsson
8dc7810976 LibGfx: Remove unnecessary AK:: prefix in VectorN.h 2023-03-06 13:05:43 +00:00
Matthew Olsson
445011d50d LibWeb: Fix include cycle between ModuleScript.h and ModuleMap.h 2023-03-06 13:05:43 +00:00
nipos
1a29ecd648 LibCore: Don't use DT_WHT in DirectoryEntry on OpenBSD 2023-03-06 12:53:01 +00:00
Ryan Liptak
bf3d9a7372 Base: Improve a few ball emojis
🎱 U+1F3B1 - Pool 8 Ball
🏀 U+1F3C0 - Basketball
🏐 U+1F3D0 - Volleyball
🥎 U+1F94E - Softball
 U+26BE - Baseball
2023-03-06 06:29:56 -05:00
Linus Groh
1a6b61b0cc LibWeb/HTML: Move WindowOrWorkerGlobalScope code into a mixin class
This will allow us to easily share the implementations of these methods
between Window and WorkerGlobalScope. The mixin class mirrors what I
already did for the Fetch API's Body mixin in 5ad62833.
2023-03-06 11:02:25 +00:00
Linus Groh
b118cc782e LibWeb/HTML: Implement WorkerGlobalScope::cross_origin_isolated() 2023-03-06 11:02:25 +00:00
Linus Groh
ed15c34387 LibWeb/HTML: Implement WorkerGlobalScope::is_secure_context() 2023-03-06 11:02:25 +00:00
Linus Groh
d1a7c39e76 LibWeb/HTML: Implement WorkerGlobalScope::origin() 2023-03-06 11:02:25 +00:00
Andreas Kling
552895da60 LibGfx: Skip old-style emoji lookup for fonts that have color bitmaps
Ultimately, we should find a way to route all emoji access through
the font code, but for now, this patch adds a special case for fonts
that are known to have embedded color bitmaps so we can test them.
2023-03-06 10:52:55 +01:00
Andreas Kling
924d23353e LibGfx/OpenType: Support one specific type of embedded color bitmaps
This patch adds support for index format 1 and image format 17.
This is enough to get Noto Color Emoji working.
2023-03-06 10:52:55 +01:00
Andreas Kling
e8cc1a4373 LibGfx: Prepare the paint code for fonts whose glyphs are color bitmaps
This patch does three things:
- Font::has_color_bitmaps() (true if CBLC and CBDT are present)
- Glyph now knows when its bitmap comes from a color bitmap font
- Painter draws color bitmap glyphs with the appropriate scaling etc
2023-03-06 10:52:55 +01:00
Andreas Kling
bca35bee6d LibGfx/OpenType: Add scaffolding for CBDT and CBLC tables 2023-03-06 10:52:55 +01:00
Andreas Kling
e6131e45e2 LibGfx/OpenType: Make "glyf" and "loca" tables optional
These tables are not guaranteed to be present in all font files.
2023-03-06 10:52:55 +01:00
MacDue
918a3082d6 LibWeb: Fix currentColor as a background-color (and maybe other places)
This moves color to be the first value resolved, this ensures that
calls to .to_color() on style values for other properties will always
be able to resolve the current color.

This change fixes the `background-color: currentColor` example in
colors.html.
2023-03-06 00:09:13 +00:00
Timothy Flynn
77fbd912b7 LibWeb+WebContent+WebDriver: Port WebDriver parameters to String
This changes the parameters parsed from a WebDriver HTTP request to
String for transferring over IPC. Conveniently, most locations these
were ultimately passed to only need a StringView.
2023-03-05 23:50:05 +00:00
Timothy Flynn
03d0be13e8 LibWeb: Allow constructing a WebDriver::Error from an OOM AK::Error
This will allow easily surrounding operations that may fail due to OOM
with TRY. Note that we now also have to define a "normal" constructor
for WebDriver::Error in order to add the AK::Error constructor.
2023-03-05 23:50:05 +00:00
Timothy Flynn
a7bb72a3d6 LibIPC: Support transferring String over IPC
Note that unlike the StringView encoder, we do not handle any "null"
state, as the new String cannot be null.
2023-03-05 23:50:05 +00:00
Sam Atkins
a1baa5cb00 CharacterMap: Make the search happen as you type 2023-03-05 23:03:32 +01:00
Sam Atkins
1f0f96e6d7 CharacterMap: Limit the number of results from the GUI character search
Past a few hundred matches, the search is no longer useful, and takes an
excessive amount of time to recalculate the column widths by measuring
thousands of pieces of text. 250 seems like a reasonable arbitrary
limit, and keeps things nice and snappy. :^)
2023-03-05 23:03:32 +01:00
Sam Atkins
bb8bd48dc0 CharacterMap: Pause updates while generating search results
Co-authored-by: Tim Flynn <trflynn89@pm.me>
2023-03-05 23:03:32 +01:00
Linus Groh
725a758c66 LibIDL: Also parse extended attributes after 'optional'
From the WebIDL grammar:
(https://webidl.spec.whatwg.org/#prod-Argument)

Argument ::
    ExtendedAttributeList ArgumentRest
ArgumentRest ::
    optional TypeWithExtendedAttributes ArgumentName Default
TypeWithExtendedAttributes ::
    ExtendedAttributeList Type

One IDL file has been updated to match the spec literally, as it can now
be parsed properly.
2023-03-05 21:59:16 +00:00
Linus Groh
cc1e8a4e9f LibWeb/HTML: Propagate errors from Window::initialize_web_interfaces() 2023-03-05 21:22:34 +00:00