Commit Graph

61815 Commits

Author SHA1 Message Date
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
Andreas Kling
d0afc3e643 CI: Remove "label pull requests" action 2024-06-05 10:49:45 +02:00
Andreas Kling
fce4739d3e LibTLS: Put debug spam about loaded certificates behind TLS_DEBUG 2024-06-05 07:11:34 +02:00
Andreas Kling
a0874dc870 LibWebView: Remove ProcessManager debug spam 2024-06-05 07:10:42 +02:00
Aliaksandr Kalenik
881e970846 LibWeb: Implement scrollbars dragging 2024-06-05 07:03:42 +02:00
Aliaksandr Kalenik
94eacf6da7 LibWeb: Remove did_request_scroll_to IPC call
No longer used after moving scrollbar painting into WebContent.
2024-06-05 07:03:42 +02:00
Aliaksandr Kalenik
cc3d95a356 LibWeb: Remove did_request_scroll IPC call
No longer used after moving scrollbar painting into WebContent.
2024-06-05 07:03:42 +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
Aliaksandr Kalenik
eb909118bf LibWeb: Propagate scrollbar-width property from root element to viewport 2024-06-05 07:03:42 +02:00
Aliaksandr Kalenik
50920b0595 LibWeb: Scroll into viewport from a task in set_focused_element()
This is a hack needed to preserve current behaviour after making set
viewport_rect() being not async in upcoming changes.

For example both handle_mousedown and handle_mouseup should use the same
viewport scroll offset even though handle_mousedown runs focusing steps
that might cause scrolling to focused element:
- handle_mousedown({ 0, 0 })
  - run_focusing_steps()
  - set_focused_element()
  - scroll_into_viewport() changes viewport scroll offset
- handle_mouseup({ 0, 0 })
2024-06-05 07:03:42 +02:00
Jamie Mansfield
8e062a52a3 LibWeb: Move NetworkPartitionKey into a header
This is used elsewhere, such as the HTMLLinkElement.
2024-06-05 05:42:47 +01: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
956106c6d8 LibWeb: Add from_string function for request priority 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
Andrew Kaster
c6e9f0e7b5 Meta+Documentation: Switch default build dir to Build/Ladybird
Also prefer using the new top-level CMakeLists.txt
2024-06-04 13:44:22 -06:00
Andrew Kaster
e8b6de51fe CI: Adapt to new top-level CMakeLists 2024-06-04 13:44:22 -06:00
Andrew Kaster
74e82b57cf CMake: Add a CMakePresets.json to make IDE integration easier 2024-06-04 13:44:22 -06:00
Andrew Kaster
66d91fa08c Meta: Add new top-level CMakeLists 2024-06-04 13:44:22 -06:00
Vroumm
23428c0b9a Documentation: Remove unnecessary newline in documentation
The commit removes an unnecessary newline character in the
documentation that was breaking the bold formatting.
2024-06-04 11:23:29 -06:00
Federico Guerinoni
337e1caa02 Documentation: Fix name in QtCreator documentation
I'll leave the change of variable `__serenity__` in another PR, also
code need to be changed.
2024-06-04 11:22:36 -06:00
Andreas Kling
cd84d23afa Base+Tests+Ladybird: Remove bitmap fonts 2024-06-04 18:45:30 +02:00
Andreas Kling
4822d1da4e LibWeb: Remove unused CRC2D::bitmap_font_fill_text() 2024-06-04 18:45:30 +02:00
Andreas Kling
e81bd34561 LibGfx: Remove more unused Font APIs 2024-06-04 18:45:30 +02:00
Andreas Kling
a4a3703fb4 LibGfx: Remove unused GlyphBitmap class 2024-06-04 18:45:30 +02:00
Andreas Kling
1670eda095 Tests/LibWeb: Remove layout test for Gfx::BitmapFont 2024-06-04 18:45:30 +02:00
Andreas Kling
d86f54da30 LibGfx: Remove Font::presentation_size()
This was a legacy version of point_size() that returned a u8.
2024-06-04 18:45:30 +02:00
Andreas Kling
d95f5692a3 LibGfx: Remove Font::qualified_name() and some FontDatabase APIs
...because the FontDatabase APIs were not used, and they were the only
users of qualified_name().
2024-06-04 18:45:30 +02:00
Andreas Kling
eccfdede10 LibGfx: Remove various unused Font APIs 2024-06-04 18:45:30 +02:00
Andreas Kling
23bb449026 LibGfx: Remove Utf32View APIs from Painter 2024-06-04 18:45:30 +02:00
Andreas Kling
1a2a34fa43 LibGfx: Remove Bitmap::glyph_spacing()
This was only ever non-zero for SerenityOS bitmap fonts.
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
Andreas Kling
30a92911fa WebContent: Remove update_system_fonts() IPC message
This was no longer doing anything. We'll eventually want a way to pass
system default fonts to each WebContent process, but we don't need to
squeeze everything through this API that was really meant for Serenity's
very idiosyncratic font system.
2024-06-04 18:45:30 +02:00
Andreas Kling
f78ed0600a LibGfx: Remove FontDatabase "default queries"
At last, nothing depends on these anymore.
2024-06-04 18:45:30 +02:00
Andreas Kling
966d442152 LibWeb+Ladybird: Remove FontPluginSerenity (+ use Ladybird::FontPlugin) 2024-06-04 18:45:30 +02:00
Andreas Kling
fac126bce9 Ladybird+LibWeb: Stop using Gfx::FontDatabase default fonts
This closes the window at WebContent process startup where we were
relying on Gfx::FontDatabase having some resolvable value in its default
font query.
2024-06-04 18:45:30 +02:00
Andreas Kling
49d546fe8b LibGfx: Remove Painter "draw op" mechanism
We were not making use of this in Ladybird, so let's simplify.
2024-06-04 18:45:30 +02:00
Andreas Kling
d3e802cbef LibGfx: Remove a whole bunch of unused Painter APIs 2024-06-04 18:45:30 +02:00
Andreas Kling
10335a07ee LibGfx: Remove Painter's "implicit font" concept
Nothing actually needs this, so let's remove it and no longer have to
deal with figuring out its fallback value.
2024-06-04 18:45:30 +02:00
Andreas Kling
ba8945f6f3 LibWeb: Make DrawText paint command always have a font
Nobody ever tries to create one without a font anyway.
2024-06-04 18:45:30 +02:00
Andreas Kling
1b2d08ee7e LibGfx: Remove a bunch of unused classes 2024-06-04 18:45:30 +02:00
Tim Ledbetter
d480355b57 Ladybird/Qt: Draw line box borders for all tabs when option is toggled
Previously, line box borders were only set for the current tab when the
option was toggled.
2024-06-04 17:22:07 +02:00
Simon Wanner
0ab4722cee LibTextCodec: Use generated lookup tables for all single byte decoders 2024-06-04 10:21:07 +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
Simon Wanner
46d5cf0443 LibTextCodec: Fix some incorrect encoding aliases 2024-06-04 10:21:07 +02:00
Simon Wanner
09f2d79cb1 LibTextCodec: Bring TextCodec::get_standardized_encoding closer to spec 2024-06-04 10:21:07 +02:00