Commit Graph

53817 Commits

Author SHA1 Message Date
Tim Ledbetter
87c17c9bb9 Ports/aria2: Explicitly disable Firefox/Chromium cookie support
Previously, this would only be enabled if the `sqlite` port was
already installed. This change explicitly disables the feature, as it
isn't that useful on SerenityOS. This ensures a consistent build
regardless of whether the `sqlite` port is installed or not.
2023-08-24 13:16:58 +02:00
Tim Ledbetter
434c97010f Ports/aria2: Explicitly disable c-ares support
This was causing the build to fail when the `c-ares` port was
installed.
2023-08-24 13:16:58 +02:00
Tim Ledbetter
637eb3179a Ports/libssh2: Update formatting to be consistent with other ports 2023-08-24 13:16:58 +02:00
Tim Ledbetter
6678a3ad00 Ports/libssh2: Prefer openssl over libgcrypt as the crypto backend
Previously,`openssl` would be used as the crypto backend for `libssh2`
if the `openssl` port was installed and the `libgcrypt` dependency
would be ignored.

With this change we install `openssl` as a dependency and explicitly
specify that it should be used as the crypto backend. We also add
`zlib` as an explicit dependency and specify that `zlib` compression
should be used.
2023-08-24 13:16:58 +02:00
Tim Ledbetter
0cb339bad1 Ports/dtc: Specify NO_PYTHON when running make install
Previously, the install step was failing when the `python3` port was
installed.
2023-08-24 12:27:52 +02:00
Tim Ledbetter
c8f78066c4 Ports/SDL2: Update to version 2.28.2 2023-08-24 12:26:19 +02:00
Tim Ledbetter
aa322c0014 Ports: Update explanation of files syntax in README 2023-08-24 11:52:12 +02:00
Sam Atkins
eab44f982a Meta: Use embed_as_string_view() for stringify_gml() 2023-08-24 07:42:12 +01:00
Sam Atkins
abba6f7b54 LibWeb: Use embed_as_string_view() for style sheet source generation 2023-08-24 07:42:12 +01:00
Sam Atkins
af4642c826 Meta: Make embed_as_string_view.py usable by CMake builds :^) 2023-08-24 07:42:12 +01:00
Andreas Kling
4ead33d8fc LibWeb: Remove "LibWeb+LibJS/1.0" from the default User-Agent string
As it turns out, there are popular User-Agent blacklists out there with
the string "LibWeb" in them. Such entries have been added long before
our LibWeb existed, so "LibWeb" has presumably been used by some bot
that people got tired of.

Trying to chase down everyone who has installed these blacklists is
obviously a losing battle, so this patch simply removes the engine part
of our default UA string.
2023-08-24 07:14:51 +02:00
Andi Gallo
6175fcdaeb LibWeb: Add a table row to the layout tree for buttons
We were relying on the table fixup algorithm to insert the missing table
row, which fails to do so when we only have an image in the button.
While that might be a problem with the table fixup algorithm, we should
build a correct layout tree explicitly anyway.

Fixes crashes on GitHub.
2023-08-24 07:08:21 +02:00
Timothy Flynn
4f563e346d Ladybird: Ensure we release CoreFoundation references
Once we are done with our references to some CoreFoundation types, we
must be sure to manually release those references.
2023-08-23 19:16:53 -04:00
MacDue
2d154bf90a LibWeb: Fix accidentally skipping post-paint actions for positioned SCs
Regressed in 2a067b5601.

I could not find anything obviously broken by this, but it definitely
was unintentional on my part.
2023-08-24 01:01:47 +02:00
Karol Kosek
fdb27c5851 LibWeb: Use StringView in calls to Vector<String>::contains_slow() 2023-08-23 20:21:09 +02:00
Karol Kosek
9663ccff77 AK: Use Iterator's trait when comparing a value
It's not needed, from what I can gather, but I changed it just for
the correctness sake.
2023-08-23 20:21:09 +02:00
Karol Kosek
e575ee4462 AK+Kernel: Unify Traits<T>::equals()'s argument order on different types
There was a small mishmash of argument order, as seen on the table:

                 | Traits<T>::equals(U, T) | Traits<T>::equals(T, U)
   ============= | ======================= | =======================
   uses equals() | HashMap                 | Vector, HashTable
