Commit Graph

27553 Commits

Author SHA1 Message Date
0GreenClover0
0742cb0818 Calendar: Use proper tile information when painting tiles after January 2023-08-14 20:45:35 +02:00
Aliaksandr Kalenik
38c7703fe8 LibWeb: Add allowPOST param in populate_session_history_entry_document 2023-08-14 17:46:46 +02:00
Aliaksandr Kalenik
b05bd889e1 LibWeb: Add missing navigable in NavigableContainer::visit_edges() 2023-08-14 17:46:46 +02:00
Aliaksandr Kalenik
08788072c1 LibWeb: Add SessionHistoryTraversalQueue 2023-08-14 17:46:46 +02:00
Aliaksandr Kalenik
6d866dc5ba LibWeb: Take care of ongoing navigation in Navigable::navigate() 2023-08-14 17:46:46 +02:00
Shannon Booth
099a069b86 LibWeb: Fix typo in query of link element search params
Regressed in 21fe86d235
2023-08-14 16:26:34 +02:00
Nico Weber
934340d845 LibPDF: Add FIXME for CIDFontType2 creation
Move some code only needed for CIDFontType2 creation into a new
function and add a FIXME describing what needs to happen there.
2023-08-14 16:26:09 +02:00
Nico Weber
1c263eee61 LibPDF: Add spec comments and FIXMEs to Type0Font::draw_string() 2023-08-14 16:26:09 +02:00
Andi Gallo
a18500c78c LibWeb: Paint separate borders for inline tables 2023-08-14 15:12:19 +02:00
Andreas Kling
c838bb3f21 LibGUI: Make AboutDialog APIs infallible 2023-08-14 14:57:54 +02:00
Andreas Kling
bd61e75e0b LibGUI: Remove Window::try_add_menu()
And fall back to the infallible add_menu().
2023-08-14 14:57:54 +02:00
Andreas Kling
5300896095 LibGUI: Remove Menubar::try_add_menu()
And fall back to the infallible add_menu().
2023-08-14 14:57:54 +02:00
Andreas Kling
94cd272ac0 LibGUI: Make CommonMenus::make_accessibility_menu() infallible 2023-08-14 14:57:54 +02:00
Andreas Kling
676ef0cc3d LibGUI: Make Menu::add_recent_files_list() infallible 2023-08-14 14:57:54 +02:00
Andreas Kling
f2faf2767f LibGUI: Remove Menu::try_add_action()
And fall back to the infallible add_action().
2023-08-14 14:57:54 +02:00
Andreas Kling
eec328e2ab LibGUI: Remove Menu::try_add_submenu()
And fall back to the infallible add_submenu().
2023-08-14 14:57:54 +02:00
Andreas Kling
1525fa3b8f LibGUI: Remove Menu::try_add_separator()
And fall back to the infallible add_separator().
2023-08-14 14:57:54 +02:00
Andreas Kling
b679094529 LibGUI: Remove remaining fallible Layout APIs 2023-08-14 14:57:54 +02:00
Andreas Kling
58e482a06d LibGUI: Remove Layout::try_add_spacer()
And fall back to the infallible add_spacer().

Work towards #20557.
2023-08-14 14:57:54 +02:00
Andreas Kling
8322b31b97 LibGUI: Remove Widget::try_set_layout<T>()
And fall back to the infallible set_layout<T>().

