summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2023-04-14LibWeb: Expose ReadableStream::m_state and use in AOsMatthew Olsson
This allows us to be a bit closer to the spec phrasing and matches what we do with WritableStream
2023-04-14LibRegex: Avoid calling GenericLexer::consume() past EOFAli Mohammad Pur
The consume(size_t) overload consumes "at most" as many bytes as requested, but consume() consumes exactly one byte. This commit makes sure to avoid consuming past EOF. Fixes #18324. Fixes #18325.
2023-04-14LibWeb: Set Comment's prototypeLuke Wilde
This makes YouTube's thumbnails start appearing on the homepage. Yes,seriously. Simply put, this is because this check failed when Comment had the incorrect prototype: https://github.com/webcomponents/polyfills/blob/90cb97f847ce918289dac0978c50dcda0a0afd72/packages/shadycss/src/style-util.js#L397 This causes it to try and reconvert style sheets that are already in Shady format, which would cause it to spuriously add things such as class selectors on the end of tag selectors. This caused nothing to match the selectors. When YouTube is generating the thumbnails, it checks if the thumbnail grid container has a non-zero clientWidth. If it's zero, it simply bails generating thumbnails. Since the selectors for this container did not apply, we would not properly create a paint box for it, causing clientWidth to return zero.
2023-04-14Ports/llvm: Increase the default stack size for LLVM executablesTim Schumacher
2023-04-14AK: Efficiently resize CircularBuffer seekback copy distanceTim Schumacher
Previously, if we copied the last byte for a length of 100, we'd recalculate the read span 100 times and memmove one byte 100 times, which resulted in a lot of overhead. Now, if we know that we have two consecutive copies of the data, we just extend the distance to cover both copies, which halves the number of times that we recalculate the span and actually call memmove. This takes the running time of the attached benchmark case from 150ms down to 15ms.
2023-04-14Spreadsheet+LibSyntax: Never insert spans directlyMatteo Benetti
Function `CellSyntaxHighlighter::rehighlight()` direct inserted spans to TextDocument `m_span` vector missing out important reordering and merging operation carried out by `TextDocument::set_spans()`. This caused overlapping spans for a cell with only a `=` symbol (one for the actual token and one for the highlighting) to miscalculate `start` and `end` value and a `length` value (of `size_t` type) with a `0-1` substraction (result: 18446744073709551615) causing `Utf32View::substring_view()` to fail the `!Checked<size_t>::addition_would_overflow(offset, length)` assertion This remove the possibility to directly alter `TextDocument`'s spans thus forcing the utilization of `HighlighterClient::do_set_spans()` interface function. Proper refactor have been applied to `CellSyntaxHighlighter::rehighlight()` function
2023-04-14Base: Add US English Apple Macintosh keymapCubic Love
Add the full alt + shift-alt keymap for the EN-US Apple Keyboard Layout
2023-04-14LibJS: Port PrototypeObject::typed_this_value() to NonnullGCPtrLinus Groh
2023-04-14LibJS: Port PrototypeObject::typed_this_object() to NonnullGCPtrLinus Groh
2023-04-14LibJS: Port PrototypeObject::this_object() to NonnullGCPtrLinus Groh
2023-04-14LibJS: Port Value::get_method() to GCPtrLinus Groh
2023-04-14LibJS: Port Value::to_bigint() to NonnullGCPtrLinus Groh
2023-04-14LibJS: Port Value::to_object() to NonnullGCPtrLinus Groh
2023-04-14LibJS: Port Value::to_primitive_string() to NonnullGCPtrLinus Groh
2023-04-14Base: Fix typo in cursor test pageSrikavin Ramkumar
2023-04-14Ladybird: Display Qt cursors corresponding to missing CSS cursorsSrikavin Ramkumar
2023-04-14LibWeb: Support NotAllowed CSS cursorSrikavin Ramkumar
2023-04-13AK: Add very naive implementation of {sin,cos,tan} for aarch64Timon Kruiper
The {sin,cos,tan} functions in AK are used as the implementation of the same function in libm. We cannot use the __builtin_foo functions as these would just call the libc functions. This was causing an infinite loop. Fix this by adding a very naive implementation of AK::{sin, cos,tan}, that is only valid for small inputs. For the other functions in this file, I added a TODO() such that we'll crash, instead of infinite looping.
2023-04-13Kernel/aarch64: Add implementation of Processor::for_eachTimon Kruiper
2023-04-13Kernel/aarch64: Change RPi::Framebuffer::PixelOrder to BGRTimon Kruiper
This is what the WindowServer expects. Confusingly the pixel format for MULTIBOOT_FRAMEBUFFER_TYPE_RGB is actually BGRx8888.
2023-04-13Kernel/aarch64: Add volatile modifier to various asm statementsTimon Kruiper
This prevents the optimizer from reordering them, which hopefully prevents future bugs.
2023-04-13Kernel/aarch64: Make sure no reordering of DAIF::read is possibleTimon Kruiper
We were crashing on the VERIFY_INTERRUPTS_DISABLED() in RecursiveSpinlock::unlock, which was caused by the compiler reordering instructions in `sys$get_root_session_id`. In this function, a SpinLock is locked and quickly unlocked again, and since the lock and unlock functions were inlined into `sys$get_root_session_id` and the DAIF::read was missing the `volatile` keyword, the compiler was free to reorder the reads from the DAIF register to the top of this function. This caused the CPU to read the interrupts state at the beginning of the function, and storing the result on the stack, which in turn caused the VERIFY_INTERRUPTS_DISABLED() assertion to fail. By adding the `volatile` modifier to the inline assembly, the compiler will not reorder the instructions. In aa40cef2b7, I mistakenly assumed that the crash was related to the initial interrupts state of the kernel threads, but it turns out that the missing `volatile` keyword was the actual problem. This commit also removes that code again.
2023-04-13WindowServer: Refactor window geometry overlay rect calculation logicTom
This moves the ideal overlay rect calculation into its own function.
2023-04-13WindowServer: Prevent some overdraw by the window geometry overlayTom
While the window geometry overlay is centered inside the tile overlay neither the text nor the location change, so there is no need to re-render and update it every time the window moves.
2023-04-13WindowServer: Move window geometry label into the tile overlay areaTom
This moves the window geometry overlay into the center of the tile window overlay when it's visible or when it moves.
2023-04-13WindowServer: Implement tile window overlayTom
This adds a tiling mode that will show a tile window overlay rather than immediately tiling a window, triggering window resizes.
2023-04-13LibGfx: Add Rect::interpolated_to functionTom
This function interpolates the edges between the rectangle and another rectangle based on a percentage value.
2023-04-13WindowServer: Fix some gliches when overlays are moved or removedTom
Keep track of areas that overlays were rendered to when we recompute occlusions. This allows us to then easily figure out areas where overlays were moved from or removed from.
2023-04-13WindowServer: Only register animations when they're runningTom
This allows us to keep Animation objects around, and the compositor will only use them when the animation is actually running.
2023-04-13WindowServer: Fix calculating tile rect on secondary screensTom
The screen rectangle's origin is only {0, 0} on the main screen, so we need to move the tile rectangle relative to its location.
2023-04-13WindowServer: Use enum class for Effects and ShowGeometryTom
2023-04-13LibWeb: Don't match the root node of HTMLCollectionLuke Wilde
Every user of HTMLCollection does not expect the root node to be a potential match, so let's avoid it by using non-inclusive sub-tree traversal. This avoids matching the element that getElementsByTagName was called on for example, which is required by Ruffle: https://github.com/ruffle-rs/ruffle/blob/da689b7687d6bb23f37251e902ccddabdfcc5f48/web/packages/core/src/ruffle-object.ts#L321-L329
2023-04-13LibLocale: Update to CLDR version 43.0.0Timothy Flynn
https://cldr.unicode.org/index/downloads/cldr-43
2023-04-13LibLocale: Prepare locale data generator for breaking changes in CLDR 43Timothy Flynn
In CLDR 42 and earlier, we were able to assume all cldr-localename files existed for every locale. They now do not exist for locales that don't provide any localized data. Namely, this is the "und" locale (which is an alias for the root locale, i.e. the locale we fall back to when a user provides an unknown locale). Further, we were previously able to assume that each currencies.json in cldr-numbers contained all currencies. This file now excludes currencies whose localized names are the same as the currency key. Therefore, we now preprocess currencies.json to discover all currencies ahead of time, much like we already do for languages.json.
2023-04-13Documentation: Document preference for SCREAMING_CASE constantsLinus Groh
2023-04-13LibWeb: Whine instead of dying on unexpected box during line layoutAndreas Kling
Log a FIXME on the debug log, along with a layout tree dump of the box that we didn't expect to see. This will be annoying (until fixed), but far less so than crashing the browser.
2023-04-13LibJS: Make well-known symbol getters return NonnullGCPtrLinus Groh
None of these are ever null after the VM has been initialized, as proved by virtually every caller immediately dereferencing the raw pointer.
2023-04-13LibJS: Make intrinsics getters return NonnullGCPtrLinus Groh
Some of these are allocated upon initialization of the intrinsics, and some lazily, but in neither case the getters actually return a nullptr. This saves us a whole bunch of pointer dereferences (as NonnullGCPtr has an `operator T&()`), and also has the interesting side effect of forcing us to explicitly use the FunctionObject& overload of call(), as passing a NonnullGCPtr is ambigous - it could implicitly be turned into a Value _or_ a FunctionObject& (so we have to dereference manually).
2023-04-13LibJS: Add spec comments to WeakSetPrototypeLinus Groh
2023-04-13LibJS: Add spec comments to WeakSetConstructorLinus Groh
2023-04-13LibJS: Add spec comments to WeakRefPrototypeLinus Groh
2023-04-13LibJS: Add spec comments to WeakRefConstructorLinus Groh
2023-04-13LibJS: Add spec comments to WeakMapPrototypeLinus Groh
2023-04-13LibJS: Add spec comments to WeakMapConstructorLinus Groh
2023-04-13LibJS: Add spec comments to TypedArrayPrototypeLinus Groh
2023-04-13LibJS: Add spec comments to TypedArrayConstructorLinus Groh
2023-04-13LibJS: Add spec comments to SymbolPrototypeLinus Groh
2023-04-13LibJS: Add spec comments to SymbolConstructorLinus Groh
2023-04-13LibJS: Add spec comments to StringConstructorLinus Groh
2023-04-13LibJS: Add spec comments to SetPrototypeLinus Groh