summaryrefslogtreecommitdiff
path: root/Userland/Libraries
AgeCommit message (Collapse)Author
2023-04-14LibTLS: Update HandshakeType value names to match IANA registry valuesstelar7
2023-04-14LibTLS: Rename AlertLevel Critial to FATALstelar7
This matches the wording used in the TLS RFC
2023-04-14LibTLS: Rename Version to ProtocolVersionstelar7
This matches the wording used in the TLS RFC Also define GREASE values as specified in RFC8701
2023-04-14LibTLS: Rename MessageType to ContentTypestelar7
This matches the wording used in the TLS RFC
2023-04-14LibC: Implement if_indextoname and if_nametoindexArda Cinar
2023-04-14LibWeb: Honor column-gap and row-gap CSS properties in flex layoutAndreas Kling
This isn't actually part of CSS-FLEXBOX-1, but all major engines honor these properties in flex layout, and it's widely used on the web. There's a bug open against the flexbox spec where fantasai says the algorithm will be updated in CSS-FLEXBOX-2: https://github.com/w3c/csswg-drafts/issues/2336 I've added comments to all the places where we adjust calculations for gaps with "CSS-FLEXBOX-2" so we can find them easily. When that spec becomes available, we can add proper spec links.
2023-04-14LibVideo/VP9: Extend the borders on reference frames to avoid branchingZaggy1024
Extending the borders on reference frames so that motion vectors that point outside the reference frame allows `predict_inter_block()` to avoid some branches to clamp the sample coordinates in its loops. This results in about a 25% improvement in decode time of a motion- heavy YouTube video (~20.8s -> ~15.6s).
2023-04-14LibVideo/VP9: Clamp reference frame prediction coords outside loopsZaggy1024
Moving the clamping of the coordinates of the reference frame samples as well as some bounds checks outside of the loop reduces the branches needed in the `predict_inter_block()` significantly. This results in a whopping ~41% improvement in decode performance of an inter-prediction-heavy YouTube video (~35.4s -> ~20.8s).
2023-04-14LibVideo/VP9: Pre-calculate inter-frames' reference frame scale factorsZaggy1024
Changing the calculation of reference frame scale factors to be done on a per-frame basis reduces the amount of work done in `predict_inter_block()`, which is a big hotspot in most videos. This reduces decode times in a test video from YouTube by about 5% (~37.2s -> ~35.4s).
2023-04-14LibVideo/VP9: Copy data to reference frames row by rowZaggy1024
This changes the order of the loop copying data to a reference frame store so that it copies each row in a contiguous line rather than copying a column at a time, which caused unnecessary branches. This reduces the decode time on a fairly long 720p YouTube video by about 14.5% (~43.5s to ~37.2s).
2023-04-14LibVideo/Matroska: Remove assertion that cue seeks find earlier samplesZaggy1024
Files can contain a first keyframe that is timestamped later than zero. We don't want to crash in those cases, so don't assert that it can't happen.
2023-04-14LibGUI: Only redraw sliders after the `on_change` callback has finishedZaggy1024
This prevents the seek slider in VideoPlayer from skipping forward and then back when fast seeking is enabled. Previously, it was possible for a single frame to render before the actual seek position in the seek bar was set.
2023-04-14LibVideo: Remove Starting playback state in favor of Seeking to zeroZaggy1024
2023-04-14LibVideo: Add a method to get the playback state from `PlaybackManager`Zaggy1024
2023-04-14LibVideo: Always present a frame when not fast-exiting seekZaggy1024
Previously, there was some leftover logic in `SeekingStateHandler` which would avoid presenting a frame if it didn't find a frame both before and after the target frame. However, this logic was unnecessary as the `on_enter()` function would check if it needed to present a frame and exit seeking if not. This allows seeking to succeed if the Seeking handler cannot find a frame before the one to be seeked to, which could occur if the first frame of a video is not at timestamp 0.
2023-04-14LibVideo: Dispatch PlaybackManager state changes after `on_enter()`Zaggy1024
Previously, the state change was dispatched before the new state that was adopted had been entered, causing it to have invalid state.
2023-04-14LibVideo: Improve logging when PLAYBACK_MANAGER_DEBUG=onZaggy1024
This adds a timestamp to the debug output when presenting a frame, so it can be clear the frame spacing between a presented frame and a state change. The seeking state will also now print when it early-exits if the seek point is within the current sample's duration.
2023-04-14LibWeb: Propogate OOM errors from readable_stream_reader_generic_cancelMatthew Olsson
2023-04-14LibWeb: Add ByteStreamController to ReadableStreamController typeMatthew Olsson
2023-04-14LibWeb: Mostly implement ReadableByteStreamController.[[ReleaseSteps]]Matthew Olsson
2023-04-14LibWeb: Mostly implement ReadableByteStreamController.[[PullSteps]]Matthew Olsson
2023-04-14LibWeb: Implement ReadableByteStreamController.[[CancelSteps]]Matthew Olsson
2023-04-14LibWeb: Expose ReadableStream::m_state and use in AOsMatthew Olsson
This allows us to be a bit closer to the spec phrasing and matches what we do with WritableStream
2023-04-14LibRegex: Avoid calling GenericLexer::consume() past EOFAli Mohammad Pur
The consume(size_t) overload consumes "at most" as many bytes as requested, but consume() consumes exactly one byte. This commit makes sure to avoid consuming past EOF. Fixes #18324. Fixes #18325.
2023-04-14LibWeb: Set Comment's prototypeLuke Wilde
This makes YouTube's thumbnails start appearing on the homepage. Yes,seriously. Simply put, this is because this check failed when Comment had the incorrect prototype: https://github.com/webcomponents/polyfills/blob/90cb97f847ce918289dac0978c50dcda0a0afd72/packages/shadycss/src/style-util.js#L397 This causes it to try and reconvert style sheets that are already in Shady format, which would cause it to spuriously add things such as class selectors on the end of tag selectors. This caused nothing to match the selectors. When YouTube is generating the thumbnails, it checks if the thumbnail grid container has a non-zero clientWidth. If it's zero, it simply bails generating thumbnails. Since the selectors for this container did not apply, we would not properly create a paint box for it, causing clientWidth to return zero.
2023-04-14Spreadsheet+LibSyntax: Never insert spans directlyMatteo Benetti
Function `CellSyntaxHighlighter::rehighlight()` direct inserted spans to TextDocument `m_span` vector missing out important reordering and merging operation carried out by `TextDocument::set_spans()`. This caused overlapping spans for a cell with only a `=` symbol (one for the actual token and one for the highlighting) to miscalculate `start` and `end` value and a `length` value (of `size_t` type) with a `0-1` substraction (result: 18446744073709551615) causing `Utf32View::substring_view()` to fail the `!Checked<size_t>::addition_would_overflow(offset, length)` assertion This remove the possibility to directly alter `TextDocument`'s spans thus forcing the utilization of `HighlighterClient::do_set_spans()` interface function. Proper refactor have been applied to `CellSyntaxHighlighter::rehighlight()` function
2023-04-14LibJS: Port PrototypeObject::typed_this_value() to NonnullGCPtrLinus Groh
2023-04-14LibJS: Port PrototypeObject::typed_this_object() to NonnullGCPtrLinus Groh
2023-04-14LibJS: Port PrototypeObject::this_object() to NonnullGCPtrLinus Groh
2023-04-14LibJS: Port Value::get_method() to GCPtrLinus Groh
2023-04-14LibJS: Port Value::to_bigint() to NonnullGCPtrLinus Groh
2023-04-14LibJS: Port Value::to_object() to NonnullGCPtrLinus Groh
2023-04-14LibJS: Port Value::to_primitive_string() to NonnullGCPtrLinus Groh
2023-04-14LibWeb: Support NotAllowed CSS cursorSrikavin Ramkumar
2023-04-13LibGfx: Add Rect::interpolated_to functionTom
This function interpolates the edges between the rectangle and another rectangle based on a percentage value.
2023-04-13LibWeb: Don't match the root node of HTMLCollectionLuke Wilde
Every user of HTMLCollection does not expect the root node to be a potential match, so let's avoid it by using non-inclusive sub-tree traversal. This avoids matching the element that getElementsByTagName was called on for example, which is required by Ruffle: https://github.com/ruffle-rs/ruffle/blob/da689b7687d6bb23f37251e902ccddabdfcc5f48/web/packages/core/src/ruffle-object.ts#L321-L329
2023-04-13LibWeb: Whine instead of dying on unexpected box during line layoutAndreas Kling
Log a FIXME on the debug log, along with a layout tree dump of the box that we didn't expect to see. This will be annoying (until fixed), but far less so than crashing the browser.
2023-04-13LibJS: Make well-known symbol getters return NonnullGCPtrLinus Groh
None of these are ever null after the VM has been initialized, as proved by virtually every caller immediately dereferencing the raw pointer.
2023-04-13LibJS: Make intrinsics getters return NonnullGCPtrLinus Groh
Some of these are allocated upon initialization of the intrinsics, and some lazily, but in neither case the getters actually return a nullptr. This saves us a whole bunch of pointer dereferences (as NonnullGCPtr has an `operator T&()`), and also has the interesting side effect of forcing us to explicitly use the FunctionObject& overload of call(), as passing a NonnullGCPtr is ambigous - it could implicitly be turned into a Value _or_ a FunctionObject& (so we have to dereference manually).
2023-04-13LibJS: Add spec comments to WeakSetPrototypeLinus Groh
2023-04-13LibJS: Add spec comments to WeakSetConstructorLinus Groh
2023-04-13LibJS: Add spec comments to WeakRefPrototypeLinus Groh
2023-04-13LibJS: Add spec comments to WeakRefConstructorLinus Groh
2023-04-13LibJS: Add spec comments to WeakMapPrototypeLinus Groh
2023-04-13LibJS: Add spec comments to WeakMapConstructorLinus Groh
2023-04-13LibJS: Add spec comments to TypedArrayPrototypeLinus Groh
2023-04-13LibJS: Add spec comments to TypedArrayConstructorLinus Groh
2023-04-13LibJS: Add spec comments to SymbolPrototypeLinus Groh
2023-04-13LibJS: Add spec comments to SymbolConstructorLinus Groh
2023-04-13LibJS: Add spec comments to StringConstructorLinus Groh