summaryrefslogtreecommitdiff
path: root/Userland
AgeCommit message (Collapse)Author
2022-01-24LibWeb: Use BFC root relative coordinates when flowing around floatsAndreas Kling
While IFC flows text into a block container, floating objects are anchored at the BFC root, not necessarily the local block container. Because of this, we have to use root-relative coordinates when checking how much space is available in between left and right floated objects.
2022-01-24LibWeb: Place block-level boxes vertically before formatting them insideAndreas Kling
Block placement is now divided into a vertical and horizontal step. The vertical step runs before formatting boxes internally. The horizontal step still runs after (since we may need the final width value.) This solves a long-standing architectural problem where IFC didn't know its origin Y position within the BFC root box. This is required for figuring out how to flow around floating objects. (Floating objects are always relative to the BFC root.)
2022-01-24LibWeb: Unify placement of replaced and non-replaced elements in BFCAndreas Kling
Seems like we can share the code for these.
2022-01-24LibWeb: Simplify code that compute initial child positions in BFCAndreas Kling
2022-01-24LibWeb: Unify code for assigning vertical box model metrics in BFCAndreas Kling
We were doing the exact same thing for both replaced and non-replaced elements, so let's share the code. :^)
2022-01-24LibWeb: Make IFC aware that its parent is always a BFCAndreas Kling
This simplifies some code and allows us to use tighter types for the parent context everywhere.
2022-01-24LibWeb: Move rect-in-coordinate-space helper to Layout::BoxAndreas Kling
2022-01-24LibWeb: Remove unused InlineFormattingContext::available_width_at_line()Andreas Kling
2022-01-24LibWeb: Take full border box into account when vertically placing floatsAndreas Kling
2022-01-23DisplaySettings: Show display's manufacturer and size instead of deviceTom
Rather than displaying the path of the framebuffer, try and display the manufacturer name and the size of the display. If no EDID data is available, fall back to showing the device path.
2022-01-23Meta+LibEDID: Download and generate the PNP ID databaseTom
This downloads the UEFI's published PNP ID database and generates a lookup table for use in LibEDID. The lookup table isn't optimized at all, but this can be easily done at a later point if needed.
2022-01-23DisplaySettings: Show DPI for selected resolutionTom
This uses the EDID provided by the connected display to show the pixel density of a selected resolution.
2022-01-23LibEDID: Add API for conveniently querying EDID from framebuffer deviceTom
2022-01-23Kernel: Add ioctl to get the EDID from a framebufferTom
2022-01-23LibEDID: Add a library to parse EDID blobsTom
This library can be used (for the most part) by kernel drivers as well as user mode. For this reason FixedPoint is used rather than floating point, but kept to a minimum.
2022-01-23LibGUI: Fix typo in TextEditorTobias Christiansen
2022-01-23LibGUI: Fix broken text rendering in TextEditorTobias Christiansen
This patch reintroduces the translation previously mistakenly removed when adding support for different underline-styles. Thanks for reporting the bug, kennethmyhra!
2022-01-23RequestServer: Unveil /etc/timezone for date-time usageTimothy Flynn
2022-01-23gunzip: Don't truncate output filename when input file suffix is omittedRummskartoffel
Before this commit, `$ gunzip abcd` would incorrectly uncompress `abcd.gz` to `a` instead of to `abcd`.
2022-01-23LibSoftGPU: Add const to Clipper where possibleLenny Maiorani
2022-01-23LibSoftGPU: Switch to using east const in Clipper.[h,cpp]Lenny Maiorani
2022-01-23LibSQL: Add simple REGEXP matchmnlrsn
The implementation of LIKE uses regexes under the hood, and this implementation of REGEXP takes the same approach. It employs PosixExtended from LibRegex with case insensitive and Unicode flags set. The implementation of LIKE is based on SQLlite specs, but SQLlite does not offer directions for a built-in regex functionality, so this one uses LibRegex.
2022-01-23LibJS+LibIMAP: Use the new Optional<U>(Optional<T>) constructorIdan Horowitz
These look much nicer than these repeated ternaries :^)
2022-01-23find: Fix crash on missing argumentsDavid Lindbom
Fixes #12075
2022-01-23LibJS: Remove VM::call()mjz19910
2022-01-23Everywhere: Convert VM::call() to JS::call()mjz19910
2022-01-23LibJS: Add some overloads for JS::call() and JS::call_impl()mjz19910
Overloads added: - JS::call for FunctionObject& - JS::call_impl for FunctionObject&
2022-01-23LibCore+LibC: Enforce the global event loop ban in codekleines Filmröllchen
It's a bad idea to have a global event loop in a client application as that will cause an initialization-order fiasco in ASAN. Therefore, LibC now has a flag "s_global_initializers_ran" which is false until _entry in crt0 runs, which in turn only gets called after all the global initializers were actually executed. The EventLoop constructor checks the flag and crashes the program if it is being called as a global constructor. A note next to the VERIFY_NOT_REACHED() informs the developer of these things and how we usually instantiate event loops. The upshot of this is that global event loops will cause a crash before any undefined behavior is hit.
2022-01-23LibCore: Fix signal handling race condition in EventLoopkleines Filmröllchen
The event loop is responsible for handling POSIX signals while it's running. The signal handler adds the signals to a wake pipe which is then read after the select'ing code in wait_for_event. Problems happen, however, when another signal comes in after the select wake: the signal will interrupt the next syscall, the `read` from the wake pipe, and the resulting EINTR in wait_for_event causes the program to crash. This is undesirable. Instead, we want to retry reading as long as we're interrupted.
2022-01-23LibCore: Create wake pipe on each threadkleines Filmröllchen
After the previous change, the wake pipe was only being created on the main thread by the main event loop. This change utilizes a flag to always initialize the wake pipe on other threads. Because the pipe is quite expensive (it will count towards the file descriptor limit, for instance), we do the initialization "lazily": Only when an event loop is constructed and it notices that there hasn't been a wake pipe created on its thread, it will create the pipe. Conversely, this means that there are no pipes on threads that never use an event loop.
2022-01-23LibCore: Allow EventLoops to run on multiple threads safelykleines Filmröllchen
The event loop system was previously very singletony to the point that there's only a single event loop stack per process and only one event loop (the topmost) can run at a time. This commit simply makes the event loop stack and related structures thread-local so that each thread has an isolated event loop system. Some things are kept at a global level and synchronized with the new MutexProtected: The main event loop needs to still be obtainable from anywhere, as it closes down the application when it exits. The ID allocator is global as IDs should not be shared even between threads. And for the inspector server connection, the same as for the main loop holds. Note that currently, the wake pipe is only created by the main thread, so notifications don't work on other threads. This removes the temporary mutex fix for notifiers, introduced in 0631d3fed5623c1f2b0d6085ab24e4dd69c6ce99 .
2022-01-23LibThreading: Introduce MutexProtected generic synchronization primitivekleines Filmröllchen
MutexProtected mirrors the identically-named Kernel primitive and can be used to synchronize access to any object that might not be thread safe on its own. Synchronization is done with a simple mutex, so access to a MutexProtected object is potentially blocking. Mutex now has an internal nesting variable which is there to harden it against lock-unlock ordering issues (e.g. double unlocking).
2022-01-23ClockSettings: Add a GUI application to set the system time zoneTimothy Flynn
This application can be expanded with other clock-related options. For an initial iteration, it has just an option to change the time zone.
2022-01-23timezone: Add a command line utility to set the system time zoneTimothy Flynn
2022-01-23LibC: Use LibTimeZone to offset localtime() for the system time zoneTimothy Flynn
2022-01-23LibTimeZone: Use /etc/timezone as the basis for the system time zoneTimothy Flynn
This changes LibTimeZone to read the current time zone from the file /etc/timezone rather than using tzset/tzname. Instead, in a subsequent commit, LibC's time methods will be changed to used LibTimeZone to retrieve the system time zone. Also add an API to set the system time zone. This method is only allowed when running within Serenity.
2022-01-23Userland: Add promises to programs that will read /etc/timezoneTimothy Flynn
This will require unveiling /etc/timezone itself for reading, as well as the rpath pledge promise.
2022-01-23LibTimeZone: Add an API to retrieve a list of all known IANA time zonesTimothy Flynn
2022-01-23LibJS+LibTimeZone+LibUnicode: Remove direct linkage to LibTimeZoneTimothy Flynn
This is no longer needed now that LibTimeZone is included within LibC. Remove the direct linkage so that others do not mistakenly copy-paste the CMakeLists text elsewhere.
2022-01-23DynamicLoader+LibC+LibTimeZone: Include LibTimeZone sources in LibCTimothy Flynn
LibTimeZone will be needed directly within LibC for functions such as localtime(). This change adds LibTimeZone directly within LibC, so that LibTimeZone isn't its own .so library anymore. LibTimeZone itself is compiled as an object library to make it easier to give it generator-specific compilation flags.
2022-01-23LibWeb: Consider TextDecorationStyle when rendering textTobias Christiansen
For now only Wavy is additionally supported, but the infrastructure is there.
2022-01-23LibWeb: Add new property 'text-decoration-style'Tobias Christiansen
This patch makes the property 'text-decoration-style' known throughout all the places in LibWeb that care.
2022-01-23LibGUI: Expand underline support for Spans in TextEditorTobias Christiansen
To achieve this, some of the lambdas got shifted around and the new attributes are respected.
2022-01-23LibGfx: Expand TextAttributes with more information about underliningTobias Christiansen
This adds a seperate Color to be used for underlines as well as support for different underline styles.
2022-01-23LibGfx: Add Painter::draw_triangle_wave()Tobias Christiansen
This patch adds support for drawing triangular waves. For now those can only be horizontal, but as they are intended for underlining text, it's an okay way to handle this.
2022-01-23LibHTTP+AK: Rename CNETWORKJOB_DEBUG to NETWORKJOB_DEBUGNico Weber
2022-01-23LibHTTP+AK: Rename CHTTPJOB_DEBUG to HTTPJOB_DEBUGNico Weber
2022-01-23LibCore: Print the actual errno if sysbeep failedLiav A
2022-01-23SystemServer: Create /dev/devctl and create devices based on its eventsLiav A
We first create the /dev/devctl based on the information from the SysFS. Then, we create block devices and character devices based on the events we read from that device.
2022-01-23SystemServer: Rename devfs => devtmpfsLiav A
We used to have a static devfs, but now it's called devtmpfs which is completely dynamic.