Age | Commit message (Collapse) | Author |
|
|
|
|
|
|
|
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.
|
|
|
|
|
|
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.
|
|
This returns true if the EventTarget has one or more registered
listeners for a given even type.
|
|
This allows cells to prevent themselves from being garbage collected,
even when there are no references to them.
|
|
|
|
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.
|
|
This usually shows up in custom sections, containing plain bytes.
|
|
This is given in pages, we need to first convert to bytes before
comparing with bytes.
|
|
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.
|
|
|
|
|
|
ByteBuffer has an inline capacity of 32 bytes, so when we provide a
string smaller than that, it cannot fail.
|
|
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())),
};
```
|
|
|
|
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.
|
|
As I understand it, these have to be painted interleaved with positioned
descendants in the same z-index category, in tree order.
|
|
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.
|
|
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.
|
|
It doesn't mutate the layout tree in any way.
|
|
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. :^)
|
|
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. :^)
|
|
|
|
|
|
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.
|
|
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.
|
|
Since this is used by LibWeb when parsing CSS colors we should not use
strtod here.
|
|
This means it no longer is locale dependent and doesn't incorrectly
accept hex floats anymore.
|
|
|
|
|
|
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.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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.
|
|
|
|
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.
|
|
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).
|
|
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.
|
|
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.
|
|
This is an normative change in the Temporal spec.
See: https://github.com/tc39/proposal-temporal/commit/ac69b63
|
|
This is an normative change in the Temporal spec.
See: https://github.com/tc39/proposal-temporal/commit/e13c52d
|
|
|