Commit graph

38783 commits

Author SHA1 Message Date
Linus Groh
83ae4ee767 Meta: Add Benjamin Maxwell to the contributors list :^) 2022-06-21 17:29:47 +01:00
Kenneth Myhra
c805987329 LibWeb: Add timeout functionality to ResourceLoader
Add timeout functionality to ResourceLoader and use it from
XMLHttpRequest.
2022-06-21 10:29:14 +01:00
Kenneth Myhra
8b42c05648 LibWeb: Add XMLHttpRequest::timeout setter and getter 2022-06-21 10:29:14 +01:00
Kenneth Myhra
1e1d59cc25 RequestServer: Do not VERIFY(request.total_size.has_value())
If the request is stopped RequestServer::did_finish_request() will crash
on the VERIFY() call since request.total_size.has_value() returns false.

Let us instead use a conditional expression to verify if it has a value
and then call async_request_finished().
2022-06-21 10:29:14 +01:00
Grigoris Pavlakis
2fa907b31a Ports/gltron: Use sdl12-compat instead of SDL2 2022-06-20 23:24:45 +01:00
Grigoris Pavlakis
c98a275931 Ports: Add SDL_sound for SDL 1.2 2022-06-20 23:24:45 +01:00
Grigoris Pavlakis
de31f51bbe Ports: Move SDL_sound to SDL2_sound 2022-06-20 23:24:45 +01:00
Mike Akers
27f93a3052 LibGUI: Prevent CenterWithinParent Dialogs from appearing offscreen
When a dialog is created the position is checked against the Desktop's
rect and repositioned to be entirely visible. If the dialog is larger
than the desktop's rect it is just centered.
2022-06-20 16:50:25 +01:00
Mike Akers
9a908748e0 WindowServer: Prevent menubar menus from appearing off screen
Adds some logic to reposition menus that would appear off the right or
bottom edge of the screen so they appear completely on screen.

Co-authored-by: Sam Atkins <atkinssj@gmail.com>
2022-06-20 16:49:31 +01:00
Karol Kosek
c6eaa39b99 LibWeb: Make doubleclicking select the nearest word 2022-06-20 12:55:50 +01:00
Karol Kosek
237a5bedd2 LibWeb: Dispatch dblclick UI Events on double click 2022-06-20 12:55:50 +01:00
Karol Kosek
03cda8a013 LibWeb+LibWebView+WebContent: Get doubleclick events from LibGUI 2022-06-20 12:55:50 +01:00
Karol Kosek
0e04532623 LibWeb: Add stub implementation for handling doubleclicks 2022-06-20 12:55:50 +01:00
FrHun
565f68f8bb LibGUI: Reimplement Painter::draw_triangle to be more symmetrical
This is a reimplementation of draw_triangle that manages without
floating point arithmetic.
It's most important property, compared to the previous implementation is
that rotating the same triangle 90 degrees won't drastically change the
appearance of that triangle. (it did before)
2022-06-20 12:40:51 +01:00
FrHun
586a94818d LibGUI: Draw ScrollBar arrows with draw_triangle
This doesn't actually change anything in appearance, but it lays the
groundwork to have these graphics scaling compatible once the window
backstores support that.
2022-06-20 12:40:51 +01:00
FrHun
325042f2b7 AK: Make Point constructors constexpr 2022-06-20 12:40:51 +01:00
FrHun
b3d1fa4c54 LibGUI: Add drawing triangle from coordinate list 2022-06-20 12:40:51 +01:00
SeekingBlues
dafea57fe2 Ports/ncurses: Disable mixed-case directory names when building on macOS
Since macOS's filesystem is case-insensitive, its `tic` only generates
terminfo directory names that are hex numbers instead of letters, such
as 78/xterm instead of x/xterm. However, the configure script still
enables the mixed-case directory name feature by default. As a result,
ncurses will fail when trying to find terminfo entries like x/xterm if
they are generated on macOS.

