Commit Graph

41193 Commits

Author SHA1 Message Date
Andreas Kling
e36750d591 LibWeb: Remove unused Layout::Node::did_insert_into_layout_tree() 2022-09-20 10:32:12 +02:00
Andreas Kling
77628289c6 LibWeb: Consolidate code for resolving vertical box model metrics in BFC
We already had a helper for this, but compute_height() wasn't using it.
Tweak it so that compute_height() can use it, and remove the duplicated
code that's now redundant.
2022-09-20 10:32:12 +02:00
ne0ndrag0n
b16704d4db GamesSettings: Always ensure last card back selected is saved 2022-09-20 07:59:13 +01:00
Brian Gianforcaro
42865b8975 LibCpp: Add .clang-format to disable clang-format for the LibCpp Tests
We don't format these files, as they might have been intentionally
formatted differently from the normal serenity style for testing.

So ignore them from our global style, so clang-format
doesn't pick them up by accident.
2022-09-19 15:52:37 -07:00
Ben Wiederhake
230226028a Meta: Use time instead of /usr/bin/time in lint-ci.sh
I totally overlooked that /usr/bin/time is not universal, which broke
some systems. This commit instead calls 'time', allowing either a shell
built-in to kick in, or a (potentially different) binary be found
anywhere in the PATH.
2022-09-19 22:18:25 +04:30
Sam Atkins
ef507720f0 Applets/ResourceGraph: Port to Core::Stream 2022-09-18 18:57:28 -07:00
Sam Atkins
474a38bd3c Applets/Network: Stop marking methods virtual unnecessarily
None of these are overridden, and NetworkWidget is a final class.
2022-09-18 18:57:28 -07:00
Sam Atkins
eacf017112 Applets/Network: Remove include_loopback parameter
This is always false, so we can do without it and simplify things a
little.
2022-09-18 18:57:28 -07:00
Sam Atkins
c8bfb07b41 Applets/Network: Port to Core::Stream 2022-09-18 18:57:28 -07:00
Ben Wiederhake
761f079a22 Meta: Fix example invocations of the serenity.sh run command 2022-09-18 18:47:34 -07:00
Ben Wiederhake
55d78ca40d Kernel: Replace KString::must_create, fix init_args 2022-09-18 18:47:34 -07:00
Ben Wiederhake
f8a42ef0b3 Meta: Only check changed files in check-style.py during pre-commit
This speeds up the script from about 90ms down to about 10ms, for
reasonably common changesets.

80ms may not feel like much, but it adds up quickly, especially since
we run a dozen scripts during pre-commit.
2022-09-18 18:45:25 -07:00
Ben Wiederhake
532786848b Meta: Only check changed files in lint-gml-format.sh
This speeds up the script from about 140ms down to <10ms, even for
changesets that touch a handful of different GML files.

130ms may not feel like much, but it adds up quickly, especially since
we run a dozen scripts during pre-commit.
2022-09-18 18:45:25 -07:00
Ben Wiederhake
de581ca5fd Meta: Only check changed files in check-newlines-at-eof
This speeds up the script from about 120ms down to about 20ms for
reasonably common changesets.

100ms may not feel like much, but it adds up quickly, especially since
we run a dozen scripts during pre-commit.
2022-09-18 18:45:25 -07:00
Ben Wiederhake
4caaa78baf Meta: Only check changed files in check-debug-flags during pre-commit
This speeds up the script from about 170ms down to about 80ms for
changes in Debug.h.in or similarly "DEBUG"-rich files, down to <10ms for
more common changesets.

