Commit graph

42787 commits

Author SHA1 Message Date
martinfalisse
829f56572d LibWeb: Parse line names in grid track position properties
Parse line names when passed to the grid-column/row-start/end CSS
properties.
2022-11-01 11:19:41 +01:00
martinfalisse
78a573d678 LibWeb: Parse line names in grid track size declarations
Parse line names in the grid-template-* CSS properties.
2022-11-01 11:19:41 +01:00
martinfalisse
93211f45a6 LibWeb: Use w3.org for specs and include new ones
Include new w3.org specs for the grid and correct others so they use
w3.org instead of drafts.
2022-11-01 11:19:41 +01:00
martinfalisse
1a4f2dca38 LibWeb: Refactor GridTrackPlacement
Refactor this class for quality-of-life reasons as well as to better
prepare for the addition of line names.
2022-11-01 11:19:41 +01:00
martinfalisse
b2b677e984 LibWeb: Refactor GridTrackSize classes
Refactor various classes in the GridTrackSize file for the incoming
named_tracks feature.

Previously the ExplicitTrackSizing had mixed responsiblities with the
newly-named GridRepeat class. This made it so it was not possible to
have multiple repeats within a single 'GridTrackSizeList' definition.

The MetaGridTrackSize class had both the responsibilities of being a
container for minmax values as well as for simple GridSizes. By uniting
the different possible values (repeat, minmax, default) into the
ExplicitGridTrack class are able to be more expressive as to the
different grid size modalities.

The GridTrackSizeList will be useful as compared to a
Vector<ExplicitGridTrack> since this way can keep track of the declared
line names. These same line names are able to be declared within the
values of a repeat function, hence the presence of a GridTrackSizeList
inside the GridRepeat class.
2022-11-01 11:19:41 +01:00
martinfalisse
9441515312 LibWeb: Rename GridTrackSizedConstraints
In order to avoid naming conflicts with the many trial-and-error name
changes going on in the GridTrackSize file, rename this to a unique name
that is unlikely to be troublesome.
2022-11-01 11:19:41 +01:00
martinfalisse
dc9f8218a9 LibWeb: Fix bug in placing grid items
Before were resetting the auto_placement_cursor_x to 0 at the end of
the row but this was incorrect, especially since the
auto_placement_cursor_y wasn't being incremented.

This made it so that auto-placed items were occasionally placed before
absolutely-placed ones even after the latter had already been placed.
2022-11-01 11:19:41 +01:00
Marco Rebhan
e773b9abe9 Toolchain: Use pkg-config instead of pkgconfig in serenity.nix
pkgconfig was renamed to pkg-config in nixpkgs.
2022-11-01 00:16:11 +00:00
Marco Rebhan
9c9ca8a8be Toolchain: Update gcc11 to gcc12 in serenity.nix 2022-11-01 00:15:53 +00:00
Timothy Flynn
2d7ad6dbe6 CI: Remove the manpage generator error file upon success
On some systems, just specifying "2> error_file" will create the file,
even if nothing is logged to it.
2022-10-31 18:25:01 -04:00
Peter Elliott
83e62e8c4f Utilities+LibArchive: Don't follow symlinks 2022-10-31 22:10:22 +00:00
Peter Elliott
415eb17490 LibCore: Add Core::System::readlink 2022-10-31 22:10:22 +00:00
Peter Elliott
612a3324d7 LibArchive: Support writing paths up to 255 characters
The POSIX.1-1988 limit was 100, but with the ustar prefix field it's 255
(kinda).
2022-10-31 22:10:22 +00:00
Peter Elliott
9ae36e2035 LibArchive: Refactor null-termination logic in TarFileHeader
Before this change the behavior was, confusingly:
- never null-terminate if set_field() is passed a StringView.
  - which would also not fail if the StringView is too large.
- require null-termination if set_field() is passed a String.

Not only are both of these wrong, having different behavior for those is
very confusing, and creating a String copy to force a type checker to
cause a string to be null-terminated is extremely weird.

The new behavior is to always null-terminate when possible, never
null-terminate if the last byte is used, and always verify that the
string will fit.
2022-10-31 22:10:22 +00:00
Timothy Flynn
a53749bc9d ntpquery: Unveil paths after parsing arguments
This allows running `ntpquery --help` in environments that do not have
the LookupServer service running, e.g. when generating man pages. The
same was done for netstat in commit 7fba413.
2022-10-31 22:10:14 +00:00
Timothy Flynn
9e9a07415e CI: Ensure the manpage generation step shuts down the VM on failure
Currently, if the script fails, it simply runs "exit 1". This exits the
script, but keeps the VM running, so CI hangs until it times out.