It seems like there is no way to change the behavior of `tic` to create
alphabetical directories, so we can only disable this option explicitly.
2022-06-19 19:50:23 +01:00
Luke Wilde
0a989d1bfd LibWeb: Implement HTMLBaseElement.href 2022-06-19 16:35:43 +01:00
Luke Wilde
1f820f8840 LibWeb: Add support for the <base> element changing the base URL
Used by Google seemingly almost all around account sign in and
management. The modern sign in page has this near the beginning:
```html
<base href="https://accounts.google.com">
```
All of the XHRs performed by sign in are relative URLs to this
base URL. Previously we ignored this and did it relative to the
current URL, causing the XHRs to 404 and sign in to fall apart.

I presume they do this because you can access the sign in page
from multiple endpoints, such as `/ServiceLogin` and
`/o/oauth2/auth/identifier`
2022-06-19 16:35:43 +01:00
kleines Filmröllchen
b3d87f8e37 Ports: Update mold to 1.0.3 2022-06-19 15:45:14 +01:00
kleines Filmröllchen
026cea990a Toolchain: Update mold to 1.0.3 2022-06-19 15:45:14 +01:00
Timur Sultanov
1f886f94bd Ports: Add OpenJDK port
Port of OpenJDK 17.0.2, zero VM only.

More work needed to get the full hotspot VM up and running :^)

Co-Authored-By: Andrew Kaster <akaster@serenityos.org>
2022-06-19 09:05:35 +02:00
Andrew Kaster
6eb9ebec5f LibC: Stop leaking FILE* from use of getgrnam and getgrgid 2022-06-19 09:05:35 +02:00
Andrew Kaster
455038d6fc Kernel: Add sysconf for IOV_MAX 2022-06-19 09:05:35 +02:00
Andrew Kaster
1d3b5d330d Kernel: Tolerate cloning MAP_STACK regions that are PROT_NONE
There's nothing stopping a userspace program from keeping a bunch of
threads around with a custom signal stack in a suspended state with
their normal thread stack mprotected to PROT_NONE.

OpenJDK seems to do this, for example.
2022-06-19 09:05:35 +02:00
Andrew Kaster
940be19259 Kernel: Create /proc/pid/cmdline to expose process arguments in procfs
In typical serenity style, they are just a JSON array
2022-06-19 09:05:35 +02:00
Andrew Kaster
ad0a001f0a Ports: Use $arch-serenity-pc-clang{++} for CC and CXX
This lets us eliminate the extra arguments on CC and CXX for ports that
care about CC and CXX pointing to actual filenames they can invoke
realpath or basename on.
2022-06-19 09:05:35 +02:00
Andrew Kaster
8c877664f7 Ports: Add variables for Toolchain binary directory and cxxfilt 2022-06-19 09:05:35 +02:00
Andrew Kaster
fef83ed47d Meta: Install runtime/utility from jakt to make hello-jakt build again
Also add a compile flag that fixes a warning from including <serenity.h>
2022-06-19 09:00:02 +02:00
kleines Filmröllchen
b0f546cd60 Meta: Run PNG size checks on CI
For safety, the PNG check doesn't run if there's no optipng installed (I
didn't want to break everyone's pre-commit hook with the introdcution of
that check). To make it run on CI, just install optipng which is
available in the standard Ubuntu package repo.
2022-06-18 21:58:43 +04:30
kleines Filmröllchen
bca0e31cba Base: Optimize a bunch of PNGs
These all save at least a couple of kilobytes.
2022-06-18 21:58:43 +04:30
kleines Filmröllchen
2c6e3ea2e9 Meta: Add a PNG size check to CI and pre-commit checks
This uses optipng to check how much size can be reduced on PNG files. If
that's more than 2 KiB for at least one file, the check fails. As with
other checks, it doesn't run if optipng is not installed.
2022-06-18 21:58:43 +04:30
Luke Wilde
bae330d559 LibWeb: Rename Event.srcTarget to Event.srcElement
It's called srcElement instead of srcTarget.
Required by w3school's search focus handler.
2022-06-18 16:13:03 +01:00
SeekingBlues
f34e69a52b LibC: Add ctermid
We simply return "/dev/tty", since it always refers to the controlling
terminal of the calling process.
2022-06-18 15:10:13 +02:00
Linus Groh
5b1e2cc65c LibJS: Update AdjustRoundedDurationDays function signature comment
I missed this in a25c5d8. Thanks to Idan for noticing :^)
2022-06-18 13:58:08 +01:00
Linus Groh
7a8e6cf6c6 LibJS: Move MergeLists into non-Temporal ECMA-262 amendments
This is an editorial change in the Temporal spec.