defines equals() | *String[^1]             | ByteBuffer

[^1]: String, DeprecatedString, their Fly-type equivalents and KString.

This mostly meant that you couldn't use a StringView for finding a value
in Vector<String>.

I'm changing the order of arguments to make the trait type itself first
(`Traits<T>::equals(T, U)`), as I think it's more expected and makes us
more consistent with the rest of the functions that put the stored type
first (like StringUtils functions and binary_serach). I've also renamed
the variable name "other" in find functions to "entry" to give more
importance to the value.

With this change, each of the following lines will now compile
successfully:

    Vector<String>().contains_slow("WHF!"sv);
    HashTable<String>().contains("WHF!"sv);
    HashMap<ByteBuffer, int>().contains("WHF!"sv.bytes());
2023-08-23 20:21:09 +02:00
Aliaksandr Kalenik
5ff7448fee LibWeb: Move viewport subscriptions from BrowsingContext to Document
With this change, elements that want to receive viewport rect updates
will need to register on document instead of the browsing context.

This change solves the problem where a browsing context for a document
is guaranteed to exist only while the document is active so browsing
context might not exit by the time DOM node that want to register is
constructed.

This is a part of preparation work before switching to navigables where
this issue becomes more visible.
2023-08-23 20:14:20 +02:00
Aliaksandr Kalenik
48e9097aa4 LibWeb: Fix "stack-use-after-return" in "process_response" callback
Fixes stack-use-after-return bug found by ASAN that happens when
`response` reference captured by `process_response` is modified
after navigation has been canceled.
2023-08-23 19:49:26 +02:00
Andreas Kling
234a73e43e LibWeb: Implement "document-tree child navigables" 2023-08-23 19:49:26 +02:00
Timothy Flynn
d56f127c80 Ladybird+LibWebView: Rename some "on get" notifications to "on received"
The old names sounded like awkward English to me, as they implied the
WebContent process is asking for information. In reality, WebContent is
*providing* the information.
2023-08-23 12:07:02 -04:00
Timothy Flynn
edec5b1d91 Ladybird+LibWebView: Migrate input completions to LibWebView callbacks 2023-08-23 12:07:02 -04:00
Timothy Flynn
5116e97a9d Ladybird+LibWebView: Migrate tooltip changes to LibWebView callbacks 2023-08-23 12:07:02 -04:00
Timothy Flynn
78d9339aa9 Ladybird+LibWebView: Migrate scrolling changes to LibWebView callbacks 2023-08-23 12:07:02 -04:00
Timothy Flynn
00fe122b0a Ladybird+LibWebView: Migrate cursor changes to LibWebView callbacks 2023-08-23 12:07:02 -04:00
Timothy Flynn
bf464665a7 Ladybird+LibWebView: Migrate layout notification to LibWebView callbacks 2023-08-23 12:07:02 -04:00
Timothy Flynn
682a5f9b70 Ladybird+LibWebView: Move APIs which only repaint to LibWebView
We can easily add hooks to notify the browsers of these events if any
implementation-specific handling is needed in the future, but for now,
these only repaint the client, which we can do in ViewImplementation.
2023-08-23 09:59:04 -04:00
Timothy Flynn
ea7e1b5f53 Ladybird+LibWebView: Move most of paint handling to LibWebView
Storing the backup bitmap is the same across Browser and Ladybird. Just
peform that work in LibWebView, and handle only the implementation-
specific nuances within the browsers.
2023-08-23 09:59:04 -04:00
Timothy Flynn
15da77f4c4 Ladybird+LibWebView: Migrate file APIs to LibWebView callbacks
This also sets the default callback to do what every non-Serenity
browser is doing, rather than copy-pasting this callback into every
implementation. The callback is still available for any platform which
might want to override the default behavior. For example, OOPWV now
overrides this callback to use FileSystemAccessClient.
2023-08-23 09:59:04 -04:00
Timothy Flynn
ebdcba8b3b Ladybird+LibWebView: Migrate dialog APIs to LibWebView callbacks 2023-08-23 09:59:04 -04:00
Timothy Flynn
e6c01ef6e2 LibWebView: Replace OOPWV inclusion with ViewImplementation.h
This is the header WebContentClient actually needs. Just noticed by
clangd when OOPWV.h has errors that don't apply to WebContentClient at
all.
2023-08-23 09:59:04 -04:00
Aliaksandr Kalenik
d06d4eb388 LibWeb: Apply "clip" property in apply_clip_overflow_rect()
Fixes bug when "clip" property does not affect abspos children.
This change makes "clip" property to be applied together with
"overflow: hidden" in `apply_clip_overflow_rect()` that already
handles abspos children correctly.
2023-08-23 15:49:06 +02:00
Aliaksandr Kalenik
5896c0ed06 LibWeb/CSS: Set "inherited" to false for "clip" property
"clip" should not be inherited.
2023-08-23 15:49:06 +02:00
Tim Ledbetter
81d9a6f44a Ports/build_all: Read port directory names into an array immediately
The script previously failed early after building `mandoc`, as it
failed to switch to the correct directory for the next port. With this
change, the script now runs to completion.
2023-08-23 15:42:49 +02:00
Andi Gallo
b13fe9397d LibWeb: Support border attribute on the table element
Fixes #19938.
2023-08-23 15:40:41 +02:00
Aman Singh
fb4a20ade5 Kernel: Fix condition for write to succeed on pseudoterminal
As "\n" is translated to "\r\n" in TTYs, the condition for a write
to succeed on a pseudoterminal should check if the underlying buffer
has 2 bytes empty rather than 1.

