Commit graph

53746 commits

Author SHA1 Message Date
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
Aliaksandr Kalenik
5f21285337 LibWeb: Add Window::navigable() 2023-08-22 20:30:06 +02:00
Aliaksandr Kalenik
343c709566 LibWeb: Add m_page in TraversableNavigable 2023-08-22 20:30:06 +02:00
Andreas Kling
5a704453af LibWeb: Implement "close a top-level traversable" 2023-08-22 20:30:06 +02:00
MacDue
f3a6fe256f Tests/LibWeb: Add a ref test for many wacky SVG radialGradients
Believe it or not, these are all correct (± a pixel), there meant to
look like that!
2023-08-22 20:25:57 +02:00
MacDue
4ad0ac465e Tests/LibWeb: Update reference for svg-gradient-spreadMethod.html 2023-08-22 20:25:57 +02:00
MacDue
bf55b49070 LibGfx: Fix SVG/canvas radial gradients with focal point != start center
Previously, it was assumed the focal point was the center of the start
circle. This is only the case if the start radius is zero or the centers
of the start and end circle are the same.

This was pretty hard to spot until repeating SVG radial gradients where
added, where the maths broke near the focal point.
2023-08-22 20:25:57 +02:00
Sam Atkins
c171810030 LibWeb: Make CalculatedStyleValue::dump() infallible 2023-08-22 17:51:48 +01:00
Sam Atkins
7fe97ee6c5 LibWeb: Make StyleValue::to_string() infallible 2023-08-22 17:51:48 +01:00
Sam Atkins
ccfe197e5a LibWeb: Make serializing CSS Parser types infallible 2023-08-22 17:51:48 +01:00
Sam Atkins
846c719e49 LibWeb: Make serializing Supports rules infallible 2023-08-22 17:51:48 +01:00
Sam Atkins
91114c157b LibWeb: Make serializing selectors infallible 2023-08-22 17:51:48 +01:00
Sam Atkins
afa27bad19 LibWeb: Make serializing media-queries infallible 2023-08-22 17:51:48 +01:00
Sam Atkins
2754c16e97 LibWeb: Make serializing GridTrack classes infallible 2023-08-22 17:51:48 +01:00
Sam Atkins
6bee81cfb6 LibWeb: Make serializing basic CSS types infallible 2023-08-22 17:51:48 +01:00
Sam Atkins
b5893ee115 LibWeb: Make Serialize functions infallible 2023-08-22 17:51:48 +01:00
Andreas Kling
788c2c5a8d LibWeb: Stop using fallible JSON API in code generators 2023-08-22 13:08:24 +02:00
Andreas Kling
20ea82bacc LibWeb: Make (snake/title/camel) casification functions infallible 2023-08-22 13:08:24 +02:00
Andreas Kling
0b83717ea2 AK: Make SourceGenerator::fork() infallible 2023-08-22 13:08:24 +02:00
Andreas Kling
244516142a AK: Remove fallible SourceGenerator::try_append()
And fall back to the infallible append().
2023-08-22 13:08:24 +02:00
Andreas Kling
a1d694ccdc AK: Remove fallible SourceGenerator::try_appendln()
And fall back to the infallible appendln().
2023-08-22 13:08:24 +02:00
Andreas Kling
8b936b5912 AK: Make SourceGenerator::set() infallible 2023-08-22 13:08:24 +02:00
Andreas Kling
3d5728ef57 LibWeb/BindingsGenerator: Remove some TRY() spam in generated bindings 2023-08-22 13:08:24 +02:00
Andrew Kaster
b3bd232a5e LibWeb: Implement StructuredSerialize for BigIntObject and Symbol 2023-08-22 13:08:08 +02:00
Andrew Kaster
f3cf7496a1 LibWeb: Add spec steps to StructuredSerialize
In preparation for serializing more types, let's move the implementation
closer to the steps in the spec.
2023-08-22 13:08:08 +02:00
Andrew Kaster
96600e77c2 LibJS: Enable storing Value and Handle<Value> in HashMaps
We have the right conversions to make this work, so let's make it
possible to have a `HashMap<JS::Handle<T>, V>` and look for a specific
T inside it without having to create a temporary handle.

