summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2022-10-24LibWeb: Add virtual destructor to EnvironmentLinus Groh
This makes it polymorphic and allows checking the subclass of an Environment with is<T>(). We also need to change the inheritance order so JS::Cell comes first for this to work. Unfortunately, I have no idea why that is. Co-Authored-By: Andreas Kling <kling@serenityos.org>
2022-10-24LibWeb: Add non-const variants of Request::{current_,}url()Linus Groh
2022-10-24LibWeb: Add referrer policy to PolicyContainerLinus Groh
2022-10-24LibWeb: Add policy container to {Window,Worker}EnvironmentSettingsObjectLinus Groh
2022-10-24LibWeb: Layout inner floats/abspos boxes after laying out the top floatLuke Wilde
Calling parent_context_did_dimension_child_root_box immediately after laying out the inside of the floating box is not correct, as we haven't worked out the dimensions of the floating box yet. In particular, this caused the icons in the top bar of Cookie Clicker to not hug the top of the viewport. This is because the icons are absolutely positioned elements inside a floating element which has padding applied to it. Since we laid out the abspos element before the floating element, it got padding values of 0 from the parent, the default value, meaning it didn't take away the padding of it's floating parent. This follows how abspos boxes layout their inside boxes as well.
2022-10-24LibJS: Only use 1 bit for Cell boolean flagAndreas Kling
2022-10-24LibWeb: Implement XMLHttpRequest.requestType setter according to specAndreas Kling
2022-10-24LibWeb: Protect XMLHttpRequest from GC in special circumstancesAndreas Kling
The XHR gives us a set of conditions where XHR objects must survive garbage collection, even when there are no pointers to them on the heap. This patch implements those conditions using the new cell self-protection mechanism in LibJS.
2022-10-24LibWeb: Add EventTarget::has_event_listener(FlyString type)Andreas Kling
This returns true if the EventTarget has one or more registered listeners for a given even type.
2022-10-24LibJS: Add Cell::must_survive_garbage_collection() mechanismAndreas Kling
This allows cells to prevent themselves from being garbage collected, even when there are no references to them.
2022-10-24LibWeb: Establish stacking context when backdrop-filter is not 'none'Luke Wilde
2022-10-24wasm: Map the entire input wasm file instead of using Core::FileAli Mohammad Pur
This is a 30x (!) speedup in parsing time as we don't lose time to Core::File's silly memmove()-into-provided-buffer stuff anymore.
2022-10-24LibWasm: Allow vectors of up to 500M entriesAli Mohammad Pur
This usually shows up in custom sections, containing plain bytes.
2022-10-24LibWasm: Calculate the max data segment size correctlyAli Mohammad Pur
This is given in pages, we need to first convert to bytes before comparing with bytes.
2022-10-24LibCore: Link against LibSystemTim Schumacher
Depending on what OS LibCore is being built for (either SerenityOS or not-SerenityOS), the library does not just wrap functions from LibC, but it also implements syscalls itself. Therefore, it needs to link against LibSystem, as that is the only library that is allowed to do syscalls. When cross-compiling the OS this is currently not an issue because LibC links against LibSystem, and CMake passes that dependency through transitively by accident. However, on Lagom, LibC is just a dummy INTERFACE library, so the LibSystem dependency is never pulled in, resulting in undefined symbols whenever we build LibCore on SerenityOS as a part of Lagom.
2022-10-24Meta: Default to the SDL QEMU frontend on SerenityOSTim Schumacher
We don't yet have anything else than SDL, and certainly not GTK.
2022-10-24Meta: Also set CC/CXX when selecting the host toolchainTim Schumacher
This ensures that the toolchain building scripts will use the host toolchain that has been found manually, and that they won't fall back to `cc` (which in the worst case may not even be installed).
2022-10-24Lagom: Link the system's LibSystem on SerenityOSTim Schumacher
2022-10-24Ports: Add port for the Boost C++ librariesGunnar Beutner
This currently requires GCC.
2022-10-24Kernel: Add definitions for SO_SNDLOWAT and SO_RCVLOWATGunnar Beutner
2022-10-24Kernel: Add definition for MSB_EORGunnar Beutner
None of the protocols we support at the moment use this, but it makes boost happy.
2022-10-24LibC: Make 'attributes' parameter for pthread_create constGunnar Beutner
2022-10-24Kernel: Add support for MSG_NOSIGNAL and properly send SIGPIPEGunnar Beutner
Previously we didn't send the SIGPIPE signal to processes when sendto()/sendmsg()/etc. returned EPIPE. And now we do. This also adds support for MSG_NOSIGNAL to suppress the signal.
2022-10-24Toolchain: Update LLVM to 15.0.3Tim Schumacher
2022-10-24LibWeb: Move internal response in FilteredResponse create() functionsLinus Groh
2022-10-24LibWeb: Use MUST() for infallible ByteBuffer::copy() invocationsLinus Groh
ByteBuffer has an inline capacity of 32 bytes, so when we provide a string smaller than that, it cannot fail.
2022-10-24LibWeb: Add Fetch::Infrastructure::Header::from_string_pair() helperLinus Groh
This allows us to use this: ```cpp auto header = TRY_OR_RETURN_OOM(realm, Infrastructure::Header::from_string_pair(name, value)); ``` Instead of the somewhat unwieldly: ```cpp auto header = Infrastructure::Header { .name = TRY_OR_RETURN_OOM(realm, ByteBuffer::copy(name.bytes())), .value = TRY_OR_RETURN_OOM(realm, ByteBuffer::copy(value.bytes())), }; ```
2022-10-24LibWeb: Fix typo in Fetch::Infrastructure::Request::add_range_header()Linus Groh
2022-10-24Ports: Add Pacman portGunnar Beutner
2022-10-24Ports: Fix building TiMidity++Gunnar Beutner
The build would previously fail if Xorg headers are installed on the host system.
2022-10-23LibWeb: Skip positioned children in paint_descendants()Andreas Kling
Positioned descendants are now handled entirely by paint_internal() so we can just skip over positioned children in paint_descendants(). This avoids drawing the same boxes multiple times.
2022-10-23LibWeb: Paint non-positioned stacking contexts with z-index 0 or autoAndreas Kling
As I understand it, these have to be painted interleaved with positioned descendants in the same z-index category, in tree order.
2022-10-23LibWeb: Paint positioned descendants with `z-index: auto`Andreas Kling
This "worked" before because all positioned elements would create their own stacking context. When we stopped doing this, there was nobody to actually paint positioned descendants with `z-index: auto`. This patch splits up steps 8 and 9 of the paint order algorithm and implements step 8 as a paint tree traversal. There's more to step 8 than I've implemented here, so I've left a FIXME for our future selves.
2022-10-23LibWeb: Update StackingContext::paint_descendants() for new ruleAndreas Kling
Since positioned elements no longer automatically create stacking contexts, we can't rely on this assumption when painting descendants of a stacking context. In this commit, we fix an issue that manifested as a failure to Gfx::Painter::restore() in the "Overlay" paint phase. What happened was that a CSS clip was being applied in the "Background" paint phase, and then unapplied in the "Overlay" phase. Due to bogus checks in paint_descendants(), the "Background" phase never ran for positioned elements, but the "Overlay" phase did. The check for positioned elements was bogus in the first place and had never actually worked before, since we would always skip over positioned descendants due to them having stacking contexts.
2022-10-23LibWeb: StackingContext::paint_descendants() can take const layout nodeAndreas Kling
It doesn't mutate the layout tree in any way.
2022-10-23LibWeb: Don't create stacking contexts for all positioned elementsAndreas Kling
We were mistakenly creating stacking contexts for all elements with non-static CSS position. For `absolute` and `relative`, we should only create stacking contexts if the `z-index` value is something other than `auto`. This makes it possible to click the cookie on Cookie Clicker. :^)
2022-10-23LibWeb: Try harder to find a suitable DOM node for mouse event dispatchAndreas Kling
Since our hit testing mechanism gives you the Paintable under the mouse cursor, we can't just give up if that paintable doesn't have a corresponding DOM node. That meant that generated content like pseudo- elements didn't generate mouse events at all. Fix this by making a dom_node_for_event_dispatch() helper function that finds a suitable DOM node when given a paintable. This first cut is very naive, and there's probably more we should do, but we have to start somewhere. :^)
2022-10-23Ports: Prefix output with the build step and port nameGunnar Beutner
We already have something similar for the toolchain builds. This makes it easier to identify which build step is currently running.
2022-10-23LibWeb: Add button property in MouseEventAliaksandr Kalenik
2022-10-23LibWeb: Dispatch "wheel" eventAliaksandr Kalenik
2022-10-23WindowServer: Reset mouse acceleration if out of rangedavidot
Before if the mouse acceleration was out of range the WindowServer would crash, this could happen if the config had an out of range or non double vaule.
2022-10-23LibWeb: Make SVG::AttributeParser use the new double parserdavidot
Because the result will be a float anyway get rid of the int parsing. Also the grammar of SVG numbers matches the double parser grammar except it can't have a sign but that should have been checked by the caller.
2022-10-23LibGfx: Make parse_rgba_color use the new double parserdavidot
Since this is used by LibWeb when parsing CSS colors we should not use strtod here.
2022-10-23LibJS: Make parseFloat use the new double parserdavidot
This means it no longer is locale dependent and doesn't incorrectly accept hex floats anymore.
2022-10-23LibWeb: Make HTMLProgressElement use the new double parserdavidot
2022-10-23LibWeb: Make HTMLInputElement of type number use the new double parserdavidot
2022-10-23LibWeb: Make the CSS parser use the new double parserdavidot
This could potentially be sped up by tracking the up to three different ranges of characters known to be digits. This would save the double parser from checking whether these are digits and because it has the size it can use the fast parsing method.
2022-10-23LibJS: Make string_to_double use the new double parserdavidot
2022-10-23LibJS: Make canonical_numeric_index_string use the new double parserdavidot
2022-10-23LibJS: Make parse_temporal_duration use the new double parserdavidot