summaryrefslogtreecommitdiff
path: root/Userland
AgeCommit message (Collapse)Author
2023-02-19LibWeb: Use is_ascii_case_insensitive_match() where the spec says toSam Atkins
2023-02-19LibWeb: Transform translate() values to device pixels before paintingAliaksandr Kalenik
2023-02-19LibGfx: Fix sign-compare compile error in TGALoaderLinus Groh
I'm not sure why this isn't caught on other people's setups or CI, but when building on NixOS it fails with: error: comparison of integer expressions of different signedness: ‘size_t’ {aka ‘long unsigned int’} and ‘int’ [-Werror=sign-compare]
2023-02-19Kernel: Support sending filedescriptors with sendmsg(2) and SCM_RIGHTSPeter Elliott
This is necessary to support the wayland protocol. I also moved the CMSG_* macros to the kernel API since they are used in both kernel and userspace. this does not break ntpquery/SCM_TIMESTAMP.
2023-02-19LibGfx: Implement serialization of MeasurementTagDataNico Weber
2023-02-19LibGfx: Move ICC MeasurementHeader to BinaryFormat.hNico Weber
2023-02-19LibGfx: Implement serialization of TextTagDataNico Weber
2023-02-19LibGfx: Make TextTagData verify input is 7-bit ASCIINico Weber
TextTagData::from_bytes() errors out if that isn't the case, but let's make sure other potential future callers get it right too.
2023-02-19LibGfx: Implement serialization of SignatureTagDataNico Weber
2023-02-19LibGfx: Implement serialization of CurveTagDataNico Weber
2023-02-19LibGfx: Implement serialization of CicpTagDataNico Weber
2023-02-19LibGfx: Implement serialization of ChromaticityTagDataNico Weber
2023-02-19LibGfx: Implement serialization of ParametricCurveTagDataNico Weber
With this, simple v4 matrix profiles using parametric curves, such as Compact-ICC-Profiles/profiles/sRGB-v4.icc, can be completely serialized and the serialized file can be read again by `icc` :^)
2023-02-19LibGfx: Implement serialization of S15Fixed16ArrayTagDataNico Weber
2023-02-19LibGfx: Implement serialization of XYZTagDataNico Weber
2023-02-19LibGfx: Implement serialization of MultiLocalizedUnicodeTagDataNico Weber
2023-02-19LibGfx: Move MultiLocalizedUnicodeRawRecord to BinaryFormat.hNico Weber
2023-02-19LibGfx: Add scaffolding for writing tag dataNico Weber
This doesn't deduplicate identical TagDatas yet. It also doesn't implement actual serialization of TagData yet.
2023-02-19LibGfx: Write ICC tag tableNico Weber
All offsets and sizes are set to 0 for now, so this still doesn't produce a valid icc file. It gets closer, though.
2023-02-19LibGfx: Move ICC TagTableEntry to BinaryFormat.hNico Weber
2023-02-19LibGfx: Extract encode_header() function in ICC writing codeNico Weber
2023-02-18LibGfx: Rename format name from `jpg` to `jpeg`Lucas CHOLLET
2023-02-18SpiceAgent: Rename `ClipboardType::JPG` to `ClipboardType::JPEG`Lucas CHOLLET
2023-02-18LibGfx: Rename `JPGLoader` to `JPEGLoader`Lucas CHOLLET
The patch also contains modifications on several classes, functions or files that are related to the `JPGLoader`. Renaming include: - JPGLoader{.h, .cpp} - JPGImageDecoderPlugin - JPGLoadingContext - JPG_DEBUG - decode_jpg - FuzzJPGLoader.cpp - Few string literals or texts
2023-02-18LibJS: Use substrings-with-superstrings in Intl.NumberFormat's groupingTimothy Flynn
To add grouping to a number, we take a string such as "123456.123" and break it into integer and fraction parts. Then we take the integer part and break it into locale-specific sized groups to inject the locale's group separator (e.g. a comma in en-US). We currently create new strings for each of these groups. Instead, we can use the shared superstring method to avoid all of that string copying.
2023-02-18LibGUI+Userland: Stop returning Layout from `Widget::(try_)set_layout()`Sam Atkins
Nobody uses this return value any more. It also lets us remove a whole bunch of `(void)` casts. :^)
2023-02-18Userland: Specify margins and spacing in the GUI::Layout constructorSam Atkins
2023-02-18Userland: Use Widget::add_spacer() everywhereSam Atkins
2023-02-18LibGUI: Allow specifying Layout margins and spacing in the constructorSam Atkins
This is comfier than `my_widget->layout()->set_margins(...)`.
2023-02-18LibGUI: Add Widget::add_spacer() wrapperSam Atkins
This just calls Layout::try_add_spacer(), but saves you having to access the Widget's Layout directly. We verify that the Widget has a Layout, since it would be a programming error if we tried to do so without one.
2023-02-18LibGfx: Add `ALWAYS_INLINE` to Color::mixed_with()/interpolate()MacDue
I can see small speedup of about 6-7% with this for some gradient painting, though Tim has been able to see an ~30% speedup in some resizing cases so this seems like a worthwhile change. Co-authored-by: Tim Ledbetter <timledbetter@gmail.com>
2023-02-18LibGfx: De-duplicate color interpolation codeMacDue
2023-02-18LibGfx: Move Color::mixed_with() inlineMacDue
This seems to give a small speedup to gradient painting and removes Color::mixed_with() (which was 10% of the time) from the profile.
2023-02-18LibGUI: Skip over grapheme clusters on left/right arrow key pressesTimothy Flynn
Currently, if you use the left/right arrow keys to move over a multi- code point glyph, we will move through that glyph one code point at a time. This means you can "pause" your movement in the middle of a glyph and delete a subsection of a grapheme cluster. This now moves the cursor across the entire cluster. Visually, we will need to separately track physical and virtual cursor positions. That is, when you move across a multi-code point glyph, the visual cursor should only move one position at a time, while a physical cursor stores the "real" position in terms of number of code points. This also converts a couple of ints to auto - these are actually size_t, and are being passed to functions that expect size_t, so let's not cast them to ints.
2023-02-17PixelPaint: Propagate errors from making filter settings widgetsKarol Kosek
2023-02-17LibJS: Dereference intrinsic accessor before deleting itJelle Raaijmakers
The iterator used to find an intrinsic accessor is used after calling `HashMap.remove()` on it, which works for our current implementation but will fall apart when you consider that modifications to the hash map might invalidate all existing iterators that came from it, as many implementations do. Since we're aiming to replace our `HashTable` implementation with something new, let's fix this first :^)
2023-02-18Shell: Correct the out-of-bounds expansion bailing conditionAli Mohammad Pur
Also adds a couple (useful) debug prints which helped track down the problem.
2023-02-18Shell: Allow underscores in normal expansion namesAli Mohammad Pur
2023-02-18Shell: Correctly keep track of special parameter lengthAli Mohammad Pur
We were previously treating special expansions (e.g. $#) as zero-length expansions, which made the shell repeat them literally after expanding them.
2023-02-18Shell: Clear expansions after committing a word in the POSIX parserAli Mohammad Pur
2023-02-18Shell: Add support for heredocs to the POSIX parserAli Mohammad Pur
2023-02-18Shell: Add a '--posix' mode to the 'dump' builtinAli Mohammad Pur
2023-02-18Shell: Allow the heredoc node to act as a redirection tooAli Mohammad Pur
This will be used in a future commit to implement POSIX sh heredocs.
2023-02-17icc: Add flags for writing and dumping profilesNico Weber
This adds three flags to icc: * --reencode-to=<file> re-serializes a profile to a given file, using Gfx::ICC::encode(). This is mainly useful for testing that code. * --dump-to=<file> dumps the raw ICC profile bytes read from the input to disk. This is useful for extracting ICC profiles from images, and for comparing the raw profile bytes to the profile bytes written by --reencode-to=. If either of these flags is passed, icc by default no longer dumps the icc data to stdout. To force priting of the data even if either of these flags is present, this also adds: * --print, which forces printing ICC contents, even if either or both of the icc-data writing flags are present.
2023-02-17LibGfx: Add start of an ICC profile writerNico Weber
For now, this can write the profile header. `icc` refuses to dump its contents since the required copyrightTag, profileDescriptionTag, and required per-device-class tags are missing, but it looks ok in a hex editor.
2023-02-17LibGfx: Add an accessor for the raw ICC Version minor_and_bugfix byteNico Weber
This is makes it easier to write this value back out.
2023-02-17LibGfx: Add a XYZ->XYZNumber conversion constructorNico Weber
This is useful for converting XYZs back to the on-disk format.
2023-02-17LibGfx: Move ICC ProfileFileSignature into a constant in BinaryFormat.hNico Weber
...so that it can be used by ICC writing code too.
2023-02-17LibGfx: Make ICCHeader use RenderingIntent enumNico Weber
No behavior change.
2023-02-17LibGfx: Move ICC on-disk structs to new BinaryFormat.hNico Weber
Removes some existing code duplication and allows future files to use these structs too.