Commit graph

49811 commits

Author SHA1 Message Date
Aliaksandr Kalenik
a27a30898c LibWeb: Add fetch_controller property in HTML::NavigationParams 2023-05-03 09:39:49 +02:00
Aliaksandr Kalenik
38a2d5ead3 LibWeb: Add navigable property in NavigationParams 2023-05-03 09:39:49 +02:00
Aliaksandr Kalenik
0c919718ae LibWeb: Change id to be optional in HTML::NavigationParams 2023-05-03 09:39:49 +02:00
Aliaksandr Kalenik
71b7a929db LibWeb: Fix typo in HTML::DocumentState
ever_navigable_target_name -> navigable_target_name
2023-05-03 09:39:49 +02:00
Aliaksandr Kalenik
f738a166f2 LibWeb: Add resource property in DocumentState 2023-05-03 09:39:49 +02:00
Aliaksandr Kalenik
bccc687175 LibWeb: Add request_body property in HTML::POSTResource 2023-05-03 09:39:49 +02:00
Aliaksandr Kalenik
8be3de665b LibWeb: Introduce SourceSnapshotParams 2023-05-03 09:39:49 +02:00
Caoimhe
2adcf85d9d HexEditor: Remember all of the layout options in the configuration 2023-05-03 08:33:11 +01:00
Tim Ledbetter
336eae219b Chess: Spawn new engine process immediately after engine is selected
A new engine process is now started immediately, rather than waiting
until a move needs to be made.

This means that if the engine is playing as black, it can start up
while the human player is making a move. This is noticable with
stockfish, which can be slow to start up.
2023-05-03 08:31:34 +01:00
Tim Ledbetter
79a204a56a Chess: Allow stockfish to be used if available
The stockfish chess engine can now be selected from the engine menu if
the port has been installed.
2023-05-03 08:31:34 +01:00
Tim Ledbetter
56dde3df54 LibChess+ChessEngine: Don't crash on error when reading UCI commands
ChessEngine and the chess GUI will no longer crash on error while
reading UCI commands. ChessEngine will print a message to the standard
output, while the GUI will ignore unknown commands. Both will print
the error to the debug log if the UCI_DEBUG flag is enabled.

Trailing and preceding whitespace is now stripped from commands before
they are parsed. Commands which are just whitespace no longer produce
errors.
2023-05-03 08:31:34 +01:00
Tim Ledbetter
25778d07e9 LibChess: Add optional ponder move to the BestMove command
The BestMove command can now include an optional ponder token, with
the move that the engine would like to ponder on.
2023-05-03 08:31:34 +01:00
Tim Ledbetter
c885df98da LibChess: Flesh out InfoCommand implementation
UCI info commands can now be received and parsed. All info types from
the UCI specification are supported.

The info command is not currently used by our engine or GUI, but the GUI
can now receive an info command from a 3rd party engine without
complaining.
2023-05-03 08:31:34 +01:00
Tim Ledbetter
77f3e9710b LibChess: Use the correct command type for InfoCommand 2023-05-03 08:31:34 +01:00
Emil Militzer
fe40a7b664 LibWeb: Only change inside value during blockification 2023-05-02 20:27:28 +02:00
Emil Militzer
31e1be0438 LibWeb: Support multi-keyword syntax for CSS display property
The Display class already supported all specific values, and now they
will be parsed too. The display property now has a special type
DisplayStyleValue.
2023-05-02 20:27:28 +02:00
Emil Militzer
81c11bc6f2 LibWeb: Expose list_item value in CSS display 2023-05-02 20:27:28 +02:00
Emil Militzer
b74940ffb7 LibWeb: Set max-values for display CSS property 2023-05-02 20:27:28 +02:00
Emil Militzer
3f7a37465d LibWeb: Add missing inline-grid for display CSS property 2023-05-02 20:27:28 +02:00
Aliaksandr Kalenik
f6ff37398c LibWeb: Fix intrinsic sizing when min or max width is specified
Fixes the problem that width is incorrectly computed in intrinsic
sizing mode when there are blocks that have min-width or max-width
specified.

Actually that is just the fix of a symptom of the larger problem that
Length::to_px() returns 0 when value is auto regardless of available
size.
2023-05-02 18:50:26 +02:00
Nico Weber
9bd35fda56 ICC: Implement TRC inversion in from_pcs for parametric curves 2023-05-02 17:15:48 +01:00
Nico Weber
4169c94ebe ICC: Implement some of Profile::from_pcs()
This implements conversion from profile connection space to the
device-dependent color for matrix-based profiles.

