Commit Graph

41643 Commits

Author SHA1 Message Date
Lucas CHOLLET
de568f87fd Calculator: Add a Rounding menu
This menu has three actions. Each one of them enable a different level
of rounding: to 0, 2 or 4 digits.
2022-10-03 15:12:47 -04:00
Sam Atkins
164094e161 LibWeb: Bring CSS tokenization preprocessing closer to spec
This is based on an editorial change in the December 2021 version of
SYNTAX-3: https://www.w3.org/TR/2021/CRD-css-syntax-3-20211224/

They named this step "filter code points", so let's use that name.
2022-10-03 17:09:41 +01:00
Sam Atkins
97e174afcd LibWeb: Use the term "ident sequence" instead of "name"
This is an editorial change in the December 2021 version of SYNTAX-3:
https://www.w3.org/TR/2021/CRD-css-syntax-3-20211224/
2022-10-03 17:09:41 +01:00
Timothy Flynn
7cab86ad28 Userland: Unveil /proc/all in applications which require it
These were missed in 7af5eef. It is needed for any application using
e.g. FileSystemAccessServer.
2022-10-03 17:09:21 +01:00
Timothy Flynn
25e0ab3ee4 Userland: Tighten promises by removing 'proc' where it isn't used
This is a partial revert of commit 7af5eef. After 97d15e9, the 'proc'
promise is not needed for operations using getsid().

This also fixes launching several applications in which 7af5eef added
the 'proc' promise only in the second call to pledge().
2022-10-03 17:09:21 +01:00
Andreas Kling
0455af4441 LibWeb: Implement HTMLImageElement.complete
This was fairly straightforward, although a small part had to be ad-hoc
since we don't yet load images through Fetch.

With this, we can now see annotation labels on deskto.ps :^)
2022-10-03 17:22:08 +02:00
Andreas Kling
9749eda09f LibWeb: Dispatch mouseenter and mouseleave events when required
I've left a FIXME here about populating the events with mouse
coordinates, button states, etc. We also need to verify that the
dispatch order either doesn't matter or at least match other engines.
2022-10-03 17:22:08 +02:00
Andreas Kling
f260afedb1 LibWeb: Don't add half-leading twice to inline block boxes
Inline-level blocks already have the half-leading applied internally,
so by adding it twice, we were offsetting their baseline by the
half-leading of the line.

This fixes an issue where inline-blocks were vertically offset from
the line they're supposed to sit on.
2022-10-03 17:22:08 +02:00
Nico Weber
ffbf5596cd Lagom: Work around gcc codegen bug
Without this, GenerateUnicodeData crashes when run during the build.
With this, `serenity.sh run` brings up a running SerenityOS.
Since GenerateUnicodeData doesn't take a lot of time to run, just
disable optimizations to work around the problem for now.

Works around #15449.
2022-10-03 15:30:51 +01:00
Hendiadyoin1
e0a6ed4bc0 LibWasm: Use String::join in Printer where apropriate 2022-10-03 14:15:46 +01:00
Hendiadyoin1
8a9d4246f1 LibWasm: Use TRY in Module::parse 2022-10-03 14:15:46 +01:00
Timothy Flynn
97d15e9b8f Kernel: Do not require 'proc' promise in getsid() and getpgid()
These only require 'stdio' according to:
https://man.openbsd.org/pledge.2
2022-10-03 13:48:03 +02:00
Liav A
74018be739 Meta: Make x86-64 target the default
This is a preparation to check if our users find noticeable bugs in the
x86-64 target, before we can decide if we want to remove the i686 target
for good.
2022-10-03 11:14:53 +02:00
Liav A
4e0f85432a Kernel/Storage: Remove the ramdisk implementation
Nobody uses this because the x86 prekernel environment is corrupting the
ramdisk image prior to running the actual kernel. In the future we can
ensure that the prekernel doesn't corrupt the ramdisk if we want to
bring support back. In addition to that, we could just use a RAM based
filesystem to load whatever is needed like in Linux, without the need of
additional filesystem driver.

