summaryrefslogtreecommitdiff
path: root/Userland/Services
AgeCommit message (Collapse)Author
2023-03-13AK: Rename Stream::{read,write} to Stream::{read_some,write_some}Tim Schumacher
Similar to POSIX read, the basic read and write functions of AK::Stream do not have a lower limit of how much data they read or write (apart from "none at all"). Rename the functions to "read some [data]" and "write some [data]" (with "data" being omitted, since everything here is reading and writing data) to make them sufficiently distinct from the functions that ensure to use the entire buffer (which should be the go-to function for most usages). No functional changes, just a lot of new FIXMEs.
2023-03-13LibCore+Userland: Make Promise's on_resolve falliblekleines Filmröllchen
This will be primarily necessary for BackgroundAction integration, but it already allows us to add proper error handling in LibIMAP :^)
2023-03-13LibCore+Userland: Allow canceling promiseskleines Filmröllchen
To make EventLoop cancel its managed Promises, we need the ability to cancel them in the first place.
2023-03-12SpiceAgent: Remove unused BMPWriter.h includeNico Weber
2023-03-11LibWeb/HTML: Propagate OOM errors from Window::{local,session}_storage()Linus Groh
This requires a bit of error type conversion glue as HashMap::try_ensure expects the callback to return ErrorOr<T> like the function itself does.
2023-03-10Everywhere: Support overriding the system color schemeimplicitfield
2023-03-10Everywhere: Rename equals_ignoring_case => equals_ignoring_ascii_caseAndreas Kling
Let's make it clear that these functions deal with ASCII case only.
2023-03-09AK: Remove infallible version of StringBuilder::to_byte_bufferLinus Groh
Also drop the try_ prefix from the fallible function, as it is no longer needed to distinguish the two.
2023-03-09WebServer+LibGUI: Use fallible version of StringBuilder::to_byte_bufferLinus Groh
...and simply ignore the errors for now. This allows us to remove the infallible function and avoid accumulating more callers of it.
2023-03-09WebServer: Use fallible version of StringBuilder::to_byte_bufferKarol Baraniecki
2023-03-09TelnetServer: Use fallible version of StringBuilder::to_byte_bufferKarol Baraniecki
2023-03-08WebContent: Wait for navigation to complete in WebDriverAliaksandr Kalenik
Implements https://w3c.github.io/webdriver/#dfn-waiting-for-the-navigation-to-complete.
2023-03-07WebContent+WebDriver: Ensure Get Window Handle checks for closed BCsTimothy Flynn
2023-03-07WebDriver: Do not throw an error when closing an inactive sessionTimothy Flynn
The spec states to only try to close the session *if* it exists. This situation can occur when closing a session after a Close Window command, as the session will be closed automatically if it was the last window.
2023-03-07WebDriver: Remove active sessions from the close-the-session AOTimothy Flynn
These steps now have more than one caller; specifically, they may be called from the Delete Session and Close Window endpoints. The session was only removed from the active session map for the former endpoint. Instead, let's more accurately handle removing the session where the spec tells us to, so that all callers properly perform this step.
2023-03-07WebDriver: Reference-count WebDriver Session objectsTimothy Flynn
When some WebDriver spec steps are implemented a bit more literally, we will end up in a situation where we remove a session from its client's active session map, but still have more steps to perform. Currently, when we remove the session, it is immediately destroyed because it is stored in an OwnPtr. Instead, we can store it as a RefPtr, which will let the caller to such steps keep the session alive until the subsequent steps are complete. While here, this also changes the storage of active sessions to a HashMap, as all lookups into it are currently a linear search.
2023-03-07WebDriver: Defer removing closed window handles until no longer neededTimothy Flynn
WebDriver::Session::close_window may invoke Session::stop, which needs the WebContent connection to still exist. Do not remove the window's handle (thus destroying the connection) until it is no longer needed.
2023-03-07WebDriver: Do not ignore the result of closing a sessionTimothy Flynn
2023-03-07WebDriver: Keep WebDriver socket listening until session endAliaksandr Kalenik
WebDriver socket should not be closed as soon as first client got connected becaused there might more than one WebContent process spawned by browser.
2023-03-07WebContent+WebDriver: Move window commands handling back to WebDriverAliaksandr Kalenik
With current architecture every window has its own WebContent process and there is one WebDriver process that is responsible for talking to all opened windows. It thus make sense to manage open windows from WebDriver process instead of WebContent process that is not supposed to know about all other opened WebContent processes. This mostly reverts 826d5f8f9ab0e28606a0d07847056bd6562ebc49 but also adds `web_content_connection` to window structure and window id generation (currently out of spec). With these changes `get_window_handles`, `switch_to_window` and `close_window` start to actually switch, close and returned handles of currently opened windows.
2023-03-07LibWebView+WebContent: Propagate close from WebContent to LibWebViewAliaksandr Kalenik
2023-03-06Everywhere: Remove NonnullOwnPtr.h includesAndreas Kling
2023-03-06Everywhere: Stop using NonnullOwnPtrVectorAndreas Kling
Same as NonnullRefPtrVector: weird semantics, questionable benefits.
2023-03-06Everywhere: Remove NonnullRefPtr.h includesAndreas Kling
2023-03-06Everywhere: Stop using NonnullRefPtrVectorAndreas Kling
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-06WebContent: Add missing LibGfx includeMatthew Olsson
2023-03-05LibWeb+WebContent+WebDriver: Port WebDriver parameters to StringTimothy Flynn
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-05LibCore+Everywhere: Return an Error from DirIterator::error()Sam Atkins
This also removes DirIterator::error_string(), since the same strerror() string will be included when you print the Error itself. Except in `ls` which is still using fprintf() for now.
2023-03-04Userland: Use Font::pixel_size_rounded_up() instead of glyph_height()Andreas Kling
The only remaining clients of this API are specific to bitmap fonts and editing thereof.
2023-03-01LibCore+Everywhere: Remove ArgsParser::add*(char const*&)Ali Mohammad Pur
This is not guaranteed to always work correctly as ArgsParser deals in StringViews and might have a non-properly-null-terminated string as a value. As a bonus, using StringView (and DeprecatedString where necessary) leads to nicer looking code too :^)
2023-02-28LibWeb: Restore proper functionality of legacy platform objectsLuke Wilde
With the GC heap conversion, the functionality of legacy platform objects was broken. This is because the generated implementation of one of them was used for all of them, removing functionality such as deletion. This re-adds all functionality, where questions such as "does the object support indexed properties?" is instead answered by virtual functions instead of by the IDL generator checking the presence of certain keywords/attributes.
2023-02-28LibWeb: Rename Layout::InitialContainingBlock to Layout::ViewportAndreas Kling
The name "initial containing block" was wrong for this, as it doesn't correspond to the HTML element, and that's specifically what it's supposed to do! :^)
2023-02-26WebServer: Remove a call to String::from_deprecated_stringNico Weber
guess_mime_type_based_on_filename() returns a StringView, so no need to bring DeprecatedString's (implicit) ctor into this. No behavior change.
2023-02-26LibGfx: Return bool not ErrorOr<bool> from ImageDecoderPlugin::sniff()MacDue
Nobody made use of the ErrorOr return value and it just added more chance of confusion, since it was not clear if failing to sniff an image should return an error or false. The answer was false, if you returned Error you'd crash the ImageDecoder.
2023-02-25Everywhere: Use _{short_,}string to create Strings from literalsLinus Groh
2023-02-24Browser+LibWeb+WebContent: Store cookie expiry times in UTCTimothy Flynn
We are currently converting parsed expiry times to local time, whereas the RFC dictates we parse them as UTC. When expiring cookies, we must also use the current UTC time to compare against the cookies' expiry times.
2023-02-21LibWeb+LibJS: Format Console arguments with JS::PrintAndrew Kaster
Instead of just calling JS::Value::to_string_without_side_effects() when printing values to the console, have all the console clients use the same JS::Print that the REPL does to print values. This method leaves some things to be desired as far as OOM hardening goes, however. We should be able to create a String in a way that doesn't OOM on failure so hard.
2023-02-21WebContent: Fix const-correctness issuesAndreas Kling
2023-02-21WindowServer: Fix various const-correctness issuesAndreas Kling
2023-02-19WebDriver: Add computedlabel endpointJonah
2023-02-19Kernel+Userland: Add constants subdirectory at /sys/kernel directoryLiav A
This subdirectory is meant to hold all constant data related to the kernel. This means that this data is never meant to updated and is relevant from system boot to system shutdown. Move the inodes of "load_base", "cmdline" and "system_mode" to that directory. All nodes under this new subdirectory are generated during boot, and therefore don't require calling kmalloc each time we need to read them. Locking is also not necessary, because these nodes and their data are completely static once being generated.
2023-02-19SystemServer: Re-mount / as non-writable, nosuid and nodevLiav A
This is a preparation before we remove the default root mount flags from the kernel code.
2023-02-19WindowServer: Fix drawing wallpaper on additional screensTom
We need to translate the source rectangle relative to the screen location when blitting from the wallpaper bitmap.
2023-02-19WindowServer: Fix caching stretched wallpaper for multiple screensTom
This creates a cached bitmap for each unique screen resolution, which allows us to share it between displays with the same resolution. If the resolution is the same as the wallpaper, we can just use the wallpaper as-is.
2023-02-18SpiceAgent: Rename `ClipboardType::JPG` to `ClipboardType::JPEG`Lucas CHOLLET
2023-02-18LibGfx: Rename `JPGLoader` to `JPEGLoader`Lucas CHOLLET
The patch also contains modifications on several classes, functions or files that are related to the `JPGLoader`. Renaming include: - JPGLoader{.h, .cpp} - JPGImageDecoderPlugin - JPGLoadingContext - JPG_DEBUG - decode_jpg - FuzzJPGLoader.cpp - Few string literals or texts
2023-02-18LibGUI+Userland: Stop returning Layout from `Widget::(try_)set_layout()`Sam Atkins
Nobody uses this return value any more. It also lets us remove a whole bunch of `(void)` casts. :^)
2023-02-18Userland: Specify margins and spacing in the GUI::Layout constructorSam Atkins
2023-02-18Userland: Use Widget::add_spacer() everywhereSam Atkins
2023-02-18LibWeb: Make factory methods of DOM::Event fallibleKenneth Myhra
Because of interdependencies between DOM::Event and UIEvents::MouseEvent to template function fire_an_event() in WebDriverConnection.cpp, the commit: 'LibWeb: Make factory methods of UIEvents::MouseEvent fallible' have been squashed into this commit.