summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2021-05-22Shell: Make sure all tests put their temp dirs in /tmpAndrew Kaster
Follow-on to #7337. Been seeing other CI test failures that point to these temp directories, so let's just move all of them to /tmp. I'm sure someone will write ext2fs stress tests later :^) Example: /usr/Tests/Shell/control-structure-as-command.sh Core::Socket: Failed to connect() to /tmp/portal/inspectables: ... + rm -rf shell-test 2>/dev/null + mkdir shell-test Error: The action has timed out.
2021-05-21Kernel: Fix PCI layout of i440fx QEMU machineLiav A
Some folks on discord said adding another e1000 network adapter made it so we don't have networking on the system anymore. To fix this, we will use other unsupported PCI device instead.
2021-05-21Tests: Remove default font tests from LibGfx/TestFontHandlingAndreas Kling
The system default font functions now rely on communication with WindowServer and so we can't really test them here.
2021-05-21LibJS: Fix indexed access of TypedArray with byte offsetLinus Groh
By doing the offset calculation in {get,put}_by_index() we would delegate these operations to Object for any index >= (array length - byte offset). By doing the offset calculation in data() instead, we can just use the unaltered property index for indexing the returned Span. In other words: data()[0] now returns the same value as indexing the TypedArray at index 0 in JS. This also fixes a bug in the js REPL which would not consider the byte offset and subsequently access the underlying ArrayBuffer data with a wrong index.
2021-05-21js: Don't print newline for empty ArrayBufferLinus Groh
If we don't have any bytes to print in hex representation, just return early instead of printing a newline in preparation for the data that won't follow. :^)
2021-05-21DisplaySettings: Restrict selection of fixed-width fontsAndreas Kling
Only allow fixed-width fonts to be the system fixed-width font. :^)
2021-05-21WindowServer: Store system font queries in WindowServer.ini :^)Andreas Kling
Changes to the system font settings are now persisted in /etc. Note that you still need to restart the system for changes to fully apply in all programs.
2021-05-21DisplaySettings: Add "Fonts" tabAndreas Kling
This allows you to view, edit, and apply changes to the system fonts.
2021-05-21WindowServer+LibGUI: Add an IPC API to change the current system fontsAndreas Kling
This patch adds a set_system_fonts() IPC API that takes the two main font queries as parameters. We'll probably expand this with additional queries when we figure out what they should be. Note that changing the system fonts on a live system mostly takes effect in newly launched programs. This is because GUI::Widget will currently cache a pointer to the Gfx::FontDatabase::default_font() when first constructed. This is something we'll have to fix somehow. Also note that the settings are not yet persisted.
2021-05-21LibGfx+WindowServer: Have WindowServer broadcast system font settingsAndreas Kling
Instead of everybody getting their system fonts from Gfx::FontDatabase (where it's all hardcoded), they now get it from WindowServer. These are then plumbed into the usual Gfx::FontDatabase places so that the old default_font() and default_fixed_width_font() APIs keep working.
2021-05-21LibWeb: Ignore vendor-specific CSS propertiesTobias Christiansen
If we can't parse a property we previously a log-line was generated. However it is in our best interest to simply ignore vendor-specific properties (e.g -moz-something or -webkit-something) since they are not part of the spec. The vendor-specific-ness is determined by looking whether the property starts with '-'. If we want to support some vendor-specific stuff, this doesn't get in the way since this check takes place after the parser determined that the current property is invalid. This cuts down the log-noise of the parser.
2021-05-21Applications: Use titlecase and distinct underlined characters in menusMax Wipfli
This changes (context) menus across the system to conform to titlecase capitalization and to not underline the same character twice (for accessing actions with Alt).
2021-05-21Meta: Make i440fx QEMU machine PCI hierarchy a bit more complexLiav A
Let's help our future selves by ensuring we have proper support for secondary PCI buses always.
2021-05-21Kernel/PCI: Fix support of multiple PCI host controllers enumerationLiav A
First scan PCI bus 0. Find any device on that bus, and if it's a PCI-to-PCI bridge, recursively scan it too. Then try to handle Multiple PCI host bridges on slot 0, device 0. If we happen to miss some PCI buses because they are not reachable through recursive PCI-to-PCI bridges scanning starting from bus 0, we might find them in this scanning.
2021-05-21Kernel/Graphics: Indicate initialization failed if no device was foundLiav A
2021-05-21FileManager: Change shortcut of Display Settings desktop optionLinus Groh
'D' is already used by 'New Directory', let's use 'S'. Fixes #7350.
2021-05-21DisplaySettings: Allow deselection of background imageJagger De Leo
Previously, if you selected a background image you could not revert to a solid color background.
2021-05-213DFileViewer: Make the main widget a GUI::FrameAndreas Kling
2021-05-21Browser: Stop leaking popup windowsAndreas Kling
We were leaking the "view source" and "downloading file" windows for some reason, presumably it was necessary when these were first added. Since they are owned by the spawning browser window, there's no need to leak them.
2021-05-21Base: Tweak syntax highlighting colors in the Default themeAndreas Kling
The old ones were barely noticeable. Let's at least make it visible that you have syntax highlighting enabled. :^)
2021-05-21LibWeb: Make tag names bold in syntax-highlighted HTML :^)Andreas Kling
2021-05-21Toolchain: Replace the -march=native flag with -mtune=nativeIdan Horowitz
This ensures inter-machine compatibility by not emitting any processor specific instructions. This fixes the issue raised by the non AVX-512 supporting GitHub actions runners.
2021-05-21Meta: Add GDB pretty printer for AK::SinglyLinkedListBrian Gianforcaro
2021-05-21Meta: Add GDB pretty printer for AK::InlineLinkedListBrian Gianforcaro
This allows a developer to easily dump a InlineLinkedList in the debugger without having to manually running the list. I needed this for a recent bug investigation in the Kernel.
2021-05-21Base: Remove accidentally added file :^)Andreas Kling
2021-05-21Revert "Kernel: Avoid allocating under spinlock in ProcessGroup::find_or_create"Brian Gianforcaro
This reverts commit e95eb7a51d8295c96cddf20f116139deecbb69d4. This is causing some sort of list corruption, as evident by #7313 I haven't been able to figure it out yet, so lets revert this change until I can figure out what's going on.
2021-05-21Revert "Kernel: Fix regression, removing a ProcessGroup that not in the list"Brian Gianforcaro
This reverts commit bbe315d8c0e36368091806f7ba1860d848e9bca7. This is un-needed when reverting the parent commit.
2021-05-21Revert "Userland: static vs non-static constexpr variables"Linus Groh
This reverts commit 800ea8ea969835297dc7e7da345a45b9dc5e751a. Booting the system no longer worked after these changes.
2021-05-21Userland: Change typedef to using directiveLenny Maiorani
Problem: - `typedef`s are read backwards making it confusing. - `using` statements can be used in template aliases. - `using` provides similarity to most other C++ syntax. - C++ core guidelines say to prefer `using` over `typedef`: https://isocpp.github.io/CppCoreGuidelines/CppCoreGuidelines#Rt-using Solution: - Switch these where appropriate.
2021-05-21Userland: static vs non-static constexpr variablesLenny Maiorani
Problem: - `static` variables consume memory and sometimes are less optimizable. - `static const` variables can be `constexpr`, usually. - `static` function-local variables require an initialization check every time the function is run. Solution: - If a global `static` variable is only used in a single function then move it into the function and make it non-`static` and `constexpr`. - Make all global `static` variables `constexpr` instead of `const`. - Change function-local `static const[expr]` variables to be just `constexpr`.
2021-05-21Toolchain: Enable native host optimizations when building toolchainBrian Gianforcaro
-march=native specializes the binaries for the CPU features available on the CPU the binary is being compiled on. This matches the needs of the Toolchain, as it's always built and used on that machine only. This should be safe for the github actions VMs as well, as they all run on a standard VM SKU in "the cloud". I saw small but notable improvements in end-2-end build times in my local testing. Each compilation unit is on average around a second faster on my Intel(R) Core(TM) i7-8705G CPU @ 3.10GHz.
2021-05-21Shell: Use /tmp for all file operations valid.sh testAndrew Kaster
Not doing so sometimes intermittently caused the '*' glob expansion test to fail and lock up the shell.
2021-05-21Shell: Hide job times behind SHELL_JOB_DEBUG flagAndrew Kaster
2021-05-21Base/CI: Run tests from /usr/Tests in GitHub ActionsAndrew Kaster
Uncomment the tests that were disabled due to frequent freezes when running without KVM. This also adds a new github actions group for every single test, which makes it easier to browse test boundaries during test runs. Move catting the serial output log back to its own step, so that it has higher visibility. The previous solution was also shown to not actually cat the log in the case of a failed boot and timeout :^(.
2021-05-21Tests: Install non-LibTest based Kernel tests into Kernel/Legacy subdirAndrew Kaster
This makes it easier to run tests we know will work in CI, and ignore ones that need some help to be repeatable.
2021-05-21LibWeb: Fix invalid behaviour of HTMLTokenizer::skip() and restore_to()Ali Mohammad Pur
skip() is supposed to end up keeping the previous iterator only one index behind the current one, and restore_to() should actually do the restore instead of just removing the now-useless source positions. Fixes #7331.
2021-05-21Kernel: Fix type, dectivate_writes => deactivate_writesLiav A
2021-05-21Kernel/Graphics: Choose VMObject considering enabled state when mmapingLiav A
When mmaping a Framebuffer from userspace, we need to check whether the framebuffer device is actually enabled (e.g. graphical mode is being used) or a textual VirtualConsole is active. Considering the above state, we mmap the right VMObject to ensure we don't have graphical artifacts if we change the resolution from DisplaySettings, changed to textual mode and after the resolution change was reverted, we will see the Desktop reappearing even though we are still in textual mode.
2021-05-21Kernel: Fix framebuffer resolution modesetting after bootLiav A
If we tried to change the resolution before of this patch, we triggered a kernel crash due to mmaping the framebuffer device again. Therefore, on mmaping of the framebuffer device, we create an entire new set of VMObjects and Regions for the new settings. Then, when we change the resolution, the framebuffersconsole needs to be updated with the new resolution and also to be refreshed with the new settings. To ensure we handle both shrinking of the resolution and growth of it, we only copy the right amount of available data from the cells Region.
2021-05-21Kernel/TTY: Don't flush dirty lines if VirtualConsole is not activeLiav A
2021-05-21Kernel: Process request to change virtual console from the IO Work queueLiav A
Instead of processing the input after receiving an IRQ, we shift the responsibility to the io work queue to handle this for us, so if a page fault occurs when trying to switch the VirtualConsole, the kernel can handle that.
2021-05-21LibGfx: Add missing TextAlignment::BottomLeftLinus Groh
2021-05-21LibWasm: Print instruction arguments tooAli Mohammad Pur
2021-05-21LibWasm: Fix nested structured instruction parsingAli Mohammad Pur
Previously, the ip would not be propagated correctly, and we would produce invalid jumps when more than one level of nesting was involved. This makes loops work :P
2021-05-21LibWasm: Resolve labels starting from the top of the stackAli Mohammad Pur
Otherwise "label index 0" would be the first ever created label, not the last one (as the spec wants) :^(
2021-05-21LibWasm: Implement a very basic linkerAli Mohammad Pur
This will simply "link" any given module instances and produce a list of external values that can be used to instantiate a module. Note that this is extremely basic and cannot resolve circular dependencies, and depends on the instance order.
2021-05-21LibWasm: Make the instantiation process produce an OwnPtrAli Mohammad Pur
Managing the instantiated modules becomes a pain if they're on the stack, since an instantiated module will eventually reference itself. To make using this simpler, just avoid copying the instance.
2021-05-21LibWasm: Decouple ModuleInstance from the AbstractMachineAli Mohammad Pur
This fixes a FIXME and will allow linking only select modules together, instead of linking every instantiated module into a big mess of exported entities :P
2021-05-21LibWasm+Meta: Implement instantiation/execution primitives in test-wasmAli Mohammad Pur
This also optionally generates a test suite from the WebAssembly testsuite, which can be enabled via passing `INCLUDE_WASM_SPEC_TESTS` to cmake, which will generate test-wasm-compatible tests and the required fixtures. The generated directories are excluded from git since there's no point in committing them.
2021-05-21LibWasm: Trap instead of VERIFY()'ingAli Mohammad Pur
...unless something really is an assertion.