summaryrefslogtreecommitdiff
path: root/Userland
AgeCommit message (Collapse)Author
2023-05-29WebP/Lossy: Add static data needed for decoding coefficientsNico Weber
Also add `vp8_short_inv_walsh4x4_c()` from the spec for the inverse Walsh-Hadamard transform. The YUV output data must bitwise match the behavior of the spec, so there isn't a ton of flexibility of how to do this particular function.
2023-05-29LibWeb: Update workarounds for fetching CORS cross-origin responsesTimothy Flynn
Now that the processResponseConsumeBody algorithm receives the internal response body of the fetched object, we do not need to go out of our way to read its body from outside of fetch. However, several elements do still need to manually inspect the internal response for other data, such as response headers and status. Note that HTMLScriptElement already does the new workaround as a proper spec step.
2023-05-29LibWeb: Handover the fetch response's internal body data upon completionTimothy Flynn
These is a normative change to the Fetch spec. See: https://github.com/whatwg/fetch/commit/9003266 https://github.com/whatwg/fetch/commit/b5a587b
2023-05-29LibWeb: Remove Layout::TableBoxAliaksandr Kalenik
Solves conflict in layout tree "type system" when elements <label> (or <button>) can't have `display: table` because Box can't be Layout::Label (or Layout::ButtonBox) and Layout::TableBox at the same time.
2023-05-29watch: Avoid overflow for large interval valuesTim Ledbetter
Previously `usleep()` was being used, which was being passed a 32-bit signed integer as a parameter. This caused an overflow for intervals larger than 2147 seconds.
2023-05-29userdel: Removal of files does not require creation rightsBen Wiederhake
2023-05-29AudioApplet: Read and apply config value only onceBen Wiederhake
2023-05-29AudioApplet: Store default config value in a single placeBen Wiederhake
The hope is that this can later be used to: - verify that all accesses to the same key use the same default value, - and extract the default values more easily.
2023-05-29FileSystemAccessServer: Don't transmit unused dataBen Wiederhake
The server cannot use these values anywhere, because this method always sets 'prompt = ShouldPrompt::No'. This saves a bunch of roundtrips for all clients that use FSAS to read abritrary files.
2023-05-29LibWeb: Only update style for the element being animated by CSSAndreas Kling
Unlike DOM mutations, CSS animations don't affect the style of the entire subtree of the element being animated. This means we only have to recompute style for the animating element, which is significantly faster than doing the whole subtree. This takes idle CPU usage on https://shopify.com/ from 100% to 30% on my (not massively powerful) laptop. :^)
2023-05-29LibWeb: Respect the CSS animation-direction property for animationsAli Mohammad Pur
2023-05-29LibWeb: Respect the animation-fill-mode CSS propertyAli Mohammad Pur
2023-05-29LibWeb: Make sure finished animations are not restartedAli Mohammad Pur
This commit makes the StyleComputer avoid restarting finished animations (e.g. animations with finite iteration counts that have run to completion). As a bonus, it also disables the animation timer when all animations have finished running.
2023-05-29LibWeb: Add preliminary support for CSS animationsAli Mohammad Pur
This partially implements CSS-Animations-1 (though there are references to CSS-Animations-2). Current limitations: - Multi-selector keyframes are not supported. - Most animation properties are ignored. - Timing functions are not applied. - Non-absolute values are not interpolated unless the target is also of the same non-absolute type (e.g. 10% -> 25%, but not 10% -> 20px). - The JavaScript interface is left as an exercise for the next poor soul looking at this code. With those said, this commit implements: - Interpolation for most common types - Proper keyframe resolution (including the synthetic from-keyframe containing the initial state) - Properly driven animations, and proper style invalidation Co-Authored-By: Andreas Kling <kling@serenityos.org>
2023-05-29LibWeb: Add CSS::Time::to_milliseconds()Ali Mohammad Pur
2023-05-29LibWeb: Keep track of CSS property source declarationsAli Mohammad Pur
This allows us to figure out where a specific CSS property comes from, which is going to be used in a future commit to uniquely identify running animations.
2023-05-29LibWeb: Add CSS CompositeStyleValueAli Mohammad Pur
This represents the value of properties assigned via their shorthands, and is expanded when computing actual property values.
2023-05-29LibWeb: Visit CSS block tokens for var() tokens as wellAli Mohammad Pur
Also extract the equirecursive lambda functions into separate functions to simplify the code a little bit.
2023-05-29LibWeb: Allow '0' as a CSS dimension valueAli Mohammad Pur
The comment mentions that zero is let through, but then immediately errors out if it sees any number outside quirks mode. This commit makes that check let zeros through.
2023-05-29Ladybird+Browser: Add a 'Dump All Resolved Styles' debug optionAli Mohammad Pur
This option dumps all styles for all elements in the document; very helpful for finding properties that have changed unintentionally :^)
2023-05-28headless-browser: Disable content filtering when running testsAndreas Kling
URL filtering was taking up a huge amount of time when burning through the tests. We're not gonna have a bunch of ads to block in our local tests, so let's just turn it off when running them.
2023-05-28headless-browser: Print a diff when a test failure occursAndreas Kling
This will make it a lot easier to understand what went wrong, especially when the failure occurs on CI but not at home. And of course, use LibDiff to generate the diff! :^)
2023-05-28WebContent+headless-browser: Use document.body.innerText for text testsAndreas Kling
This should be less fickle than the "select all & copy selected text" trick we were doing earlier.
2023-05-28LibWeb: Use HashMap instead of Vector to store grid areas in GFCAliaksandr Kalenik
Grid areas are accessed by their name (string) so HashMap is more appropriate data structure to store them.
2023-05-28LibGUI: Fix crooked close button on active tabs in the TabWidgetKarol Kosek
This is a regression from f391ccfe53e18395842d0d6b743d08d23b9108e5. The bug didn't appear on inactive tabs, as they already use `translated(1, -2)`.
2023-05-28LibWeb: Wrap child text sequences of grid container in anonymous blocksAliaksandr Kalenik
From spec https://drafts.csswg.org/css-grid/#grid-items: "Each in-flow child of a grid container becomes a grid item, and each child text sequence is wrapped in an anonymous block container grid item." Fixes the problem that text sequences inside grid containers are ignored and not displayed.
2023-05-28LibWeb: Treat unresolvable percentages as auto to resolve sizes in GFCAliaksandr Kalenik
Fixes the bug that currently we always consider tracks with percentage size as ones with "fixed" length even when available size is not definite. With this change tracks with percentage size when available size is not definite will be considered as "intrinsic" sized.
2023-05-28LibWeb: Support reverse flex layout with space-around/space-betweenAndreas Kling
We were not taking reverse flex directions into account when choosing the initial offset for flex item placement if justify-content were either space-around or space-between.
2023-05-28WebP/Lossy: It's 'macroblock', not 'metablock'Nico Weber
Somehow my brain decided to change the name of this concept. Not sure why, the spec consistently uses 'macroblock'. No behavior change.
2023-05-28LibWeb: Add missing check in CrossOriginGetOwnPropertyHelperAndi Gallo
We have to check that the entry in CrossOriginProperties is the one actually requested from the caller before executing the body of the loop. This fixes a crash triggered by YouTube iframe embedding.
2023-05-28LibTest: Use the 16 standard ANSI colors in status outputDaniel Bertalan
Neither Azure Pipelines' log viewer, nor macOS Terminal.app support full 24-bit RGB color codes, causing the text output to be displayed incorrectly. Fix this by using one of the 16 standard colors. Most terminal emulators use a relatively dark shade for red by default, as seen in the "ANSI escape code" Wikipedia article, so change the foreground color to white to preserve contrast.
2023-05-28LibJS: Fix reading cached source rangesMacDue
Made a slight logic error in 95d69fc which meant the dummy range would be returned even if the source_range_storage contained an actual source range. This corrects that by resolving the null unrealized range to a dummy range, and storing that. It then can be treated as a normal source range.
2023-05-28LibJS: Fix crash when trying to get source rangeMacDue
Previously, source_range() could crash attempting to read from a null unrealized->source_code pointer. It looks like the previous behaviour here was to return a dummy source range, so this commit restores that. With this loading https://github.com/SerenityOS/serenity works again.
2023-05-28SpaceAnalyzer: Migrate to `Core::Directory::for_each_entry()`Sam Atkins
2023-05-28LibCore: Add wrapper for fstatat()Sam Atkins
`Core::System::fstatat()` is similar to our standard `Core::System` wrappers. `Core::Directory::stat(relative_path, flags)` is a convenience method if you already have a Directory, to stat a file relative to it.
2023-05-28LibCore: Don't record false DirIterator errorsSam Atkins
`readdir()` returns null if there is an error, OR if we reached the end. We don't need to create an Error if there wasn't one.
2023-05-28Terminal: Migrate to `Core::Directory::for_each_entry()`Sam Atkins
2023-05-28DisplaySettings: Migrate to `Core::Directory::for_each_entry()`Sam Atkins
2023-05-28LibWeb: Apply rules for parsing a legacy color valueShannon Booth
2023-05-28LibWeb: Add Web::HTML::parse_legacy_color_valueShannon Booth
This function follows the "rules for parsing a legacy color value" which is used in some legacy attributes, such as 'bgcolor' in the body element.
2023-05-28LibGfx: Add Color::from_named_css_color_stringShannon Booth
This is factored out from Color::from_string and determines the color only from performing an ASCII case-insensitive search over the named CSS colors.
2023-05-28LibWasm: Create AK::StackInfo once per AbstractMachineAndreas Kling
This makes test-wasm about 20% faster on my Linux machine :^)
2023-05-28LibC: Ensure that `struct group::gr_mem` pointers are alignedDaniel Bertalan
Otherwise, we get a UBSan crash in SystemServer before we could even start running tests on AArch64.
2023-05-28LibCrypto: Add workaround for false -Warray-bounds warningDaniel Bertalan
When building for AArch64 with UBSan enabled, GCC 13.1 reports a false "array out of bounds" error on access to offset `1 * sizeof(u64)`. Changing the order of the stores seems to silence it.
2023-05-28LibWeb: Improve support for selecting an image sourceAndi Gallo
Apply media conditions before selecting a size and add an algorithm to select an image source based on pixel density.
2023-05-28LibWeb: Skip children based on media when updating the source setAndi Gallo
If child has a media attribute and its value does not match the environment, continue to the next child.
2023-05-28LibJS: Make Error stack traces lazierAndreas Kling
Instead of eagerly populating the stack trace with a textual representation of every call frame, just store the raw source code range (code, start offset, end offset). From that, we can generate the full rich backtrace when requested, and save ourselves the trouble otherwise. This makes test-wasm take ~7 seconds on my machine instead of ~60. :^)
2023-05-28headless-browser: Call fflush() between tests when running on TTYAndreas Kling
This allows us to see the full test name without getting cut off by stdio buffering. :^)
2023-05-27WebP/Lossy: Variable naming fix for constants from last pull requestNico Weber
2023-05-27WebP/Lossy: Add code to read macroblock metadataNico Weber