summaryrefslogtreecommitdiff
path: root/Userland/Services
AgeCommit message (Collapse)Author
2022-02-18WebServer: Close the socket if Connection: keep-alive isn't requestedAli Mohammad Pur
2022-02-16LibCore+Everywhere: Return ErrorOr from ConfigFile::sync()Sam Atkins
Currently this method always succeeds, but that won't be true once we switch to the Core::Stream API. :^) Some of these places would ideally show an error message to the user, since failure to save a file is significant, but let's not get distracted right now.
2022-02-16LibCore+Everywhere: Return ErrorOr from ConfigFile factory methodsSam Atkins
I've attempted to handle the errors gracefully where it was clear how to do so, and simple, but a lot of this was just adding `release_value_but_fixme_should_propagate_errors()` in places.
2022-02-16WebContent: Exit peacefully when client dies during synchronous IPCAndreas Kling
If we're waiting for the client (typically Browser) to respond to a synchronous IPC message from our side (e.g window.alert()) and the client disconnects instead, just exit peacefully. Ultimately a WebContent process lives to serve its client. When the client dies, there is no need for WebContent anymore.
2022-02-14SystemServer: Remove now unnecessary call to chmod on /dev/audioLiav A
Don't use chmod now that DevTmpFS honors permission mode when creating new directories.
2022-02-14WindowServer: Remove extraneous whitespace in `WindowServer.ipc`James Puleo
2022-02-14WindowServer+Userland: Pass wallpapers as `Gfx::Bitmap` instead of pathJames Puleo
The WindowServer _really_ does not need to know the filesystem path to it's wallpaper, and allows setting arbitrary wallpapers (those outside of `/res/wallpapers`). The GUI::Desktop will keep track of the path to the wallpaper (if any), and save it to config if desired (to be persisted). This avoids the need to `unveil` paths to the wallpaper, fixing #11158
2022-02-14SystemServer: Remove Socket.h header + use Core::System in some placessin-ack
Various Core::System functions are still missing so not all raw syscalls were converted just yet.
2022-02-14LookupServer: Convert to Core::Stream::UDPSocketsin-ack
2022-02-14WindowServer: Consolidate tiled and maximized window rects calculationVitaly Dyachkov
Calculating tiled and miximized window frame have a lot in common. In fact, we can look at maximized window state as a special case of the tile type. It simplifies the code since there is a lot of cases when we take an action only if the window is maximized or tiled.
2022-02-14AudioServer: Use first audio channel in the /dev/audio directoryLiav A
For now, just use the first audio channel in the /dev/audio directory. In the future we can add support for watching and loading other channels so we can route audio to multiple sound cards on the system.
2022-02-14SystemServer: Create audio channel device nodes in /dev/audio directoryLiav A
2022-02-13Userland: Run gml-formatIdan Horowitz
This brings the existing GML files up to spec with the new requirements
2022-02-12RequestServer: Make value copy of the URL in ensure_connection()Andreas Kling
I saw what looked like a UAF of this URL in a RequestServer crash, and it seems reasonable to make a copy here since we end up passing them to Core::deferred_invoke().
2022-02-11LibConfig: Rename pledge_domains(String) => pledge_domain(String)Vitaly Dyachkov
pledge_domains() that takes only one String argument was specifically added as a shortcut for pledging a single domain. So, it makes sense to use singular here.
2022-02-11RequestServer: Recreate socket if it reached EOFIdan Horowitz
This ensures we don't continue using a socket that has EOF'ed (meaning the protocol has disconnected in the case of TCP) for new requests.
2022-02-10LibSQL+SQLServer: Introduce and use ResultOr<ValueType>Timothy Flynn
The result of a SQL statement execution is either: 1. An error. 2. The list of rows inserted, deleted, selected, etc. (2) is currently represented by a combination of the Result class and the ResultSet list it holds. This worked okay, but issues start to arise when trying to use Result in non-statement contexts (for example, when introducing Result to SQL expression execution). What we really need is for Result to be a thin wrapper that represents both (1) and (2), and to not have any explicit members like a ResultSet. So this commit removes ResultSet from Result, and introduces ResultOr, which is just an alias for AK::ErrorOrr. Statement execution now returns ResultOr<ResultSet> instead of Result. This further opens the door for expression execution to return ResultOr<Value> in the future. Lastly, this moves some other context held by Result over to ResultSet. This includes the row count (which is really just the size of ResultSet) and the command for which the result is for.
2022-02-10LibWeb: Perform CSS custom property cascade once instead of per-propertyAndreas Kling
Previously we would re-run the entire CSS selector machinery for each property resolved. Instead of doing that, we now resolve a final set of custom property key/value pairs at the start of the cascade.
2022-02-10LibSQL+SQLServer: Move LibSQL/SQLResult.[h,cpp] to LibSQL/Result.[h,cpp]Timothy Flynn
Rename the file to match the new class name.
2022-02-10LibSQL+SQLServer: Return the new Result class from statement executionsTimothy Flynn
We can now TRY anything that returns a SQL::Result or an AK::Error.
2022-02-09LibTLS+RequestServer: Add an option to dump TLS keys to a log fileAli Mohammad Pur
This file allows us to decrypt TLS messages in wireshark, which can help immensely in debugging network stuff :^)
2022-02-09LibJS: Replace uses of MarkedValueList with MarkedVector<Value>Linus Groh
This is effectively a drop-in replacement.
2022-02-08Browser+LibWeb: Add "Dump Local Storage" item to Browser's Debug menuAndreas Kling
2022-02-08RequestServer: Avoid Vector OOB access in ConnectionCacheAli Mohammad Pur
`it.is_end()` could be updated to return false for a previously-invalid iterator after we append a new socket, copy its value out to a local variable to not hit this behaviour.
2022-02-08LibWeb: Introduce the Environment Settings ObjectLuke Wilde
The environment settings object is effectively the context a piece of script is running under, for example, it contains the origin, responsible document, realm, global object and event loop for the current context. This effectively replaces ScriptExecutionContext, but it cannot be removed in this commit as EventTarget still depends on it. https://html.spec.whatwg.org/multipage/webappapis.html#environment-settings-object
2022-02-08WindowServer: Preserve cursor position when dragging between statesthankyouverycool
Previously windows would end up in awkward positions relative to the move cursor when dragging between tile types or unmaximizing. This feels a bit more ergonomic.
2022-02-08WindowServer: Add Vertically/HorizontallyMaximized WindowTileTypesthankyouverycool
VerticallyMaximized tiling replaces set_vertically_maximized() to take advantage of tiling ergonomics. Middle-clicking a window's maximize button now tiles vertically; secondary-clicking tiles horizontally. Adds Super+Alt+Arrow shortcuts for both. Super+Left/Right tiling shortcuts now let windows shift between tile types directly.
2022-02-08WindowServer: Fix comments in WindowManagerthankyouverycool
2022-02-08WindowServer: Unify Window restore rectsthankyouverycool
Previously, different rects were used to restore tiled and maximized windows, creating edge cases for inconsistent restoration. All states now restore m_floating_rect, which saves the last valid size and location of a window while free-floating.
2022-02-08WindowServer: Rename Window::tiled() => tile_type() and add is_tiled()thankyouverycool
This seems more consistent with naming conventions across the system and makes conditionals easier to read.
2022-02-08LibJS+Everywhere: Remove all VM::clear_exception() callsdavidot
Since VM::exception() no longer exists this is now useless. All of these calls to clear_exception were just to clear the VM state after some (potentially) failed evaluation and did not use the exception itself.
2022-02-07RequestServer: Reenable socket notifications unconditionallyAli Mohammad Pur
There's a possible window where the notifications are disabled, and any request coming at that time will never get any data if it relies on socket notifications.
2022-02-07Meta+Userland: Run the GML formatter on CI and pre-commitkleines Filmröllchen
Now that the GML formatter is both perserving comments and also mostly agrees to the existing GML style, it can be used to auto-format all the GML files in the system. This commit does not only contain the scripts for running the formatting on CI and the pre-commit hook, but also initially formats all the existing GML files so that the hook is successfull.
2022-02-06LibWeb: Plumb OOPWV focus state across the IPC boundaryAndreas Kling
This makes focus outlines show up in OOPWV at last! :^)
2022-02-06LibCore+Userland: Remove Core::TCPSocket :^)sin-ack
This was deprecated in favor of Core::Stream::TCPSocket, and now has no users.
2022-02-06WebSocket: Pledge rpath and unveil /etc/timezoneAli Mohammad Pur
This is required for timezone stuff, otherwise we'd just crash.
2022-02-06Userland: Convert TLS::TLSv12 to a Core::Stream::SocketAli Mohammad Pur
This commit converts TLS::TLSv12 to a Core::Stream object, and in the process allows TLS to now wrap other Core::Stream::Socket objects. As a large part of LibHTTP and LibGemini depend on LibTLS's interface, this also converts those to support Core::Stream, which leads to a simplification of LibHTTP (as there's no need to care about the underlying socket type anymore). Note that RequestServer now controls the TLS socket options, which is a better place anyway, as RS is the first receiver of the user-requested options (though this is currently not particularly useful).
2022-02-05Browser: Add Debug menu action for dumping the stacking context treeAndreas Kling
2022-02-03KeyboardPreferenceLoader: Don't crash when "Keymaps" is emptyRummskartoffel
2022-02-03Base+WindowsServer+keymap: Store multiple keymaps in a configTimur Sultanov
2022-02-03WindowServer+Keymap+LibGUI: Add widget to display current keymapTimur Sultanov
2022-02-03WindowManager: Basic support for system keymap switchingTimur Sultanov
2022-02-01Everywhere: Fully qualify font names by including their slopethankyouverycool
Fixes typefaces of the same weight but different slopes being incorrectly returned for each other by FontDatabase.
2022-01-29Everywhere: Remove redundant inline keywordLenny Maiorani
`constexpr` implies `inline` so when both are used it is redundant.
2022-01-29WindowServer: Allow checking checkable entries in a menu using spacenetworkException
2022-01-28Userland: Fix unnecessary heap allocation of singleton objectsDaniel Bertalan
In order to avoid having multiple instances, we were keeping a pointer to these singleton objects and only allocating them when it was null. We have `__cxa_guard_{acquire,release}` in the userland, so there's no need to do this dance, as the compiler will ensure that the constructors are only called once.
2022-01-28RequestServer: Replace disconnected sockets in the grace period tooAli Mohammad Pur
We previously only replaced disconnected sockets on the queued-request path, leading to attempts to send requests on a disconnected socket if the disconnection happened in the deletion grace period.
2022-01-28Revert "FileSystemAccessServer: Display times in the local time zone"Timothy Flynn
This reverts commit fa016a72fd8f0288de02f3aa8e7834b08b8f2238.
2022-01-28Revert "Userland: Invoke tzset in apps that care about time zones"Timothy Flynn
This reverts most of commit ede5c9548e55d8216dba21ed431b9e53d085a248. The one change not reverted is ClockWidget.h, so that the taskbar clock can continue to notice time zone changes.
2022-01-28FileSystemAccessServer: Display times in the user's local time zoneTimothy Flynn