Commit graph

58657 commits

Author SHA1 Message Date
Tim Ledbetter bf0b114bde Ports/devilutionX: Update to version 1.5.2 2024-02-06 15:44:33 +01:00
Nico Weber cd5aeb0f22 Tests: Remove UserspaceEmulator more
These files don't contain "UserspaceEmulator", so I missed them
in #22998.

No behavior change.
2024-02-06 05:53:05 -07:00
Aliaksandr Kalenik 4a41a65ec5 LibWeb: Shift button paintable clip rectangle by scroll offset
Rectangles should be recorded using absolute coordinates, including
the scroll offset.
2024-02-06 13:06:16 +01:00
Aliaksandr Kalenik d43dbe2842 LibWeb: Shift SVG paintable clip rectangle by scroll offset
Rectangles should be recorded using absolute coordinates, including
the scroll offset.
2024-02-06 13:06:16 +01:00
Dan Klishch 677bcea771 ntpquery: Use AK::convert_between_host_and_network_endian
Instead of polluting global namespace with definitions from
libkern/OSByteOrder.h and machine/endian.h on MacOS, just use AK
functions for conversions.
2024-02-06 04:37:47 -07:00
Jelle Raaijmakers 6b08b43a1e Ports: Update URL for qt6-qt5compat
They moved the file from `official_releases` to `archive` :^)
2024-02-06 08:46:10 +01:00
Shannon Booth f5fd912d6d LibJS/Tests: Add a bunch of rounding mode tests 2024-02-06 08:45:34 +01:00
Shannon Booth 0ed352e44e LibJS: Update DifferenceInstant and its callers to latest spec
This is a bit tangled in that updating these functions involves a slew
of other spec changes.

However those spec updates fix a bunch of rounding issues, fixing 32
test cases.

Diff Tests:
    +32     -32 
2024-02-06 08:45:34 +01:00
Shannon Booth c4f37c1bfa LibJS: Implement Temporal AO BalanceDuration 2024-02-06 08:45:34 +01:00
Shannon Booth 276930185a LibJS: Implement temporal AO BalancePossiblyInfiniteTimeDuration
This has the guts of the old temporal AO BalanceDuration with some
differences such as an extra precision of one unit. This appears to be
important for different rounding modes to act as a tiebreaker.

It also does not have any logic regarding a zoned date time 'relative
to' - the spec seems to have this factored in a way where callers are
expected to perform this logic if neccessary.
2024-02-06 08:45:34 +01:00
Shannon Booth 750ecc3f43 LibJS: Add a FIXME to remove use of old Temporal AO BalanceDuration
This is a bit too big of a yak to take on right now - leave a FIXME to
remove this as it seems easier to update callers of this function
piecemeal.
2024-02-06 08:45:34 +01:00
Shannon Booth af586dde64 LibJS: Add a remainder() function to represent remainder(x, y)
This is just the same as calling x % y - or fmod, and is implemented
for symmetry with the 'modulo' function.
2024-02-06 08:45:34 +01:00
Nico Weber cc083310a7 LibGfx/ICC: In lerp_nd(), use VLAs for coordinates
`x.size()` is 3 or 4 in practice and at most 15 in theory
(cf `number_of_components_in_color_space()` in Profile.cpp),
so using a VLA for these should be fine from a stack size PoV.

It's only accessed through a span, so there's no additional
security risk.

Takes

    Build/lagom/bin/image --no-output \
        --assign-color-profile \
            Build/lagom/Root/res/icc/Adobe/CMYK/USWebCoatedSWOP.icc \
        --convert-to-color-profile serenity-sRGB.icc \
        cmyk.jpg

from 2.74s to 2.66s on my machine, almost 3% faster.

(Don't do this in LibPDF's SampledFunction::evaluate() since there's
no bound on the dimension of the input function. Realistically,
size of the table puts a pretty low bound on that dimension though,
so we should probably enforce some bound in SampledFunction::create()
and do this there too.)
2024-02-06 08:44:53 +01:00
Nico Weber 9fc47345ce LibGfx+LibPDF: Make sample() functions take ReadonlySpan<>
...instead of Vector<>.

