Commit Graph

48538 Commits

Author SHA1 Message Date
Cameron Youell
1fc2878e24 Ports/freetype: Update freetype to version 2.13.0 2023-03-27 14:27:32 +01:00
Cameron Youell
4b3491ebb6 Ports/grep: Update grep to version 3.10 2023-03-27 14:27:32 +01:00
Cameron Youell
20b1a3b682 Ports/git: Update git to version 2.40.0 2023-03-27 14:27:32 +01:00
Sam Atkins
ba30f298f9 LibWeb: Stop returning the left padding for resolved padding-bottom
I accidentally broke this 8 months ago and nobody noticed. 😅
2023-03-27 14:27:09 +01:00
Fabian Dellwing
ee0ae18386 LibTLS: Check if certificate is self signed before importing it as CA 2023-03-27 15:34:28 +03:30
Fabian Dellwing
114a383af3 LibTLS: Add self signage information to our parsed certificates 2023-03-27 15:34:28 +03:30
Kemal Zebari
c5542ea2c9 Browser: Remove unused variables in BookmarksBarWidget 2023-03-27 10:39:17 +01:00
MacDue
039d5edc6f Browser: Show current zoom level in view menu 2023-03-26 21:55:21 +01:00
MacDue
a2d333ff4a LibGUI: Allow updating the names of menus and submenus 2023-03-26 21:55:21 +01:00
MacDue
cf730403ea WindowServer: Allow updating the name of a menu 2023-03-26 21:55:21 +01:00
MacDue
952f6bbb2a WindowServer: Rename menu_title to name in IPC API
This is referred to as the name everywhere else, so we should be
consistent here.
2023-03-26 21:55:21 +01:00
MacDue
9dbfba0879 Ladybird: Show current zoom level in view menu 2023-03-26 21:55:21 +01:00
MacDue
b22052c0dd LibWebView: Expose getter for current zoom level 2023-03-26 21:55:21 +01:00
MacDue
17d23590bf LibWeb: Check for empty name in is_in_same_radio_button_group()
I missed this check in #18046 (though it was covered in one case
by an optimization).
2023-03-26 21:55:21 +01:00
Andreas Kling
32653f34f9 LibWeb: Don't force relayout whole page on programmatic scroll
When scrolling the page, we may need to flush any pending layout
changes. This is required because otherwise, we don't know if the target
scroll position is valid.

However, we don't need to *force* a layout. If the layout tree is
already up-to-date, we can use it as-is.

Also, if we're scrolling to (0, 0), we don't need to update the layout
at all, since (0, 0) is always a guaranteed valid scroll position.
2023-03-26 21:46:22 +01:00
Coderdreams
14c9ef2563 Ladybird: Open target _blank links in new tab 2023-03-26 21:22:58 +01:00
Aliaksandr Kalenik
05a2d1f0e0 LibWeb/WebDriver: Wait for more data to arrive if request is incomplete
Currently significant portion of requests coming to WebDriver server
fails with error while parsing json body because requests are parsed
when they are not complete yet.

This change solves this by waiting for more data to arrive if HTTP
request parser found that there is not enough data yet to parse
the whole request.

In the future we would probably want to move this logic to LibHTTP
because this problem is relevant for any HTTP server.
2023-03-26 17:56:17 +02:00
Aliaksandr Kalenik
7b8a857e30 LibHTTP: Return error if request is incomplete
If there is not enough input to completely parse HTTP request we need
to return error and handle it in HTTP server.
2023-03-26 17:56:17 +02:00
Aliaksandr Kalenik
9220cdc285 LibHTTP+WebDriver+WebServer: Return error from HTTP request parser 2023-03-26 17:56:17 +02:00
Aliaksandr Kalenik
5b31d1208f LibWeb: Run XML parser input through encoding decoder
Fixes the issue that XML parser fails when loader passes input that is
prefixed with byte order mark.

Also it generally makes sense to pass text source through encoding
decoder before parsing. Probably we would even want to introduce method
similar to `create_with_uncertain_encoding` in `HTMLParser` but for
`XMLParser` to be make harder unconsciously pass non-UTF8 input to XML
parser.
2023-03-26 15:48:45 +01:00
Timothy Flynn
04b51e39d6 LibTimeZone: Update to TZDB version 2023b
https://mm.icann.org/pipermail/tz-announce/2023-March/000078.html
2023-03-26 15:43:40 +01:00
Timothy Flynn
b3d033f027 LibWeb: Declare overflow_value_makes_box_a_scroll_container as static
It is only used in this file, and not being declared static gives a "no
previous declaration" error.
2023-03-26 10:38:05 -04:00
Cameron Youell
f251ff0521 LibWeb: Fix non return in overflow value check 2023-03-26 15:03:43 +01:00
Andreas Kling
949483fb01 Tests/LibWeb: Test flex column item with auto height and max-width
This case is important because we have to clamp the width before using
it to determine the auto height.
2023-03-26 15:14:35 +02:00
Andreas Kling
5b030a6923 Tests/LibWeb: Add test for flex item auto height with flex-wrap: wrap 2023-03-26 15:14:35 +02:00
Andreas Kling
2699f226fb LibWeb: Don't compute main axis "auto min-size" for flex item cross axis
The "flex item automatic minimum size in the main axis is the
content-based minimum size" behavior should only apply to flex item
sizes in the main axis. There was one case where we incorrectly applied
this behavior in the cross axis
2023-03-26 15:14:35 +02:00
Andreas Kling
1f7e6cc022 LibWeb: Use zero automatic minimum size for scroll-container flex items
The "flex item automatic minimum size in the main axis is the
content-based minimum size" behavior should only apply to flex items
that aren't scroll containers. We were doing it for all flex items.
2023-03-26 15:14:35 +02:00
Andreas Kling
8038824211 LibWeb: Add Layout::Box::is_scroll_container()
The computed `overflow` property values determine whether a box is a
scroll container or not, so let's have a simple helper for asking this.
2023-03-26 15:14:35 +02:00
Andreas Kling
3932afdc6a LibWeb: Remove unnecessary repeat of partial flex layout algorithm
When calculating one of the intrinsic sizes for a flex container, we
already go through the flex layout algorithm.

