summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2021-03-08AK: Add AK_ENUM_BITWISE_OPERATORS(..) to enable type-safe enum bitwise ↵Brian Gianforcaro
operations This change introduces `AK_ENUM_BITWISE_OPERATORS(..)` which when enabled for an enum, will automatically declare all the necessary bitwise operators for that enum. This allows bit masks enums to be used as first class, type safe, citizens.
2021-03-08LibWeb: Implement StyleSheet.typeAndreas Kling
This just returns "text/css" on CSSStyleSheet, nothing exciting.
2021-03-08LibWeb: Map all the IDL string types to AK::String for nowAndreas Kling
DOMString, CSSOMString and USVString can all map to AK::String for now, until we figure something better out.
2021-03-08LibWeb: Give CSSLoader a backpointer to its owner elementAndreas Kling
This allows CSSLoader to set up the style sheet owner node internally, and avoids an awkward weak link between CSSLoader and Document.
2021-03-08LibWeb: Implement StyleSheet.ownerNode :^)Andreas Kling
2021-03-08AK: Take advantage of constexpr in Time and add time conversion methodsTom
By making the Time constructor constexpr we can optimize creating a Time instance from hardcoded values. Also add more functions to convert between Time and various time units.
2021-03-08AK: Initialize the AK::Time membersTom
Since we tell the compiler to provide a default constructor we need to initialize the member variables.
2021-03-08Ports: Add SDL2_mixerAndreas Kling
2021-03-08LibWeb: Start exposing CSS style sheets to JavaScript :^)Andreas Kling
This patch adds bindings for the following objects: - StyleSheet - StyleSheetList - CSSStyleSheet You can get to a document's style sheets via Document.styleSheets and iterate through them using StyleSheetList's item() and length(). That's it in terms of functionality at this point, but still neat. :^)
2021-03-08LibWeb: Allow specifying a custom C++ implementation for IDL attributesAndreas Kling
The "ImplementedAs" extended attribute can now be specified on IDL attributes to provide the name of a custom C++ implementation instead of assuming it will have the same name as the attribute.
2021-03-08LibWeb: Make generated wrapper code cast IDL longs to i32 for nowAndreas Kling
This makes it possible to use "long" and "unsigned long" in IDL.
2021-03-08AK: JsonObject::value_or() fallback value should be a const referenceAndreas Kling
2021-03-08Ports/git: remove no longer needed patchesJorropo
2021-03-08Base: Add sysctl man pageBrendan Coles
2021-03-08Shell: Don't blindly dereference the result of Parser::parse()AnotherTest
It _may_ return nullptr if there's nothing to return. Fixes #5691.
2021-03-08Meta: check-newlines-at-eof.py now checks .json files and files in Base/Emanuele Torre
This makes it also check man pages and keymap files. :^)
2021-03-08Base: Fix newlines at end of file in some files.Emanuele Torre
2021-03-08Everywhere: Remove unnecessary whitespace at the end of some lines.Emanuele Torre
2021-03-08Base: Replace HTMl => HTMLEmanuele Torre
2021-03-08Meta: serenityos.org: Fix javascript error in the 2nd anniversary page.Emanuele Torre
The error as seen from chromium's devtools: Uncaught ReferenceError: I is not defined at (index):455
2021-03-08Ports: Add Genemuaabajyan
This is a Basic Genesis / MegaDrive Emulator, that only requires SDL2 to run it. Usage: genemu /path/to/game.bin
2021-03-08Kernel: Manually reset the XCR0 registerLuke
According to the Intel manual: "After reset, all bits (except bit 0) in XCR0 are cleared to zero; XCR0[0] is set to 1." Sadly we can't trust this, for example VirtualBox starts with bits 0-4 set, so let's do it ourselves. Fixes #5653
2021-03-08LibC: Remove stdbool.h as it is provided by the compilerMițca Dumitru
2021-03-08LibC: Define static_assert in assert.h when it's being used in CMițca Dumitru
2021-03-08LibCrypto: Fail with overflow when bitfield has too many unused bitsAnotherTest
There cannot be more unused bits than the entirety of the input. Found by OSS-Fuzz: https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=31706#c1
2021-03-07LibCompress: Rename libcompression.so to libcompress.soJelle Raaijmakers
2021-03-07LibWeb: Fix clang-format issue in CSS/StyleResolver.cppAndreas Kling
2021-03-07Ports: Add SDL2_ttfAndreas Kling
2021-03-07LibWeb: Split CSS::StyleSheet into StyleSheet and CSSStyleSheetAndreas Kling
This is a little convoluted but matches the CSSOM specification.
2021-03-07LibWeb: Rename StyleRule => CSSStyleRuleAndreas Kling
This matches the CSSOM specification.
2021-03-07open: Fix opening "." (again)Linus Groh
We can't always rely on the initial URL's path(), so use either the user-specified argument or the URL path for determining the realpath, depending on whether we got a file:// URL argument. Fixes #4950.
2021-03-07Kernel: Fix pointer over/underflow in create_threadBen Wiederhake
The expression (u8*)params.m_stack_location + stack_size … causes UBSan to spit out the warning KUBSAN: addition of unsigned offset to 0x00000002 overflowed to 0xb0000003 … even though there is no actual overflow happening here. This can be reproduced by running: $ syscall create_thread 0 [ 0 0 0 0 0xb0000001 2 ] Technically, this is a true-positive: The C++-reference is incredibly strict about pointer-arithmetic: > A pointer to non-array object is treated as a pointer to the first element > of an array with size 1. […] [A]ttempts to generate a pointer that isn't > pointing at an element of the same array or one past the end invoke > undefined behavior. https://en.cppreference.com/w/cpp/language/operator_arithmetic Frankly, this feels silly. So let's just use FlatPtr instead. Found by fuzz-syscalls. Undocumented bug. Note that FlatPtr is an unsigned type, so user_esp.value() - 4 is defined even if we end up with a user_esp of 0 (this can happen for example when params.m_stack_size = 0 and params.m_stack_location = 0). The result would be a Kernelspace-pointer, which would then be immediately flagged by 'MM.validate_user_stack' as invalid, as intended.
2021-03-07AK+Tests: Also test Checked<> with unsignedBen Wiederhake
As expected, Checked<unsigned> works as intended. However, we didn't have a test for that, so I added one. See also 90c070cb1d90d77ba461017e609b9f8ee6326de1.
2021-03-07Tests: Make syscall-fuzzer less brittleBen Wiederhake
2021-03-07Kernel: Expose sysctl 'ubsan_is_deadly' to panic the Kernel on UBBen Wiederhake
This makes it easier to find UB, for example when fuzzing the Kernel. This can be enabled by default, thanks to @boricj's work in 32e1354b9b0050dd2920c8506cef2841789e14df.
2021-03-07FileManager: Disable view change actions when directory is unreadableLinus Groh
Closes #3556.
2021-03-07Serendipity: Couple more tips and some clean-upthankyouverycool
2021-03-07Serendipity: Make main window a normal windowAndreas Kling
..instead of a tool window. Tool windows are meant as accessories to an application's main/primary windows, not to be primary windows themselves. Fixes #5667.
2021-03-07Serendipity: Simplify GML and fix button alignmentAndreas Kling
2021-03-07Kernel: Fix unaligned read inside map_ebda()Jean-Baptiste Boric
2021-03-07Serendipity: Make main window resizable (#5675)supercyp
If it is not resizable, the "What's new" page may be hard to read.
2021-03-07LibWeb: Make tiled backgrounds scroll with contentAndreas Kling
Previously the page background was always draw relative to the viewport instead of following with the content. This should eventually become an opt-in mode (via CSS "background-attachment") but for now let's have the default behavior be that backgrounds scroll with content. Also take this opportunity to move the background painting code from the two web views to a shared location in InitialContainingBlockBox.
2021-03-07LaunchServer: Use new FileManager flags instead of two argumentsspeles
2021-03-07FileManager: Use ArgsParser, handle more optionsspeles
This adds 2 more flags, that help with the "select on start" invocation. -s - makes us open the parent directory of the entry, and select it. -r - makes FileManager to skip real path resolution for cases when we want to select the symlink in parent directory. Also, if the file path is passed as argument, not it will open parent with the file selected.
2021-03-07LibCore: Add String variant for ArgsParser::add_positional_argumentspeles
This is basically the same version as const char *, but it's a nice helper that allows us to handle strings without casting.
2021-03-07LibGUI: Scroll selection into view when the IconView is first laid outspeles
If we set selection before the IconView is laid out, it has no size. So it can't correctly calculate where to scroll. Forcing scroll after the first resize fixes that.
2021-03-07Applications: Open folder with pre-selected file where appropriate :^)speles
2021-03-07AK: Add optional fragment parameter to create_with_file_protocol()speles
Now that we use fragment for specifying starting selection in FileManager we would benefit from providing it as argument instead of setting it each time separately.
2021-03-07Meta: Use the new Shell features to improve run-tests-and-shutdownAnotherTest
Fixes two TODOs in that file :^)
2021-03-07Shell: Add support for enumerating lists in for loopsAnotherTest
With some odd syntax to boot: ```sh $ for index i x in $whatever {} ```