Commit graph

54689 commits

Author SHA1 Message Date
Andrew Kaster
d27e4732b6 Meta: Add link to my GitHub sponsors to the contributors list 2023-09-18 19:58:46 -06:00
Bastiaan van der Plaat
aed25991e6 Maps: Add MapsSettings with multiple tile providers options 2023-09-18 12:46:41 -06:00
Bastiaan van der Plaat
264782557e Maps: Fix bug when opening attribution url by adding launch unveil 2023-09-18 12:46:41 -06:00
Daniel Bertalan
715f452233 Documentation: Hide Meta/serenity.sh rebuild-toolchain
Unless a new toolchain update has been merged, users should not need to
rebuild their toolchain. Yet, the first thing they see in the build
documentation is to run `Meta/serenity.sh rebuild-toolchain`, which
might incorrectly lead them to use it whenever they encounter an error.
This is a waste of time and causes frustration.

Move any mentions of this option to `Troubleshooting.md` and add a note
to `BuildInstructions.md` about the toolchain build being a one-time
endeavor.
2023-09-18 11:13:23 -06:00
Tim Ledbetter
9cd3477763 GameOfLife: Replace DeprecatedString with String 2023-09-18 11:12:25 -06:00
Bastiaan van der Plaat
e3cd789ea8 Maps: Add context menu to the map widget 2023-09-18 11:12:04 -06:00
Timothy Flynn
ece9908070 Ladybird: Add context menu items to the AppKit chrome to inspect nodes 2023-09-18 11:11:23 -06:00
Timothy Flynn
bd1e35c726 Ladybird: Map the AppKit Inspector's DOM nodes to their IDs and parents
This is in the spirit of commit a4692a6c978a6e66d171e003063449790a6c5879
(and the history behind that commit).

We will need to perform lookups from an integral node ID to the JSON for
that node frequently in the Inspector. We will also need to traverse the
DOM tree from a node, through its ancestors, to the root node. These are
essentially the same maps stored by the Qt Inspector widget.
2023-09-18 11:11:23 -06:00
Timothy Flynn
6304abf94c Ladybird: Add a table to display CSS properties to the AppKit Inspector 2023-09-18 11:11:23 -06:00
Timothy Flynn
4483204c9c Ladybird: Implement a basic Inspector window for the AppKit chrome
This commit includes only fetching the DOM tree from the WebContent
process and displaying it in an NSOutlineView. The displayed tree
includes some basic styling (e.g. colors).
2023-09-18 11:11:23 -06:00
Timothy Flynn
33b006f157 Ladybird: Add a helper to deserialize a JSON string to an NSDictionary
The steps here are a tad verbose, and will be needed several times in
the Inspector window.
2023-09-18 11:11:23 -06:00
Timothy Flynn
507dea5fdd Ladybird: Add an AppKit NSString category to hold common utilities
This currently holds a helper to create a new string which collapses all
consecutive whitespace to a single ASCII space.
2023-09-18 11:11:23 -06:00
Junior Rantila
1f07a18f4e Ladybird: Add tooltips for buttons in AppKit version 2023-09-18 11:10:31 -06:00
Karol Kosek
1681d6f721 Meta: Port recent build changes to gn build
This ports the following commits:
6476dea898
153ae93f9c
45b36bd08a
7870f10aa8
139c575cc9
63d09f6daf
1b3ad1c721
77d32fcb5f
2023-09-18 11:09:48 -06:00
Hendiadyoin1
d168bfabc4 Kernel/USB: Detach devices from their driver when they are detached 2023-09-18 11:09:19 -06:00
Jesse Buhagiar
b4cd354bae Kernel/USB: Add driver search on device plug
When a device is plugged into the machine (and hence, when
`Device::try_create()` is called), then we attempt to load a driver by
calling that driver's probe function.
2023-09-18 11:09:19 -06:00
Jesse Buhagiar
b0ed126538 Kernel/USB: Expose USBConfiguration in USBInterface 2023-09-18 11:09:19 -06:00
Jesse Buhagiar
3cfdc6e363 Kernel/USB: Add get_driver_by_name helper in USBManagement 2023-09-18 11:09:19 -06:00
Jesse Buhagiar
2aa17f619c Kernel/USB: Add USB Driver register/unregister function 2023-09-18 11:09:19 -06:00
Jesse Buhagiar
3cead2801a Kernel: Call USB Driver initialize functions during init 2023-09-18 11:09:19 -06:00
Jesse Buhagiar
a0dd6ec6b1 Kernel/USB: Add driver_init section
At any one given time, there can be an abitrary number of USB drivers in
the system. The way driver mapping works (i.e, a device is inserted, and
a potentially matching driver is probed) requires us to have
instantiated driver objects _before_ a device is inserted. This leaves
us with a slight "chicken and egg" problem. We cannot call the probe
function before the driver is initialised, but we need to know _what_
driver to initialise.

