Commit Graph

42839 Commits

Author SHA1 Message Date
martinfalisse
0586730a92 Base: Add tests for grid gap 2022-11-07 10:06:07 +01:00
martinfalisse
188856c5eb LibWeb: Implement gap in CSS Grid 2022-11-07 10:06:07 +01:00
martinfalisse
2b69fa5649 LibWeb: Add some helpers for TemporaryTrack
Add some helpers to the TemporaryTrack struct to assist in making future
commits more legible.
2022-11-07 10:06:07 +01:00
martinfalisse
9e6612c49b LibWeb: Parse CSS gap property
Including the legacy grid-gap, grid-column-gap and grid-row-gap
properties.
2022-11-07 10:06:07 +01:00
Slimey
e00b16460c Base+VideoPlayer: Add an icon for video player
Co-authored-by: TreuKS <ks2225@protonmail.com>
2022-11-06 22:27:22 -08:00
Brian Gianforcaro
d736b2c3c3 Ports: Update fio to version 3.33 2022-11-07 06:46:30 +01:00
Daniel Bertalan
4296425bd8 Everywhere: Remove redundant inequality comparison operators
C++20 can automatically synthesize `operator!=` from `operator==`, so
there is no point in writing such functions by hand if all they do is
call through to `operator==`.

This fixes a compile error with compilers that implement P2468 (Clang
16 currently). This paper restores the C++17 behavior that if both
`T::operator==(U)` and `T::operator!=(U)` exist, `U == T` won't be
rewritten in reverse to call `T::operator==(U)`. Removing `!=` operators
makes the rewriting possible again.
See https://reviews.llvm.org/D134529#3853062
2022-11-06 10:25:08 -07:00
Gunnar Beutner
4e406b0730 Meta+LibUnicode: Avoid relocations for emoji data
Previously each emoji had its own symbol in the library which was then
referred to by another symbol. This caused thousands of avoidable data
relocations at load time.

This saves about 122kB RAM for each process which uses LibUnicode.
2022-11-06 17:34:06 +01:00
Gunnar Beutner
2d3567ee92 Meta+LibUnicode: Avoid relocations for static unicode data
Previously the s_decomposition_mappings variable would refer to other
data in s_decomposition_mappings_data. This would cause thousands of
avoidable relocations at load time.

This saves about 128kB RAM for each process which uses LibUnicode.
2022-11-06 17:34:06 +01:00
Slimey
fb71df5cb1 Base: Add appropriate entries for VideoPlayer
VideoPlayer will now show up in the Media category, and `vp` is now
an alias for it.
2022-11-06 16:27:18 +01:00
Slimey
ce75a04908 Base+Ports: Rename 'Sound' category to 'Media' 2022-11-06 16:27:18 +01:00
Slimey
bb95374b49 VideoPlayer: Add quit action and help menu
I also moved the menubar initialization code to VideoPlayerWidget in
order to keep all of the bulk out of main.cpp :)
2022-11-06 16:27:18 +01:00
Slimey
8006bdf6b4 VideoPlayer: Show current open file in the title 2022-11-06 14:49:09 +01:00
martinfalisse
13ac078202 Base: Add test for sizing children of grid 2022-11-06 13:23:33 +01:00
martinfalisse
03949296c7 LibWeb: Calculate grid content height using column width
Should use the min_content_height function for calculating the height of
content. Thanks to previous commits, are able to use the width of the
column for this calculation.
2022-11-06 13:23:33 +01:00
martinfalisse
7474827747 LibWeb: Use AvailableSpace when referring to the grid width
Should use AvailableSpace to get the grid width instead of
box_state.content_width().

This change was imposed on me by the compiler as in a future commit I
will remove the only reference to the available_space parameter.
2022-11-06 13:23:33 +01:00
martinfalisse
60341995fe LibWeb: Calculate grid columns first, and grid rows second
As per the spec, it seems that the size of the columns of the grid
should be calculated first, and then the sizes of the rows. This commit
reorders the code for the sizing of the grid to match the spec.

