Commit Graph

58657 Commits

Author SHA1 Message Date
Andrew Kaster
bc9c710904 LibWeb: Hide WebDriver::match_route debug behind its own flag
When enabling WEBDRIVER_DEBUG globally, this function's debug spam
overpowers the rest of the useful logs.
2024-02-08 15:53:46 +01:00
Andrew Kaster
f739e976a4 Tests: Pass App Bundle path to WebDriver to WPT CTest test on macOS
The WebDriver binary in ${CMAKE_CURRENT_BINARY_DIR}/bin doesn't actually
have access to the Ladybird binary in the default CMake setup.
2024-02-08 15:53:46 +01:00
Nico Weber
d7f04c9aa1 LibGfx/JPEGLoader: Make byte_offset() return offset from start of stream
JPEGStream::byte_offset() now returns an offset relative to the start
of the stream, instead of relative to the buffered part.

No behavior change except if JPEG_DEBUG is set.
2024-02-08 07:45:34 -07:00
ronak69
113c6dc48b WindowServer: Show fixed aspect ratio in the resize overlay 2024-02-08 14:22:28 +00:00
ronak69
83028518a0 WindowServer: Don't show tile overlay for fixed aspect ratio windows
Windows with fixed aspect ratio cannot be tiled so the tile overlay
shouldn't be shown.
2024-02-08 14:22:28 +00:00
ronak69
8d16c7c9b9 WindowServer: Handle latching fix-aspect-ratio window to the screen edge
Double-clicking the edges of a window results in the edge being extended
until it latches to the screen edge. This used to violate the fixed
aspect ratio property of certain windows because of only extending the
window in one dimension.

