Commit graph

46829 commits

Author SHA1 Message Date
kleines Filmröllchen
863afbaf38 Base: Add a quote to the fortunes database 2023-02-13 12:10:27 +00:00
Tim Schumacher
43f98ac6e1 Everywhere: Remove the AK:: qualifier from Stream usages 2023-02-13 00:50:07 +00:00
Tim Schumacher
874c7bba28 LibCore: Remove Stream.h 2023-02-13 00:50:07 +00:00
Tim Schumacher
606a3982f3 LibCore: Move Stream-based file into the Core namespace 2023-02-13 00:50:07 +00:00
Tim Schumacher
a96339b72b LibCore: Move Stream-based sockets into the Core namespace 2023-02-13 00:50:07 +00:00
Tim Schumacher
d43a7eae54 LibCore: Rename File to DeprecatedFile
As usual, this removes many unused includes and moves used includes
further down the chain.
2023-02-13 00:50:07 +00:00
Karol Kosek
14951b92ca LibGUI: Remove deprecated text and set_text functions in AbstractButton
This moves the functions to lambda when registering a property.
External code can now only communicate using the new String API.
2023-02-13 00:45:09 +00:00
Karol Kosek
e39adc4772 Userland: Set Button text using the new String class 2023-02-13 00:45:09 +00:00
Karol Kosek
b5cb9a9ebb LibGUI+TaskBar: Make Calendar::formatted_date() return ErrorOr<String>
This commit introduces no error propagation.
2023-02-13 00:45:09 +00:00
Karol Kosek
f802920a3a Userland: Use default initializer instead of an empty string for Buttons 2023-02-13 00:45:09 +00:00
Karol Kosek
d32d4029d3 Userland: Replace usages of AbstractButton::text_deprecated with text() 2023-02-13 00:45:09 +00:00
Karol Kosek
fca29eae09 LibGUI: Store text using the new String class in the AbstractButton
This change also adds non-deprecated text() and set_text() functions and
helper constructors for Button, CheckBox, and RadioButton to call the
strings directly.

The whole codebase at this point is still using the deprecated string
functions, which the class will quietly convert to a new String.
2023-02-13 00:45:09 +00:00
Karol Kosek
d32b052f22 LibGUI+Userland: Add _deprecated suffix to AbstractButton::{set_,}text 2023-02-13 00:45:09 +00:00
Karol Kosek
61b49daf0a LibGUI: Make Clipboard::set_plain_text take text as a StringView 2023-02-13 00:45:09 +00:00
Karol Kosek
67ffc687d8 LibGUI+PixelPaint: Port GUI::ValueSlider's suffix to the new String 2023-02-13 00:26:39 +00:00
Rodrigo Tobar
c4507bb56e LibPDF: Add more built-in SIDs
The first iteration has enough SIDs to display simple documents, but
when trying more and more documents we started to need more of these
SIDs to be properly defined. This is a copy/paste exercise from the CFF
document, which is tedious, so it will continue in small drops.

This commit fills all the gaps until SID 228, which covers all the
ISOAdobe space, and should be enough for most use cases. Since this is a
continuous space starting at 0, we now use an Array instead of a Map to
store these names, which should be more performant. Also to simplify
things I've moved the Array out of the CFF class, making it a simpler
static variable, which allows us to use template type deduction.
2023-02-13 00:23:17 +00:00
Zaggy1024
fb0c226da3 LibVideo/VP9: Convert the Parser to use AK/BitStream.h
This doesn't appear to have had a measurable impact on performance,
and behavior is the same.

