Commit graph

53753 commits

Author SHA1 Message Date
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
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