This commit adds a special case to the latching logic that makes sure to
also extend the other dimension of the window such that the fixed aspect
ratio is maintained.
2024-02-08 14:22:28 +00:00
Kyle Lanmon
e09245badd cut: Add -c,--characters option 2024-02-08 07:20:50 -07:00
dependabot[bot]
f926d96c74 CI: Bump mymindstorm/setup-emsdk from 13 to 14
Bumps [mymindstorm/setup-emsdk](https://github.com/mymindstorm/setup-emsdk) from 13 to 14.
- [Release notes](https://github.com/mymindstorm/setup-emsdk/releases)
- [Commits](https://github.com/mymindstorm/setup-emsdk/compare/v13...v14)

---
updated-dependencies:
- dependency-name: mymindstorm/setup-emsdk
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-02-08 07:19:32 -07:00
kleines Filmröllchen
5054f34b4a LibAudio: Automatically write a FLAC seektable
This contains a seekpoint every 2 seconds, allowing our own players to
work better.
2024-02-08 07:19:09 -07:00
Sönke Holz
c0d7749654 Kernel/riscv64: Add QEMU virt machine memory map
We can remove this temporary memory map once we support parsing the
device tree provided to us by the firmware.
2024-02-08 07:16:20 -07:00
Erick Howard
3e0d1becd4 cp: Add --interactive/-i flag
- Add interactive flag which tells `cp` to prompt before overwriting
  files
- Accept 'yes', 'no', 'n', and 'y' as input, all other inputs will
  result in the prompt being shown again
2024-02-08 07:11:44 -07:00
ronak69
90d68d43ce KeyboardMapper: Convert Utf-8 char in String to Utf-32 code point
Ensure that the Utf-8 encoded "mapping character" in String (from
InputBox) gets converted to Utf-32 code point. Before, only the first
byte of Utf-8 char sequence was used as a Utf-32 code point.

That used to result in incorrect characters getting written in the
keymap file for all the "non-ascii" characters used as the mapping
character.
2024-02-08 07:07:25 -07:00
Tom Finet
227aa8f2e4 Kernel/Net: E1000ENetworkAdapter detect EEPROM
The presence of EEPROM is detected by reading the
EE_PRES bit from the EECD register.
2024-02-08 07:05:46 -07:00
Dan Klishch
7945c9d808 JSSpecCompiler: Do not store XML::Node in tokens 2024-02-08 07:05:13 -07:00
Dan Klishch
94f5086b93 JSSpecCompiler: Remove ParseError 2024-02-08 07:05:13 -07:00
Dan Klishch
9a2337f7ad JSSpecCompiler: Get rid of ParseError in Lexer 2024-02-08 07:05:13 -07:00
Dan Klishch
ed04aff1de JSSpecCompiler: Try to get section number even if header parsing failed 2024-02-08 07:05:13 -07:00
Dan Klishch
6b30c4d2f0 JSSpecCompiler: Issue meaningful errors in TextParser 2024-02-08 07:05:13 -07:00
Dan Klishch
dee4978d67 JSSpecCompiler+LibXML: Store location for tokens 2024-02-08 07:05:13 -07:00
Dan Klishch
d219c91ca9 JSSpecCompiler: Make fields in classes from SpecParser.h private 2024-02-08 07:05:13 -07:00
Dan Klishch
cb6e75e890 JSSpecCompiler: Mostly get rid of ParseError in AlgorithmStep
And while on it, create proper logical scopes for algorithm steps.
2024-02-08 07:05:13 -07:00
Dan Klishch
1bd1187c92 JSSpecCompiler: Push ParseError out of AlgorithmStepList 2024-02-08 07:05:13 -07:00
Dan Klishch
c7369f2f93 JSSpecCompiler: Push ParseError out of Algorithm 2024-02-08 07:05:13 -07:00
Dan Klishch
d339ad01bb JSSpecCompiler: Push ParseError out of SpecFunction 2024-02-08 07:05:13 -07:00
Nico Weber
32f601f9a4 LibPDF: Fix small bug from #21452
I implemented CFF charset format 2 in 6f783929dd with the note
"I haven't seen this being used in the wild". Now that I have
seen it (0000658.pdf), I can say that this has never worked,
despite me claiming "it's easy to implement".

But now it works!
2024-02-08 13:48:56 +00:00
Nico Weber
93ee01041f LibGfx/OpenType: Validate we can read the active cmap subtable format
We now reject fonts where the active cmap subtable is in a format
we can't read yet, instead of silently drawing squares for all glyphs.

This doesn't fire at all for my 1000-file PDF test set, but seems
like a good thing to check.

(Instead of duplicating the switch, I first tried making a
glyph_id_for_code_point_or_else() that returns ErrorOr<u32> and then
make both glyph_id_for_code_point() and validate_format_can_be_read()
call that, but I liked less how that worked out -- felt too clever.)
2024-02-08 13:48:33 +00:00
Nico Weber
be8b5b794f LibGfx/OpenType: Error on fonts without a supported subtable
This would've saved me some debugging on #23103.

We now return an error instead of a font that draws squares for all
characters. That seems preferable since it makes these cases easy to
find. This fires for three files in my 1000-file PDF test set, so it's
not exceedingly common (...but I wasn't aware that three files were
rendering boxes for this reason, and now I am and can just make them
work in the future).
2024-02-08 13:48:33 +00:00
Sam Atkins
b177e0dd66 ClipboardHistory: Be more careful about the history limit
Previously, if the number of history items was already above the history
limit, then it would never trim old history items. This could happen if
the ClipboardHistory.json file was manually edited.

Prevent this by sorting and trimming the data that is read in. For good
measure, also guard against `> m_history_limit` in add_item().
2024-02-08 13:46:12 +00:00
Sam Atkins
0b9aee57e7 ClipboardHistory: Store clipboard history as valid JSON
Previously, the ClipboardHistory.json file contained a series of
individual JSON objects for history items, separated by newlines. This
is convenient for appending a single item, but makes the file itself
invalid JSON.

This commit changes that file to instead contain those objects in a
proper JSON array.
2024-02-08 13:46:12 +00:00
Aliaksandr Kalenik
ff3e454565 LibWeb: Invalidate paint-only property after relayout
Before this change, `set_needs_to_resolve_paint_only_properties()` was
only called after style invalidation. However, since relayout can be
triggered independently from style invalidation, we need to ensure that
paint-only properties are updated in that case too.
2024-02-08 13:08:10 +01:00
Kenneth Myhra
e8a20b3c3e Ports: Update mc to 4.8.31 2024-02-07 15:04:21 +01:00
Kenneth Myhra
babddc24c2 Documentation: Add 'python3-packaging' to additional dependency list
The 'python3-packaging' depedency is required to build the GLib port
after version 2.79.0.
2024-02-07 15:04:21 +01:00
Kenneth Myhra
45f827f58c Ports: Update glib to 2.79.1 2024-02-07 15:04:21 +01:00
Kenneth Myhra
e865b3e3ab Ports: Update curl to 8.6.0 2024-02-07 15:04:21 +01:00
Tim Ledbetter
f961a0eb61 TerminalSettings: Ensure automark setting is reverted on cancel 2024-02-07 13:35:49 +01:00
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