With the tiles using independent BooleanDecoders with their own
backing BitStreams, we're even one step closer to threaded tiles!
2023-02-13 00:22:23 +00:00
Nico Weber
6f39c44160 icc: Dump embedded non-parametric curves in lutAToBType and lutAToBType 2023-02-13 00:15:02 +00:00
Nico Weber
7929f8fef9 icc: Dump embedded parametric curves in lutAToBType and lutAToBType 2023-02-13 00:15:02 +00:00
Nico Weber
ed8bd3a792 icc: Dump more information about curves in lutAToBType and lutAToBType 2023-02-13 00:15:02 +00:00
Nico Weber
6f95ec5821 LibGfx: Validate presence of curves for lutAToBType and lutBToAType 2023-02-13 00:15:02 +00:00
Nico Weber
9cfd7a299c Userland: Use allocation-failure safe functions where it's easy
I went through all callers of adopt_own() and replaced them with
try_make<>() if possible or adopt_nonnull_own_or_enomem() else
in cases where it was easy (i.e. in functions already returning
ErrorOr).

No intended behavior change.
2023-02-12 22:54:28 +01:00
Kenneth Myhra
f698585097 LibWeb: Move setting of FormDataPrototype to initialize()
This moves the setting of FormDataPrototype out of the constructor to
initialize().
2023-02-12 21:35:59 +00:00
Liav A
4b1e501bdf Utilities/arp: Don't unveil /tmp/portal/lookup for numerical output
It's not needed in such case, and in the near-future when we would want
to use this utility in an initramfs environment where there's no service
such as LookupServer being running, it's still useful to have the option
to invoke this utility with the mentioned limited output functionality.
2023-02-12 20:54:20 +00:00
Ollrogge
0ce1c52577 LibArchive: Add support for modification time and date 2023-02-12 13:13:15 -07:00
Ollrogge
361df6eff8 AK: Add conversion functions for packed DOS time format
This also adjusts the FATFS code to use the new functions and removes
the now redundant old conversion functions.
2023-02-12 13:13:15 -07:00
Nico Weber
7e915b145b LibGfx: Let ICC code validate tag data alignment
Both when reading the main tag table and when reading embedded
curve data in lutAToBType or lutBToAType.
2023-02-12 20:07:45 +00:00
Nico Weber
b15a889ca4 icc: Dump some of lutAToBType and lutBToAType curve data 2023-02-12 20:07:45 +00:00
Nico Weber
c4b650cf4e LibGfx: Implement curve parsing for lutAToBType and lutBToAType
With this, we parse all data of all permitted tag types of all
required tags in all ICC profile types :^)