No behavior (or performance) change.
2024-02-06 08:44:53 +01:00
Nico Weber a352099b05 LibGfx/ICC: In lerp_nd(), use VLAs for left_index, factor
`x.size()` is 3 or 4 in practice and at most 15 in theory
(cf `number_of_components_in_color_space()` in Profile.cpp),
so using a VLA for these should be fine from a stack size PoV.

They're accessed from two local loops iterating from 0 to
`x.size()`, so it's hopefully not too risky from a security
PoV either.

Takes

    Build/lagom/bin/image --no-output \
        --assign-color-profile \
            Build/lagom/Root/res/icc/Adobe/CMYK/USWebCoatedSWOP.icc \
        --convert-to-color-profile serenity-sRGB.icc \
        cmyk.jpg

from 2.81s to 2.74s on my machine, about 2.5% faster.
2024-02-06 08:44:53 +01:00
Tim Ledbetter 69df94ec5c LibWeb: Implement document.elementFromPoint()
This function uses our existing hit testing code to determine the
topmost element at the given coordinates relative to the viewport.
2024-02-06 08:43:03 +01:00
Matthew Olsson c732e03ea0 LibWeb: Add missing implementation of method in AnimationTimeline 2024-02-06 08:42:07 +01:00
Matthew Olsson df4be9a479 LibWeb: Add missing virtual destructor in AnimationEffect 2024-02-06 08:42:07 +01:00
Matthew Olsson 154b4d4196 LibWeb: Invalidate style of animation targets in update_finished_state 2024-02-06 08:42:07 +01:00
Matthew Olsson a7727215a6 LibWeb: Implement missing members of AnimationEffect.getComputedTiming() 2024-02-06 08:42:07 +01:00
Matthew Olsson 360082544c LibWeb: Fix incorrect Animation active_time in the after phase 2024-02-06 08:42:07 +01:00
Matthew Olsson 16a21a503d LibWeb: Fix incorrect comparison in Animation::update_finished_state 2024-02-06 08:42:07 +01:00
Matthew Olsson 2e29b0d700 LibWeb: Rename confusing parameter in AnimationPlaybackEvent 2024-02-06 08:42:07 +01:00
Matthew Olsson 8c80d0ee02 LibWeb: Fix typo (original_relative_time -> origin_relative_time) 2024-02-06 08:42:07 +01:00
Matthew Olsson a27dd03dcc LibWeb: Avoid slicing struct in KeyframeEffect::construct_impl 2024-02-06 08:42:07 +01:00
Aliaksandr Kalenik 7411f66fcf LibWeb/CSS: Resolve value of "height" in special way according to spec
Per spec value of height should be resolved to used value if "display"
property is not "none" or "contents".
2024-02-06 08:41:21 +01:00
Bastiaan van der Plaat 582bf1eaf3 Run: Fix bug where it would crash because uninitialized main widget
The set_main_widget<T>() function only calls the construct and not
`try_create()` that the GMLCompiler generates so all calls to
`find_descendant_of_type_named()` would result in null
pointers that would resolve in a crash.
2024-02-06 08:41:01 +01:00
Timothy Flynn 747fd86f26 LibWeb: Make WebDriver check if the BC's navigable has been destroyed
The spec steps to check if a browsing context is open have been updated
for navigables.
2024-02-06 08:40:27 +01:00
Aliaksandr Kalenik 623ad94582 LibWeb: Resolve effective overflow-x and overflow-y according to spec
Implements following rule from CSS Overflow Module Level 3:
"The visible/clip values of overflow compute to auto/hidden
(respectively) if one of overflow-x or overflow-y is neither visible
nor clip."
2024-02-06 08:39:06 +01:00
Shannon Booth b6292a2d7d LibWeb: Use WebIDL integer typedefs in ProgressEvent 2024-02-06 08:35:53 +01:00
Shannon Booth 3e756da564 LibWeb: Use unsigned long long for ProgressEventInit
The IDL generator now supports this :^)
2024-02-06 08:35:53 +01:00
Nico Weber 92a628c07c LibPDF: Always treat /Subtype /Image as binary data when dumping
Sometimes, the "is mostly text" heuristic fails for images.

Before:

    Build/lagom/bin/pdf --render out.png ~/Downloads/0000/0000521.pdf \
        --page 10 --dump-contents 2>&1 | wc -l
       25709

