Commit Graph

58922 Commits

Author SHA1 Message Date
Tim Ledbetter
fa37a220d6 Terminal: Propagate changes in automark settings to the terminal 2024-02-07 13:35:49 +01:00
Tim Ledbetter
0bdb222953 Terminal: Deduplicate bell mode parsing code 2024-02-07 13:35:49 +01:00
Tim Ledbetter
5c8962b8f1 LibVT+TerminalSettings: Move settings parsing functions to LibVT
This change moves the automark and bell settings parsing functions to
LibVT, so that they can be shared between Terminal and TerminalSettings.
2024-02-07 13:35:49 +01:00
Tim Ledbetter
2850bb881a TerminalSettings: Provide default values for terminal settings
The change ensures that functions that parse string values for terminal
settings fall back to a default value, if there is no value present or
the value is invalid.
2024-02-07 13:35:49 +01:00
Tim Ledbetter
1df31e426d TerminalSettings: Use correct name for the automark_off radio button
This was causing a segfault when opening the Terminal Settings window.
2024-02-07 13:35:49 +01:00
Tim Ledbetter
b680c29923 Base: Add a default AutoMark entry to the Terminal config file 2024-02-07 13:35:49 +01:00
Nico Weber
d3c94d8436 LibGfx: Add a comment to Font::try_load_from_offset()
See #17189 -- this confused me for a bit.
2024-02-07 08:31:18 +00:00
Nico Weber
21ffb118af LibGfx/OpenType: Support cmaps with format Unicode
Some fonts only contain unicode tables. This makes them work.
2024-02-07 08:31:03 +00:00
Ali Mohammad Pur
54ab6fe5b9 LibVT+Everywhere: Introduce 'automarks' and 'clear previous command'
Automarks are similar to bookmarks placed by the terminal, allowing the
user to selectively remove a single command and its output from the
terminal scrollback.
This commit implements a single way to add marks: automatically placing
them when the shell becomes interactive.

To make sure the shell behaves correctly after its expected prompt
position changes, the terminal layer forces a resize event to be passed
to the shell on such (possibly) partial clears; this also has the nice
side effect of fixing the disappearing prompt on the preexisting "clear
including history" action: Fixes #4192.
2024-02-07 00:43:11 +01:00
Ali Mohammad Pur
cde528fdd9 LibLine: Fully redraw on resize when origin position changes 2024-02-07 00:43:11 +01:00
Ali Mohammad Pur
35abbafb7b Shell: Don't escape display/trailing texts when completing via programs
This matches the shell's own behaviour regarding completions.
2024-02-07 00:43:11 +01:00
Ali Mohammad Pur
8666b4fa87 Shell: Provide a valid ending position for POSIX immediate nodes
This allows the formatter to generate a correct immediate invocation
without a missing closing brace.
This commit also removes a useless code comment.
2024-02-07 00:43:11 +01:00
Gabriel Tassinari
946a4d6f0f Presenter: Add Manual link in help menu 2024-02-06 20:43:31 +00:00
mobounya
7326d00baa RequestServer: Avoid using gethostbyname
Replace gethostbyname with Core::Socket::resolve_host in
RequestServer::ConnectionFromClient::ensure_connection.

Resolved #22199.
2024-02-06 21:43:23 +01:00
Dan Klishch
38164411f0 Ladybird/Qt: Properly listen for DPI changes on Wayland
Some Wayland compositors have support of fractional-scale-v1 protocol.
The protocol allows compositor to announce a preferred fractional scale
on a per-wl_surface basis. Qt forwards these Wayland events to an
application using a usual DevicePixelRatioChange event. However, in
contrast to the other platforms, this DevicePixelRatioChange event is
issued directly on widgets and not screens. Additionally, the exact
fractional scale is stored in QWindow object and not the current screen.

Note that in theory it is possible to obtain per-screen fractional
scaling on Wayland by interpolating data provided by wl_output and
xdg_output events but qtwayland does not do that.

If fractional-scale-v1 is not available, qtwayland will still fire
per-Widget DevicePixelRatioChange events, but, obviously, with the
per-screen possibly larger ceiled scaling.

This whole thing makes handling DPI changes on Wayland really simple.
All we need to do is to intercept DevicePixelRatioChange events firing
on QWindow objects and call the old device_pixel_ratio_changed handler
with the window's devicePixelRatio(). The only caveat here is not forget
to always set QWidget's parent before calling devicePixelRatio() on it.
2024-02-06 09:59:17 -07:00
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