summaryrefslogtreecommitdiff
path: root/Userland/Libraries
AgeCommit message (Collapse)Author
2023-02-13LibGUI: Take gutter into account when measuring TextEditor content areaSam Atkins
2023-02-13LibGUI: Don't show caret cursor when hovering TextEditor's gutterSam Atkins
2023-02-13LibGUI: Combine wrapping/non-wrapping TextEditor code pathsSam Atkins
The `is_wrapping_enabled()` paths function just fine when wrapping is disabled. We already calculate `m_line_visual_data`. The only reason to use a special path is for speed, since you can skip some steps if you know each line is only 1 line high visually. However, with code-folding being added, we can't make assumptions about line height because a line could be hidden and have an effective height of 0px. So `text_position_at_content_position()` always needs to loop through the lines to see what our position is, and that function always needs to be called to calculate the real position.
2023-02-13LibGUI: Fix typo in `span_consumed` variableSam Atkins
2023-02-13LibWeb: Convert CSS Token::to_debug_string() to ::to_string() :^)Sam Atkins
Using from_utf8_short_string() for all cases that are <= 3 bytes long. Which is almost all of the static ones.
2023-02-13LibWeb: Convert CSS Token/ComponentValue::to_debug_string() to StringSam Atkins
These are only used for debugging, so I've decided that logging the ErrorOr<String> itself is fine instead of trying to handle that error more gracefully in those cases. If you're getting OOM trying to debug log things, you have bigger problems.
2023-02-13LibWeb: Convert CSS Token value to new FlyStringSam Atkins
2023-02-13LibWeb: Return StringViews from CSS Token bracket-string gettersSam Atkins
These don't need to be full Strings, so let's be lightweight.
2023-02-13LibWeb: Do not assume field element is always a HTMLInputElementKenneth Myhra
Cast to a HTMLElement instead and retrieve the value attribute from there instead.
2023-02-13LibWeb: Avoid dereferencing null pointerKenneth Myhra
Null check was missing and we would crash when dereferencing the pointer to access the type() member.
2023-02-13LibWeb: Clarify WebIDL::Promise as an alias for JS::PromiseCapabilitynetworkException
This patch adds the WebIDL::Promise type explicitly defined in the WebIDL spec to be a PromiseCapability Record from ecma262.
2023-02-13Everywhere: Remove the `AK::` qualifier from Stream usagesTim Schumacher
2023-02-13LibCore: Remove `Stream.h`Tim Schumacher
2023-02-13LibCore: Move Stream-based file into the `Core` namespaceTim Schumacher
2023-02-13LibCore: Move Stream-based sockets into the `Core` namespaceTim Schumacher
2023-02-13LibCore: Rename `File` to `DeprecatedFile`Tim Schumacher
As usual, this removes many unused includes and moves used includes further down the chain.
2023-02-13LibGUI: Remove deprecated text and set_text functions in AbstractButtonKarol Kosek
This moves the functions to lambda when registering a property. External code can now only communicate using the new String API.
2023-02-13Userland: Set Button text using the new String classKarol Kosek
2023-02-13LibGUI+TaskBar: Make Calendar::formatted_date() return ErrorOr<String>Karol Kosek
This commit introduces no error propagation.
2023-02-13Userland: Replace usages of AbstractButton::text_deprecated with text()Karol Kosek
2023-02-13LibGUI: Store text using the new String class in the AbstractButtonKarol Kosek
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-13LibGUI+Userland: Add `_deprecated` suffix to AbstractButton::{set_,}textKarol Kosek
2023-02-13LibGUI: Make Clipboard::set_plain_text take text as a StringViewKarol Kosek
2023-02-13LibGUI+PixelPaint: Port GUI::ValueSlider's suffix to the new StringKarol Kosek
2023-02-13LibPDF: Add more built-in SIDsRodrigo Tobar
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-13LibVideo/VP9: Convert the Parser to use AK/BitStream.hZaggy1024
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-13LibGfx: Validate presence of curves for lutAToBType and lutBToATypeNico Weber
2023-02-12Userland: Use allocation-failure safe functions where it's easyNico Weber
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-12LibWeb: Move setting of FormDataPrototype to initialize()Kenneth Myhra
This moves the setting of FormDataPrototype out of the constructor to initialize().
2023-02-12LibArchive: Add support for modification time and dateOllrogge
2023-02-12LibGfx: Let ICC code validate tag data alignmentNico Weber
Both when reading the main tag table and when reading embedded curve data in lutAToBType or lutBToAType.
2023-02-12LibGfx: Implement curve parsing for lutAToBType and lutBToATypeNico Weber
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-12LibGfx: Add a size-less ParametricCurveTagData::from_bytes() overloadNico Weber
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-12LibGfx: Add a size-less CurveTagData::from_bytes() overload in ICC codeNico Weber
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-12LibVideo: Create Resuming handler for seek/buffer handlers to inheritZaggy1024
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-12LibVideo/VideoPlayer: Dispatch state change events and update play iconZaggy1024
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-12LibVideo: Display the first frame when paused after opening a videoZaggy1024
2023-02-12LibVideo: Add StartingStateHandler to prepare the first frames of videoZaggy1024
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-12LibVideo: Check whether it's time to present frames before doing soZaggy1024
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-12LibVideo: Delay playback errors by their sample timestamps when we canZaggy1024
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-12LibVideo: Deduplicate logic for dispatching video frame queue itemsZaggy1024
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-12LibVideo/Matroska: Fix out-of-bounds access when seeking to cuesZaggy1024
2023-02-12LibWeb: Implement location.hash setterAndreas Kling
This stops a lot of the whining about uncaught exceptions on the Speedometer benchmark.
2023-02-12LibWeb: Use 'auto& vm =' once at beginning to reduce noiseKenneth Myhra
2023-02-12LibPDF: Check for end of stream in Reader::matches_regular_character()Julian Offenhäuser
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-12LibPDF: Return an error if we fail to load a replacement fontJulian Offenhäuser
2023-02-12LibPDF: Allow filter DecodeParms array entries to be nullJulian Offenhäuser
Filters will use the default values in this case.
2023-02-12LibPDF: Allow reading documents with incremental updatesJulian Offenhäuser
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-12LibGUI: Callback with the clamped value of Sliders on a jump to cursorZaggy1024
2023-02-12LibWeb: Implement algorithm 'construct the entry list given a form'Kenneth Myhra