summaryrefslogtreecommitdiff
path: root/Tests
AgeCommit message (Collapse)Author
2023-04-07LibWeb: Use max-width property in table formattingmartinfalisse
2023-04-07LibWeb: Add table formatting testsmartinfalisse
Creates some TableFormattingContext tests based on the tests in /html/misc.
2023-04-07LibWeb: Move table tests to their own foldermartinfalisse
2023-04-07LibWeb: Don't put abspos grid/flex items in anonymous wrapperAndreas Kling
Grid and flex containers have their own rules for abspos items, so we shouldn't try to be clever and put them in the "current" anonymous wrapper block. That behavior is primarily for the benefit of block & inline layout.
2023-04-06AK: Add FlyString::is_one_of for variadic string comparisonKenneth Myhra
2023-04-06LibWeb: Ignore preferred width when calculating intrinsic width of blockAndreas Kling
When calculating the intrinsic width of a block-level box, we now ignore the preferred width entirely, and not just when the preferred width should be treated as auto. The condition for this was both confused and wrong, as it looked at the available width around the box, but didn't check for a width constraint on the box itself. Just because the available width has an intrinsic sizing constraint doesn't mean that the box is undergoing intrinsic sizing. It could also be the box's containing block!
2023-04-06Tests/LibWeb: Move block & inline layout tests into own directoryAndreas Kling
2023-04-05LibWeb: Use intrinsic aspect ratio when calculating max content heightmatcool
2023-04-05Tests: Add test for webp lossless decodingNico Weber
2023-04-03LibTLS: Refactor CA loading into central functionFabian Dellwing
2023-04-03Tests: Add benchmarks for `JPEGLoader`Lucas CHOLLET
I'm the author of the image.
2023-04-03Tests: Add a test for SOF2 JPEGs with successive approximationsLucas CHOLLET
This image was generated using `cjpeg` with the following scan file: 0 1 2: 0 0 0 2; 0: 1 63 0 1; 1: 1 63 0 1; 2: 1 63 0 1; 0 1 2: 0 0 2 1; 0: 1 63 1 0; 1: 1 63 1 0; 2: 1 63 1 0; 0 1 2: 0 0 1 0;
2023-04-03AK+Everywhere: Change AK::fill_with_random to accept a Bytes objectTimothy Flynn
Rather than the very C-like API we currently have, accepting a void* and a length, let's take a Bytes object instead. In almost all existing cases, the compiler figures out the length.
2023-04-02LibWeb: Add borders functionality to CSS Gridmartinfalisse
2023-04-02LibWeb: Fix regression in definite grid row heightsmartinfalisse
Fixes a row height bug when a grid item in a row has a definite height.
2023-04-02LibWeb: Don't apply presentational hints to associated pseudo elementsAndreas Kling
CSS properties generated by presentational hints in content attributes should not leak into pseudo elements.
2023-04-02LibWeb: Don't apply element inline style to associated pseudo elementsAndreas Kling
An element's inline style, if present, should not leak into any pseudo elements generated by that element.
2023-04-02AK: Increase LittleEndianOutputBitStream's buffer size and remove loopsTimothy Flynn
This is very similar to the LittleEndianInputBitStream bit buffer change from 8e834d4bb2f8a217013142658fe7203c5a5c3170. We currently buffer one byte of data for the underlying stream. And when we put bits onto that buffer, we do so 1 bit at a time. This replaces the u8 buffer with a u64. And instead of looping at all, we perform bitwise operations to write the desired number of bits. Using the "enwik8" file as a test (100MB uncompressed, commonly used in benchmarks: https://www.mattmahoney.net/dc/enwik8.zip), compression time decreases from: 13.62s to 10.9s on Serenity (cold) 13.62s to 9.22s on Serenity (warm) 2.93s to 2.32s on Linux One caveat is that this requires explicitly flushing any leftover bits when the caller is done with the stream. The byte buffer implementation implicitly flushed its data every time the buffer was byte-aligned, as doing so would always fill the byte. This is no longer the case. But for now, this should be fine as the one user of this class, DEFLATE, already has a "flush everything now that we're done" finalizer.
2023-04-02LibWeb: Fix application of intrinsic aspect ratio to flex column itemsAndreas Kling
The intrinsic aspect ratio of a box is a width:height ratio, so if we have the width and need the height, we should divide, not multiply. :^)
2023-04-01LibWeb: Add display grid automated testsmartinfalisse
2023-04-01Tests: Use layout tests placed in subdirectoriesmartinfalisse
Allows organizing layout tests into subdirectories.
2023-04-01LibCompress: Implement block size validation for XZ streamsTim Schumacher
2023-04-01Tests: Document input of the xz_utils_good_1_block_header_1 test caseTim Schumacher
2023-03-30LibWeb: Actually visit rules and media queries in imported style sheetsAndreas Kling
Due to CSSImportRule::has_import_result() being backwards, we never actually entered imported style sheets when traversing style rules or media queries. With this fixed, we no longer need the "collect style sheets" step in StyleComputer, as normal for_each_effective_style_rule() will now actually find all the rules. :^)
2023-03-30LibCompress: Use LZMA context from preexisting dictionaryTim Schumacher
2023-03-30LibCompress: Avoid overflowing the size of uncompressed LZMA2 chunksTim Schumacher
2023-03-30LibCompress: Only require new LZMA2 properties after dictionary resetTim Schumacher
2023-03-30LibCompress: Implement support for multiple concatenated XZ streamsTim Schumacher
2023-03-30LibCompress: Move XZ header validation into the read functionTim Schumacher
The constructor is now only concerned with creating the required streams, which means that it no longer fails for XZ streams with invalid headers. Instead, everything is parsed and validated during the first read, preparing us for files with multiple streams.
2023-03-30LibCompress: Implement proper handling of LZMA end-of-stream markersTim Schumacher
2023-03-29LibWeb: Resolve percentage vertical-align values against line-heightAndreas Kling
...instead of not resolving them at all. :^)
2023-03-28LibWeb: Clamp fit-content widths in flex layout to min/max-widthAndreas Kling
In situations where we need a width to calculate the intrinsic height of a flex item, we use the fit-content width as a stand-in. However, we also need to clamp it to any min-width and max-width properties present.
2023-03-28Tests/LibWeb: Add layout test for layout fix in PR #15780Luke Wilde
Adds a layout test for the fix in 488a979.
2023-03-27LibWeb: Use fit-content width in place of indefinite flex item widthsAndreas Kling
In `flex-direction: column` layouts, a flex item's intrinsic height may depend on its width, but the width is calculated *after* the intrinsic height is required. Unfortunately, the specification doesn't tell us exactly what to do here (missing inputs to intrinsic sizing is a common problem) so we take the solution that flexbox applies in 9.2.3.C and apply it to all intrinsic height calculations within FlexFormattingContext: if the used width of an item is not yet known when its intrinsic height is requested, we substitute the fit-content width instead. Note that while this is technically ad-hoc, it's basically extrapolating the spec's suggestion in one specific case and using it in all cases.
2023-03-27LibWeb: Fix intrinsic sizing early return condition in TFCAliaksandr Kalenik
Early return before running full TFC algorithm is only possible when just table width need to be calculated.
2023-03-27LibTLS: Check if certificate is self signed before importing it as CAFabian Dellwing
2023-03-26Tests/LibWeb: Test flex column item with auto height and max-widthAndreas Kling
This case is important because we have to clamp the width before using it to determine the auto height.
2023-03-26Tests/LibWeb: Add test for flex item auto height with `flex-wrap: wrap`Andreas Kling
2023-03-25LibGfx/JPEG: More support for scans with a single componentLucas CHOLLET
Introduced in 2c98eff, support for non-interleaved scans was not working for frames with a number of MCU per line or column that is odd. Indeed, the decoder assumed that they have scans that include a fabricated MCU like scans with multiple components. This patch makes the decoder handle images with a number of MCU per line or column that is odd. To do so, as in the current decoder state we do not know if components are interleaved at allocation time, we skip over falsely-created macroblocks when filling them. As stated in 2c98eff, this is probably not a good solution and a whole refactor will be welcome. It also comes with a test that open a square image with a side of 600px, meaning 75 MCUs.
2023-03-25LibWeb: Don't allow resolved height of abspos elements to become negativeAndreas Kling
We have to clamp the resulting height to 0 when solving for it.
2023-03-25LibWeb: Don't allow resolved width of abspos elements to become negativeAndreas Kling
We have to clamp the resulting width to 0 when solving for it.
2023-03-25LibWeb: Add out-of-flow boxes to anonymous wrapper block when possibleAndreas Kling
If the previous sibling of an out-of-flow box has been wrapped in an anonymous block, we now stuff the out-of-flow box into the anonymous block as well. Co-authored-by: Aliaksandr Kalenik <kalenik.aliaksandr@gmail.com>
2023-03-25LibRegex: Make ^ and $ accept all `LineTerminator`s instead of just '\n'Ali Mohammad Pur
Also adds a couple tests.
2023-03-24Tests/LibCrypto: Test block splitting logic for SHA1/SHA256Jelle Raaijmakers
We were not testing this logic and I caused a regression while modifying some of the hashing code, so let's add these. Note that I only added two tests to test both 'families' of implementations for the SHA hashes.
2023-03-22LibWeb: Support loading file:// URLs via fetch (through ResourceLoader)Andreas Kling
This builds on the existing ad-hoc ResourceLoader code for HTTP fetches which works for files as well. This also includes a test that checks that stylesheets loaded with the "file" URL scheme actually work.
2023-03-21LibGfx: Move all image loaders and writers to a subdirectoryLucas CHOLLET
2023-03-21Everywhere: Use `LibFileSystem` where trivialCameron Youell
2023-03-21Tests: Add XZ tests from XZ utilsTim Schumacher
2023-03-21Tests: Add tests to verify alpha values are premultiplied when scalingTim Ledbetter
2023-03-20LibWeb: Don't crash on HTML input element with `display: inline`Andreas Kling
This would previously assert in InlineFormattingContext because we had an outwardly inline box that wasn't inwardly flow. Fix this by converting text-based input boxes to inline-blocks. This is an ad-hoc solution, and there might be a much better way to solve it.