summaryrefslogtreecommitdiff
path: root/Userland/Libraries
AgeCommit message (Collapse)Author
2023-05-15LibCore: Use StringView in Object::find_{child,descendant}_of_type_namedKarol Kosek
It's unnecessary to allocate a string when we only want to compare it with another string. This change also adds a helper for string literals, so that we won't need to add -sv suffix everywhere. :^)
2023-05-15LibGfx: Stop assuming the target format is always BGRA8888MacDue
...and instead assume it's BGRx8888 or BGRA8888, for now. Always treating the target as BGRA8888 leads to the alpha channel being interpreted incorrectly sometimes (as can be seen with WindowServer overlays). Fixes #18749
2023-05-14LibVideo: Add `PlaybackManager::from_mapped_file`Caoimhe
This allows us to create a PlaybackManager from a file which has already been mapped, instead of passing a file name. This means that anyone who uses `PlaybackManager` can now use LibFSAC :)
2023-05-14LibCore: Remove standard I/O from DeprecatedFileBen Wiederhake
2023-05-14LibWeb: Start implementing sizing for tracks with span > 1 items in GFCAliaksandr Kalenik
Partially implements: - Increase sizes to accommodate spanning items crossing content-sized tracks - Increase sizes to accommodate spanning items crossing flexible tracks from https://www.w3.org/TR/css-grid-2/#algo-content
2023-05-14LibWeb: Separate grid tracks from gaps in GFCAliaksandr Kalenik
This change is supposed to solve the problem that currenty when grid tracks are interleaved with gaps it is impossible to iterate tracks spanned by a specific grid item. There is a pair of functions: gap_adjusted_row() and gap_adjusted_column() but they won't work when it comes to items spanning > 1 track. Separating gaps from tracks is going to make it possible to iterate just tracks or both tracks and gaps when it is required. And now tracks spanned by an item can be accessed by just index without doing any additional math.
2023-05-14LibWeb: Make the dblclick event bubble, cancelable and composedLuke Wilde
2023-05-14LibELF: Only call IFUNC resolvers after populating the PLTDaniel Bertalan
As IFUNC resolvers may call arbitrary functions though the PLT, they can only be called after the PLT has been populated. This is true of the `[[gnu::target_clones]]` attribute, which makes a call to `__cpu_indicator_init`, which is defined in `libgcc_s.so`, through the PLT. `do_plt_relocation` and `do_direct_relocation` are given a parameter that controls whether IFUNCs are immediately resolved. In the first pass, relocations pointing to IFUNCs are put on a worklist, while all other relocations are performed. Only after non-IFUNC relocations are done and the PLT is set up do we deal with these.
2023-05-14LibELF: Split `do_relocation` into `do_{direct,plt}_relocation`Daniel Bertalan
No functional changes intended. This is in preparation of a commit that overhauls how IFUNCs are resolved. This commit lets us move the implementation of PLT patching from `DynamicObject` to `DynamicLoader` where all other relocation code lives. For this, got[2] now stores the loader's address instead of the object's.
2023-05-14LibC+LibELF: Handle the R_AARCH64_IRELATIVE relocation typeDaniel Bertalan
This is the AArch64 equivalent of `R_X86_64_IRELATIVE`, which specifies a symbol whose address is determined by calling a local IFUNC resolver function.
2023-05-14LibWeb: Remove unused line in calculate_min_content_size() in GFCAliaksandr Kalenik
2023-05-14LibWeb: Remove excessive spec referencing in GridFormattingContextAliaksandr Kalenik
Removes unrelated to the code copy paste from spec (sometimes duplicated).
2023-05-14LibWeb: Remove dead code in resolve_intrinsic_track_sizes() in GFCAliaksandr Kalenik
Removes partially implemented algorithm for distributing extra space from spanning item: https://www.w3.org/TR/css-grid-2/#extra-space This algorithm should not be part of resolving track sizing on its own but instead be a subfunction of step 3: https://www.w3.org/TR/css-grid-2/#track-size-max-content-min There are changes in layout tests but those are not regressions.
2023-05-14LibWeb: Change implicit background-size height to autoRimvydas Naktinis
The spec says: "The first value gives the width of the corresponding image, the second value its height. If only one value is given the second is assumed to be auto." Fixes #18782
2023-05-14LibWeb: Protect against dereferencing a null pending image requestAndreas Kling
The spec seems to neglect the potential nullity of an image's pending request in various cases. Let's protect against crashing and mark these cases with a FIXME about figuring out whether they are really spec bugs or not.
2023-05-14LibDebug: Stub out LocListX and remove stub expression evaluatorMacDue
The expression evaluator is dead code that does nothing but crash on all paths, as no opcodes are implemented. Stubbing out the LocListX form fixes a crash while reading DWARF 5 debug data that contains location lists. These are just a new way to store location expressions, and since we never implemented expressions, we can just ignore these too. As far as I can tell this is enough for DWARF 5 to work for us (since we mainly just use the line tables).
2023-05-14LibJS/Bytecode: Restore old environments when an exception is caughtAndreas Kling
Unwind contexts now remember the lexical and variable environments in effect when they were created. If an exception is caught, we revert to those environments in the running execution context.
2023-05-14LibJS/Bytecode: Fix bogus program termination after `try` with `catch`Andreas Kling
For `try` statements with a `catch` clause, we were generating *two* "next" blocks. This meant that not throwing an exception would cause execution to stop. Fix this by using the "next" block pointer for the try "entry" and "handler" blocks.
2023-05-13Userland: Allow our access check to pass flags to faccessat syscallFabian Dellwing
2023-05-13LibWeb: Flesh out basic support of min-width/height for grid itemsAliaksandr Kalenik
This change brings calculate_minimum_contribution() for grid items and supporting functions.
2023-05-13LibJS/Bytecode: Variable declarators should always prefer lexical envAndreas Kling
This fixes an issue where object environments (from `with` statement) were bypassed by statements like `var x = 1` (for objects with an `x` property). Fixes 25 tests in test262. :^)
2023-05-13LibWeb: Implement performance.{measure,clearMeasures}Luke Wilde
2023-05-13LibWeb: Specify snake case names for navigation timing entries tooLuke Wilde
This will be used by performance.measure to read the value of a given entry in the NavigationTiming interface.
2023-05-13LibWeb: Partially implement HTMLSourceElement's insertion/removal stepsTimothy Flynn
This implements the substeps which concern HTMLMediaElement parents.
2023-05-13LibWeb: Implement the HTMLMediaElement child <source> selection stepsTimothy Flynn
Rather than setting the src attribute on the HTMLMediaElement, websites may append a list of HTMLSourceElement nodes to the media element. There is a series of "try the next source" steps to attempt to fetch/load each source until we find one that works.
2023-05-13LibWeb: Change Document::parse_url to accept a StringViewTimothy Flynn
There's no need for this to require a DeprecatedString - the method it wraps around already only expects a StringView. This allows passing a String instance without any conversion.
2023-05-13LibGUI: Use ColorRole::DisabledText when AbstractView is disabledthankyouverycool
And only paint GlyphMapWidget's frame if disabled
2023-05-13LibGUI: Allow setting and clearing text in SpinBoxthankyouverycool
2023-05-13LibGUI+Applications: Let GlyphMapWidget initialize a null Fontthankyouverycool
FontEditor will need to clear references to its mutable font in the future while CharacterMap has no use for the highlights clone, so let's convert GlyphMapWidget's set_font wrapper into a separate initialize function for the editor and stop hiding the base function for others. Setting font null in either ultimately points the map to the system's default font.
2023-05-13LibGfx: Convert FontStyleMappings to Arraysthankyouverycool
This will let us neatly ensure capacities, do unchecked appends, and iterate by size() on FontEditor's models.
2023-05-13LibGUI: Add fallible factories to ItemListModelthankyouverycool
2023-05-13LibGUI: Ignore Alt+{Left,Right} key events in GlyphMapWidgetthankyouverycool
Fixes seek actions not activating by keyboard shortcut when GlyphMapWidget has focus.
2023-05-13LibWeb: Return grid container width from automatic_content_width in GFCAliaksandr Kalenik
automatic_content_width() should return grid container width that is supposed to be set by determine_intrinsic_size_of_grid_container().
2023-05-13LibWeb: Implement grid container intrinsic sizes calculationAliaksandr Kalenik
When a width/height constraint is applied to GFC it should set its own width/height to the sum of track sizes according to the spec. Changes in layout tests are improvement over what we had before.
2023-05-13LibWeb: Fix condition to determine auto tracks while sizing in GFCAliaksandr Kalenik
This solves the issue when track with "fixed" min sizing function were treated like "auto" during sizing.
2023-05-13LibWeb: Let HTMLImageElement delay the document load event againAndreas Kling
2023-05-13LibWeb: Don't force HTMLImageElement to have a legacy ImageLoaderAndreas Kling
We achieve this by adding a new Layout::ImageProvider class and having both HTMLImageElement and HTMLObjectElement inherit from it. The HTML spec is vague on how object image loading should work, which is why this first pass is focusing on image elements.
2023-05-13LibWeb: Implement enough of "update the image data" to load imagesAndreas Kling
This first pass is enough to get us: - Image loading via fetch - Source selection via srcset and sizes attributes
2023-05-13LibWeb: Add a class to represent the "source set" concept from HTMLAndreas Kling
Also comes with a little extra CSS parser helper for parsing "sizes" attributes in images.
2023-05-13LibWeb: Add class to represent "list of available images" from HTML specAndreas Kling
2023-05-13LibWeb: Start fleshing out HTML "image requests" and "image data"Andreas Kling
This patch adds HTML::ImageRequest and HTML::DecodedImageData. The latter had to use a different name than "ImageData", as there is already an IDL-exposed ImageData class in HTML.
2023-05-13LibDebug: Propagate errors around LineProgramBen Wiederhake
Found while playing Fixme-Roulette.
2023-05-13LibCore: Remove unused API from DeprecatedFileBen Wiederhake
It looks like this migration it taking a while, so let's make sure noone accidentally introduces new usages of this currently-unused API.
2023-05-13Userland: Merge DEFAULT_PATH into LibFileSystem/FileSystem.hBen Wiederhake
2023-05-13LibWeb: Make PercentageOr<T> equality comparison work for calc() valuesAndreas Kling
This makes hovering around on GitHub fast again, as it no longer believes that the grid-template-areas property keeps changing when it didn't :^) Also made to_string() work for calc() values as well, since I stumbled upon that while debugging this.
2023-05-13LibWeb: Fix typo in containing_block_size_for_item in GFCAliaksandr Kalenik
2023-05-13LibWeb: Align calculate_min/max_content_contribution with the specAliaksandr Kalenik
This change brings more spec compliant implementation of functions to calculate min/max contributions of grid items in containing block size.
2023-05-12LibKeyboard: Read keymap through File, not DeprecatedFileBen Wiederhake
This results in a new OOM prevention. Hooray!
2023-05-12LibGfx+Fuzz: Convert ImageDecoder::initialize to ErrorOrBen Wiederhake
This prevents callers from accidentally discarding the result of initialize(), which was the root cause of this OSS Fuzz bug: https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=55896&q=label%3AProj-serenity&sort=summary
2023-05-12LibWeb: Implement fetching classic scripts using Fetch infrastructureTimothy Flynn