This involves adding some operator== implementations, and some
specializations of AK::Traits.
2023-08-22 13:08:08 +02:00
Andi Gallo
685ef4ec82 LibWeb: Stop collecting lookahead items on forced break
This avoids a crash since such items don't have a node nor CSS
properties. Fixes crashes on Wikipedia pages which contain preformatted
code.
2023-08-22 11:33:45 +02:00
Aliaksandr Kalenik
cca779e7f6 LibWeb: Treat grid items with z-index != auto as positioned elements 2023-08-22 11:33:24 +02:00
Aliaksandr Kalenik
95a8dec373 LibWeb: Treat grid item as it creates stacking context during painting
Grid specification https://www.w3.org/TR/css-grid-2/#z-order defines
special painting order for grid items which should be the same as for
defined for inline-blocks in CSS2.
2023-08-22 11:33:24 +02:00
Aliaksandr Kalenik
b4064320bd LibWeb: Add m_is_grid_item in Layout::Node
This information is going to be needed during painting to treat grid
items as stacking contexts.
2023-08-22 11:33:24 +02:00
Tim Ledbetter
08528a8084 Ports/prboom-plus: Update formatting to be consistent with other ports 2023-08-22 09:14:28 +02:00
Tim Ledbetter
8676ffee77 Ports/prboom-plus: Add CMAKE_TOOLCHAIN_FILE to configopts
This fixes an issue where `prboom-plus` wouldn't build if the `make`
port was installed. Including this also makes some manually specified
paths unnecessary.
2023-08-22 09:14:28 +02:00
stelar7
434d95ef55 LibWeb: Add missing promise rejection in execute_async_script 2023-08-21 13:22:04 -06:00
stelar7
b0adf96eff LibWeb: Implement the timeout step of execute_async_script 2023-08-21 13:22:04 -06:00
stelar7
23b378822b LibWeb: Stub out Release Actions
This allows WPT to open the browser, and it no longer instantly crashes
2023-08-21 13:22:04 -06:00
Andi Gallo
3d7e788981 LibWeb: Improve the line breaking algorithm
Check the width of the next token after white space to decide line
breaks. The next width can also be the total width of multiple tokens.
This better follows the CSS Text specification and matches behavior of
other browsers.

Fixes #20388.
2023-08-21 19:31:00 +02:00
Tim Ledbetter
33b133d3f4 Ports/libuuid: Disable natural language support
Having this option enabled made `libuuid` link to `libintl` only when
the `gettext` port was installed. This made the `taskwarrior` port
fail to build when `gettext` was installed prior to `libuuid`.
2023-08-21 17:54:16 +02:00
Tim Ledbetter
da9c389ce3 Ports/libuuid: Update formatting to be consistent with other ports 2023-08-21 17:54:16 +02:00
Fabian Dellwing
8e75c605a1 Ports: Update poppler 2023-08-21 16:52:47 +02:00
Tim Ledbetter
f77f85291a Ports/freedink: Disable sound from launcher
Currently, launching the game with sound effects enabled causes the
game to segfault, so let's disable it until the sound issue is fixed.
2023-08-21 15:30:35 +02:00
Tim Ledbetter
66a3361b39 Ports/freedink: Update formatting to be consistent with other ports 2023-08-21 15:30:35 +02:00
Tim Ledbetter
79c5b96953 Ports/freedink: Add launcher icon 2023-08-21 15:30:35 +02:00
Tim Ledbetter
94de006144 Ports/freedink: Use make install rather than copying files manually
This ensures the required binary files are installed to the correct
location and data files are copied to their default location so the
`--refdir` argument isn't needed when launching the game.
2023-08-21 15:30:35 +02:00
Tim Ledbetter
cecc554102 Ports/freedink: Add required const to char* declarations
This allows FreeDink to be built with GCC 13.
2023-08-21 15:30:35 +02:00
Andreas Kling
0103940cee LibWeb: Resolve viewport-relative <img sizes> values
We still don't know how to resolve font-relative lengths in <img sizes>
since we don't always have font size information available at this stage
in the pipeline, but we can at least handle viewport-relative lengths.

This fixes an issue on many websites where low-resolution images were
loaded (appropriate for a small viewport) even when the viewport is big.
2023-08-21 13:56:18 +02:00
Andreas Kling
ae5313d33c LibWeb: Add Document::viewport_rect()
This is a convenience helper that returns an empty rect if there is no
browsing context (to get the actual rect from).
2023-08-21 13:56:18 +02:00
Sam Atkins
b8e694c0f2 LibWeb: Implement the :dir() selector pseudo-class 2023-08-21 13:51:56 +02:00
Sam Atkins
5b125811f1 LibWeb: Add support for pseudo-class functions that take an ident param
This is prep work for `:dir()`, though other pseudo-classes may well use
it in the future too.
2023-08-21 13:51:56 +02:00