summaryrefslogtreecommitdiff
path: root/Userland
AgeCommit message (Collapse)Author
2021-05-27PDFViewer: Show app name as "PDF Viewer" when a file is loadedLinus Groh
2021-05-27SoundPlayer: Show app name as "Sound Player" when a file is loadedLinus Groh
2021-05-27Utilites: Make dd truncate output fileMarcus Nilsson
Make dd truncate the output file as Gnu-dd does by default. Fixes #7497
2021-05-27Shell: Disable the valid test as it has a high failure rate on targetAndrew Kaster
Tracked by #7336
2021-05-27LibGfx: Copy into a u32 in LZWDecoder::next_code() instead of castingAndrew Kaster
This results in unaligned reads sometimes, depending on the layout of the underlying buffer. Caught by UBSAN.
2021-05-27LibC: Use u32 in arc4random instead of char[4]Andrew Kaster
There's no alignment requirements on a char[4] buffer, so this was causing unaligned reads that were caught by UBSAN.
2021-05-27DHCPClient: Avoid unaligned access when parsing optionsAndrew Kaster
Just casting a void* to a T* and dereferencing it is not particularly safe. Also UBSAN was complaining. Use memcpy into a default constructed T instead and require that the T be trivially copyable.
2021-05-27Userland: Port UBSAN implementation to userspaceAndrew Kaster
Take Kernel/UBSanitizer.cpp and make a copy in LibSanitizer. We can use LibSanitizer to hold other sanitizers as people implement them :^). To enable UBSAN for LibC, DynamicLoader, and other low level system libraries, LibUBSanitizer is built as a serenity_libc, and has a static version for LibCStatic to use. The approach is the same as that taken in Note that this means now UBSAN is enabled for code generators, Lagom, Kernel, and Userspace with -DENABLE_UNDEFINED_SANTIZER=ON. In userspace however, UBSAN is not deadly (yet). Co-authored-by: ForLoveOfCats <ForLoveOfCats@vivaldi.net>
2021-05-27LibTest: Do not cleanly exit when abort() is calledAli Mohammad Pur
Instead, do the cleanup, remove the signal handler, and abort() again.
2021-05-27LibWasm: Avoid excessive pop()-then-push() on the stackAli Mohammad Pur
Also make the stack a lot bigger, since we now have only one of these instead of one per function call.
2021-05-27LibWasm: Let the interpreter itself manage the call frameAli Mohammad Pur
2021-05-27LibWasm: Add a copy assignment operator to ValueAli Mohammad Pur
2021-05-27LibWasm: Make Interpreter a virtual interfaceAli Mohammad Pur
This allows multiply different kinds of interpreters to be used by the runtime; currently a BytecodeInterpreter and a DebuggerBytecodeInterpreter is provided.
2021-05-27LibWasm: Use the current configuration to run call opsAli Mohammad Pur
This should make it easier to implement multiple types of interpreters on top of a configuration, and also give a small speed boost in not initialising as many Stack objects.
2021-05-27LibWasm: Make Frame a value type as wellAli Mohammad Pur
This means stack operations will no longer do extra allocations.
2021-05-27LibWasm: Don't put values and labels in OwnPtrsAli Mohammad Pur
Doing that was causing a lot of malloc/free traffic, but since there's no need to have a stable pointer to them, we can just store them by value. This makes execution significantly faster :^)
2021-05-27file: Output directory when path is a directoryArjan Zuidema
Before file would output 'text/html' when the path was a directory.
2021-05-27DHCPClient: Rename struct members for InterfaceDescriptorGunnar Beutner
Public members shouldn't have an "m_" prefix.
2021-05-27DHCPClient: Remove unused #includesGunnar Beutner
2021-05-27DHCPClient: Resend DHCP packets when we don't receive an answerGunnar Beutner
Previously we'd only only send one DHCP request for network interfaces which were up when DHCPClient started. If that packet was lost we'd never send another request for those interfaces. Also, if an interface were to appear after DHCPClient started (not that that is possible at the moment) we wouldn't send requests for that interface either.
2021-05-27Profiler: Don't try to create a DisassemblyModel for invalid indicesAndreas Kling
This fixes a null dereference when toggling the "top functions" mode while a top-level process node was selected.
2021-05-27LibGUI+TextEditor: Add the calculation of selected wordsry-sev
This moves the calculation of selected words that was originally in the TextEditor application to TextEditor in LibGUI. This allows all applications with text editors to get this number without having to calculating it themselves.
2021-05-273DFileViewer: Add view menuErik Biederstadt
The view menu contains: 1. A fullscreen option (also accessed by pressing F11). 2. Rotation axis controls (x, y, z, or any combination) 3. Rotation speed controls (No rotation, slow, normal, or fast)
2021-05-26Help: Tweak splitter spacing in main UI layoutAndreas Kling
This doesn't look perfect, but it's slightly better than unmodified.
2021-05-26LibGUI: Paint some knurling in the middle of GUI::SplitterAndreas Kling
This makes splitters stand out visually so you can actually spot them. Before this, you had to guess/know where they were, which was weird. The look of the knurling is the same as GUI::ResizeCorner, to build on the established visual language.
2021-05-26LibGUI: Have GUI::Splitter track all grabbable areasAndreas Kling
Instead of computing the grabbable areas on the fly in mouse event handlers, we now figure out which parts of the splitter are grabbable when something moves around, and then remember it. This makes the code a lot easier to follow.
2021-05-26Playground: Start out with a GUI::Frame on the right hand sideAndreas Kling
This looks a lot nicer than starting with a plain GUI::Widget.
2021-05-27LibGfx: remove constexpr, add noexcept on interpolate methodSamuel Kelemen
This removes `constexpr` from the interpolate method in Color.h and adds `noexcept`. The roundf call cannot be constexpr on clang. This is the only incompatibility preventing serenity from building under clang. I tested this on OSX Big Sur 11.3 and 11.3.1, and everything works with this change.
2021-05-26Hearts: Highlight cards when an invalid play is attemptedGunnar Beutner
This briefly inverts the selected card when the user attempts to make an invalid play.
2021-05-26LibGUI/AbstractView: Remove `on_selection`Jelle Raaijmakers
Since the introduction of multi-select, we have had both `on_selection` and `on_selection_change`, the latter of which was only invoked when a change in selection came in through the model. This removes `AbstractView::on_selection` and replaces it usage with the more explicit `on_selection_change` everywhere.
2021-05-26LibGL: Fix incorrect sign compare caused by GLsizei changesJesse Buhagiar
2021-05-263DFileViewer: Support textured modelsJesse Buhagiar
Models that contain UV co-ordinates are now supported, and will display with a texture wrapped around it, provided a `bmp` with the same name as the object is in the same directory as the 3D Model.
2021-05-26LibGL: Add texture sampling to SW RasterizerJesse Buhagiar
The software rasterizer now samples a texture passed to us from the GL context. This is currently a bit of a hack, as we should be scanning from a list of texture units and checking if they are enabled. For now, this at least gives some visual confirmation that texturing is working as it should
2021-05-26LibGL: Implement glTexCoord2fJesse Buhagiar
2021-05-26LibGL: Implement Texture State ManagementJesse Buhagiar
Some very primitive Texture State management. Data can now be uploaded to textures.
2021-05-26LibGL: Add Texture Name AllocationJesse Buhagiar
Texture names can now be allocated via `glGenTextures` and deallocated via `glDeleteTextures`.
2021-05-26LibGL: Change GLsizei from unsigned to signed integral typeJesse Buhagiar
There is some really wild stuff going on in the OpenGL spec for this.. The Khronos website states that GLsizei is a 32-bit non-negative value used for sizes, however, some functions such as `glGenTextures` state that the input `n` could be negative, which implies signage. Most other implementations of `gl.h` seem to `typedef` this to `int` so we should too.
2021-05-26LibJS+LibWeb: Make Uint8ClampedArray use TypedArrayAli Mohammad Pur
Instead of being its own separate unrelated class. This automatically makes typed array properties available to it, as well as making it available to the runtime.
2021-05-26LibWasm: Add execution hooks and a debugger mode to the wasm toolAli Mohammad Pur
This is useful for debugging *our* implementation of wasm :P
2021-05-26LibCore: Add a standard error stream getterAli Mohammad Pur
2021-05-26LibWasm: Drop previous frame when a structured end instruction is runAli Mohammad Pur
2021-05-26LibWasm: Turn memory read failures into trapsAli Mohammad Pur
2021-05-26LibWasm: Once more fix structured instruction label indicesAli Mohammad Pur
This finally works correctly. :tm:
2021-05-26LibWasm: Drop the correct number of framesAli Mohammad Pur
Prior to this commit, we would be dropping an extra frame.
2021-05-26LibWasm: Implement checked truncation instructionsAli Mohammad Pur
This implements the 8 i<n>.truncate.f<n>_<s> instructions.
2021-05-26LibWasm+LibWeb: Partially resolve memory exportsAli Mohammad Pur
This allows the JS side to access the wasm memory, assuming it's exported by the module. This can be used to draw stuff on the wasm side and display them from the js side, for example :^)
2021-05-26LibWasm: Correct memory init size when instantiatingAli Mohammad Pur
These limits are in units of page size, not bytes. Also fixes incorrect debug logs.
2021-05-26LibJS: Allow ArrayBuffer to not own its backing data buffer as wellAli Mohammad Pur
This is implemented as a ByteBuffer* in a variant, so its size should only be increased by an index.
2021-05-26LibWasm+LibWeb: Implement (a very basic version of) the JS link/importAli Mohammad Pur
This allows Wasm code to call javascript functions.
2021-05-26LibWeb: Implement a very basic WebAssembly JS APIAli Mohammad Pur
This impl is *extremely* simple, and is missing a lot of things, it's also not particularly spec-compliant in some places, but it's definitely a start :^)