Andrew Kaster
d90a9ab70c
LibWeb: Add Web::UIEvents::KeyCode and KeyModifier enums, drop Kernel
...
This was the last Kernel header we had. Move the definitions we need
into a UIEvents header similar to MouseButton.
2024-06-07 09:44:41 +02:00
Enver Balalic
862fc91b2c
LibWeb: Implement HTMLImageElement::decode with a few FIXMEs
...
Implements enough of HTMLImageElement::decode for it to not break
websites and actually load an image :)
2024-06-06 08:20:02 +02:00
Andreas Kling
f42c18bc4c
LibGfx: Make Painter::target() return a Bitmap&
...
Painter always has a target bitmap, so let's return a reference.
2024-06-05 15:37:05 +02:00
Andreas Kling
fe4cc32380
Everywhere: Include <LibGfx/Painter.h> in fewer places
...
Touching Painter.h now rebuilds ~40 files instead of ~300.
2024-06-05 15:37:05 +02:00
Andreas Kling
57906a4e1b
LibGfx: Move Gfx::Painter::WindingRule => Gfx::WindingRule
2024-06-05 15:37:05 +02:00
Andreas Kling
254d040ff4
LibGfx: Move Gfx::Painter::ScalingMode => Gfx::ScalingMode
...
This will allow users to avoid including Painter.h
2024-06-05 15:37:05 +02:00
Andreas Kling
6a96920dbc
LibGfx: Remove Bitmap and Painter "scale" concept
...
We don't need intrinsic scale factors for Gfx::Bitmap in Ladybird,
as everything flows through the CSS / device pixel ratio mechanism.
This patch also removes various unused functions instead of adapting
them to the change.
2024-06-05 15:37:05 +02:00
Aliaksandr Kalenik
5285e22f2a
LibWeb+WebContent: Move scrollbar painting into WebContent
...
The main intention of this change is to have a consistent look and
behavior across all scrollbars, including elements with
`overflow: scroll` and `overflow: auto`, iframes, and a page.
Before:
- Page's scrollbar is painted by Browser (Qt/AppKit) using the
corresponding UI framework style,
- Both WebContent and Browser know the scroll position offset.
- WebContent uses did_request_scroll_to() IPC call to send updates.
- Browser uses set_viewport_rect() to send updates.
After:
- Page's scrollbar is painted on WebContent side using the same style as
currently used for elements with `overflow: scroll` and
`overflow: auto`. A nice side effects: scrollbars are now painted for
iframes, and page's scrollbar respects scrollbar-width CSS property.
- Only WebContent knows scroll position offset.
- did_request_scroll_to() is no longer used.
- set_viewport_rect() is changed to set_viewport_size().
2024-06-05 07:03:42 +02:00
Jamie Mansfield
2ffda00347
LibWeb: Implement HTMLImageElement.crossOrigin
2024-06-05 05:42:47 +01:00
Jamie Mansfield
d7d60268ec
LibWeb: Implement HTMLLinkElement.crossOrigin
2024-06-05 05:42:47 +01:00
Jamie Mansfield
735859bc10
LibWeb: Implement HTMLLinkElement.fetchPriority
2024-06-05 05:42:47 +01:00
Jamie Mansfield
d1f884533e
LibWeb: Update "create a link request" for spec changes
...
Fetch priority is added, and one line is split into two :)
2024-06-05 05:42:47 +01:00
Jamie Mansfield
21cf2c2981
LibWeb: Implement HTMLScriptElement.fetchPriority
2024-06-05 05:42:47 +01:00
Jamie Mansfield
8315ad6759
LibWeb: Implement HTMLImageElement.fetchPriority
2024-06-05 05:42:47 +01:00
Jamie Mansfield
2fde20adf9
LibWeb: Add IDL enum for fetch priority attribute
2024-06-05 05:42:47 +01:00
Andreas Kling
4822d1da4e
LibWeb: Remove unused CRC2D::bitmap_font_fill_text()
2024-06-04 18:45:30 +02:00
Andreas Kling
04a6e2f83d
LibWeb: Remove Gfx::BitmapFont
...
This class supported the binary bitmap font file format in SerenityOS,
and isn't something we need in Ladybird.
2024-06-04 18:45:30 +02:00
Simon Wanner
6b2c459901
LibTextCodec: Fix ISO-8859-1 vs. windows-1252 handling in web contexts
...
The Encoding specification maps ISO-8859-1 to windows-1252 and expects
the windows-1252 translation table to be used, which differs from
ISO-8859-1 for 0x80-0x9F.
Other contexts expect to get the actual ISO-8859-1 encoding, with 1-to-1
mapping to U+0000-U+00FF, when requesting it.
`decoder_for_exact_name` is introduced, which skips the mapping from
aliases to the encoding name done by `get_standardized_encoding`.
2024-06-04 10:21:07 +02:00
Jamie Mansfield
e13b9bef5c
LibWeb: Don't warn when 'scopes' is present in import maps
...
Another mistake I made when implementing import map support.
2024-06-01 07:42:48 -04:00
Jamie Mansfield
76eb7568c9
LibWeb: Set import map scopes when parsing
2024-06-01 07:42:48 -04:00
Andreas Kling
a3782782fa
LibJS: Remove two unused members from ExecutionContext
2024-05-31 16:31:33 +02:00
Andrew Kaster
46e00a8f5e
LibWeb: Parse TokenizedFeatures from window.open
2024-05-30 16:16:33 -04:00
Andrew Kaster
e2d50dc5dd
LibWeb: Move window.open TokenizedFeature parsing into its own file
2024-05-30 16:16:33 -04:00
Matthew Olsson
9ea6ab0ad4
LibJS+LibWeb: Fix a ton of JS_CELL-like macro issues
2024-05-30 09:29:20 -06:00
Andrew Kaster
9bc1318a78
LibWeb: Consume user activation when showing a picker dialog
2024-05-29 21:30:15 +02:00
Andrew Kaster
a3a74245d6
LibWeb: Implement consume user activation AO
2024-05-29 21:30:15 +02:00
Andrew Kaster
45860e3878
LibWeb: Move consume history-action user activation to Window
2024-05-29 21:30:15 +02:00
Andrew Kaster
9c6ebe21d2
LibWeb: Remove get prefix from activation timestamp getters
2024-05-29 21:30:15 +02:00
Andrew Kaster
2fde20993b
LibWeb: Update show the picker if applicable to latest spec text
2024-05-29 21:30:15 +02:00
Jamie Mansfield
7da449ce01
LibWeb: Check correct activation (spec fix)
...
See:
- https://github.com/whatwg/html/commit/d28284f
2024-05-29 09:32:59 -06:00
Jamie Mansfield
34b2a4f7ca
LibWeb: Add getter for history-action activation
2024-05-29 09:32:59 -06:00
Jamie Mansfield
a741f68eb9
LibWeb: Implement "consume history-action user activation"
2024-05-29 09:32:59 -06:00
Jamie Mansfield
30539db2fc
LibWeb: Use Infinity<double> for infinity
...
Co-authored-by: Matthew Olsson <matthewcolsson@gmail.com>
2024-05-29 09:32:59 -06:00
Jamie Mansfield
01bd179eef
LibWeb: Implement UserActivation
2024-05-29 09:32:59 -06:00
Jamie Mansfield
227151b881
LibWeb: Add getter for sticky activation
2024-05-29 09:32:59 -06:00
Tim Ledbetter
bb923983fc
LibWeb: Implement WorkerGlobalScope.importScripts()
...
This method allows workers to synchronously import one or more scripts.
2024-05-29 08:17:18 +02:00
Tim Ledbetter
975a067f58
LibWeb: Align worker ESO getters with the specification
...
The `api_base_url()` and `policy_container()` getters now get their
respective objects from the global scope.
2024-05-29 08:17:18 +02:00
Tim Ledbetter
2d487ee5ab
LibWeb: Add spec comments to WorkerEnvironmentSettingsObject::setup()
...
No behavior change.
2024-05-29 08:17:18 +02:00
Aliaksandr Kalenik
b8d18ebcf7
LibWeb+WebContent: Change event loop to synchronously paint next frame
...
...instead of scheduling repaint timer in PageClient.
This change fixes flickering on Discord that happened because:
- Event loop schedules repainting by activating repaint timer
- `Document::tear_down_layout_tree()` destroys paintable tree
- Repaint timer invokes callback and renders an empty frame because
paintable tree was destroyed
2024-05-28 18:21:18 +02:00
Jamie Mansfield
3095daa7c8
LibWeb: Implement HTMLImageElement.currentSrc
...
Removes some console noise from lner.co.uk :)
2024-05-27 17:34:59 +02:00
Jamie Mansfield
600daea544
LibWeb: Implement HTMLIFrameElement.loading
2024-05-27 17:34:59 +02:00
Jamie Mansfield
9ee061ea14
LibWeb: Implement HTMLImageElement.loading
...
Removes some console noise while loading mmu.ac.uk :)
2024-05-27 17:34:59 +02:00
Jamie Mansfield
c484625631
LibWeb: Add IDL enum for lazy loading attribute
2024-05-27 17:34:59 +02:00
Timothy Flynn
eb3b8f8ee4
LibWeb: Implement EventSource for server-sent events
...
EventSource allows opening a persistent HTTP connection to a server over
which events are continuously streamed.
Unfortunately, our test infrastructure does not allow for automating any
tests of this feature yet. It only works with HTTP connections.
2024-05-26 18:29:24 +02:00
Timothy Flynn
9cc186b929
LibWeb: Implement the "queue a task" steps as a distinct AO
...
This will be needed by EventSource.
2024-05-26 18:29:24 +02:00
Shannon Booth
67b1f4af55
LibWeb: Implement HTMLFormElement.encoding
2024-05-26 07:47:59 +02:00
Shannon Booth
aeb815cc66
LibWeb: Implement HTMLFormElement.enctype
2024-05-26 07:47:59 +02:00
Matthew Olsson
a98ad191c7
Userland: Add ESCAPING annotations to a bunch of places
...
This isn't comprehensive; just a result of a simple grep search.
2024-05-22 21:55:34 -06:00
Matthew Olsson
a5f4c9a632
AK+Userland: Remove NOESCAPE
...
See the next commit for an explanation
2024-05-22 21:55:34 -06:00
Tim Ledbetter
c0e504fbdd
LibWeb: Add some missing [FIXME]
IDL attributes
2024-05-21 19:29:04 +02:00