This will be used in a future commit so as to calculate the height of a
row based on the resolved final width of a column.
2022-11-06 13:23:33 +01:00
martinfalisse
24c4d7fb46 LibWeb: Calculate available space for children of the grid
Previously were not passing along any information to the children
of the grid, as were simply passing the same AvailableSpace that was
received for the grid itself. Now, each child is given an available
space in accordance with the layout of the grid.
2022-11-06 13:23:33 +01:00
Baitinq
0758bc457e LibWeb: Replace some unnecessary ShadowRoot verify_cast with static_cast
These two occurrences of verify_cast happened right after a check on the
type of converted reference, making the verify_cast redundant.
2022-11-06 12:13:32 +00:00
Timothy Flynn
5e5cdb2d28 LibJS: Remove the now-unused LocalTZA AO 2022-11-06 01:47:37 +00:00
Timothy Flynn
f211028252 LibJS: Change ToLocalTime to use epoch nanoseconds
This is an editorial change to the ECMA-402 spec. See:
https://github.com/tc39/ecma402/commit/b3f9a1b
2022-11-06 01:47:37 +00:00
Timothy Flynn
9a9025dea0 LibJS: Remove infallibility marker from DefaultTimeZone invocation
This is an editorial change to the ECMA-402 spec. See:
https://github.com/tc39/ecma402/commit/46aa5cc

Also add an ECMA-402 spec link to the DefaultTimeZone implementation, as
that definition supersedes ECMA-262.
2022-11-06 01:47:37 +00:00
MacDue
d66b219453 Base: Add some extra conic-gradient() test cases
This adds a test of a conic-gradient() with just a center position
and no starting angle.

This also adds a gradient that gives each quadrant a different color,
this is very sensitive to the center position being correct.
2022-11-06 01:42:55 +00:00
MacDue
b2a0d70ef3 LibWeb: Fix some conic-gradient() painting issues
This makes the center position the center of the pixel rather than
the top left corner (which fixes some small artifacts on a few
gradients).

This also now floors the angle used to sample from the gradient line,
this avoids the colors diverging the further away from the center you
get (which is noticeable on hard-edge gradients).
2022-11-06 01:42:55 +00:00
MacDue
51cd37110a LibWeb: Fix parsing conic-gradient()s with only at <position>
This fixes parsing conic-gradient()s like:

  conic-gradient(at 60% 45%, red, yellow, green)

Where you have a center position but no starting angle.
2022-11-06 01:42:55 +00:00
Clemens Wasser
e5ddbfaed6 Ports: Enable ssl and ztd features for Qt port 2022-11-05 19:31:37 -06:00
Clemens Wasser
2a852250dd Ports: Build Qt modules Network and Concurrent 2022-11-05 19:31:37 -06:00
Clemens Wasser
64ab5bb835 LibC: Add missing definitions for IPv6 packet info 2022-11-05 19:31:37 -06:00
Clemens Wasser
7c0286a5c2 LibC: Implement pthread_testcancel 2022-11-05 19:31:37 -06:00
Liav A
8d8b0d0a34 Userland: Add support for jails
This happens in two ways:
1. LibCore now has two new methods for creating Jails and attaching
   processes to a Jail.
2. We introduce 3 new utilities - lsjails, jail-create and jails-attach,
   which list jails, create jails and attach processes to a Jail,
   respectively.
2022-11-05 18:00:58 -06:00
Liav A
1d0066a5cc Userland/pls: Use Core::System::exec_command method to execute a command 2022-11-05 18:00:58 -06:00
Liav A
0d1af1ad63 LibCore: Add System::exec_command method
This method was taken from the pls utility and its purpose is to execute
a given command with all the required requirements such as providing a
suitable exec environment.
2022-11-05 18:00:58 -06:00
Liav A
942e262e86 Base: Add information about the new /sys/kernel/jails node 2022-11-05 18:00:58 -06:00
Liav A
5e062414c1 Kernel: Add support for jails
Our implementation for Jails resembles much of how FreeBSD jails are
working - it's essentially only a matter of using a RefPtr in the
Process class to a Jail object. Then, when we iterate over all processes
in various cases, we could ensure if either the current process is in
jail and therefore should be restricted what is visible in terms of
PID isolation, and also to be able to expose metadata about Jails in
/sys/kernel/jails node (which does not reveal anything to a process
which is in jail).