After:

    Build/lagom/bin/pdf --render out.png ~/Downloads/0000/0000521.pdf \
         --page 10 --dump-contents 2>&1 | wc -l
       11376
2024-02-05 21:18:19 -05:00
vincent-rg a9df60ff1c AK: Update OptionParser::m_arg_index by substracting skipped args
On argument swapping to put positional ones toward the end,
m_arg_index was pointing at "last arg  index" + "skipped args" +
"consumed args" and thus was pointing ahead of the skipped ones.

m_arg_index now points after the current parsed option arguments.
2024-02-06 00:08:30 +01:00
Tim Ledbetter 8320faf052 Ladybird/Qt: Map Enter keypresses to the code point '\n'
Previously, on systems where pressing Enter would generate "\r\n", only
the '\r' character was being sent to the event handler. This change
ensures consistent behavior across platforms regardless of their native
line ending characters.
2024-02-05 16:52:03 -05:00
Bastiaan van der Plaat 5a8e82e6ea Base: Create user default Music and Pictures directories 2024-02-05 16:30:52 +01:00
Bastiaan van der Plaat c8dc77a552 LibCore: Add Music, Pictures and Videos user directory helpers 2024-02-05 16:30:52 +01:00
Bastiaan van der Plaat f4d5ff9ed9 Welcome: Move tips.txt to /usr/share/Welcome because it's system wide 2024-02-05 16:30:52 +01:00
Andrew Kaster 813c66403d LibWeb: Catch null browsing context in destroy_top_level_traversable
When WebDriver asks to destroy a window, we can hit this case with no
active browsing context. This seems odd, but perhaps is a spec issue as
well. Just log to dbgln for now.
2024-02-05 08:05:48 -07:00
Andrew Kaster d508a02f25 LibWeb: Ensure that load events are fired for window.open('about:blank') 2024-02-05 08:05:48 -07:00
Andrew Kaster 888e67992a LibWeb: Remove unused BrowsingContext functions and data members
This aligns it better with the current state of the spec.

There's still some functions and data members that need moved into
Navigable or TraversableNavigable, but we can leave those for the next
cleanup PR.
2024-02-05 08:05:48 -07:00
Andrew Kaster 9645daaf6c LibWeb: Remove RemoteBrowsingContext and AbstractBrowsingContext
With the transition to Navigables, and a working implementation of
window.open(), we no longer need this abstraction layer.
2024-02-05 08:05:48 -07:00
Andrew Kaster 6e75440d5a LibWeb: Bring Document::fallback_base_url closer to the spec 2024-02-05 08:05:48 -07:00
Andrew Kaster 5d9d0aa267 LibWeb: Replace check for BrowsingContext's about blank state with false
This check has been if (false && stuff) for quite a while, since the
transition to Navigables. No one updates the BrowsingContext's session
history, so the check for it having an about blank document and only an
about blank document is always false.
2024-02-05 08:05:48 -07:00
Andrew Kaster b6fc29ca21 LibWeb: Always use Navigable to translate CSS positions to top-level 2024-02-05 08:05:48 -07:00
Andrew Kaster 3aee787539 LibWeb+WebContent: Convert WebDriver to choose a navigable AO
Also use the TraversableNavigable's window_handle instead of the
BrowsingContext's.
2024-02-05 08:05:48 -07:00
Andrew Kaster 713698d2ca Documentation: Recommend disabling clangd's IncludeCleaner feature 2024-02-05 08:04:24 -07:00
Andrew Kaster e6762e8d4d Meta: Disable readability-function-cognitive-complexity in clang-tidy
Feedback from contributors suggests that this warning doesn't help code
quality, and is seen as noisy.
2024-02-05 08:04:24 -07:00
Andrew Kaster 3078572f0d Meta: Disable misc-include-cleaner in clang-tidy
IncludeCleaner is a new feature of clang-tidy/clangd that adds upstream
support for the include-what-you-use (IWYU) tool's checks.

However, this tool is very noisy on our codebase. It can be enabled by
individual contributors at their leisure.
2024-02-05 08:04:24 -07:00
Dan Klishch 3e43d15440 Everywhere: Prefer VERIFY over assert() 2024-02-05 07:03:53 -05:00
Fabian Dellwing ef9bfe3499 Ports: Update poppler to 24.02.0 2024-02-04 23:58:52 +01:00