summaryrefslogtreecommitdiff
path: root/Userland/Libraries
AgeCommit message (Collapse)Author
2023-02-08AK: Remove the fallible constructor from `LittleEndianOutputBitStream`Tim Schumacher
2023-02-08AK: Remove the fallible constructor from `LittleEndianInputBitStream`Tim Schumacher
2023-02-08AK: Remove the fallible constructor from `BigEndianInputBitStream`Tim Schumacher
2023-02-08LibGfx: Validate type of cicpTag in ICC ProfileNico Weber
This should've really been part of e8bbb3d91536.
2023-02-08LibGfx+icc: Read cicpTypeNico Weber
This is a very new tag used for HDR content. The only files I know that use it are the jpegs on https://ccameron-chromium.github.io/hdr-jpeg/ But they have an invalid ICC creation date, so `icc` can't process them. (Commenting out the check for that does allow to print them.) If the CIPC tag is present, it takes precedence about the actual data in the profile and from what I understand, the ICC profile is basically ignored. See https://www.color.org/events/HDR_experts.xalter for background, in particular https://www.color.org/hdr/02-Luke_Wallis.pdf (but the other talks are very interesting too). (PNG also has a cICP chunk that's supposed to take precedence over iCCP.)
2023-02-08LibGfx: Add another profile ID to ICC quirk listNico Weber
2023-02-08LibGfx: Add ICC v2 tags to tag listNico Weber
2023-02-08LibGfx+icc: Read signatureTypeNico Weber
This isn't used by any mandatory tags, and it's not terribly useful. But jpegs exported by Lightroom Classic write the 'tech' tag, and it seems nice to be able to dump its contents. signatureType stores a single u32 which for different tags with this type means different things. In each case, the value is one from a short table of valid values, suggesting this should be a per-tag enum class instead of a per-tag DistinctFourCC, per the comment at the top of DistincFourCC.h. On the other hand, 3 of the 4 tables have an explicit "It is possible that the ICC will define other signature values in the future" note, which suggests the FourCC might actually be the way to go. For now, just punt on that and manually dump the u32 in fourcc style in icc.cpp and don't add any to_string() methods that return a readable string based on the contents of these tables.
2023-02-08LibGfx+icc: Read namedColor2TypeNico Weber
This is the type of namedColor2Tag, which is a required tag in NamedColor profiles. The implementation is pretty basic for now and only exposes the numbers stored in the file directly (after endian conversion).
2023-02-07LibWeb: Null check `nearest_sibling` in `generate_missing_parents`Aliaksandr Kalenik
Caught by AddressSanitizer.
2023-02-07LibWeb: Table wrappers should not be ignored in auto height calculationAliaksandr Kalenik
Though table wrappers are anonymous block containers (because TableWrapper is inherited from BlockContainer) with no lines they should not be skipped in block auto height calculation.
2023-02-07LibGUI: Add 9 and 11 to the list of suggested sizes in FontPickerAndreas Kling
2023-02-07LibGUI: Add callbacks for Slider drags starting and endingZaggy1024
2023-02-07LibGUI: Make sliders start a drag when jumping to the cursorZaggy1024
This allows users to seek to any position in VideoPlayer, then continue adjusting the playback timestamp while holding left mouse.
2023-02-07LibGUI+About: Make AboutDialog creation fallibleSam Atkins
2023-02-07LibGUI: Convert AboutDialog layout to GMLSam Atkins
2023-02-06LibGfx: Add table size validation for ICC lut16TypeNico Weber
2023-02-06LibChess: Factorize the returned `StringView` for a drawLucas CHOLLET
2023-02-06Chess+LibChess: Avoid using `DeprecatedString` whenever possibleLucas CHOLLET
2023-02-05LibGfx: Fix comment typo in ICC codeNico Weber
2023-02-05LibC+LibCore: Remove serenity_setenv()MacDue
This was called from LibCore and passed raw StringView data that may not be null terminated, then incorrectly passed those strings to getenv() and also tried printing them with just the %s format specifier.
2023-02-05LibCore+LibC: Add putenv() wrapperMacDue
This is made safe with a special serenity_putenv() function in LibC.
2023-02-05LibCore: Add const qualifier to exec() argument spansMacDue
2023-02-05LibGfx: Extract a variable in ICC TextDescriptionTagDataNico Weber
2023-02-05LibSQL: Actually print an error message after failing to launch a serverKarol Kosek
We were shadowing the 'result' variable, which made an exec error message along with the search paths never being printed.
2023-02-05LibGUI: Handle utf-8 search strings in findArda Cinar
Similar to LibVT, we were iterating over needle bytes instead of code points. This patch allows finding unicode substrings in a text document.
2023-02-05LibVT: Handle utf-8 search strings in findArda Cinar
Instead of iterating through the needle being searched one byte at a time (like an ascii string), we calculate its unicode code points first and then iterate through those.
2023-02-05LibWeb: Respect `font-stretch` in `StyleComputer::compute_font`Aliaksandr Kalenik
2023-02-05LibGfx: Pass font width to `FontDatabase::get()`Aliaksandr Kalenik
Width need to be passed to `FontDatabase::get()` to resolve font name unambiguously.
2023-02-04AK: Check the return type in `IsCallableWithArguments`Lucas CHOLLET
Template argument are checked to ensure that the `Out` type is equal or convertible to the type returned by the invokee. Compilation now fails on: `Function<void()> f = []() -> int { return 0; };` But this is allowed: `Function<ErrorOr<int>()> f = []() -> int { return 0; };`
2023-02-04LibGUI: Verify NonemptyText InputBox doesn't result in an empty stringKarol Baraniecki
2023-02-04LibGUI+Userland: Switch order of parameters for InputBox::showKarol Baraniecki
Because usage of the input_type parameter is now higher than of the placeholder parameter, this makes for a cleaner API.
2023-02-04Userland: Replace manual checking by using GUI::InputType::NonemptyTextKarol Baraniecki
Do this where we were already checking if the input was empty after the InputBox was submitted. Those places gain interactive input validation. :^)
2023-02-04LibGUI: Allow the InputBox to be of NonemptyText typeKarol Baraniecki
It seems like a lot (most?) places where InputBoxes are used check if the retrieved string isn't empty anyway - make this be reflected in the user interface, by disabling (graying out) the "OK" button when nothing is entered, so empty input isn't a viable option at all.
2023-02-04AK: Make LEB128 decoding work with `read_value`Tim Schumacher
2023-02-04AK: Port `LEB128` to the new `AK::Stream`Tim Schumacher
2023-02-04AK: Make `SeekableStream::truncate()` take a `size_t`Tim Schumacher
Similar to the return values earlier, a signed value doesn't really make sense here. Relying on the much more standard `size_t` makes it easier to use Stream in all contexts.
2023-02-04LibGfx: Port ICOLoader to the new AK::StreamKarol Kosek
2023-02-04LibGfx: Return ErrorOr<> in ICOLoader internal functionsKarol Kosek
2023-02-04LibPDF: Fix clipping of painting operationsRodrigo Tobar
While the clipping logic was correct (current v/s new clipping path), the clipping path contents weren't. This commit fixed that. We calculate the clipping path in two places: when we set it to be the whole page at graphics state creation time, and when we perform clipping path intersection to calculate a new clipping path. The clipping path is then used to limit painting by passing it to the painter (more precisely, but passing its bounding box to the painter, as the latter doesn't support arbitrary path clipping). For this last point the clipping path must be in device coordinates. There was however a mix of coordinate systems involved in the creation, update and usage of the clipping path: * The initial values of the path (i.e., the whole page) were in user coordinates. * Clipping path intersection was performed against m_current_path, which is in device coordinates. * To perform the clipping operation, the current clipping path was assumed to be in user coordinates. This mix resulted in the clipping not working correctly depending on the zoom level at which one visualised a page. This commit fixes the issue by always keeping track of the clipping path in device coordinates. This means that the initial full-page contents are now converted to device coordinates before putting them in the graphics state, and that no mapping is performed when applied the clipping to the painter.
2023-02-03LibWeb: Implement CanvasRenderingContext2D.createPattern()MacDue
This is a first pass at implementing CRC2D.createPattern() and the associated CanvasPattern object. This implementation only works for a few of the required image sources [like CRC2D.drawImage()], and does not yet support transforms. Other than that it supports everything else (which is mainly the various repeat modes).
2023-02-03LibWeb: Fix typo and use auto where possibleMacDue
2023-02-03LibSQL+SQLServer: Send result column names over IPC to SQL clientsTimothy Flynn
2023-02-03LibSQL+Userland: Pass SQL IPC results to clients in a structureTimothy Flynn
SQLClient exists as a wrapper around SQL IPC to provide a bit friendlier interface for clients to deal with. Though right now, it mostly forwards values as-is from IPC to the clients. This makes it a bit verbose to add values to IPC responses, as we then have to add it to the callbacks used by all clients. It's also a bit confusing seeing a sea of "auto" as the parameter types for these callbacks. This patch moves these response values to named structures instead. This will allow adding values without needing to simultaneously update all clients. We can then separately handle the new values in interested clients only.
2023-02-03LibSQL: Store selected column names in the results for SELECT statementsTimothy Flynn
2023-02-03LibWeb: Parse font-stretch CSS propertyAliaksandr Kalenik
2023-02-03LibVideo/VP9: Use proper indices for updating inter_mode probabilitiesZaggy1024
I previously changed it to use the absolute inter-prediction mode values instead of the ones relative to NearestMv. That caused the probability adaption to take invalid indices from the counts and broke certain videos. Now it will just convert to the PredictionMode enum when returning from parse_inter_mode, which allows us to still use it the same as before.
2023-02-03LibVideo/VP9: Use u32 to store the parsed value countsZaggy1024
There were rare cases in which u8 was not large enough for the total count of values read, and increasing this to u32 should have no real effect on performance (hopefully).
2023-02-03LibVideo/VP9: Prevent negation overflow in BitStream::read_sZaggy1024
2023-02-03LibVideo/VP9: Correct the mode/partition probability adaption countsZaggy1024