Commit graph

48663 commits

Author SHA1 Message Date
Andreas Kling
ca290b27ea LibWeb: Make box content sizes indefinite before intrinsic sizing
When calculating the intrinsic width of a box, we now make its content
width & height indefinite before entering the intrinsic sizing layout.
This ensures that any geometry assigned to the box by its parent
formatting context is ignored.

For intrinsic heights, we only make the content height indefinite.
This is because used content width is a valid (but optional) input
to intrinsic height calculation.
2023-03-27 23:28:07 +02:00
Andreas Kling
7639eccd53 LibWeb: Add default equality operators to Available{Space,Size}
I find myself adding these over and over again while testing.
Let's just have them always there.
2023-03-27 23:28:07 +02:00
Andreas Kling
3b76cc5245 LibWeb: Pass available inner space to inline-level SVG layout 2023-03-27 23:28:07 +02:00
Andreas Kling
4f752ca791 LibWeb: Pass available inner space to BFC root auto height calculation 2023-03-27 23:28:07 +02:00
Aliaksandr Kalenik
1ee99017e2 LibWeb: Fix intrinsic sizing early return condition in TFC
Early return before running full TFC algorithm is only possible when
just table width need to be calculated.
2023-03-27 23:10:16 +02:00
Sam Atkins
97b3f1230b WebServer: Propagate more errors
Use try_append() instead of append().
2023-03-27 20:29:51 +01:00
Sam Atkins
8dd0038f47 LibCore: Add DateTime::to_string()
This is just the contents of to_deprecated_string() with errors
propagated. to_deprecated_string() is now implemented using to_string().
2023-03-27 20:29:51 +01:00
Sam Atkins
7dfe1f9f8f WebServer: Use relative URLs for the directory listing
This fixes an issue found on Linus's hosted WebServer. Now, if WebServer
is hosted at a non-root URL. (eg, `example.com/webserver` instead of
`example.com`) the links will correctly go to
`example.com/webserver/foo` instead of `example.com/foo`.
2023-03-27 20:29:51 +01:00
Sam Atkins
cce5e3158f WebServer: Handle incomplete HTTP requests
Mostly by copying the code in LibWeb/WebDriver/Client.cpp
2023-03-27 20:29:51 +01:00
MacDue
ce8f1939e9 Ladybird: Don't update the zoom menu text for null tabs
This fixes an "Assertion `m_zoom_menu && m_current_tab' failed." error
when closing a window.
2023-03-27 18:50:01 +01:00
Cameron Youell
0471ec0567 Toolchain: Update binutils to version 2.40 2023-03-27 16:13:48 +01:00
djwisdom
afc067bc38 Ports: Update serenity-theming use latest commit ba2ddd0
Snake: Add Buggie skin
Snake: Add CatDog skin
Chess: Add ugly piece set
Base: Add Hotdog Stand theme
2023-03-27 14:28:45 +01:00
Cameron Youell
7b33f33509 Ports/libtiff: Update libtiff to version 4.5.0 2023-03-27 14:27:32 +01:00
Cameron Youell
c04e8ae6f2 Ports/imagemagick: Update imagemagick to version 7.1.1-5 2023-03-27 14:27:32 +01:00
Cameron Youell
7874b492df Ports/gettext: Update gettext to version 0.21.1 2023-03-27 14:27:32 +01:00
Cameron Youell
0bd2cd037d Ports/sqlite: Update sqlite to version 3410200 2023-03-27 14:27:32 +01:00
Cameron Youell
5d9c4cc9e3 Ports/libpng: Update libpng to version 1.6.39 2023-03-27 14:27:32 +01:00
Cameron Youell
66f4ffe309 Ports/make: Update make to version 4.4 2023-03-27 14:27:32 +01:00
Cameron Youell
f22bf42566 Ports/cmake: Update cmake to version 3.26.1 2023-03-27 14:27:32 +01:00
Cameron Youell
18720fed7b Ports/curl: Update curl to version 8.0.1 2023-03-27 14:27:32 +01:00
Cameron Youell
a5269560f5 Ports/bison: Update bison to version 3.8 2023-03-27 14:27:32 +01:00
Cameron Youell
4900b34ae1 Ports/bdwgc: Update bdwgc to version 8.2.2 2023-03-27 14:27:32 +01:00
Cameron Youell
fb3a1e2341 Ports/bc: Update bc to version 6.5.0 2023-03-27 14:27:32 +01:00
Cameron Youell
884d5720d6 Ports/bash: Update bash to version 5.2.15 2023-03-27 14:27:32 +01:00
Cameron Youell
cff303bd69 Ports/binutils: Update binutils to version 2.40 2023-03-27 14:27:32 +01:00
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