See: https://github.com/tc39/proposal-temporal/commit/4ce3db1
2022-06-18 13:54:46 +01:00
Linus Groh
0c3d2b656e LibJS: Rename CalendarMergeFieldNames to MergeLists
This is an editorial change in the Temporal spec.

See: https://github.com/tc39/proposal-temporal/commit/bebf467
2022-06-18 13:54:46 +01:00
Linus Groh
e685896403 LibJS: Check value is an Object before checking for internal slots
This is an editorial change in the Temporal spec.

See: https://github.com/tc39/proposal-temporal/commit/d96e662
2022-06-18 13:54:46 +01:00
Linus Groh
a25c5d8fe8 LibJS: Make relativeTo required for AdjustRoundedDurationDays
This is an editorial change in the Temporal spec.

See: https://github.com/tc39/proposal-temporal/commit/48e0a15
2022-06-18 13:54:46 +01:00
Linus Groh
9e79856b43 Revert "AK: Add comparison operators to NonnullOwnPtr"
This reverts commit 50c88e5e3a.

The intention was to add them to NonnullRefPtr, not NonnullOwnPtr. That
is also what was advertised in the PR, but not actually done in the
reverted commit.
2022-06-18 13:17:49 +01:00
MacDue
9ed5b2dfb5 LibGfx: Move AntiAliasingPainter.cpp into Gfx namespace 2022-06-18 02:34:56 +01:00
MacDue
e4cca7886e LibWeb: Use the AA painter for drawing dotted lines
The AA painter will actually draw the dots as circles, which is
how other browsers handle this.
2022-06-18 02:34:56 +01:00
MacDue
6139fc5c87 LibGfx: Add AA dotted horizontal/vertical lines
This adds simple dotted lines (horizontal/vertical only for now).

There's a little number fudging added in to make sure the final
dot is always drawn at the endpoint (for lines with at least a
handful of dots).
2022-06-18 02:34:56 +01:00
Allan Regush
50c88e5e3a AK: Add comparison operators to NonnullOwnPtr 2022-06-18 02:11:08 +01:00
kleines Filmröllchen
709f0a2ab3 Ports: Add OptiPNG
OptiPNG is a neat little tool that optimizes PNG sizes to ridiculous
degrees. We like to use it to optimize PNGs before including them in
Serenity itself, so it's a nice port to have. OptiPNG is a very
cooperative POSIX C program, it compiles and works without any patching
on x86_64 and i686 :^)
2022-06-17 21:53:28 +01:00
kleines Filmröllchen
96180fc2d9 LibC: Add printf and scanf format macros for "fast" and "least" types
As usual, we just define these based on the given integer size itself.
2022-06-17 21:53:28 +01:00
Linus Groh
d9fc09c6e5 LibJS/Tests: Remove outdated FIXME 2022-06-17 21:06:01 +01:00
Linus Groh
25667a834c ThemeEditor: Run gml-format 2022-06-17 19:49:16 +01:00
networkException
8163faa696 DisplaySettings: Use IPC calls instead of current_system_theme helper 2022-06-17 19:46:30 +01:00