Commit graph

41209 commits

Author SHA1 Message Date
Sam Atkins cb45fa79ee LibEDID: Use Core::Stream API to generate PnpIDs 2022-09-20 07:48:45 -04:00
Sam Atkins 32810f6d1a IPCCompiler: Use Core::Stream API 2022-09-20 07:48:45 -04:00
Sam Atkins 2dea636f33 Run: Use Core::Stream API for command history file 2022-09-20 07:48:45 -04:00
Sam Atkins aee52a458b PixelPaint: Remove unused Image::write_to_file() method
This seems to be a remnant from before FileSystemAccessClient was used.
2022-09-20 07:48:45 -04:00
Timothy Flynn a203e714ec LibGUI: Use fuzzy matching when searching for emoji by name
This allows the user to have slight typos in their search query.
2022-09-20 11:08:54 +01:00
Timothy Flynn 11bd6c3d68 AK: Do not require an allocated String for fuzzy matching
A StringView is sufficient here. This also removes the declaration of
fuzzy_match_recursive from the header, as it's only needed from within
the implementation file.
2022-09-20 11:08:54 +01:00
Andreas Kling d4acdac317 LibWeb+WebContent+Browser: Plumb visibility state from GUI to web pages
OOPWV now reacts to show/hide events and informs LibWeb about the state
change. This makes visibilitychange events fire when switching tabs. :^)
2022-09-20 10:32:14 +02:00
Andreas Kling 5908873b45 LibGUI: Fire Show/Hide events when adding/removing widget from tree
This ensures that widgets always get an initial show event.
2022-09-20 10:32:13 +02:00
Andreas Kling 4ee5dfbe4b LibWeb: Flesh out a chunk of the HTML spec's frame navigation algorithms 2022-09-20 10:32:13 +02:00
Andreas Kling e5f6d36616 LibWeb: Keep more of the navigation parameters in Document 2022-09-20 10:32:13 +02:00
Andreas Kling 42b8656db3 LibWeb: Flesh out "document visibility" state a bit more
We can now "update the visibility state", which also causes
`visibilitychange` events to fire on the document.

This still needs GUI integration work at the BrowsingContext level.
2022-09-20 10:32:13 +02:00
Andreas Kling 5a500827b8 LibWeb: Move HistoryHandlingBehavior enum to its own header
This avoids a header cycle in a subsequent patch.
2022-09-20 10:32:12 +02:00
Andreas Kling 03375a3dc9 LibWeb: Implement more spec-compliant iframe/frame attribute processing
We're still missing the lazy loading attribute handling, and once we hit
the navigation step, we fall back to totally ad-hoc behavior instead of
going all the way with a Fetch Request.
2022-09-20 10:32:12 +02:00
Andreas Kling 0810e77d77 LibWeb: Set the document "completely loaded time" when appropriate 2022-09-20 10:32:12 +02:00
Andreas Kling 954da8fde5 LibWeb: Only create iframe nested context if iframe document has context
We had glossed over a condition in the spec that said we should only run
the nested context creation steps when the iframe's own containing
document has a browsing context.
2022-09-20 10:32:12 +02:00
Andreas Kling 8ead228202 LibWeb: Implement "browsing context group" concept from the HTML spec 2022-09-20 10:32:12 +02:00
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