For the mentioned corruption problem, look at issue #9893.
2022-10-03 11:12:35 +02:00
Peter Elliott
37f527be9c Documentation: Change references to uid based sockets to sids 2022-10-03 11:11:29 +02:00
Peter Elliott
7af5eef0dd SystemServer+LoginServer+Userland: Switch to sid-based sockets
This commit does three things atomically:
- switch over Core::Account+SystemServer+LoginServer to sid based socket
  names.
- change socket names with %uid to %sid.
- add/update necessary pledges and unveils.

Userland: Switch over servers to sid based sockets

Userland: Properly pledge and unveil for sid based sockets
2022-10-03 11:11:29 +02:00
Peter Elliott
1df4cc1926 Utilities/logout: Refactor to use Core::SessionManagement::logout 2022-10-03 11:11:29 +02:00
Peter Elliott
2c3caa7e17 LibCore: Create Core::SessionManagement for session management 2022-10-03 11:11:29 +02:00
Peter Elliott
76c67b7ae9 LibCore: Make usernames optional in ProcessStatisticsReader 2022-10-03 11:11:29 +02:00
Peter Elliott
71728f3ea6 LibCore: Add Core::System wrapper for getsid() 2022-10-03 11:11:29 +02:00
Andrew Kaster
9c32b9ea3c Toolchain: Update BuildMold to mold 1.5.1 and use CMake
Per the release notes for 1.5.0, the CMake build is preferred going
forward.
2022-10-03 10:01:06 +01:00
Andrew Kaster
32c9be30dc Ports/mold: Update to 1.5.1 and use CMake instead of Makefile
Per the release notes for 1.5.0, the CMake build is preferred going
forward. This lets us drop some Makefile patches and pass them as CMake
options instead, with the exception of disabling mold-wrapper.so.
2022-10-03 10:01:06 +01:00
Andrew Kaster
376425639d Meta: Force -machine pc-i440fx-7.0 when using QEMU >= 7.1
Until the root cause behind #14952 is found, this workaround should stem
the tide of users in discord asking why their system crashes on startup.
2022-10-03 09:57:45 +01:00
Andreas Kling
9f7a68136f LibWeb: It's AK_OS_MACOS, not AK_OS_MAC 2022-10-03 00:27:21 +02:00
Linus Groh
f27bc56e5e LibJS: Capture promise capability in new_promise_capability() executor
This is how the spec suggests implementing this; we need to be slightly
more verbose as our PromiseCapability implementation cannot hold
arbitrary JS values.

Unfortunately it makes the error message slightly more ambiguous as we
no longer expose the non-function value to the outer scope (we could!),
but at least we don't UAF the stack allocated values anymore :^)
2022-10-02 23:02:27 +01:00
Linus Groh
fc9d587e39 LibJS: Make PromiseCapability GC-allocated
A struct with three raw pointers to other GC'd types is a pretty big
liability, let's just turn this into a Cell itself.
This comes with the additional benefit of being able to capture it in
a lambda effortlessly, without having to create handles for individual
members.
2022-10-02 23:02:27 +01:00
Linus Groh
0585029c30 LibJS: Add Visitor::visit(GCPtr<T>) and Visitor::visit(NonnullGCPtr<T>)
Let's avoid reaching for ptr() as much as possible.
2022-10-02 23:02:27 +01:00
Linus Groh
d3b7c06712 LibJS: Add Value(GCPtr<T>) and Value(NonnullGCPtr<T>) constructors
Let's avoid reaching for ptr() as much as possible.
2022-10-02 23:02:27 +01:00
Linus Groh
c2326ec95a LibJS: Move PromiseCapability into its own cpp/h file
This is not strictly connected to PromiseReaction in any way.
Preparation before doing some actual work on it :^)
2022-10-02 23:02:27 +01:00
Linus Groh
4986fa262c LibJS: Update outdated PROMISE_DEBUG logging 2022-10-02 23:02:27 +01:00
Linus Groh
ed2aa6459d LibJS: Remove two outdated forward declarations 2022-10-02 23:02:27 +01:00
MacDue
7c8ce42593 LibWeb: Fix string whitespace splitting mistake
`.split_view(Infra::ASCII_WHITESPACE)` tries to split the string view on
the string "\t\n\f\r " (not any of the individual characters of that
string).

