summaryrefslogtreecommitdiff
path: root/Userland/Libraries
AgeCommit message (Collapse)Author
2023-02-25Everywhere: Use _{short_,}string to create Strings from literalsLinus Groh
2023-02-25LibGfx: Parse WebP VP8L chunk headerNico Weber
For now, just dbgln_if() all data. Eventually we'll want to use at least width and height.
2023-02-25LibGfx: Fix lossless fourcc in VP8X chunk decoderNico Weber
2023-02-25LibGfx: Add link to webp overviewNico Weber
2023-02-25LibGfx: Parse some of WebP 'VP8 ' chunkNico Weber
This is for lossy compression, in which case a WebP file is a single VP8 key frame. This only parses the 10-byte frame header, which contains image dimensions (and some other things). For now, just dbgln_if() all data. Eventually we'll want to use at least width and height.
2023-02-25LibGfx: Parse WebP VP8X chunkNico Weber
For now, just dbgln_if() all data. Eventually we'll want to use at least width and height.
2023-02-25LibGfx: Add a FIXME to WebPImageDecoderPlugin::icc_data()Nico Weber
2023-02-25LibGfx: Add a WebPLoadingContext::error() helperNico Weber
No behavior change. (Well, technically, this now correctly sets the state to Error if the first chunk is neither of 'VP8 ', 'VP8L', 'VP8X'. But no *interesting* behavior change.)
2023-02-25LibDSP: Get rid of DeprecatedStringkleines Filmröllchen
This was a rather easy change, since only parameter names make use of strings in the first place. This also improves OOM resistance: If we can't create a parameter name, we will just set it to the empty string.
2023-02-24LibDeviceTree: Use unchecked_append() in path parsingMacDue
try_append() checks if the vector should increase capacity and if so grows the vector. unchecked_append() verifies the vector already has enough capacity, and will never grow the vector.
2023-02-24Revert "LibDeviceTree: Propagate try_append() errors while parsing paths"Linus Groh
This reverts commit f064f5f36e6c4ec9d96122815ed359d6290f8de2. As Andrew points out, this append is not actually fallible in practice, since the loop is terminated once the vector size reaches its inline capacity. https://github.com/SerenityOS/serenity/pull/17606#discussion_r1117662246
2023-02-24Kernel+Userland: Refine preventing syscall annotations of Regions optionLiav A
Instead of using a special case of the annotate_mapping syscall, let's introduce a new prctl option to disallow further annotations of Regions as new syscall Region(s).
2023-02-24LibDeviceTree: Propagate try_append() errors while parsing pathsMacDue
2023-02-24Browser+LibWeb+WebContent: Store cookie expiry times in UTCTimothy Flynn
We are currently converting parsed expiry times to local time, whereas the RFC dictates we parse them as UTC. When expiring cookies, we must also use the current UTC time to compare against the cookies' expiry times.
2023-02-24LibIPC: Add a built-in encoder/decoder for AK::TimeTimothy Flynn
2023-02-24LibWeb: Consider transform property while finding containing blockAliaksandr Kalenik
2023-02-24LibWeb: Stop overflow clip box aggregation on reached stacking contextAliaksandr Kalenik
2023-02-24Revert "LibWeb: Fix clip of hidden overflow..."Aliaksandr Kalenik
This reverts commit eb1ef59603c13c43b87c099c43c4d118dc8441f6. The idea of saving clip box to apply it to handle `overflow: hidden` turned out to break painting if box is painted before it's containing block (it is possible if box has negative z-index).
2023-02-24Kernel+Userland: Unify declarations for KCOV in Kernel/API/kcov.hLiav A
2023-02-24Kernel+Userland: Move prctl numbers header file to Kernel/API directoryLiav A
2023-02-24LibGfx: Remove single-code point Font::glyph_or_emoji_width APITimothy Flynn
All callers are now aware of multi-code point emoji (and must remain so going forward).
2023-02-24LibGUI: Make Gfx- to text-positioning handle multi-code point glyphsTimothy Flynn
2023-02-24LibGfx: Use non-emoji glyph width API to compute the width of a spaceTimothy Flynn
2023-02-24LibWeb: Make text fragment indexing handle multi-code point glyphsTimothy Flynn
2023-02-24LibWeb: Make canvas text preparation handle multi-code point glyphsTimothy Flynn
2023-02-24LibPDF: Refactor *Font classesRodrigo Tobar
The PDFFont class hierarchy was very simple (a top-level PDFFont class, followed by all the children classes that derived directly from it). While this design was good enough for some things, it didn't correctly model the actual organization of font types: * PDF fonts are first divided between "simple" and "composite" fonts. The latter is the Type0 font, while the rest are all simple. * PDF fonts yield a glyph per "character code". Simple fonts char codes are always 1 byte long, while Type0 char codes are of variable size. To this effect, this commit changes the hierarchy of Font classes, introducing a new SimpleFont class, deriving from PDFFont, and acting as the parent of Type1Font and TrueTypeFont, while Type0 still derives from PDFFont directly. This distinction allows us now to: * Model string rendering differently from simple and composite fonts: PDFFont now offers a generic draw_string method that takes a whole string to be rendered instead of a single char code. SimpleFont implements this as a loop over individual bytes of the string, with T1 and TT implementing draw_glyph for drawing a single char code. * Some common fields between T1 and TT fonts now live under SimpleFont instead of under PDFfont, where they previously resided. * Some other interfaces specific to SimpleFont have been cleaned up, with u16/u32 not appearing on these classes (or in PDFFont) anymore. * Type0Font's rendering still remains unimplemented. As part of this exercise I also took the chance to perform the following cleanups and restructurings: * Refactored the creation and initialisation of fonts. They are all centrally created at PDFFont::create, with a virtual "initialize" method that allows them to initialise their inner members in the correct order (parent first, child later) after creation. * Removed duplicated code. * Cleaned up some public interfaces: receive const refs, removed unnecessary ctro/dtors, etc. * Slightly changed how Type1 and TrueType fonts are implemented: if there's an embedded font that takes priority, otherwise we always look for a replacement. * This means we don't do anything special for the standard fonts. The only behavior previously associated to standard fonts was choosing an encoding, and even that was under questioning.
2023-02-24LibPDF: Add new error construction functionsRodrigo Tobar
These should make it easier to create specific errors, specially when wanting to create a formatted message.
2023-02-24LibPDF: Allow show_text to return errorsRodrigo Tobar
Errors can (and do) occur when trying to render text, and so far we've silently ignored them, making us think that all is well when it isn't. Letting show_text return errors will allow us to inform the user about these errors instead of having to hiding them.
2023-02-24LibGfx+Tests: Add test for webp ICC loading and fix bugNico Weber
I drew the two webp files in Photoshop and saved them using the "Save a Copy..." dialog, with ICC profile and all other boxes checked. (I also tried saving with all the boxes unchecked, but it still wrote an extended webp instead of a basic file.) The lossless file exposed a bug: I didn't handle chunk padding correctly before this patch.
2023-02-24LibGfx: Use LibUnicode to filter code points that cannot start an emojiTimothy Flynn
2023-02-24LibGfx: Use the paths to emoji images generated alongside emoji dataTimothy Flynn
Rather than formatting the paths at runtime, as vformat is quite heavy in a profile.
2023-02-24LibUnicode: Add a method to check if a code point could start an emojiTimothy Flynn
2023-02-24LibUnicode: Generate the path to emoji images alongside emoji dataTimothy Flynn
This will provide for quicker emoji lookups, rather than having to discover and allocate these paths at runtime before we find out if they even exist.
2023-02-24LibGfx: Add scaffolding for a webp decoderNico Weber
At the moment, this processes the RIFF chunk structure and extracts the ICCP chunk, so that `icc` can now print ICC profiles embedded in webp files. (And are image files really more than containers of icc profiles?) It doesn't even decode image dimensions yet. The lossy format is a VP8 video frame. Once we get to that, we might want to move all the image decoders into a new LibImageDecoders that depends on both LibGfx and LibVideo. (Other newer image formats like heic and av1f also use video frames for image data.)
2023-02-24LibGfx: Drop tags of unknown type instead of writing invalid icc filesNico Weber
We could make UnknownTagData hold on to undecoded, raw input data and write that back out when serializing. But for now, we don't. On the flipside, this _does_ write unknown tags that have known types. We could have a mode where we drop unknown tags with known types. But for now, we don't have that either. With this, we can for example reencode /Library/ColorSync/Profiles/WebSafeColors.icc and icc (and other tools) can dump the output icc file. The 'ncpi' tag with type 'ncpi' is dropped while writing it, while the unknown tag 'dscm' with known type 'mluc' is written to the output. (That file is a v2 file, so 'desc' has to have type 'desc' instead of type 'mluc' which it would have in v4 files -- 'dscm' emulates an 'mluc' description in v2 files.)
2023-02-24LibWeb: Mark JS::Promise* return value for digest() with JS::NNGCPtrKenneth Myhra
2023-02-24LibWeb: Port SubtleCrypto to new StringKenneth Myhra
The algorithm comparison in digest() is done using a StringView to avoid complex error handling and promise rejection.
2023-02-24LibWeb: Port Crypto to new StringKenneth Myhra
2023-02-24LibGfx: Make ICC reader check that profile size is a multiple of 4Nico Weber
With this, I would've found e8bd067ce5f7 earlier. (If this turns out to be too strict in practice, we can always relax it again.)
2023-02-24LibWeb: Render HTML content if present for HTTP error pagesAndreas Kling
If an HTTP response fails with an error code (e.g 403) but still has body content, we now render the content. We only fall back to our own built-in error page if there's no body.
2023-02-24HackStudio: Add 'pause debuggee' buttonItamar
This button sends a SIGSTOP to the debugged process, which pauses it. The debuggee can be resumed with the 'continue' button.
2023-02-24HackStudio: Add progress bar to Debugger initializationItamar
During Debugger initialization, most of the time is spent creating DebugInfo objects for the libraries that the program has loaded.
2023-02-24LibDebug: Remove file path fixup for library sourcesItamar
It's no longer needed as the file paths we get for libraries in the current build process is canonical.
2023-02-23LibWeb: Add spec link to border-width: thin/medium/thick definitionsSam Atkins
In the latest backgrounds-3 spec, these have official fixed values. :^)
2023-02-23LibWeb: Port Worker to new StringKenneth Myhra
2023-02-23LibWeb: Port WorkerGlobalScope to new StringKenneth Myhra
2023-02-23LibWeb: Port WorkerLocation to new StringKenneth Myhra
2023-02-23LibGfx: Pad last element in ICC files to 4-byte boundary tooNico Weber
The spec wants that to happen.
2023-02-23LibGfx: Implement serialization of LutAToBTagData and LutBToATagDataNico Weber
With this, we can write all tag types we can currently read :^)
2023-02-23LibGUI: Fix Action destructor to unregister itself correctlyHumberto Alves
Changed the Action destructor to fix an issue where global scoped actions without shortcuts were not being properly unregistered from the application. Previously, this could cause crashes when attempting to open the command palette.