Commit graph

60760 commits

Author SHA1 Message Date
Dan Klishch
50911e6f96 Utilities/w: Work around Clang 18 bug with templated lambda + Variant
This was missed in 6f972c1 since this file is not compiled as a part of 
a Lagom build.
2024-04-15 17:58:47 -06:00
Nico Weber
7296b0fa43 LibGfx/JPEG2000: Implement tag trees
A tag tree is a data structure used for deserializing JPEG2000
packet headers.

We don't use them for anything yet, except from tests.

The implementation feels a bit awkward to me, but we can always polish
it later.

The spec thankfully includes two concrete examples. The code is
correct enough to pass those -- I added them as test.
2024-04-16 00:40:16 +02:00
Tim Ledbetter
99b2eff988 LibWeb: Invalidate style when CSSStyleRule selectorText changes
Previously, any change to the selectorText of a CSSStyleRule was not
reflected in the document style.
2024-04-15 22:12:49 +02:00
Nico Weber
69fa1d1b6e LibGfx/WebP: Remove a bounds check that is never hit
No behavior change.
2024-04-15 15:53:52 +02:00
Nico Weber
04c6af7dfd LibGfx/WebP: Add two spec comments 2024-04-15 15:53:52 +02:00
Aryan Baburajan
def486305a SQLStudio: Port to GML Compilation 2024-04-15 14:01:13 +02:00
Aryan Baburajan
3336d00241 IncrementalSearchBanner: Port to GML compilation 2024-04-15 14:01:13 +02:00
Aryan Baburajan
b2587cb11b EmojiInputDialog: Port to GML compilation 2024-04-15 14:01:13 +02:00
Aryan Baburajan
d6ca054935 GMLCompiler: GML compile compatibility for ScrollableContainerWidget 2024-04-15 14:01:13 +02:00
Aryan Baburajan
72a5c8f3d8 TwentyFourtyEight: Port to GML compilation 2024-04-15 14:01:13 +02:00
Aryan Baburajan
1c75aa98b8 2048: Rename to TwentyFourtyEight for GML compatibility 2024-04-15 14:01:13 +02:00
Aryan Baburajan
342fb906cf MouseSettingsWidget: Port to GML compilation 2024-04-15 14:01:13 +02:00
Aryan Baburajan
03f4ec8032 MailSettingsWidget: Port to GML compilation 2024-04-15 14:01:13 +02:00
Aryan Baburajan
e488928509 FontPickerDialog: Port to GML compilation 2024-04-15 14:01:13 +02:00
Aryan Baburajan
3ab05dbbb9 FilePickerDialog: Port to GML compilation 2024-04-15 14:01:13 +02:00
Aryan Baburajan
ddbed25bb5 PasswordInputDialog: Port to GML compilation 2024-04-15 14:01:13 +02:00
Andreas Kling
24157e4d1b LibWeb: Only invalidate style/layout on mutation for connected DOM nodes
If a DOM node isn't connected, there's no need to invalidate, since it's
not going to be visible anyway. The node will be automatically inserted
if/when it becomes connected in the future.
2024-04-15 12:58:27 +02:00
Andreas Kling
2fbcaadef0 LibWeb: Don't schedule style/layout updates in detached documents
There's no need to do any kind of style or layout work in documents that
aren't attached to a browsing context.
2024-04-15 12:58:27 +02:00
Andreas Kling
d0076aaa24 LibWeb: Remove unnecessary Document::force_layout() API
The only remaining client of this API can simply not call it, and let
normal DOM layout invalidation happen.
2024-04-15 12:58:27 +02:00
Andreas Kling
c08ba8ac4c LibWeb: Fix new ImageData(width, height) when width != height 2024-04-15 11:27:34 +02:00
Andreas Kling
134c4b6335 LibWeb: Fix CRC2D.getImageData() when width != height
We were mistakenly using the width as both width and height when getting
ImageData from a 2D canvas.
2024-04-15 11:27:34 +02:00
Jamie Mansfield
e487f70bbf LibWeb: Support "importmap" scripts 2024-04-15 10:11:54 +02:00
Aliaksandr Kalenik
ccb363c443 LibWeb: Add hashchange event support 2024-04-15 01:02:51 -07:00
Aliaksandr Kalenik
efefd44a9f LibWeb: Navigate to changed url in Location::set_hash()
This step assumes copyURL is modified in place, while
`URL::Parser::basic_parse()` returns it as a result.

> 6. Basic URL parse input, with copyURL as url and fragment state as
  state override.

So copyURL has to be reassigned to navigate to new url on step 8:

