summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2021-08-14LibWeb: Implement and use ListStyleStyleValueSam Atkins
Yes, the name is silly, but it's a StyleValue for list-style, so... yeah. :^) Since `list-style-type` and `list-style-image` can both have `none` as a value, and can appear in any order, we have to handle it separately, and then assign either or both of those to `none` depending on how many `none`s there are, and whether those sub-properties already have values. Added some extra test cases to lists.html to cover list-style-image and list-style-position parts of the list-style shorthand, and the `none` values.
2021-08-14LibWeb: Implement and use BackgroundStyleValueSam Atkins
This one represents one secton of a `background` property, since it can have multiple background values separated by commas. Eventually, we will represent that as a List of BackgroundStyleValues. Also modified some background-foo properties in StyleResolver so that the is_background_x() functions could be removed. I realized that our handling of var() in shorthand properties is wrong, so have been removing the is_builtin_or_dynamic() calls from the parsing code for shorthands. This broke our var() test page, so I have replaced the use of 'background' with 'background-color' there.
2021-08-14LibWeb: Implement and use FontStyleValueSam Atkins
After working with the code for a while, it makes more sense to put all the parsing in Parser, instead of some of it living in StyleResolver. That means our current ValueListStyleValue needs to be replaced with specific StyleValue types for the properties that are shorthands or otherwise combine several values together. Here we implement FontStyleProperty, which represents a `font` CSS property. Also adjusted the fonts.html test page so that font-weights are featured in test cases without things we do not yet support.
2021-08-14LibWeb: Use new StyleValueList for simple propertiesSam Atkins
Also, moved the repeated code for assigning 1-4 values to top/right/bottom/left properties, into an assign_edge_values() lambda, for convenience.
2021-08-14LibWeb: Implement new StyleValueListSam Atkins
StyleValueList is a list of StyleValues of the same type, for use in properties like `margin` which accept a variable number of arguments. I had originally hoped to simply swap the old ValueListStyleValue from being a list of ComponentValues to one of StyleValues, but I can see now that I will need to have both for a little while, so renamed the old is_value_list() to is_component_value_list() temporarily.
2021-08-14LibWeb: Add StyleValue.is_builtin() convenience functionSam Atkins
2021-08-14LibWeb: Make 'auto' be both a Length and Identifier in CSSSam Atkins
I had accidentally parsed it in `parse_builtin_or_dynamic_value()` instead of `parse_length()` before, which was confusing, so now it's parsed along with other Lengths. Whether it should be a Length is up for debate, and has been tripping me up a few times, but a lot of code expects it to be one. For now, an 'auto' Length value (or any other value which overloads `is_auto()`) also claims to be a `ValueID::Auto` identifier.
2021-08-14LibWeb: Make '0' always be both a number and a length in CSSSam Atkins
A '0' token can be interpreted both as a Number, and as a Length. This is problematic as in our CSS parser, we often call parse_css_value() first, to figure out what something is, and then assign it. So we do not know in advance whether we want a Length or not. Previously, it always got parsed as a Length, and then every place that expected a NumericStyleValue had to also check for a Length(0), which is easy to forget to do. In particular, this was causing issues with the `flex` property parsing. To solve this, we now always parse 0 as a NumericStyleValue, and NSVs of 0 pretend to be a Length(0px) when asked. In two places, we were casting to a LengthStyleValue* based on is_length(), which no longer works, so those have been adjusted to use `StyleValue::to_length()` instead. They also now check for `is_numeric()` first, to avoid the extra conversion to a Length and back. Possibly this opens up new issues elsewhere. In my testing it seems fine, but until we can get CSS test suites running, it's hard to know for certain.
2021-08-14Tests: Add regression tests for the LibCpp preprocessorItamar
Similarly to the LibCpp parser regression tests, these tests run the preprocessor on the .cpp test files under Userland/LibCpp/Tests/preprocessor, and compare the output with existing .txt ground truth files.
2021-08-14LibCpp: Move parser tests to Userland/Libraries/LibCpp/Tests/parserItamar
2021-08-14Utilities: Add 'file' and 'definitions' arguments to cpp-preprocessorItamar
The 'file' argument allows specifying a file path. The 'definitions' flag controls whether preprocessor definitions are printed.
2021-08-14LibCpp: Evaluate function-like macro callsItamar
2021-08-14LibCpp: Understand preprocessor macro definition and invocationItamar
The preprocessor now understands when a function-like macro is defined, and can also parse calls to such macros. The actual evaluation of function-like macros will be done in a separate commit.
2021-08-14LibCpp: Add lexer option to ignore whitespace tokensItamar
2021-08-14Utilities: Rename PreprocessorTest=>cpp-preprocessorItamar
2021-08-14Ports: Fix building the wget portGunnar Beutner
2021-08-14Ports: Fix building the nano portGunnar Beutner
2021-08-14Ports: Make sure to remove the .la file after building libxml2Gunnar Beutner
Otherwise libtool gets confused and tries to link against files that don't exist.
2021-08-14Ports: Add missing dependency for libxml2Gunnar Beutner
When xz was previously built we'd end up with a shared library for libxml2 that depends on xz features but isn't linked against liblzma.
2021-08-14Ports: Make sure to remove the .la file after building libiconvGunnar Beutner
Otherwise libtool gets confused and tries to link against files that don't exist.
2021-08-14Kernel/ProcFS: Get unveil stats instead of FDs stats for unveil dataLuke
It was accidentally using `procfs_get_fds_stats` instead of `procfs_get_unveil_stats`.
2021-08-14Profiler: Set the initial size of the timeline container to a snug fitAndreas Kling
2021-08-14Profiler: Add a "Signposts" tab next to the "Samples" tabAndreas Kling
This tab provides a filtered listing of all the signpost events in the currently selected time range.
2021-08-14Profiler: Don't lose sight of timeline tracks when zooming outAndreas Kling
Update the track sizes before repositioning them. This ensures that they always remain visible in the timeline container.
2021-08-14Profiler: Don't include signposts in the samples listAndreas Kling
2021-08-14Profiler: Store signposts in the main event streamAndreas Kling
Instead of keeping a separate Vector<Event> for signposts, let them live in the main event stream. For fast iteration, we instead keep a cache of the signpost event indices.
2021-08-14Profiler: Use AK::Variant for type-specific data in Profile::EventAndreas Kling
Each event has a different set of data depending on the event type.
2021-08-13LibJS/Tests: Remove outdated FIXME commentLinus Groh
2021-08-13LibJS/Tests: Enable Proxy handler apply() thisArg test that now passesLinus Groh
2021-08-13LibJS/Tests: Test iteration order of Map.prototype.entries()Linus Groh
2021-08-13LibJS/Tests: Test iteration order of Map.prototype.values()Linus Groh
2021-08-13LibJS/Tests: Test iteration order of Map.prototype.keys()Linus Groh
2021-08-13Meta: Tell user which Toolchain ARCH they need to buildBrian Gianforcaro
There was some understandable confusion about this error now that we have multiple toolchains.
2021-08-13Kernel: Allow `kfree_aligned` to be called on null pointersDaniel Bertalan
The C++ standard specifies that `free` and `operator delete` should be callable with nullptr. The non-aligned `kfree` already handles this, but because of the pointer arithmetic to obtain the allocation start pointer, the aligned version would produce undefined behavior.
2021-08-13Kernel: Allow aligned `operator new` to return nullptrDaniel Bertalan
In e7fb70b05, regular kmalloc was changed to return nullptr on allocation failure instead of crashing. The `kmalloc_aligned_cxx` wrapper used by the aligned operator new should do the same.
2021-08-13Ports: Build a shared library for curlGunnar Beutner
This fixes building the git port.
2021-08-13Ports: Make sure re-installing the gcc port doesn't failGunnar Beutner
Re-installing the gcc port would previously fail because we failed to overwrite the symlink.
2021-08-13Ports: Make sure HOST_* variables are set correctly for nested buildsGunnar Beutner
When building a port as a dependency for another port the HOST_* variables were previously initialized with values referring to the SerenityOS toolchain. Fixes #9168.
2021-08-13LibC: Add struct ifconf in net/if.hGunnar Beutner
This fixes building the scummvm port.
2021-08-13SystemMonitor: Don't fail if we don't have ports installedDaniel Bertalan
In #9373, /usr/local/bin was added to the unveiled directories to make symbolization work on ports. This directory only exists if at least one port is installed, so unveil would fail with ENOENT if we had none.
2021-08-13Kernel: Convert lock debug APIs to east constBrian Gianforcaro
2021-08-13Kernel: Add lock debugging to ProtectedValue / RefCountedContendedBrian Gianforcaro
Enable the LOCK_DEBUG functionality for these new APIs, as it looks like we want to move the whole system to use this in the not so distant future. :^)
2021-08-13Kernel: Reduce LOCK_DEBUG ifdefs by utilizing Kernel::LockLocationBrian Gianforcaro
The LOCK_DEBUG conditional code is pretty ugly for a feature that we only use rarely. We can remove a significant amount of this code by utilizing a zero sized fake type when not building in LOCK_DEBUG mode. This lets us keep the same API, but just let the compiler optimize it away when don't actually care about the location the caller came from.
2021-08-13Kernel: Introduce LockLocation abstraction from SourceLocationBrian Gianforcaro
Introduce a zero sized type to represent a SourceLocation, when we don't want to compile with SourceLocation support.
2021-08-13Kernel/ProcFS: Propagate errors correctly when they occurLiav A
Calling error() on KResult is a mistake I made in 7ba991dc371, so instead of doing that, which triggers an assertion if an error occured, in Inode::read_entire method with VERIFY(nread <= sizeof(buffer)), we really should just return the KResult and not to call error() on it.
2021-08-13Meta: Add new-project.sh :^)sin-ack
This script will instantiate a HackStudio template into a project on the host. It currently supports all templates used by HackStudio. To avoid having to maintain compatibility between other shells and the Serenity shell in the postcreate scripts, we build the Serenity shell with Lagom and use that to run the script.
2021-08-13LibCore+LibHTTP: Check the status of the socket after EINPROGRESSbrapru
Previously the system would assume the socket was connected after the file descriptor became writeable. Just because the fd is signaled as ready for output does not necessarily indicate the socket is connected. Instead, we should check the status of the socket with SO_ERROR and handle successes/errors accordingly.
2021-08-13Kernel: Clear SO_ERROR on successful socket connectionbrapru
When TCP sockets successfully establish a connection, any SO_ERROR should be cleared back to success. For example, SO_ERROR gets set to EINPROGRESS on asynchronous connect calls and should be cleared when the socket moves to the Established state.
2021-08-13Utilities: Add program argument for netstat to display connection pidbrapru
Adds netstat command line argument to display slash-separated pair of the id and name of the process that owns the socket. User must have superuser privileges to see information on non-owned sockets.
2021-08-13Kernel/ProcFS: Expose TCP/UDP Socket pidsbrapru
This allows for commands like netstat to reference /proc/net and identify a connection's owning process. Process information is limited to superusers and user owned processes.