It only does the inverse color transform but does not yet do the
inverse tone reproduction curve transform -- i.e. it doesn't
implement many cases (LUT transforms), and it does the one thing
it does implement incorrectly. But to vindicate the commit a bit,
it also does the incorrect thing very inefficiently.
2023-05-02 17:15:48 +01:00
Nico Weber
2319b2ffb5 ICC: Use snake_case instead of matching spec's camelCase in to_pcs() 2023-05-02 17:15:48 +01:00
Nico Weber
72f0575fb0 LibGfx: Fix -Wdouble-promotion for float matrices 2023-05-02 17:15:48 +01:00
Nico Weber
82bd7c33d1 ICC: Make a "not yet implemented" string more precise 2023-05-02 17:15:48 +01:00
Nico Weber
103f818afc ICC: Rename tag_for_rendering_intent()
To make clear it's for forward transforms, it's now called
forward_transform_tag_for_rendering_intent().

No behavior change.
2023-05-02 17:15:48 +01:00
Ali Mohammad Pur
2306219ef9 AK: Accomodate always-32-bit data member pointers in IntrusiveList
This only exists on windows, but we've made an effort to keep jakt
working on windows, so let's support this silliness.
2023-05-02 17:46:39 +03:30
Daniel Bertalan
be7bc41470 LibJS: Fix mix-up between assignment and comparison 2023-05-02 07:03:57 -04:00
Daniel Bertalan
00b4976f2c Everywhere: Make Lagom build with GCC 13
GCC 13 was released on 2023-04-26. This commit fixes Lagom build errors
when using an updated host toolchain:
- Adds a workaround for a bug in constraint handling, which made LibJS
  fail to compile: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=109683
- Silences the new `-Wdangling-reference` diagnostic globally. It
  produces multiple false positives with no clear way to silence them
  without `#pragmas`.
- Silences `-Wself-move` in `RefPtr` tests as GCC 13 adds this
  previously Clang-exclusive warning.
2023-05-02 07:03:57 -04:00
Zaggy1024
1422f7f904 LibVideo/VP9: Revert framebuffer size reduction to allow OOB blocks
The framebuffer size was reduced in f2c0cee, but this caused some niche
block layouts to write outside of the frame.

This could be fixed by adding checks to see if a block being predicted/
reconstructed is within the frame, but the branches introduced by that
reduce performance slightly. Therefore, it's better to keep the
framebuffer sized according to the decoded frame size in 8x8 blocks so
that any block can be decoded without bounds checking.

A test was added to ensure that this continues to work.
2023-05-02 07:00:46 -04:00
Aliaksandr Kalenik
6cec431720 LibWeb: Set zero underflow when calculating intrinsic width of block
This fix resolves issue where calculating the min size of a block could
result in incorrect value if width of the block's children was
compensated by margins to fit into container width (which is equal to 0
during min size calculation).
2023-05-02 12:41:45 +02:00
Andreas Kling
00e3e82bbd LibWeb: Account for box-sizing:border-box in layout-less definite sizes
When we determine that a size is definite because it can be resolved now
without performing layout, we also need to account for the box-sizing
property.

This lets us remove a hack from flex layout where box-sizing:border-box
was manually undone at one point in the layout algorithm.
2023-05-02 11:47:13 +02:00
Andreas Kling
deea7cbc11 LibWeb: Remove vestigial resolve_definite_width/height helper functions
These functions no longer do anything interesting and just forward to
content_width/content_height. Let's make the callers use those directly
instead and remove this indirection layer.
2023-05-02 11:47:13 +02:00
Joel Petersson
e98315de6b SoundPlayer: Fix glitchy visualization on pause/stop
Previously when pausing or stoping a track in SoundPlayer,
the visualizations would glitch out. This was caused by them
being updated with the same buffer over and over.
With this patch a pause action will freeze the visualization at the
point of the pause and a stop action will reset the visualization
so it displays nothing until a track is started.
2023-05-02 09:15:20 +02:00
Joel Petersson
f1d8e55168 SoundPlayer: Introduce buffer_reset api to VisualizationWidget
Previously there was no way to clear the internal buffer in a
VisualizationWidget. These buffers are what determines how a
VisualizationWidget is rendered, so with this commit we are now
able to reset visualizations.
2023-05-02 09:15:20 +02:00
Caoimhe
d05cb50b24 LibGUI: Only clear TreeView::m_view_metadata when required
Prior to this commit, we were always clearing the TreeView's metadata,
even if it wasn't needed. Now, we only clear it if the callee says that
we should invalidate indices.