Instead of exiting, write a failure status to an error log and shutdown.
CI can then read that error log and fail the run if needed.
2022-10-31 22:10:14 +00:00
Luke Wilde
5ebfa8d620 CI: Make the test262 worker use GCC 12 2022-10-31 16:14:41 -04:00
Tim Schumacher
6382b174dc LibELF: Drop the "resolve and map" all-in-one
Both users of this function now have to do their resolving separately
before anyways, so let's just drop the resolving part inside the
function and require absolute paths to be fed in instead.
2022-10-31 19:23:02 +00:00
Tim Schumacher
d4a4fe68f9 LibELF: Track libraries using their full path 2022-10-31 19:23:02 +00:00
Tim Schumacher
2f4c06b13b LibELF: Handle absolute and relative paths for all resolve requests 2022-10-31 19:23:02 +00:00
Tim Schumacher
5e2a146860 LibELF: Sift down "library name only"-strings as far as possible
I might have gone a bit overboard with the `VERIFY`s, but this allows
for very easy tracking of where we start to leak in non-absolute paths.
2022-10-31 19:23:02 +00:00
Tim Schumacher
e7d0fb50a1 LibELF: Use a bit of TRY in DynamicLinker
`TRY` also works for `Result<>`. Who knew?
2022-10-31 19:23:02 +00:00
Tim Schumacher
31643c4ee3 LibELF: Prepend resolve_and to one of the map_library overloads
Having two functions that are named the same and whose behavior
regarding "should probably get a full path" and "does explicitly not
require a full path" is quite confusing, especially since that
difference is dictated through the other passed arguments.
2022-10-31 19:23:02 +00:00
Tim Schumacher
d0d494a151 LibELF: Drop the separate file name member from DynamicLoader 2022-10-31 19:23:02 +00:00
Tim Schumacher
177a5baf60 LibELF: Ensure that DynamicLoader only receives absolute paths
While at it, start renaming variables where we know that they store a
path, so that we will get less confused in the future.
2022-10-31 19:23:02 +00:00
Linus Groh
a1de15498d LibWeb: Use proper origins in Request::has_redirect_tainted_origin()
URL::url_origin() is a globally available function now, so let's use it!
2022-10-31 18:04:11 +00:00
premek
ec34d60e5c HexEditor: Specify page skip size in multiples of the line height 2022-10-31 15:37:08 +00:00
Timothy Flynn
bda737fde7 nologin: Use proper format strings with out() and outln()
1. Don't use the sv literal as this bypasses CheckedFormatString.

2. Don't use the content of a file as the format string. If the file
   contains "{}", the program will crash.
2022-10-31 11:22:39 -04:00
Linus Groh
a80da456a5 LibWeb: Mark WebIDL::ExceptionOr<T> as [[nodiscard]] 2022-10-31 14:12:44 +00:00
Linus Groh
acfb546048 LibWeb: Handle currently ignored WebIDL::ExceptionOr<T>s 2022-10-31 14:12:44 +00:00
Linus Groh
f01d90aa63 Lagom: Update GCC version check in CMakeLists.txt
This was forgotten in bc2ebcadc0.
2022-10-31 14:08:39 +00:00
Zaggy1024
f99d356a17 VideoPlayer: Start fleshing out the user interface
This adds player widget with working play/pause controls, a seek bar
which currently only displays the current playback position, and a
button to cycle between the scaling modes.

The player uses the new PlaybackManager class to handle demuxing,
decoding, and frame presentation timing.

Currently, the volume control is non-functional.
2022-10-31 14:47:13 +01:00
Zaggy1024
353e1c2b4d LibVideo: Add PlaybackManager to load and decode videos
This file will be the basis for abstracting away the out-of-thread or
later out-of-process decoding from applications displaying videos. For
now, the demuxer is hardcoded to be MatroskaParser, since that is all
we support so far. The demuxer should later be selected based on the
file header.