This section is designed to store pointers to functions that are called
during the last stage of the early `_init` sequence in the Kernel. The
accompanying macro in `USBDriver` emits a symbol, based on the driver
name, into this table that is then automatically called.

This way, we enforce a "common" driver model; driver developers are not
only required to write their driver and inherit from `USB::Driver`, but
are also required to have a free floating init function that registers
their driver with the USB Core.
2023-09-18 11:09:19 -06:00
Jesse Buhagiar
8883da9586 Kernel/USB: Add new Driver base class
Co-Authored-By: Liav A <liavalb@gmail.com>
Co-Authored-By: Leon Albrecht <leon2002.la@gmail.com>
2023-09-18 11:09:19 -06:00
Bastiaan van der Plaat
9939b028c6 LibWeb: Add basic Navigator send beacon support 2023-09-18 11:08:26 -06:00
Hendiadyoin1
d262670729 LibWeb: Use more CSSPixelFractions in GFC::expand_flexible_tracks
Also contains a drive-by expression simplification, and accidental
double truncation fix.
2023-09-18 18:02:51 +02:00
Tim Ledbetter
9b30dea889 LibGUI: Remove Action::try_create_checkable() 2023-09-18 18:00:45 +02:00
Tim Ledbetter
f570a0f0b8 LibGUI: Remove ItemListModel::try_create() 2023-09-18 18:00:45 +02:00
Tim Ledbetter
a6f6a1afd2 Userland: Prefer non-fallible construction for LibGUI objects 2023-09-18 18:00:45 +02:00
Aliaksandr Kalenik
a4a94de942 LibJS: Get initial_value from local variables if id represents a local
If identifier represents local variable we should get its value from
`local_variables` in `ExecutionContext` instead of environment.
2023-09-18 17:57:56 +02:00
Andreas Kling
675d919dd2 LibWeb: Handle custom ident values for the CSS font-family property
We were parsing these all right, but ignoring them in StyleComputer.

No test unfortunately, since we don't currently have a way to delay
the load event until a @font-face has been fully loaded. (Any test
of this right now would be flaky.)
2023-09-18 16:34:01 +02:00
Andreas Kling
1f69e9cddf LibWeb: Remove Layout::Node::m_visible and compute it on the fly
This fixes an issue where the value would be out of sync with reality
in anonymous wrapper block boxes, since we forgot to compute m_visible
after assigning the computed values to them.

Fixes #21106
2023-09-18 14:45:20 +02:00
Andreas Kling
0a133ccba4 LibWeb: Remove the HTML blink element
Support for this element has been removed from all major engines years
ago already, and it's currently the only reason we have a weird
"visible" flag on Layout::Node (which we toggle on a timer here..)
2023-09-18 14:45:20 +02:00
Daniel Bertalan
6fd8f9ea51 CMake: Link with -Bsymbolic-non-weak-functions if supported
This flag makes the linker bind default-visibility functions locally, so
that calls to them do not have to go through the PLT. This makes it
impossible to override them by preloading a DSO. This was already the
case partially due to `-fno-semantic-interposition`, however that flag
is only able to optimize call sites that are in the same Translation
Unit as the function definitions.

This removes 80% of the PLT relocations in `libjs.so.serenity`.

Obsoletes #20877
2023-09-18 10:26:42 +02:00
Daniel Bertalan
1f747b9132 CMake: Use CMAKE_POSITION_INDEPENDENT_CODE instead of explicit -fpic
This makes CMake pass `-fpie` instead of `-fpic` to the compiler when
building the Kernel and userland *executables*. This allows the compiler
to make certain optimizations based on the fact that the code will be
used in an executable, such as not having to emit `.localalias` symbols.
This leads to a 450 KiB decrease in the size of the Kernel binary.
2023-09-18 10:26:42 +02:00
Daniel Bertalan
4defa401d3 Toolchain+Ports: Update binutils to 2.41
Aside from a straightforward rebase, this contains an out-of-tree patch
from MaskRay which adds the `-Bsymbolic-non-weak-functions` flag to ld.
2023-09-18 10:26:42 +02:00
Daniel Bertalan
ae21002cb5 Toolchain+Ports: Update GCC to 13.2.0
This is a minor bugfix release, which to my knowledge contains nothing
of importance to us. However, there is one QoL change to our patches.

