summaryrefslogtreecommitdiff
path: root/Userland/Services
AgeCommit message (Collapse)Author
2021-10-20LibJS: Rename define_native_function => define_old_native_functionIdan Horowitz
This method will eventually be removed once all native functions are converted to ThrowCompletionOr
2021-10-20LibJS: Add ThrowCompletionOr versions of the JS native function macrosIdan Horowitz
The old versions were renamed to JS_DECLARE_OLD_NATIVE_FUNCTION and JS_DEFINE_OLD_NATIVE_FUNCTION, and will be eventually removed once all native functions were converted to the new format.
2021-10-20LibJS: Replace usages of JS_{DECLARE, DEFINE}_NATIVE_GETTERIdan Horowitz
These macros are equivalent to JS_{DECLARE, DEFINE}_NATIVE_FUNCTION and were only sometimes used, so let's just get rid of them altogether.
2021-10-19LoginServer: Fix typo in --auto-login option value nameLinus Groh
2021-10-19LoginServer: Log in when the user presses the enter keyTimothy Flynn
2021-10-18LoginServer: Use the verb "log in" for window title & submit buttonAndreas Kling
2021-10-17LoginServer: Add --auto-login switchPeter Elliott
Auto login will automatically log in a user without prompting for a password, but will still allow logouts and subsequent password logins.
2021-10-17TaskBar+Utilities: Add logout(1) command, and call it in ShutdownDialogPeter Elliott
logout kills the session that SystemServer --user was started with.
2021-10-17LoginServer: Process logins and start SystemServer in user modePeter Elliott
2021-10-17LoginServer: Layout a basic login windowPeter Elliott
2021-10-17SystemServer: Add per user mode (--user)Peter Elliott
System server running in user mode will form the basis of a "session" for login purposes in serenity.
2021-10-14LibWeb: Introduce simple scrollable overflow, size ICB to viewportAndreas Kling
Per spec, the initial containing block (ICB) should have the size of the viewport. We have only done this for the width until now, since we had no way to express scrollable overflow. This patch adds Layout::Box::m_overflow_data, an optional struct that can hold on to information about a box's overflow. Then we have BFC set the ICB up with some scrollable overflow instead of sizing it to fit its content vertically. This fixes a number of broken layouts where correctness depends on having the appropriate ICB height.
2021-10-14ConfigServer: Sync config files to disk automaticallyValtteri Koskivuori
At the risk of introducing premature optimization, it only syncs to disk 5 seconds after the latest valid configuration update, to handle cases where programs might send frequent updates that would go to disk every time otherwise. Also syncs to disk when the client connection closes. Co-authored-by: Timothy Flynn <trflynn@pm.me>
2021-10-13SystemServer: Avoid uninitialized memoryBen Wiederhake
2021-10-13LibJS: Convert to_object() to ThrowCompletionOrLinus Groh
2021-10-11ClockWidget: Left-align clock and center based on ideal widthJames Magahern
I personally find it very distracting when the clock continuously shifts around as seconds tick. Because we're not using a monospace font for the clock, this is to be expected since each number has a different typographic width. However, a tradeoff can be made to make this slightly less distracting. Instead of _perfectly_ centering the time string for every given possible time, we can center it once based on a constant measurement and render the rest of the string as left-aligned. The advantage is that the clock no longer shifts around anymore while seconds tick. The disadvantage is that the time may sometimes be not perfectly centered by a pixel or two for certain numbers. Personally, I find the tradeoff well worth it, and I don't think I would even notice the imperfect centering unless I was specifically looking for it and watching it for a long time.
2021-10-08CrashDaemon: Stop automatically compressing coredumpsAndreas Kling
This was a nice idea in theory, but in practice it makes big crashes (e.g WebContent) even more CPU intensive. Let's disable this for now (but keep the ability for CrashReporter to open compressed coredumps.)
2021-10-05LookupServer: Fix to handle whitespaces and tabs in /etc/hostsfleximus
2021-10-05SQLServer+SQL+LibSQL: Allow sql client to specify the database nameJan de Visser
The database the sql client connected to was 'hardcoded' to the login name of the calling user. - Extended the IPC API to be more expressive when connecting, by returning the name of the database the client connected to in the 'connected' callback. - Gave the sql client a command line argument (-d/--database) allowing an alternative database name to be specified A subsequent commit will have a dot command allowing the user to connect to different databases from the same sql session.
2021-10-05SQLServer: Do not capture stack variables by reference in lambdasJan de Visser
If you capture a stack variable by reference in a lamdba definition, and this lambda outlives the scope of the stack variable, this reference may point to garbage when the lambda is executed. Therefore capture as little as possible (typically only ``this``), and what is captured is captured by value
2021-10-03LibJS: Convert has_own_property() to ThrowCompletionOrLinus Groh
2021-10-03LibWeb: Fix that $0 was no longer accessibledavidot
We now set the realm (twice) on every console input. This can probably be avoided if we use two executing contexts one for the website the other for the console. This achieves a similar behavior but is not really nice and not really spec like.
2021-10-01RequestServer: Don't hide the SIGINFO state dump behind a debug macroAndreas Kling
Until we're confident that RequestServer doesn't need this runtime debug dump helper, it's much nicer if everyone has it built in, so they can simply send a SIGINFO if they see it acting up.
2021-10-01RequestServer: Ignore preconnect requests for available connectionsAli Mohammad Pur
There's no need to schedule a useless job when the connection is already there and established.
2021-10-01Browser: Check m_console_client is non-null before dereferencing itIdan Horowitz
This added check matches CientConnection::js_console_input and makes sure the webcontent process doesn't crash if the console is opened while no page is available (like in a file not found situation)
2021-09-30RequestServer: Avoid storing a strong reference to a socket in callbacksAli Mohammad Pur
Unused sockets created by EnsureConnection should not keep the socket around (storing a strong reference will create a reference cycle). This fixes a whole bunch more RS spins.
2021-09-30RequestServer: Use an OwnPtr for the connection cache vectorAli Mohammad Pur
Just as removing individual connections can cause the vector entries to change positions, adding or removing connections to the cache can also move the connections around, which would make it possible for a connection to avoid being deleted (and make the RS spin on the Notifier for that connection). This commit makes it so that no connection cache is left when it's supposed to be deleted. Fixes a few more RS spins.
2021-09-29LibJS: Convert internal_own_property_keys() to ThrowCompletionOrLinus Groh
2021-09-29LibJS: Convert internal_delete() to ThrowCompletionOrLinus Groh
2021-09-29LibJS: Convert internal_set() to ThrowCompletionOrLinus Groh
2021-09-29LibJS: Convert internal_get() to ThrowCompletionOrLinus Groh
2021-09-29LibJS: Convert internal_has_property() to ThrowCompletionOrLinus Groh
2021-09-29LibJS: Convert internal_define_own_property() to ThrowCompletionOrLinus Groh
2021-09-29LibJS: Convert internal_get_own_property() to ThrowCompletionOrLinus Groh
2021-09-29LibJS: Convert internal_prevent_extensions() to ThrowCompletionOrLinus Groh
2021-09-29LibJS: Convert internal_is_extensible() to ThrowCompletionOrLinus Groh
2021-09-29LibJS: Convert internal_set_prototype_of() to ThrowCompletionOrLinus Groh
2021-09-29LibJS: Convert internal_get_prototype_of() to ThrowCompletionOrLinus Groh
2021-09-29RequestServer: Use an OwnPtr for cached connectionsAli Mohammad Pur
Otherwise we'd end up trying to delete the wrong connection if a connection made before us is deleted. Fixes _some_ RequestServer spins (though not all...). This commit also adds a small debug mechanism to RequestServer (which can be enabled by turning REQUEST_SERVER_DEBUG on), that can dump all the current active connections in the cache, what they're doing, and how long they've been doing that by sending it a SIGINFO.
2021-09-29RequestServer: Correctly start preconnected TLS socketsAli Mohammad Pur
We need to set the root certificates, and tell the connection cache that the preconnect job finished (otherwise it would spin forever, waiting for us to tell it that).
2021-09-28WebContent: Coalesce paint invalidations to avoid spamming clientAndreas Kling
Some content cause a lot of paint invalidations (e.g someone drawing to a <canvas> repeatedly) and we don't need to spam the client about this. Instead, accumulate a dirty rect, and send it once per event loop step.
2021-09-28RequestServer+LibProtocol: Add an 'EnsureConnection' IPC endpointAli Mohammad Pur
This will allow LibWeb (and other components) to request a connection to be premade and cached, to make subsequent loads faster.
2021-09-28LibWeb: Fire "keyup" events as well :^)Andreas Kling
This was easy, now that we have KeyboardEvent.
2021-09-27LibWeb+Browser: Make ad blocking work in the multi-process worldAndreas Kling
We now send the list of content filters over to new WebContent processes after creating an OutOfProcessWebView. :^)
2021-09-22WebContent: Pass an empty bitmap object if the pointer is nullKarol Kosek
Prior this commit we were always dereferencing the image bitmap pointer, even if it was null, which resulted in a crash when trying to open the context menu when an image wasn't loaded. Closes: #10178
2021-09-21CrashDaemon+CrashReporter: Streamline crash reporting a little bitAndreas Kling
Before this patch, this is what would happen after something crashed: 1. CrashDaemon finds a new coredump in /tmp 2. CrashDaemon compresses the new coredump (gzip) 3. CrashDaemon parses the uncompressed coredump and prints a backtrace 4. CrashDaemon launches CrashReporter 5. CrashReporter parses the uncompressed coredump (again) 6. CrashReporter unlinks the uncompressed coredump 7. CrashReporter displays a GUI This was taking quite a long time when dealing with large programs crashing (like Browser's WebContent processes.) The new flow: 1. CrashDaemon finds a new coredump in /tmp 2. CrashDaemon mmap()'s the (uncompressed) coredump 3. CrashDaemon launches CrashReporter 4. CrashDaemon goes to sleep for 3 seconds (hack alert!) 5. CrashReporter parses the (uncompressed) coredump 6. CrashReporter unlinks the (uncompressed) coredump 7. CrashReporter displays a GUI 8. CrashDaemon wakes up (after step 4) 9. CrashDaemon compresses the coredump (gzip) TL;DR: we no longer parse the coredumps twice, and we also prioritize launching the CrashReporter GUI immediately when a new coredump shows up, instead of compressing and parsing it in CrashDaemon first. The net effect of this is that you get a backtrace on screen much sooner. That's pretty nice. :^)
2021-09-20WindowServer: Apply screen scaling when getting bitmap around cursorDavid Isaksson
This fixes an issue for the magnifier that when the screen scaling is increased to 2 the magnifier doesn't center around the cursor. Since booting Serenity with multiple displays doesn't work at the moment the rescaling is only added for the one display case.
2021-09-19LibCore+RequestServer: Ignore callbacks for cancelled network jobsAli Mohammad Pur
Also cancel the jobs when they're destroyed. This makes sure that jobs whose owners have discarded don't end up crashing because of a did_fail().
2021-09-19RequestServer+LibHTTP+LibGemini: Cache connections to the same hostAli Mohammad Pur
This makes connections (particularly TLS-based ones) do the handshaking stuff only once. Currently the cache is configured to keep at most two connections evenly balanced in queue size, and with a grace period of 10s after the last queued job has finished (after which the connection will be dropped).
2021-09-16FileSystemAccessServer: Only compute basename when promptingBrian Gianforcaro
pvs-studio flagged this as a potential performance optimization, we only need to compute the basename when it's used.