Commit graph

53943 commits

Author SHA1 Message Date
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
Tim Ledbetter
5af7d5da2f Ports: Simplify the output from identify when installing icons
This ensures that the correct index is always used when selecting an
image of a particular size.
2023-08-23 12:55:00 +02:00
Tim Ledbetter
d09271be35 Ports/SDL_sound: Ensure build is run in parallel 2023-08-23 12:23:33 +02:00
Tim Ledbetter
b885be8046 Ports/SDL_sound: Specify which optional dependencies to include
This fixes an issue where building `SDL_sound` with the `libphysfs`
port installed would cause the build to fail.

Ogg support has also been enabled. This allows playback of the sound
effects in GLTron.

Both FLAC and `libmodplug` support are currently disabled, even
though the build succeeds with them enabled, as there is currently no
way to test whether they would work or not.
2023-08-23 12:23:33 +02:00
Tim Ledbetter
9e5d430fbd Ports/SDL_sound: Update formatting to be consistent with other ports 2023-08-23 12:23:33 +02:00
Andreas Kling
354d2ccc3c LibWeb: Support fast_is<T>() for table, table sections, rows and cells
3.2x speed-up on WebKit/PerformanceTests/DOM/GridSort.html
2023-08-23 08:06:25 +02:00
Andreas Kling
76580bb9ba LibWeb: Cache lowercased tag name for getElementsByTagName() iteration
Instead of calling to_lowercase() on two strings for every step while
iterating over the HTMLCollection returned by getElementsByTagName(),
we now cache the lowercased tag name beforehand and reuse it.

2.4x speed-up on WebKit/PerformanceTests/DOM/DOMDivWalk.html
2023-08-23 08:06:25 +02:00
Sam Atkins
ec340f03a5 WebContent+LibWebView: Add support for user style sheets 2023-08-23 05:32:10 +02:00
Sam Atkins
6dcd8d4a2c LibWeb: Add support for "User" CascadeOrigin
User styles are applied after the UserAgent's built-in styles, and
before the Author styles that are part of the web page.

Because they're neither part of the page, but can still be modified
while the page is open, caching is a little tricky. The approach here
is to piggy-back on the StyleComputer's rule caches, which already get
rebuilt whenever the styles change. This is not the smartest approach,
since it means re-parsing the style sheet more often than is necessary,
but it's simple and works. :^)
2023-08-23 05:32:10 +02:00
Sam Atkins
7bc5949e35 LibWeb: Implement the :placeholder-shown pseudo-class
This matches if the element has a placeholder, and that placeholder is
currently visible. This applies to `<input>` and `<textarea>` elements,
but our `<textarea>` is very limited so does not support placeholders.
2023-08-23 05:30:59 +02:00
Sam Atkins
9f5b1e6614 LibWeb: Implement the :read-only and :read-write pseudo-classes 2023-08-23 05:30:59 +02:00
Sam Atkins
3d10bf3ae7 LibWeb: Implement the :target-within pseudo-class selector
As noted in a9620d8784 we don't currently
set the target element so this does not function, so no tests. But it
should work once we have a fleshed out Navigables implementation. :^)
2023-08-23 05:30:59 +02:00
Sam Atkins
3af8b491b4 LibWeb: Implement :any-link and :local-link pseudo-class selectors
`:any-link` matches links, whether they have been visited or not.

`:local-link` matches links to the current URL.
2023-08-23 05:30:59 +02:00
Timothy Flynn
eb8f7b303c LibLocale+LibJS: Make relative time format APIs infallible
These APIs only perform small allocations, and are only used by LibJS.
Callers which could only have failed from these APIs are also made to
be infallible here.
2023-08-23 05:29:21 +02:00
Timothy Flynn
7536648498 LibLocale+LibJS+ClockSettings: Make date time format APIs infallible
These APIs only perform small allocations, and are only used by LibJS
and the time zone settings widget. Callers which could only have failed
from these APIs are also made to be infallible here.
2023-08-23 05:29:21 +02:00
Timothy Flynn
0914e86691 LibLocale+LibJS: Make number format APIs infallible
These APIs only perform small allocations, and are only used by LibJS.
Callers which could only have failed from these APIs are also made to
be infallible here.
2023-08-23 05:29:21 +02:00
Timothy Flynn
cd526813e6 LibLocale+LibJS: Make locale data APIs infallible
These APIs only perform small allocations, and are only used by LibJS.
Callers which could only have failed from these APIs are also made to
be infallible here.
2023-08-23 05:29:21 +02:00
MacDue
a98201f889 LibGfx: Nudge points away from the start point in radial gradients
Avoids a division by zero, and an incorrect pixel in some repeating
radial gradient cases.

(Ref tests updated)
2023-08-23 05:27:19 +02:00
MacDue
df58fa8653 LibGfx: A few small radial gradient tweaks/fixups
A few very minor changes seemed to small to commit separately:

- Fix typo postive -> positive
- Remove swap(start, end) FIXME, that is the correct thing to do
- Add FIXME for start_radius == end_radius case
- Formatting tweaks
2023-08-23 05:27:19 +02:00
Cubic Love
2b8a9ff2ae Base: Improve Hearts Icon
Before the Hearts icon was quite angular, now it is a more rounded
heart with a subtle gradient.
2023-08-23 05:25:28 +02:00
Andi Gallo
bab1d09d92 LibWeb: Derive baseline from rightmost descendant
Make the existing algorithm recursive, accounting for boxes which
contain line boxes indirectly. Fixes some button alignment issues on
Wikipedia.
2023-08-23 05:24:55 +02:00
Timothy Flynn
2a8f558911 CI: Add a step to ensure the AppKit chrome can compile
The main build step builds the Qt chrome, because ENABLE_QT=ON is the
default. This adds a step to ensure we can build the AppKit chrome as
well.
2023-08-22 21:36:19 -04:00
Timothy Flynn
5722d0025b Ladybird: Implement an AppKit chrome for macOS :^)
This adds an alternative Ladybird chrome for macOS using the AppKit
framework. Just about everything needed for normal web browsing has
been implemented. This includes:

* Tabbed, scrollable navigation
* History navigation (back, forward, reload)
* Keyboard / mouse events
* Favicons
* Context menus
* Cookies
* Dialogs (alert, confirm, prompt)
* WebDriver support

This does not include debugging tools like the JavaScript console and
inspector, nor theme support.

The Qt chrome is still used by default. To use the AppKit chrome, set
the ENABLE_QT CMake option to OFF.
2023-08-22 21:36:19 -04:00
Timothy Flynn
66a89bd695 Meta: Support using clang-format on Objective-C++ files
We can (and have to) remove the C++ language identifier from the main
set of rules. This will allow these rule to propagate to all languages.
2023-08-22 21:36:19 -04:00
Aliaksandr Kalenik
43da0701fc LibWeb: Implement navigate() for Location object 2023-08-22 20:30:06 +02:00