We no longer force `-fpic` in the compiler driver, and instead use the
`--enable-default-pie` configure option to generate position-independent
code suitable for executables. For building shared libraries, the
`-fpic` flag must be specified explicitly.
2023-09-18 10:26:42 +02:00
dependabot[bot]
e31a3ef2ad CI: Bump docker/login-action from 2 to 3
Bumps [docker/login-action](https://github.com/docker/login-action) from 2 to 3.
- [Release notes](https://github.com/docker/login-action/releases)
- [Commits](https://github.com/docker/login-action/compare/v2...v3)

---
updated-dependencies:
- dependency-name: docker/login-action
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-09-17 20:58:02 -06:00
Andrew Kaster
78c2fad89c LibTimeZone: Include generated files before checked-in files
This is a rickety solution to a problem when using LibTimeZone as a
static archive, like we do for Android. When pulling symbols from an
archive into a shared library, lld will pick the weak symbols for our
timezone helpers and keep them. Even if there's a strong symbol in
another object file in the same archive, it ignores them. However,
if we make sure that the strong symbols for the generated files are
first in the list, then we avoid the problem altogether by relying
on linker specifics.
2023-09-17 19:22:29 -06:00
Andrew Kaster
de1bcf3597 Ladybird/Android: Enable content filters and Autoplay allowlist
Copy these over from the standard main.cpp for WebContent. The ideas are
already starting to come together on how to unify these main files.
2023-09-17 19:22:29 -06:00
Andrew Kaster
091a0e0b78 LibWeb: Report Android 10 as OS_STRING in user agent on Android
Some websites, such as m.youtube.com, sniff for a version after the
Android OS version. Chrome has recently taken to always reporting
Android 10, so let's follow suit.
2023-09-17 19:22:29 -06:00
Andrew Kaster
27fda83dcf Ladybird/Android: Add window options to night theme
These were added to the non-night theme to accomodate our custom action
bar. Add them to the night theme to make it actually usable.
2023-09-17 19:22:29 -06:00
Andrew Kaster
f9f5c5a3a9 Documentation: Add prerequisites for Android build 2023-09-17 19:22:29 -06:00
Andrew Kaster
642a2570a8 Ladybird/Android: Explicitly schedule Core::EventLoop in main activity
Instead of having an annoying loop that constantly reschedules a
Core::EventLoop trigger, have the ALooperEventLoopManager do it itself
in the did_post_event() function.

We cannot simply re-use the Unix implementation directly because that
implementation expects to actually be called all the time in order to
service timers. If you don't call its' pump() method, timers do not get
triggered. So, we do still need the seconary thread for Timers that was
added earlier.
2023-09-17 19:22:29 -06:00
Andrew Kaster
ff0494c63b Ladybird/Android: Bind WebSocketService for WebSocket purposes
Similar to the RequestServer, bind this from the WebContentService
implementation and have it work the same way. Deduplicate some code
while we're here.
2023-09-17 19:22:29 -06:00
Andrew Kaster
a243bc465f Ladybird/Android: Bind a RequestServerService for networking needs
Add a RequestServerService class that uses the LadybirdServiceBase class
added previously. Bind to it from the WebContentService's service_main()
during startup.
2023-09-17 19:22:29 -06:00
Andrew Kaster
da8f450335 Ladybird/Android: Move common service functionality to a base class
Create LadybirdServiceBase to hold the standard "set resource dir" and
"init ipc sockets" service functionality that will be common between the
WebContent, RequestServer, and WebSocket services.

Refactor the handler class slightly to avoid the HandlerLeak lint by
making the class a static class inside the companion object and use a
WeakReference to the service instead of a strong one.
2023-09-17 19:22:29 -06:00
Andrew Kaster
315ad2d391 Ladybird/Android: Move JNI functions into their own files
This should be easier to work on, and keeps the layers of the native
code nice and clean cut.
2023-09-17 19:22:29 -06:00
Bastiaan van der Plaat
274fd88242 Ladybird/AppKit: Remember last window position and size 2023-09-17 18:10:42 -06:00
Cubic Love
2767fa78f8 Solitaire: Rearrange Help Menu
Rearrange the Help menu actions so they're in the same order as other
application's Help menus.
2023-09-17 17:26:32 -06:00
Cubic Love
73d4b067d4 Base: Update Snake & Flappy Bug manpages 2023-09-17 17:26:32 -06:00
kleines Filmröllchen
8bcf25561b AK: Fix MemoryStream seek from end
The seek offset is still applied positively when seeking from the end;
see the Kernel's seek implementation.
2023-09-17 17:13:52 -06:00