(`icc` doesn't dump this data yet, though.)
2023-02-12 20:07:45 +00:00
Nico Weber
bb19dc00af LibGfx: Add a size-less ParametricCurveTagData::from_bytes() overload
The curve data in lutAToBType and lutBToAType can store 'para' data, but
other than in the main ICC tag table, the size of the tag data isn't
explicitly stored. So it must be computed from the data contents.

Extract the function body into a helper can call that from both
variants.
2023-02-12 20:07:45 +00:00
Nico Weber
8ed3f7c4c2 LibGfx: Add a size-less CurveTagData::from_bytes() overload in ICC code
The curve data in lutAToBType and lutBToAType can store 'curv' data, but
other than in the main ICC tag table, the size of the tag data isn't
explicitly stored. So it must be computed from the data contents.

Extract the function body into a helper can call that from both
variants.
2023-02-12 20:07:45 +00:00
Liav A
38ce053296 Utilities/netstat: Don't unveil /tmp/portal/lookup for numerical output
It's not needed in such case, and in the near-future when we would want
to use this utility in an initramfs environment where there's no service
such as LookupServer being running, it's still useful to have the option
to invoke this utility with the mentioned limited output functionality.
2023-02-12 19:38:40 +00:00
Zaggy1024
4f26b35640 LibVideo: Create Resuming handler for seek/buffer handlers to inherit
This allows the logic for keeping track of whether to resume to the
paused or the playing state when exiting these states. The new
StartingStateHandler also uses the class, since it can also be paused
and unpaused while waiting for samples.

The pause/play actions on the handlers inheriting from the resuming
handler will also now notify the owner that the state has changed so
that it can change icons, etc.
2023-02-12 18:47:56 +01:00
Zaggy1024
a6b938b407 LibVideo/VideoPlayer: Dispatch state change events and update play icon
The PlaybackStateChangeEvent wasn't connected up anymore, so the player
wouldn't change icons when stopping playback due to reaching the end of
the stream or encountering an error.
2023-02-12 18:47:56 +01:00
Zaggy1024
aa0f7d9c89 LibVideo: Display the first frame when paused after opening a video 2023-02-12 18:47:56 +01:00
Zaggy1024
789bc99b8d LibVideo: Add StartingStateHandler to prepare the first frames of video
This new state handler will retrieve and display the first frame, while
ensuring that playback can start as soon as possible by buffering two
frames on top of the first frame for the PlayingStateHandler to set its
next frame timer by.
2023-02-12 18:47:56 +01:00
Zaggy1024
f9a65c1502 LibVideo: Check whether it's time to present frames before doing so
Previously, we assumed the timer was hitting at the correct time. This
meant that if we changed states and the previous state handler had
prepared a next frame, we would immediately display it without checking
the timestamp.
2023-02-12 18:47:56 +01:00
Zaggy1024
5da0c6f916 LibVideo: Delay playback errors by their sample timestamps when we can
If we encounter an error in the video decoder, we can set a timestamp
for the error item in the queue so that it will display the error only
when the frame that caused the error would have been displayed.
2023-02-12 18:47:56 +01:00
Zaggy1024
2a228e8a6e LibVideo: Deduplicate logic for dispatching video frame queue items
Previously we had dispatch_decoder_error and on_decoder_error serving
the same function, with one not handling the end of stream properly.

There is also a new function to dispatch either an error or a frame to
the owner of this playback manager, so that PlaybackStateHandlers don't
have to duplicate this logic.
2023-02-12 18:47:56 +01:00
Zaggy1024
e813b8fd19 LibVideo/Matroska: Fix out-of-bounds access when seeking to cues 2023-02-12 18:47:56 +01:00
Andreas Kling
dadabb58eb LibWeb: Implement location.hash setter
This stops a lot of the whining about uncaught exceptions on the
Speedometer benchmark.
2023-02-12 13:00:33 +01:00
Kenneth Myhra
4d27b9e553 LibWeb: Use 'auto& vm =' once at beginning to reduce noise 2023-02-12 11:53:52 +00:00
Julian Offenhäuser
1f27c47973 LibPDF: Check for end of stream in Reader::matches_regular_character()
The way this was set up before, this function would return "true" if
the underlying stream had ended, which would cause us to try to read
past the end in some edge cases.
2023-02-12 10:55:37 +00:00
Julian Offenhäuser
a2b57dd188 LibPDF: Return an error if we fail to load a replacement font 2023-02-12 10:55:37 +00:00
Julian Offenhäuser
96064ec5af LibPDF: Allow filter DecodeParms array entries to be null
Filters will use the default values in this case.
2023-02-12 10:55:37 +00:00
Julian Offenhäuser
34350ee9e7 LibPDF: Allow reading documents with incremental updates
The PDF spec allows incremental changes of a document by appending a
new XRef table and file trailer to it. These will only contain the
changed objects and will point back to the previous change, forming an
arbitrarily long chain of XRef sections and file trailers.

Every one of those XRef sections may be encoded as an XRef stream as
well, in which case the trailer is part of the stream dictionary as
usual. To make this easier, I made it so every XRef table may "own" a
trailer. This means that the main file trailer is now part of the main
XRef table.
2023-02-12 10:55:37 +00:00
Zaggy1024
0c230f5ff0 LibGUI: Callback with the clamped value of Sliders on a jump to cursor 2023-02-12 09:53:05 +01:00
Kenneth Myhra
2f20f16292 Base: Add a test using FormData and FormDataEvent 2023-02-12 00:18:09 +00:00
Kenneth Myhra
fc886b4556 LibWeb: Implement algorithm 'construct the entry list given a form' 2023-02-12 00:18:09 +00:00
Kenneth Myhra
9d13537fc7 AK: Add function 'shallow_clone()' to HashMap
This makes a shallow clone of the HashMap, the items temselves are not
cloned in any way.
2023-02-12 00:18:09 +00:00