Work towards #20557.
2023-08-14 14:57:54 +02:00
Timothy Flynn
341626e2ea LibJS: Reorder NumberFormat's rounding priority resolved option
This is a normative change in the ECMA-402 spec. See:
https://github.com/tc39/ecma402/commit/0fbf16c
2023-08-14 07:48:54 -04:00
Timothy Flynn
b0c8543b28 LibJS: Compute NumberFormat's rounding priority during construction
This is an editorial change in the ECMA-402 spec. See:
https://github.com/tc39/ecma402/commit/c28118e
2023-08-14 07:48:54 -04:00
Andi Gallo
bc8c2b2bc2 LibWeb: Use cell width instead available width to compute height
Overall available width should only affect later stages of the table
layout algorithm and have no impact on cell measures.
2023-08-14 13:14:24 +02:00
MacDue
2a067b5601 LibWeb: Don't paint all stacking contexts like positioned elements
Previously stacking contexts were only painted in steps 3, 8, and 9.
These steps are only meant to cover positioned elements (as per
https://www.w3.org/TR/CSS22/zindex.html). This meant that elements with
opacity (which forms a stacking context) could end up painted above
elements that actually occlude them.
2023-08-14 13:10:17 +02:00
Shannon Booth
576f8e8fa8 LibWeb: Fix crash parsing an invalid pseudo compound selector
Reduced from a crash on: https://github.com/SerenityOS/serenity/pulls

Fixes #20568
2023-08-14 11:43:57 +01:00
0GreenClover0
061061bd9c Calendar: Make on_month_click capture the view_month_action's RefPtr 2023-08-14 07:29:09 +02:00
Aliaksandr Kalenik
0d66a80a0f headless-browser: Add ref tests support
The ref tests runner takes screenshots of both the input page and the
expected page, then compares them. Ref testing allows us to catch
painting bugs, which cannot be detected with the layout and text tests
we already have.

With ref tests, we'll likely want to reuse the same expectation page
for multiple inputs. Therefore, there's a `manifest.json` file that
describes the relationship between inputs and expected outputs.
2023-08-14 07:28:22 +02:00
Shannon Booth
9d60f23abc AK: Port URL::m_fragment from DeprecatedString to String 2023-08-13 15:03:53 -06:00
Shannon Booth
5663a2d3b4 AK+LibWeb: Do not percent encode/decode in URL fragment setter/getters
The web specs do not expect decoding or decoding to happen when calling
these helpers. This allows us to remove the raw_fragment helper function
from the URL class.
2023-08-13 15:03:53 -06:00
Shannon Booth
c25485700a AK: Port URL scheme from DeprecatedString to String 2023-08-13 15:03:53 -06:00
Shannon Booth
21fe86d235 AK: Port URL::m_query from DeprecatedString to String 2023-08-13 15:03:53 -06:00
Shannon Booth
55a01e72ca AK: Port URL username/password from DeprecatedString to String
And for cases that just need to check whether the password/username is
empty, add a raw_{password,username} helper to avoid any allocation.
2023-08-13 15:03:53 -06:00
Shannon Booth
6b29dc3e46 LibWeb: Fix double percent encode of username
URL::set_username will apply a percent encode, so we don't need to do
it a second time here.
2023-08-13 15:03:53 -06:00
0GreenClover0
340230f6bf Calendar: Promote view_type ActionGroup to CalendarWidget's member
Otherwise, it would get destroyed after exiting the create() function.
2023-08-13 22:34:14 +02:00
Daniel Bertalan
65232b6681 LibJS: Mark classes and virtual functions final where possible
These cases were found with GCC's `-Wsuggest-final-{types,methods}`
warnings, which catch calls that could have been devirtualized had we
declared the functions `final` in the source.

To reproduce, Link Time Optimization needs to be enabled. The easiest
way to achieve this is to set the `CMAKE_INTERPROCEDURAL_OPTIMIZATION`
cache variable to `ON`. The `.incbin` directive in LibCompress' Brotli
decompressor might needs to be changed to an absolute path for this to
work.

This commit also removes a pair of unused virtual functions.
2023-08-13 18:05:09 +02:00
Andreas Kling
72c9f56c66 LibJS: Make Heap::allocate<T>() infallible
Stop worrying about tiny OOMs. Work towards #20449.

While going through these, I also changed the function signature in many
places where returning ThrowCompletionOr<T> is no longer necessary.
2023-08-13 15:38:42 +02:00
Andi Gallo
b6f9f4c28c LibWeb: Fix handling of max-content containing block for floating box
Fixes layout of page toolbar on Wikipedia.
2023-08-13 14:43:41 +02:00
Andi Gallo
97ba1ff1f7 LibWeb: Remove unused variable from compute_height method 2023-08-13 14:43:41 +02:00
sin-ack
7192cf7487 LibWeb: Add hack for computing the request referer during load
This is a temporary hack until navigables are used to load pages, which
uses fetch infrastructure that does this according to spec.
2023-08-13 14:29:53 +02:00
Liav A
029160fd27 Utilities: Add zcat
This utility is actually a symlink to the gunzip utility.
The gunzip utility is modified to enable writing to stdout when running
through the zcat symlink, to emulate the same behavior on other OSes.

In addition to that, the gunzip utility is now required on a default
installation as it could be a vital utility under some conditions (for
example, downloading source code in a tar.gz file).
2023-08-13 10:16:03 +01:00
Daniel Bertalan
f0973db6dd LibSanitizer: Add _abort variants of UBSan handlers
These variants make the choice to terminate the process a compile-time
decision rather than a runtime-configurable setting through
`UBSAN_OPTIONS`. As the compiler can treat any code following these
UBSan handler calls as dead code, it allows for significant
optimizations, such as removing redundant UBSan checks and not needing
to worry about saving volatile registers before calling these.

Generation of this kind of instrumentation can be enabled with
`-fsanitize=undefined -fno-sanitize-recover=undefined`. Build system
support will come in a separate PR.
2023-08-13 05:14:07 +02:00
Daniel Bertalan
a2d352c4c9 LibSanitizer: Abort on unrecoverable UBSan errors
There is no sensible recovery possible from non-void functions that
fail to return a value, or from `__builtin_unreachable()` being reached,
all bets are off once they happened. This is why LLVM's libsanitizer
treats these as always fatal, even if all other UBSan checks are made
recoverable with `-fsanitize-recover`. The codegen already assumes that
these handlers will not return.
2023-08-13 05:14:07 +02:00
auipc
1653c5ea41 LibWeb: Use current platform for navigator.platform
Before, navigator.platform would always report the platform as "Serenity
OS", regardless of whether or not that was true. It also did not include
the architecture, which Firefox and Chrome both do. Now, it can report
either "Linux x86_64" or "SerenityOS AArch64".
2023-08-13 05:13:18 +02:00
thankyouverycool
1ea24c38b4 LibGUI: Fix typo in Splitter's resizee Getter/Setter 2023-08-13 05:12:00 +02:00
kleines Filmröllchen
2e46e33a9b LibGUI: Add direct property for fixed-width font
There's the "font_type" property which currently only handles
fixed-width yes/no, so until we get a proper font type enum and
associated enum property, this is better to use from GML instead of a
special case in the GML compiler.
2023-08-12 12:29:19 -06:00
kleines Filmröllchen
bb471451e0 aconv: Time transcode duration
This is a good indicator for encode speed.
2023-08-12 12:25:26 -06:00
kleines Filmröllchen
70f31c89a3 aconv: Support FLAC encoding
The main write loop is refactored so that adding further formats via the
new Encoder interface should be much simpler.
2023-08-12 12:25:26 -06:00
kleines Filmröllchen
625aac2367 LibAudio: Add a FLAC encoder
This encoder can handle all integer formats and sample rates, though
only two channels well. It uses fixed LPC and performs a
close-to-optimal parameter search on the LPC order and residual Rice
parameter, leading to decent compression already.
2023-08-12 12:25:26 -06:00
kleines Filmröllchen
252b1328ea LibAudio: Expand FLAC loader debug messages
These are now indented to aid readability.
2023-08-12 12:25:26 -06:00
kleines Filmröllchen
60f1472902 LibAudio: Store all available data in the FLAC frame header
This will make it possible to write the header back out.
2023-08-12 12:25:26 -06:00