160ms may not feel like much, but it adds up quickly, especially since
we run a dozen scripts during pre-commit.
2022-09-18 18:45:25 -07:00
Ben Wiederhake
88c8ad840d Meta: Rewrite pre-commit script check-emoji in python
This reduces the scripts execution time from 0.57 seconds to 0.01
seconds, while also making the check a bit tighter, leaving fewer
possible problems.
2022-09-18 18:45:25 -07:00
Ben Wiederhake
c4895b7d95 Meta: Always show the timing of commands in lint-ci.sh
This should make it easier to identify slow-running scripts.
While we're at it, unify the output a little bit.
2022-09-18 18:45:25 -07:00
Ben Wiederhake
078e4bde32 LibC: Fix misplaced #include in limits.h
posix1_lim.h only defines macros that start with _POSIX_*, and don't
mention anything that might be defined in limits.h. Likewise, limits.h
uses none of the _POSIX_* macros. Thus, it is okay to change the order
of imports.
2022-09-18 18:30:05 -07:00
Ben Wiederhake
f11a69aafb Kernel: Fix misplaced #include in ATA/Definitions.h 2022-09-18 18:30:05 -07:00
Ben Wiederhake
c214d31c5e Everywhere: Fix order of includes and #pragma once 2022-09-18 18:30:05 -07:00
Ben Wiederhake
30cca01e24 HeaderCheck: Also check AK for broken headers 2022-09-18 13:27:24 -04:00
Ben Wiederhake
9c75d9e2cb AK: Move heavyweight fuzzy matching to own compilation unit 2022-09-18 13:27:24 -04:00
Ben Wiederhake
8a1e406615 HeaderCheck: Disable warning due to LibSoftGPU
Once LibSoftGPU drops this disable, HeaderCheck should remove it, too.
Until then, it is necessary to build at all.
2022-09-18 13:27:24 -04:00
Ben Wiederhake
2f7c9915b5 HeaderCheck: Remove outdated debug code
This should never have been committed.
2022-09-18 13:27:24 -04:00
Ben Wiederhake
929e46f360 WindowServer: Add missing includes
This remained undetected for a long time as HeaderCheck is disabled by
default. This commit makes the following file compile again:

    // file: compile_me.cpp
    #include <WindowServer/SystemEffects.h>
    // That's it, this was enough to cause a compilation error.
2022-09-18 13:27:24 -04:00
Ben Wiederhake
87eac0e424 Kernel: Add missing include in API
This remained undetected for a long time as HeaderCheck is disabled by
default. This commit makes the following file compile again:

    // file: compile_me.cpp
    #include <Kernel/API/POSIX/ucontext.h>
    // That's it, this was enough to cause a compilation error.
2022-09-18 13:27:24 -04:00
Ben Wiederhake
a99cd09891 Libraries: Add missing includes, add namespace qualifiers
This remained undetected for a long time as HeaderCheck is disabled by
default. This commit makes the following file compile again:

    // file: compile_me.cpp
    #include <LibDNS/Question.h>
    // That's it, this was enough to cause a compilation error.

Likewise for most other files touched by this commit.
2022-09-18 13:27:24 -04:00
Ben Wiederhake
48d8aff436 LibJS: Add missing includes
This remained undetected for a long time as HeaderCheck is disabled by
default. This commit makes the following file compile again:

    // file: compile_me.cpp
    #include <LibJS/Runtime/StringPrototype.h>
    // That's it, this was enough to cause a compilation error.

Likewise for most other files touched by this commit.
2022-09-18 13:27:24 -04:00
Ben Wiederhake
d073a31c21 LibWeb: Add missing includes
This remained undetected for a long time as HeaderCheck is disabled by
default. This commit makes the following file compile again:

    // file: compile_me.cpp
    #include <LibWeb/HTML/CrossOrigin/CrossOriginOpenerPolicy.h>
    // That's it, this was enough to cause a compilation error.

Likewise for most other files touched by this commit.
2022-09-18 13:27:24 -04:00
sin-ack
e9d5d2f74b LibWeb: Remove the flex item size cache
This was overly permissive as the FIXME stated and was causing layout
issues.
2022-09-18 18:55:06 +02:00
Andreas Kling
97b5230413 LibWeb: Subtract border & padding when using flex line size as item size
The flex line cross size includes the margin boxes of items, so when
we're taking the flex line's cross size to use as an item cross size,
we have to subtract the margin, border padding from both sides.