There's no need to perform some of the algorithm steps a second time.
This is a relic from an earlier time when we tried to bail early from
the layout algorithm in  the intrinsic sizing case. Now that we go
through the whole thing anyway, this is much simpler. :^)
2023-03-26 15:14:35 +02:00
MacDue
d38392d416 Base: Use radio button groups on accent-color demo page 2023-03-26 15:09:57 +02:00
MacDue
bcfe275563 Base: Add two more radio buttons to HTML input test page
You can't really test radio buttons with just one button.
2023-03-26 15:09:57 +02:00
MacDue
f96747b722 LibWeb: Check all conditions of radio button groups
This fixes a few issues I noticed when playing around with radio
buttons. Previously radio buttons would uncheck checkboxes with
the same "name" attribute, uncheck inputs across different forms,
and treated no name attribute as a group.

This now implements the radio button group check from the HTML spec.
2023-03-26 15:09:57 +02:00
Jelle Raaijmakers
256030da4e PixelPaint: Correctly set default layer name
Previously, if you confirmed the "new layer" dialog without any change
to the layer name, the layer would end up with an empty string for its
name.
2023-03-26 12:30:58 +01:00
Cameron Youell
f17bee0cb5 LibWeb: Fix mistype in LayoutState 2023-03-26 13:28:07 +02:00
Tim Ledbetter
30b3c30aba PixelPaint: Remove unused function definition from Image 2023-03-26 01:49:58 +01:00
Tim Ledbetter
8b4158633b PixelPaint: Use new String to format error messages 2023-03-26 00:47:29 +01:00
Tim Ledbetter
5b84fafbca PixelPaint: Include possible errno description in error messages
In the case where an error is created from an errno, calling
string_literal() will print nothing. Using Error's formatter
instead gives a more descriptive error message.
2023-03-26 00:47:29 +01:00
Tim Ledbetter
3faf089be5 PixelPaint: Add a Duplicate Layer action
The "Duplicate Layer" action inserts a copy of the selected layer into
the layer stack. The new layer is placed above the selected layer.
2023-03-26 00:44:26 +01:00
Tim Ledbetter
55feecee36 PixelPaint: Make wand tool work when layer and image rects differ
Previously, the position of the mask used to calculate the new
selection did not match the position of the active layer. The program
would crash when trying to set a mask pixel outside the bounds of the
active layer.
2023-03-26 00:21:29 +01:00
Julian Offenhäuser
bdd5f36121 LibPDF: Load replacements for TrueTypeFonts without an embedded font
This previously only happened for Type 1 fonts.
2023-03-25 16:27:30 -06:00
Julian Offenhäuser
5deac3a7f5 LibPDF: Actually return an error when failing to load replacement fonts 2023-03-25 16:27:30 -06:00
Julian Offenhäuser
fec7ccf020 LibPDF: Ask OpenType font programs for glyph widths if needed
If the font dictionary didn't specify custom glyph widths, we would fall
back to the specified "missing width" (or 0 in most cases!), which meant
that we would draw glyphs on top of each other in a lot of cases, namely
for TrueTypeFonts or standard Type1Fonts with an OpenType fallback.

What we actually want to do in this case is ask the OpenType font for
the correct width.
2023-03-25 16:27:30 -06:00
Julian Offenhäuser
2b3a41be74 LibPDF: Remove the subroutine length limit for PS1 font programs
A limit of 1024 subroutines seemed like a sensible choice, but some
fonts actually do exceed it. We will now only assert that the specified
amount is positive.
2023-03-25 16:27:30 -06:00
Julian Offenhäuser
4ec01669fc LibPDF: Scale vector paths with the view
This ensures that lines have the correct size at every scale factor.
2023-03-25 16:27:30 -06:00
Julian Offenhäuser
731676c041 LibPDF: Accept floats as line dash pattern phases 2023-03-25 16:27:30 -06:00
Julian Offenhäuser
95a804bc4e LibPDF: Allow the page rotation to be inherited 2023-03-25 16:27:30 -06:00
Julian Offenhäuser
b90a794d78 LibPDF: Allow pages with no specified contents
The contents object may be omitted as per spec, which will just leave
the page blank.
2023-03-25 16:27:30 -06:00
Julian Offenhäuser
fde990ead8 LibPDF: Allow optional inheritable page attributes
Previously, get_inheritable_object would always try to find the object
and throw an error if it couldn't. The spec tells us that some page
attributes, like CropBox, are optional but also inheritable. Others,
like the media box and resources, are technically required by the spec,
but omitted by some documents.

In both cases, we are now able to search for inheritable objects and
find a suitable replacement if there wasn't one.
2023-03-25 16:27:30 -06:00
Julian Offenhäuser
320f5f91ab LibPDF: Ignore whitespace in the ASCII hex filter
The spec tells us that any amount of whitespace may appear between the
hex digits and that it should just be ignored.
2023-03-25 16:27:30 -06:00
Nico Weber
29796f8f5e LibCrypto: Use 8-byte crc32 instruction on arm too
Takes

    % time Build/lagom/gunzip -c \
        /Users/thakis/Downloads/trace_bug.json.gz > /dev/null

from 3.9s to 3.87s.
2023-03-25 21:42:50 +00:00