> 8. Location-object navigate this to copyURL.
2024-04-15 01:02:51 -07:00
Andreas Kling
037b395b5d LibWeb: Try to parse WOFF and WOFF2 even if MIME type says otherwise
As it turns out, websites can lie about this, and it doesn't really cost
us much to try decoding as other formats before giving up.
2024-04-15 10:01:05 +02:00
Timothy Flynn
9c608b46fd LibWeb+LibWebView+WebContent: Remove now-unused history change IPC 2024-04-14 18:53:58 -07:00
Timothy Flynn
6eb2052d40 LibWebView: Remove now-unused history object 2024-04-14 18:53:58 -07:00
Timothy Flynn
e5c5dcca6a Ladybird/AppKit: Use LibWeb's history state for history navigation 2024-04-14 18:53:58 -07:00
Timothy Flynn
7cf8eabb82 Browser: Use LibWeb's history state for history navigation 2024-04-14 18:53:58 -07:00
Timothy Flynn
8e2b1a8a1d LibWebView: Update the stored URL when WebContent's URL changes 2024-04-14 18:53:58 -07:00
Timothy Flynn
7c54b15d6d Ladybird/Qt: Remove unused history-related includes 2024-04-14 18:53:58 -07:00
Andreas Kling
7f0920b0e9 LibWeb: Implement HTMLScriptElement.async 2024-04-14 22:08:22 +02:00
Andreas Kling
4cc972a8ae LibWeb: Stub out HTMLElement.outerText 2024-04-14 22:08:22 +02:00
Andreas Kling
e610346fab LibWeb: Minimally implement HTMLElement.inert and HTMLElement.accessKey
This commit adds attribute reflection but nothing else.
2024-04-14 22:08:22 +02:00
Andreas Kling
afea8ccd43 LibWeb: Stub out HTMLElement.accessKeyLabel 2024-04-14 22:08:22 +02:00
Andreas Kling
0b28a310b1 LibWeb: Stub out Element.scrollBy() 2024-04-14 22:08:22 +02:00
Andreas Kling
82f8b64017 LibWeb: Stub out Element.currentCSSZoom 2024-04-14 22:08:22 +02:00
Andreas Kling
20bdda7f02 LibWeb: Implement Element.removeAttributeNode() 2024-04-14 22:08:22 +02:00
Andreas Kling
f13bda60ba LibWeb: Tidy up Element.idl
- Reorder all the entries so their order match the corresponding specs.
- Add spec links for partial interfaces and mixins.
- Add FIXMEs for unimplemented APIs.
2024-04-14 22:08:22 +02:00
Andreas Kling
cf315338ec LibWeb: Don't draw image alt text frames with "rough" rect
This was an accident in 3645b676fb
2024-04-14 18:05:48 +02:00
Andreas Kling
217cb01708 LibGfx: Clip out-of-bounds pixel accesses in Painter::draw_rect() 2024-04-14 18:05:48 +02:00
Kenneth Myhra
d5c7959c45 LibWeb: Let queue_a_microtask() take a JS::HeapFunction
This changes the signature of queue_a_microtask() from AK:Function to
JS::HeapFunction to be more clear to the user of the functions that this
is what is used internally.
2024-04-14 17:22:26 +02:00
Nico Weber
76ba374aef LibPDF: Move CFF to use AK::Error instead of PDF::Error
Similar to the previous commit. No real behavior change.
2024-04-14 17:22:00 +02:00
Nico Weber
102ac331c6 LibPDF: Move Type1FontProgram to use AK::Error instead of PDF::Error
Makes some of the errors a bit less descriptive. But this is pretty
stable by now and the errors fire basically never, so that seems ok.

Needing the explicit `AK::` prefix is a bit awkward, but that'll go
away once this class moves out of LibPDF.

Move error() into the two subclasses. I'll remove it from CFF in
a follow-up.

No real behavior change.
2024-04-14 17:22:00 +02:00
Tim Ledbetter
c6f070d29e LibWeb/Fetch: Don't crash when a fetch request times out
Previously, calling fetch with a signal object provided by
`AbortSignal.timeout()` would cause a crash when the signal timed out.

We now push a `TemporaryExecutionContext` to the stack when we invoke
the signal's abort steps, as an execution context is required when
calling native functions.
2024-04-14 13:36:25 +02:00
Aliaksandr Kalenik
78af6ca971 Ladybird/Qt: Add icon for "Dump Session History Tree" action 2024-04-14 02:42:53 -07:00
Aliaksandr Kalenik
882904b4bf Ladybird/Qt: Stop using history to drive navigation
Before this change we had to keep session history on browser side to
calculate a url for back/forward/reload action.
Now, with a mature enough implementation of navigation algorithms from
the specification, there is no need to use
history on the browser side to calculate navigation URLs because:
- Traversable navigable owns session history that is aware of all
  navigations, including those initiated by History API and Navigation
  API
- TraversableNavigable::traverse_the_history_by_delta() uses
  traversable's history to calculate the next URL based on delta, so
  there is no need for UI to keep sesion history.

In the future, we will likely want to add a way to pull session history
from WebContent to make it browsable from the UI.
2024-04-14 02:42:53 -07:00
Aliaksandr Kalenik
c96fc902ff LibWeb+LibWebView+WebContent: Add did_change_url() IPC call 2024-04-14 02:42:53 -07:00
Aliaksandr Kalenik
a8cf1aca7c LibWeb: Rename did_update_url() to did_history_api_push_or_replace()
The previous name was extremely misleading, because the call is used for
pushing or replacing new session history entry on chrome side instead of
only changing URL.
2024-04-14 02:42:53 -07:00
Aliaksandr Kalenik
461184d964 LibWeb+LibWebView+WebContent: Add did_update_navigation_buttons_state()
It is going to be used to communicate whether it is possible to navigate
back or forward after session history stored on browser side will no
longer be used to driver navigation.
2024-04-14 02:42:53 -07:00