Previous we only subtracted the cross margins, which led to oversized
items in some cases.
2022-09-18 18:34:42 +02:00
Andreas Kling
7bf3b40867 LibWeb: Remove bogus main space restriction in wrapping flex layouts 2022-09-18 18:34:42 +02:00
Timothy Flynn
887dac0929 LibJS: Handle NumberFormat's [[UseGrouping]] option for "true" / "false"
This is a normative change to the Intl NumberFormat V3 spec. See:
https://github.com/tc39/proposal-intl-numberformat-v3/commit/4751da5
2022-09-18 09:45:40 -04:00
Andreas Kling
9743849ddb LibWeb: Allow passing null to a nullable IDL union type
This fixes an issue on Twitter where they were instantiating an
IntersectionObserver with a null root. The root IDL type is
`(Element or Document)?` so null needs to be allowed.
2022-09-18 12:53:06 +02:00
Andreas Kling
0ca1b4b123 LibWeb: Don't replace existing Content-Type header in outgoing XHRs
This fixes an issue where Twitter was HTTP 400'ing some of our XHRs.
2022-09-18 12:53:06 +02:00
Andreas Kling
575e3bf37d LibWeb: Check document fully active status in "element cannot navigate"
This resolves a FIXME and brings us closer to spec.
2022-09-18 12:53:06 +02:00
Tim Schumacher
46b8a4cda3 Ports: Only regenerate patches if there are actual changed commits
We were previously comparing the hash against the hash after the initial
import, which caused us to regenerate patches every time as long as we
did have patches (even if they haven't changed at all) and the script
entirely missing that it should remove patches if the current commit is
the "import" commit.
2022-09-18 13:00:46 +04:30
Tim Schumacher
c1dc8c9ccb Ports: Handle generating a ReadMe for an empty patch directory 2022-09-18 13:00:46 +04:30
Tim Schumacher
f6005764d7 Ports: Place tags at important points in the commit history
This helps with easier rebasing and for easier comparing or returning to
the state at which the last actual on-disk patches were.
2022-09-18 13:00:46 +04:30
Tim Schumacher
1b9fb7041d Ports: Unify the git "origin" and the working copy
I've lost more changes to "you forgot to push the changed commits to the
remote" than I'd like to admit, so let's just unify both and only ever
use the actual working repository for detemining whether any patches
have changed.
2022-09-18 13:00:46 +04:30
Tim Schumacher
cb2f0d9861 Toolchain: Regenerate patches using the latest format rules 2022-09-18 13:00:46 +04:30
Tim Schumacher
453323f3c1 Ports: Force full-length file indices when formatting patches
This keeps file index lengths from being dependent on internals of the
repository.
2022-09-18 13:00:46 +04:30
Tim Schumacher
72c059535e Ports: Follow symlinks while discovering whether a port has patches
This enables us to use `./package.sh dev` with LLVM and GCC.
2022-09-18 13:00:46 +04:30
Tim Schumacher
4d29489705 Ports: Keep [...] prefixes while importing patches
This stops us from mangling our LLVM patch names and titles when using
`./package.sh dev`, as they like to put their category names in square
brackets.
2022-09-18 13:00:46 +04:30
Andreas Kling
e6ef366859 LibWeb: Implement basic support for Document.all
The finer details are missing here, but the basic API is up.
2022-09-18 02:17:29 +02:00
Andreas Kling
3df9861814 LibWeb: Capture self as a WeakPtr in ResourceClient::set_resource()
It's not safe to capture `this` as a raw pointer here, since nothing
is guaranteed to keep the ResourceClient alive (even if the Resource
stays alive.)
2022-09-18 02:15:01 +02:00
Andreas Kling
fa2dd4cbe3 LibWeb: Make Document vend the same HTMLCollections every time 2022-09-18 02:08:01 +02:00
Andreas Kling
1903dff365 LibWeb: Support getting and setting Attr.textContent 2022-09-18 02:08:01 +02:00
Andreas Kling
530675993b LibWeb: Rename Attribute to Attr
This name is not very good, but it's what the specification calls it.
2022-09-18 02:08:01 +02:00
Andreas Kling
3c3ae3a768 LibWeb: Only uppercase qualified names in HTML documents
This takes care of an old FIXME now that we can distinguish between HTML
and non-HTML documents.
2022-09-18 00:53:26 +02:00