summaryrefslogtreecommitdiff
path: root/Userland/Libraries
AgeCommit message (Collapse)Author
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
2023-05-12LibWeb: Implement the fetch a classic script AOTimothy Flynn
Note that this unfortunately requires the same workaround as <link> elements to handle CORS cross-origin responses.
2023-05-12LibTextCodec: Change UTF-8's decoder to replace invalid code pointsTimothy Flynn
The UTF-8 decoder will currently crash if it is provided invalid UTF-8 input. Instead, change its behavior to match that of all other decoders to replace invalid code points with U+FFFD. This is required by the web.
2023-05-12LibWeb: Add an alias for FetchAlgorithm's consume-body callback argumentTimothy Flynn
This will make it more convenient in places where the Variant would need to be re-typed outside of this class.
2023-05-12LibWeb: Change the script fetch completion callback to accept any scriptTimothy Flynn
The completion callback currently only accepts a JavaScriptModuleScript. The same callback will need to be used for ClassicScript scripts as well so allow the callback to accept any Script type. The single existing outside caller already stores the result as a Script.
2023-05-12LibWeb: Implement the fetch response's unsafe response AOTimothy Flynn
2023-05-12LibWeb: Implement the fetch response is CORS-cross-origin AOTimothy Flynn
2023-05-12LibWeb: Implement the legacy extracting an encoding AOTimothy Flynn
2023-05-12LibWeb: Implement the CORS settings attribute credentials mode AOTimothy Flynn
2023-05-12LibGfx: VERIFY() error is finite when splitting bezier curvesMacDue
If this value somehow becomes nan/inf the painter will keep splitting the path till the process OOMs, a simple crash would be preferable.
2023-05-12LibWeb: Use .to_px_or_zero() in tentative_height_for_replaced_element()MacDue
If just .to_px() is used the height can end up as the float `inf` or `nan`. This caused an OOM when loading Polygon as this `inf` would become a `nan` and propagate to the SVG painting, which then attempts to draw a path with nan control points, which would make the Gfx::Painter infinitely split the path till it OOM'd.
2023-05-11LibWeb: Resolve grid items preferred width in GFCAliaksandr Kalenik
Previously, the width and height of grid items were set to match the size of the grid area they belonged to. With this change, if a grid item has preferred width or height specified to not "auto" value it will be resolved using grid area as containing block and used instead.
2023-05-11LibWeb: Parse calc() function in grid sizesAliaksandr Kalenik
Adds missing part of grid size parsing function to handle calc().
2023-05-11LibWeb: Use LengthPercentage in CSS::GridSizeAliaksandr Kalenik
Using LengthPercentage instead of Length and Percentage separately is going to allow GridSize to store calc() values. It also allows to simplify some parts of layout code.
2023-05-10LibWeb: Fix percentage min/max sizes on flex items with intrinsic ratioAndreas Kling
We were resolving percentage values against the containing block size in the wrong axis.
2023-05-10LibWeb: Don't resolve CSS property values for unconnected elementsAndreas Kling
While it's possible to getComputedStyle() on an unconnected element, the resulting object is not supposed to have any values, since we can't resolve style without a document root anyway. This fixes a crash on https://bandcamp.com