The playback and decoding are currently all done on one thread using
timers. The design of the code is such that adding threading should
be trivial, at least based on an earlier version of the code. For now,
though, it's better that this runs in one thread, as the multithreaded
approach causes the Video Player to lock up permanently after a few
frames are decoded.
2022-10-31 14:47:13 +01:00
Zaggy1024
0a4def1208 LibVideo: Abstract media container format demuxing
This creates an abstract Demuxer class to allow multiple container
container formats to be easily used by video playback systems.
2022-10-31 14:47:13 +01:00
Zaggy1024
3a2f6c700d LibVideo: Parse the duration of Matroska files 2022-10-31 14:47:13 +01:00
Zaggy1024
2b4b6c5613 LibVideo: Make VP9::Decoder a subclass of a new abstract VideoDecoder
This will allow other decoders to be used in place of VP9::Decoder when
new video decoders are implemented, such as AV1.
2022-10-31 14:47:13 +01:00
Zaggy1024
3720f66bb1 LibVideo: Set CodingIndependentCodePoints in its member functions
This moves the setting of code points in CICP structs to member
functions completely so that the code having to set these code points
can be much cleaner.
2022-10-31 14:47:13 +01:00
Zaggy1024
074f771b59 LibVideo: Add VideoFrame class for decoded video frames
The class is virtual and has one subclass, SubsampledYUVFrame, which
is used by the VP9 decoder to return a single frame. The
output_to_bitmap(Bitmap&) function can be used to set pixels on an
existing bitmap of the correct size to the RGB values that
should be displayed. The to_bitmap() function will allocate a new bitmap
and fill it using output_to_bitmap.

This new class also implements bilinear scaling of the subsampled U and
V planes so that subsampled videos' colors will appear smoother.
2022-10-31 14:47:13 +01:00
Beckett Normington
30189186e9 Utilities: Add nologin application
This adds the `nologin` application to the system. This application
will look for `/etc/nologin`. If it is present, it will display the
message in the file. Otherwise, it will display an error about the
current account being unavailable.
2022-10-31 10:54:00 +00:00
premek
429bd32016 Base: Add Scissors & arrows emoji
✂️ - U+2702 Scissors
➡️ - U+27A1 Right Arrow
⤴️ - U+2934 Right Arrow Curving Up
⤵️ - U+2935 Right Arrow Curving Down
⬅️ - U+2B05 Left Arrow
⬆️ - U+2B06 Up Arrow
⬇️ - U+2B07 Down Arrow
2022-10-31 10:39:42 +00:00
Zaggy1024
91fbfe1773 LibVideo: Make DecoderError getters const 2022-10-31 00:02:52 +01:00
implicitfield
cea7386ea8 Base: Set PATH in text mode 2022-10-31 00:02:34 +01:00
Zaggy1024
81b0b232e1 LibThreading: Set BackgroundAction's thread name correctly
Previously, init() in BackgroundAction.cpp was calling
Core::Object::set_name, which does not affect the displayed thread name
which is displayed by the system monitor. This changes it to pass the
name to the thread constructor.
2022-10-31 00:02:13 +01:00
Oleg Kosenkov
0c27d95e76 Userland: Use Threading::MutexLocker to lock/unlock mutexes 2022-10-31 00:00:52 +01:00
Gunnar Beutner
466000e05f Meta: Make YCM work when the current dir is not the root of the tree
Previously we'd incorrectly use a relative path for the compilation
database.
2022-10-30 23:57:25 +01:00
Gunnar Beutner
084fad2aca Meta: Remove debug code in the YCM config file 2022-10-30 23:57:25 +01:00
Zaggy1024
e20756f9f7 LibGUI: Update buttons' text/tooltips in Action::set_text
This allows Actions that change based on some state to update their
associated buttons' text and tooltips to match their new text. The
play/pause button in SoundPlayer (and VideoPlayer if it's merged)
will now change tooltips when the playback changes state, rather than
always displaying "Play (Space)".
2022-10-30 23:54:12 +01:00
Linus Groh
1de1d6423b LibWeb: Implement the fetch() method :^)
With so much infrastructure implemented, we can finally add the last
piece of this puzzle - the fetch() method itself!

This contains a few hundred lines of generated code as handling the
RequestInfo and RequestInfo parameter types manually is not feasible,
but we can't use the IDL definition as the Window object is handwritten
code at the moment.
It's neatly tucked away in Bindings/ and will be removed eventually.
2022-10-30 20:10:29 +00:00
Linus Groh
c8d121fa32 LibWeb: Implement most of the 'Fetching' AOs
This implements the following operations from section 4 of the Fetch
spec (https://fetch.spec.whatwg.org/#fetching):

- Fetch
- Main fetch
- Fetch response handover
- Scheme fetch
- HTTP fetch
- HTTP-redirect fetch
- HTTP-network-or-cache fetch (without caching)

It does *not* implement:

- HTTP-network fetch
- CORS-preflight fetch

Instead, we let ResourceLoader handle the actual networking for now,
which isn't ideal, but certainly enough to get enough functionality up
and running for most websites to not complain.
2022-10-30 20:10:29 +00:00
Linus Groh
4db85493e8 AK+Meta: Add WEB_FETCH_DEBUG macro 2022-10-30 20:10:29 +00:00