A lifetime model for the Jail object is currently plain simple - there's
simpy no way to manually delete a Jail object once it was created. Such
feature should be carefully designed to allow safe destruction of a Jail
without the possibility of releasing a process which is in Jail from the
actual jail. Each process which is attached into a Jail cannot leave it
until the end of a Process (i.e. when finalizing a Process). All jails
are kept being referenced in the JailManagement. When a last attached
process is finalized, the Jail is automatically destroyed.
2022-11-05 18:00:58 -06:00
Liav A
d69a0380e1 Kernel: Add copy_typed_from_user for non-const Userspace<T*> 2022-11-05 18:00:58 -06:00
Oleg Kosenkov
46c6176fad Games: Add BrickGame 2022-11-05 16:35:13 -06:00
Dan Klishch
73f4cfa930 AK: Introduce fixed-width floating point types (f32, f64, f80 and f128) 2022-11-05 16:04:12 -06:00
Christopher Wales
266882937d Toolchain: Disable makeinfo for binutils
This is necessary to build on MacOS. As discussed in #15530, Serenity
no longer appears to build on MacOS Ventura. This attempts to fix that
by enforcing it at the command level.
2022-11-05 14:23:21 -06:00
Andreas Kling
5839ef2ed8 LibWeb: Render text inside <input type=password> as asterisks (*)
This makes it possible to enter passwords while recording YouTube
videos. :^)
2022-11-05 18:54:39 +01:00
Andreas Kling
b33a2eb9b1 LibWeb: Inherit style across shadow tree boundaries
This makes the text in <input> inherit style from the <input> element.
2022-11-05 18:54:39 +01:00
Andreas Kling
87b0ddb354 LibWeb: Add DOM::Node::parent_or_shadow_host_element()
This will be used in style computation to inherit style across shadow
tree boundaries.
2022-11-05 18:54:39 +01:00
Andreas Kling
9c46fb7337 Kernel: Make sys$msyscall() not take the big lock
This function is already serialized by the address space lock.
2022-11-05 18:54:39 +01:00
Timothy Flynn
cfa5e03108 WebContent: Capture horizontal overflow in full document screenshots
The full-page screenshot was missing horizontal overflow content on most
web pages. Change the dimensions of the captured screenshot to match the
actual content size.
2022-11-05 17:21:30 +00:00
Timothy Flynn
2f5ceeac62 WebContent: Store and provide access to web page content size 2022-11-05 17:21:30 +00:00
Smrtnyk
2ba2e6ca0a LibJS: Rename ToShowTimeZoneNameOption to ToTimeZoneNameOption
This is an editorial change in Temporal spec.

See: ab5b1ba910
2022-11-05 15:44:49 +00:00
MacDue
6c6c94f05a LibWeb: Use relative units for gradients until painting
This commit tweaks gradients so resolve_color_stop_positions() no
longer cares about the actual length of the gradient. All stops
are resolved to relative positions along the gradient line
(between 0 and 1), and are only scaled back to pixels (if required)
during the actual painting.

This has no immediate benefit right now, but it might make using
CSS pixels for gradients easier :^)

This also includes some mild refactoring.
2022-11-05 14:12:23 +00:00
Easton Pillay
22d54cd446 LibGUI: Hold down Alt when clicking TreeView to expand full subtree
On other operating systems, if you hold down Alt when you click to
expand part of a tree, it expands all of the children of the node
you clicked. This commit makes our TreeView act the same way :)
2022-11-05 14:49:22 +01:00
Andreas Kling
7809cc6557 LibWeb: Use preferred flex item sizes as min/max-content contribution
When a flex item has a specific preferred size, that size should be its
contribution to the containers intrinsic sizes.

This fixes an issue on Patreon where the logo would cover the entire
viewport since the SVG had a large intrinsic size but the flex item
containing it had a small specified size in CSS.
2022-11-05 11:42:19 +01:00
Timothy Flynn
ea7ce76d20 Browser: Add a context menu item to take a full document screenshot 2022-11-05 09:29:28 +01:00
Timothy Flynn
95e591b61b LibWebView+WebContent: Add an IPC to take a full document screenshot 2022-11-05 09:29:28 +01:00