Commit Graph

41221 Commits

Author SHA1 Message Date
Andreas Kling
aa4dd6c1bc LibWeb: Implement Element.insertAdjacentHTML() from DOM Parsing
One edge case is left as a TODO() for now, since I'm not entirely sure
how to construct an element to those specifications.

With this patch, we can now run the Speedometer benchmark! :^)
2022-09-20 18:28:41 +02:00
Andreas Kling
287a9b552a AK: Fix bad parsing of some file:/// URLs with base URL
We were dropping the base URL path components in the resulting URL due
to mistakenly determining the input URL to start with a Windows drive
letter. Fix this, add a spec link, and a test.
2022-09-20 15:38:53 +02:00
Andreas Kling
ac76df3d47 LibWeb: Implement Window.frameElement 2022-09-20 14:48:07 +02:00
Andreas Kling
e4fd042041 LibWeb: Flesh out the default "quirks mode" style sheet
Import all the quirks mode rules from the HTML spec. There's more to
quirks mode, of course, but it's nice that we can just copy these.
2022-09-20 14:48:07 +02:00
Andreas Kling
77d947b8ad LibWeb: Initialize document referrer from Fetch Request if available 2022-09-20 14:48:07 +02:00
Andreas Kling
9683da4470 LibWeb: Add referrer accessors to Fetch Request 2022-09-20 14:48:07 +02:00
Ali Mohammad Pur
578d73943a LibC+LibRegex: Move central regex definitions into LibC/bits
This decouples LibRegex from the serenity LibC.
Fixes #15251.
2022-09-20 12:57:21 +01:00
Sam Atkins
120e5aeca4 LibCore: Actually tell people to stop using Core::File in new code
Otherwise, we keep getting new code merged that uses it, which requires
fixing later.
2022-09-20 07:48:45 -04:00
Sam Atkins
f640921371 MasterWord: Port to Core::Stream 2022-09-20 07:48:45 -04:00
Sam Atkins
68032d2724 Profiler: Port to Core::Stream 2022-09-20 07:48:45 -04:00
Sam Atkins
183b054695 SoundPlayer: Port M3UParser to Core::Stream
Also make the path parameter a StringView, since that's what gets passed
in.
2022-09-20 07:48:45 -04:00
Sam Atkins
684c3efc04 StateMachineGenerator: Port to LibMain and Core::Stream 2022-09-20 07:48:45 -04:00
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