The correct way to split this string views here is
`.split_view_if(Infra::is_ascii_whitespace)`, this is a little
inconsistent with String, so probably should be addressed.
2022-10-02 22:47:28 +01:00
Andreas Kling
6bb3d4694f Meta: Add Lucas Chollet to the contributors list :^) 2022-10-02 21:37:06 +02:00
Lucas CHOLLET
b8c42365f0 mount: Report error instead of crashing on failure
Being unable to `open` on the source caused mount to crash. The error is
now properly reported to the user.
2022-10-02 21:33:35 +02:00
implicitfield
6c86b40724 test: Support more options
Adds -g, -G, -k, -O and -u options.
2022-10-02 21:33:01 +02:00
implicitfield
caab6ac968 test: Print the correct operator on error 2022-10-02 21:33:01 +02:00
Linus Groh
7760c00714 LibWeb: Move strip_and_collapse_whitespace() to Infra/
...and make it spec compliant by considering all ASCII whitespace,
greatly simplifying it in the process :^)
2022-10-02 21:32:49 +02:00
Linus Groh
b86c264975 LibWeb: Replace incorrect uses of split_view() for whitespace splitting 2022-10-02 21:32:49 +02:00
Linus Groh
b9220a18d1 LibWeb: Replace incorrect uses of String::trim_whitespace() 2022-10-02 21:32:49 +02:00
Linus Groh
fb21271334 LibWeb: Replace incorrect uses of AK::is_ascii_space() 2022-10-02 21:32:49 +02:00
Linus Groh
87ac38c78b LibWeb: Add is_ascii_whitespace() function
This matches the Infra spec's definition of 'ASCII whitespace', and we
can at last stop using AK::is_ascii_space(), which has a different idea
about what 'whitespace' means.
2022-10-02 21:32:49 +02:00
matcool
eae9cb2b02 Keymaps: Improve pt-br keymap
Adds /?° key (scancode 115).
Shift + 6 now maps to ¨ instead of space.
AltGr + (1-6) now map to ¹²³£¢¬.
AltGr + = now maps to §.
AltGr + [ now maps to ª.
AltGr + ] now maps to º.
AltGr + q now maps to /.
AltGr + w now maps to ?.
AltGr + e now maps to °.
AltGr + c now maps to ₢.
2022-10-02 21:28:55 +02:00
matcool
cb9b004ff8 Snake: Show message box on game over
Previously the game would immediately reset on game over, but now it'll
pause the game and show a message box with your score.
2022-10-02 21:28:37 +02:00
Monroe Clinton
67300af248 Games: Wrong parent window passed to GUI::MessageBox
We were passing the wrong parent window to GUI::MessageBox making
it impossible to exit the message window.
2022-10-02 21:28:26 +02:00
MacDue
2a9128efe3 Base: Add example backdrop-filter using hue-rotate() 2022-10-02 21:17:41 +02:00
MacDue
e697a72c99 LibWeb: Support painting the hue-rotate() filter effect 2022-10-02 21:17:41 +02:00
MacDue
df6b7fff90 LibGfx: Implement HueRotateFilter
This implements a simple and fairly efficient hue rotation filter.
It is based off the SVG feColorMatrix "hueRotate" matrix operation.
https://drafts.fxtf.org/filter-effects-1/#elementdef-fecolormatrix
2022-10-02 21:17:41 +02:00
MacDue
6b167c8427 LibGfx: Add [[nodiscard]] to Matrix operators 2022-10-02 21:17:41 +02:00
MacDue
3d532571bb LibGfx: Add Matrix::operator*(T scalar) 2022-10-02 21:17:41 +02:00
MacDue
95878688a7 LibGfx: Add Matrix::operator+(Matrix const & other) 2022-10-02 21:17:41 +02:00