summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2022-07-13Ports/cfunge: Remove workdir weirdnessTim Schumacher
2022-07-13LibJS: Implement Intl.NumberFormat V3's [[SignDisplay]] changesTimothy Flynn
Intl.NumberFormat V3 adds a "negative" option for [[SignDisplay]] to only use the locale's signed pattern for negative numbers.
2022-07-13LibJS: Implement Intl.NumberFormat V3's [[UseGrouping]] changesTimothy Flynn
In the main spec, [[UseGrouping]] can be true or false. In V3, it may be one of: auto: Respect the per-locale preference for grouping. always: Ignore per-locale preference for grouping and always insert the grouping separator (note: true is now an alias for always). min2: Ignore per-locale preference for grouping and only insert the grouping separator if the primary group has at least 2 digits. false: Ignore per-locale preference for grouping and never insert the grouping separator.
2022-07-13LibJS: Populate roundingPriority in Intl.PluralRules.resolvedOptionsTimothy Flynn
This is inherited from Intl.NumberFormat.
2022-07-13LibJS+js: Parse new constructor options from Intl.NumberFormat V3Timothy Flynn
This contains minimal changes to parse newly added and modified options from the Intl.NumberFormat V3 proposal, while maintaining main spec behavior in Intl.NumberFormat.prototype.format. The parsed options are reflected only in Intl.NumberFormat.prototype.resolvedOptions and the js REPL.
2022-07-13Kernel/Graphics: Allocate VGA window region according to the usual rulesLiav A
We should not allocate a kernel region inside the constructor of the VGATextModeConsole class. We do use MUST() because allocation cannot fail at this point, but that happens in the static factory method instead.
2022-07-13Kernel/Graphics: Rename m_vga_region => m_vga_window_regionLiav A
2022-07-13Kernel/Graphics: Rename TextModeConsole => VGATextModeConsoleLiav A
This change represents well the fact that the text mode console is based on VGA text mode.
2022-07-13Kernel/Graphics: Remove unnecessary VGAConsole class abstractionLiav A
The original intention was to support other types of consoles based on standard VGA modes, but it never came to an implementation, nor we need such feature at all. Therefore, this class is not needed and can be removed.
2022-07-13NotificationServer: Move notifications down if hoveredAtharva Kulkarni
Currently in case of multiple notifications, the notifications are drawn on top of each other when expanded. The change moves the notificaiton below other notifications
2022-07-13LibWeb: Only create one wrapper for inline content inside flex containerAndreas Kling
Due to a missing `return` statement, we were creating two anonymous wrapper blocks around each piece of inline content inside a flex container. This had no visual impact, since they ended up with 0x0 dimensions, but we were wasting a fair bit of time running layout on them.
2022-07-13WorkspacePicker: Hide applet if size == 0Filiph Sandström
2022-07-12LibWeb: Traverse shadow-including subtree when adopting DOM nodesAndreas Kling
This takes care of two FIXMEs and fixes an issue on Google Docs where we'd mix boxes from different documents in the same layout tree. (This happened because shadow trees remained attached to their old document when their host was adopted.)
2022-07-12LibWeb: Use fit-content size for flex items with indefinite cross sizeAndreas Kling
2022-07-12LibWeb: Stub out two functions on SVGGeometryElementAndreas Kling
These two were called by Discord while loading: - float getTotalLength(); - DOMPoint getPointAtLength(float distance);
2022-07-12LibWeb: Add barebones implementation of DOMPoint and DOMPointReadOnlyAndreas Kling
2022-07-12AK: Remove StringView(char const*) :^)sin-ack
This constructor relied on running strlen implicitly on its argument, thereby potentially causing out-of-bound reads (some of which were caught a few days ago). The removal of this constructor ensures that the caller must explicitly pass the size of the string by either: 1) Using operator""sv on literal strings; or 2) Calling strlen explicitly, making it clear that the size of the view is being calculated at runtime.
2022-07-12Tests: Remove StringView char const* initialization testsin-ack
We now explicitly disallow this.
2022-07-12AK+Userland+Tests: Remove URL(char const*) constructorsin-ack
The StringView(char const*) constructor is being removed, and there was only a few users of this left, which are also cleaned up in this commit.
2022-07-12AK: Remove String <-> char const* comparison operatorssin-ack
During the removal of StringView(char const*), all users of these functions were removed, and they are of dubious value (relying on implicit StringView conversion).
2022-07-12LibRegex: Remove RegexStringView(char const*) constructorsin-ack
This allowed passing in a nullptr for the StringView which will not be possible once StringView(char const*) is removed.
2022-07-12LibCore: Add FIXME note about converting Core::Account to use StringViewsin-ack
This prevents a bunch of utilities from using StringView for their arguments.
2022-07-12Everywhere: Use default StringView constructor over nullptrsin-ack
While null StringViews are just as bad, these prevent the removal of StringView(char const*) as that constructor accepts a nullptr. No functional changes.
2022-07-12Everywhere: Replace single-char StringView op. arguments with charssin-ack
This prevents us from needing a sv suffix, and potentially reduces the need to run generic code for a single character (as contains, starts_with, ends_with etc. for a char will be just a length and equality check). No functional changes.
2022-07-12Everywhere: Add sv suffix to strings relying on StringView(char const*)sin-ack
Each of these strings would previously rely on StringView's char const* constructor overload, which would call __builtin_strlen on the string. Since we now have operator ""sv, we can replace these with much simpler versions. This opens the door to being able to remove StringView(char const*). No functional changes.
2022-07-12Everywhere: Split Error::from_string_literal and Error::from_string_viewsin-ack
Error::from_string_literal now takes direct char const*s, while Error::from_string_view does what Error::from_string_literal used to do: taking StringViews. This change will remove the need to insert `sv` after error strings when returning string literal errors once StringView(char const*) is removed. No functional changes.
2022-07-12Everywhere: Explicitly specify the size in StringView constructorssin-ack
This commit moves the length calculations out to be directly on the StringView users. This is an important step towards the goal of removing StringView(char const*), as it moves the responsibility of calculating the size of the string to the user of the StringView (which will prevent naive uses causing OOB access).
2022-07-12LibC: Convert getopt and getopt_long to new StringView usagesin-ack
2022-07-12LibCore: Add convenience templates for System::{unveil,pledge}sin-ack
These convenience templates allow the following to be written as before: TRY(Core::System::pledge("promises...")); TRY(Core::System::pledge("promises...", "execpromises...")); TRY(Core::System::unveil("path", "permissions")); TRY(Core::System::unveil(nullptr, nullptr)); Other uses must now append sv to any literal string passed to pledge and unveil.
2022-07-12LibX86: Convert register names to StringViewssin-ack
2022-07-12Userland: Remove erroneous String -> char* -> StringView conversionssin-ack
These were accidental (or leftover) uses of String::characters() to construct StringViews through its StringView(char const*) constructor. Since this constructor is due to be removed, this will no longer work. Plus this prevents strlen from being run on these strings unnecessarily.
2022-07-12Userland: Convert command line arguments to String/StringViewsin-ack
StringView was used where possible. Some utilities still use libc functions which expect null-terminated strings, so String objects were used there instead.
2022-07-12Tests: Convert TestQuotedPrintable decode test to use StringViewssin-ack
2022-07-12Tests: Convert TestBase64 decode test to use StringViews directlysin-ack
Previously it would rely on the implicit StringView conversions. Now the decode_equal function will directly use StringViews.
2022-07-12Tests: Make TestSourceLocation basic_scenario specify StringView lengthsin-ack
2022-07-12LibJS: Emit StringViews for ErrorType instancessin-ack
This removes the need for calculating each string's length during ErrorType use at the cost of storing it within the binary.
2022-07-12LibChess: Add convenience constructor for Chess::Squaresin-ack
It didn't feel right to add sv suffixes to 2-character strings, so I added this convenience constructor.
2022-07-12Meta+Userland: Simplify some formatterssin-ack
These are mostly minor mistakes I've encountered while working on the removal of StringView(char const*). The usage of builder.put_string over Format<FormatString>::format is preferrable as it will avoid the indirection altogether when there's no formatting to be done. Similarly, there is no need to do format(builder, "{}", number) when builder.put_u64(number) works equally well. Additionally a few Strings where only constant strings were used are replaced with StringViews.
2022-07-12AK: Add string literal helpers to AK::SourceGeneratorsin-ack
Since all uses of SourceGenerator are with literal strings, there is no need to burden generators with the sv suffix.
2022-07-12AK: Explicitly calculate length of char* when printingsin-ack
This moves out the calculation of the char* out to the formatter. Additionally, we now print (null) when a null pointer is passed.
2022-07-12AK: Make CheckedFormatString pass the char array size to StringViewsin-ack
This makes the assumption that we never pass a stack-allocated char array to CheckedFormatString arguments (dbgln, outln, warnln). This assumption seems to hold true for the current state of Serenity code, at least. :^)
2022-07-12Kernel/Graphics: Simplify initialization flow explanation commentLiav A
Most of it was not relevant anymore to what we do in the initialization method anyway, and now it represents it quite well and "to the point".
2022-07-12Kernel/Graphics: Fix comparison of framebuffer type in initializationLiav A
2022-07-12Kernel/Graphics: Remove VGA folder and its contentLiav A
We never supported VGA framebuffers and that folder was a big misleading part of the graphics subsystem. We do support bare-bones VGA text console (80x25), but that only happens to be supported because we can't be 100% sure we can always initialize framebuffer so in the worst scenario we default to plain old VGA console so the user can still use its own machine. Therefore, the only remaining parts of VGA is in the GraphicsManagement code to help driving the VGA text console if needed.
2022-07-12LibWeb: Add missing break to avoid fallthrough in FlexFormattingContextIdan Horowitz
This silences a Clang warning.
2022-07-12LibWeb: Remove unused variable in FlexFormattingContextIdan Horowitz
2022-07-12LibWeb: Express flex item cross axis alignment as offsets-from-centerAndreas Kling
This allows us to perform cross axis alignment without knowing the final cross size of the flex container.
2022-07-12LibWeb: Actually clamp flex line cross size to min/max-sizeAndreas Kling
We were dropping the result of css_clamp() on the floor, oops! Let's also mark it [[nodiscard]] so it won't happen again.
2022-07-12LibWeb: Don't crash when failing to create WebGL context on non-SerenityAndreas Kling
This makes Ladybird stop panicking on websites that try to use WebGL.
2022-07-12DevTools/HackStudio: Fix 'enabled' property of 'build' and 'run' buttonsferhatgec