This fixes an issue in FileManager (#6903), where updating the file
system by creating/deleting any file/folder would cause the tree to
collapse completely.

This may be more of a 'patch' than an actual fix, since I don't have a
lot of experience with `GUI::TreeView` or `GUI::Model`, but it doesn't
appear to break any other `TreeView` use-cases and using FileManager is
now much better than it was before :^)
2023-05-02 07:24:55 +02:00
Ali Mohammad Pur
8d446d2a9e LibWeb: Make XMLDocumentBuilder create elements with the HTML namespace
Otherwise we'll end up with all-generic elements and not run any special
HTML sauce logic, leading to very plain pages.
2023-05-01 15:22:55 +02:00
Andreas Kling
75d603c31b LibWeb: Support getting the grid-template-areas from resolved style
Without this, we crash when opening the DOM inspector.
2023-05-01 11:23:40 +02:00
Andreas Kling
9fa51987f8 Userland+Base: Treat ".webp" files as images :^) 2023-05-01 11:10:56 +02:00
Andreas Kling
676e1c2cdc CertificateSettings: Add missing ellipsis on import/export buttons 2023-05-01 11:10:18 +02:00
Fabian Dellwing
006d2e6508 nc: Fix overflow in port and local_port argument 2023-04-30 21:12:46 +03:30
Fabian Dellwing
4ebc7306da LibCore: Implement integral ArgsParser positionals through a template
This matches the behaviour of options.
2023-04-30 21:12:46 +03:30
Fabian Dellwing
f4ed9d5d83 LibCore: Add support for short integral type to ArgsParser 2023-04-30 21:12:46 +03:30
Fabian Dellwing
8f34478e75 Ports: Add ssmtp port 2023-04-30 19:23:08 +02:00
Jelle Raaijmakers
1951f7874d LibELF: Report file path for unimplemented DYNAMIC tags
This allows us to immediately locate the shared library with the
unimplemented tag.
2023-04-30 14:10:01 +02:00
Andreas Kling
98b8bab441 LibGUI: Use Variant's built-in equality operator in Window and Widget
Now that Variant has operator==(), we don't need to go through all this
trouble to compare two Variant values.
2023-04-30 14:01:59 +02:00
iyush
a268dcb1e2 HackStudio: Move around execution order and prevent crashing
Previously hackstudio tried to synchronize the language server before
executing the command inside the editor.  If sync-command for the server
(for example the CommentLineCommand) is not implemented inside the
function responsible for syncing the language server, the IDE would
crash.

This patch makes it such that the synchronization happens only after IDE
executes the command locally.  If such command is not implemented (as
was the case earlier), it would simply reupdate the content inside the
language server. Even though the reupdate might be expensive, it is
better than crashing hackstudio altogether.

Because of reordering, the relevant function names have been changed to
better reflect the code flow.
2023-04-30 06:08:22 +02:00
Dan Klishch
4653b38808 AK: Replace linear exponentiation by binary in MinimalBigInt
This further optimizes floating point parsing (specifically with a large
amount of digits). The commit shaves additional 20% of the run time for
750-digit numbers. No performance degradation is noticeable for small
numbers.
2023-04-30 06:05:54 +02:00
Dan Klishch
80517b5a70 AK: Use helpers from BigIntBase.h in MinimalBigInt
Although it might seem like we've switched to more generic functions,
which must run slower, it is not the case. The time required to parse
"1", for example, decreased by 1%. For numbers with more digits, the
effect is more noticeable: 8-digit numbers are parsed ~5% faster; for
gigantic 750-digit numbers, parsing is 2 times faster.

The later result is achieved by using UFixedBigInt<64>::wide_multiply
instead of u128::operator*(u128).
2023-04-30 06:05:54 +02:00
Dan Klishch
a179383dcc AK: Add benchmarks for floating point parsing 2023-04-30 06:05:54 +02:00