Fixes SerenityOS#18888
2023-08-23 15:26:03 +02:00
Tim Ledbetter
d7c1a1ecac Ports/libgd: Update formatting to be consistent with other ports 2023-08-23 13:33:49 +02:00
Tim Ledbetter
1f2aef4028 Ports/libgd: Explicitly specify which dependencies to include
Previously, building `libgd` with `fontconfig` already installed would
cause the build to fail.
2023-08-23 13:33:49 +02:00
implicitfield
2114c27656 Flood: Replace usage of DeprecatedString 2023-08-23 13:28:07 +02:00
implicitfield
adaf4a9ed5 Flood: Use the new GML compiler 2023-08-23 13:28:07 +02:00
implicitfield
8434b3a0c6 Flood: Propagate errors when creating SettingsDialog 2023-08-23 13:28:07 +02:00
Hendiadyoin1
239293a8b4 Meta: Disable misc-use-anonymous-namespace clang-tidy warning
This flags nearly every static function, so let's disable it
2023-08-23 12:25:40 +01:00
Bastiaan van der Plaat
c88f14902b LibWeb: Add DOMQuad and text tests 2023-08-23 12:11:21 +01:00
Bastiaan van der Plaat
e4270bc01d LibWeb: Make DOMRectReadOnly use double instead of float 2023-08-23 12:11:21 +01:00
Bastiaan van der Plaat
2e1d6f624d LibIDL: Fix bug where Type::is_json doesn't look at parent interface 2023-08-23 12:11:21 +01:00
Bastiaan van der Plaat
43825acc79 Meta+BindingsGenerator: Add postfix to member_value_name to make unique 2023-08-23 12:11:21 +01:00
Tim Schumacher
dbc25f18ec LibCompress: Let BrotliDecompressionStream take a MaybeOwned 2023-08-23 12:03:37 +01:00
Tim Schumacher
8a853278d0 LibCompress: Port ZlibDecompressor to AK::Stream 2023-08-23 12:03:37 +01:00
Tim Schumacher
90780d9ade LibCompress: Let GzipDecompressor take a MaybeOwned<Stream> 2023-08-23 12:03:37 +01:00
0GreenClover0
f165d2e7ec LibWeb: Update <use> visuals after changing the referenced element 2023-08-23 11:55:24 +01:00