summaryrefslogtreecommitdiff
path: root/Userland
AgeCommit message (Collapse)Author
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-24LibC: Make 'attributes' parameter for pthread_create constGunnar Beutner
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-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-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
2022-10-23LibJS: Make PluralRules use the new double parserdavidot
2022-10-23LibJS: Make Token use the new double parserdavidot
2022-10-23LibJS: Fix that non-double numbers from JSON were truncated to i32davidot
2022-10-23LibC: Make strtod use the new exact number parserdavidot
Because strtod need to set ERANGE and track the last character we have to check the resulting value. We also have to check for nan and inf in strtod itself as the new double parser doesn't accept that as floating points.
2022-10-23LibJS: Make a TypedArray test actually run on all different typesdavidot
2022-10-23LibJS: Add descriptive output to test-commons expect().toThrow()davidot
This (and still some other methods) just say Expectation error leaving the user completely in the dark whether the method threw at all. And since we have nice function printing now we can just toString the function since most are lambda's.
2022-10-22SystemServer: Fix race condition in Service::determine_account()Gunnar Beutner
In theory our peer process could die between the call to getsockopt() and Core::system::stat() and another process could end up with the same PID which would result in us incorrectly launching the service as another user (e.g. root).
2022-10-22Userland: Utilize MS_NOREGULAR mount flagLiav A
For SystemServer, we simply ensure that the /dev mount is now mounted with MS_NOREGULAR flag to ensure only non-regular files are created, thus, achieving what DevTmpFS provided in its implementation, but in a much more sane and clean way than how DevTmpFS did that. For other userland applications, we simply make them being aware of this flag so they can show an indication about this flag being used to the user.
2022-10-22SystemServer: Mount TmpFS on /dev instead of DevTmpFSLiav A
In the next commit, we will drop the DevTmpFS code for good, so we need to mount a TmpFS instance on /dev instead of DevTmpFS.
2022-10-22LibJS: Require NanosecondsToDays remainder less than dayLengthMoustafa Raafat
This is an normative change in the Temporal spec. See: https://github.com/tc39/proposal-temporal/commit/ac69b63
2022-10-22LibJS: Require that NanosecondsToDays doesn't flip signMoustafa Raafat
This is an normative change in the Temporal spec. See: https://github.com/tc39/proposal-temporal/commit/e13c52d
2022-10-22LibCrypto: Add SignedBigInteger::is_positive()Moustafa Raafat