summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2023-01-24icc: Print every TagData object only onceNico Weber
When several tags refer to the same TagData object, we now only print it the first time, and print "(see 'foob' above)" the following times, where `foob` is the tag identifier where we printed it the first time.
2023-01-24LibGfx: Dedupe ICC TagData objectsNico Weber
Several tags can refer to the same TagData. In particular, the rTRC, gTRC, bTRC tags usually all three refer to the same curve. Curve objects can be large, so allocate only a single TagData object in that case and make all tags point to it. (If we end up storing some cache in the curve object later on, this will also increase the effectiveness of that cache.)
2023-01-24AK: Make HashMap::try_ensure work with a fallible construction callbackNico Weber
Co-authored-by: Timothy Flynn <trflynn89@pm.me>
2023-01-24LibGfx: Move TagTableEntry into read_tag_tableNico Weber
It's now used only there.
2023-01-24LibGfx: Pass offset and size instead of full TagTableEntry to read_tagNico Weber
read_tag() has no business knowing the tag signature.
2023-01-24WindowServer: Reuse existing `WindowManager::desktop_rect()` methodSam Atkins
2023-01-24LibGfx: Use `Core::Stream` to decode QOI imagesTim Schumacher
2023-01-24LibGfx: Pass the first QOI chunk byte to the operation implementationTim Schumacher
This reduces reliance on the peek operation, which the generic stream implementation does not support. This also corrects the naming, since "tag" wasn't entirely correct for some of the operations, where the tag takes up only part of a byte, with the rest being reserved for data.
2023-01-24LibGfx: Use x-mac-roman TextCodec for decoding MacRoman textNico Weber
2023-01-24LibTextCodec: Add a MacRoman decoderNico Weber
Allows displaying `<meta charset="x-mac-roman">` html files. (`:set fenc=macroman`, `:w` in vim to save in that encoding.)
2023-01-24LibTextCodec: Simplify Latin1Decoder::process() a tiny bitNico Weber
2023-01-24LibGfx: Cache font pixel metrics in ScaledFontAndreas Kling
Instead of recomputing the pixel metrics over and over, we can just cache them with the font and avoid a bunch of expensive computation.
2023-01-24WindowServer: Double click a window's frame to latch to screen's edgeJelle Raaijmakers
2023-01-24WindowServer: Always process double clicks for mouse eventsJelle Raaijmakers
This used to be optional and was disabled in two cases: - On a mouse move event during dragging; because double clicks are only possible on mouse up events, this had no effect. - On a mouse event for automatic cursor tracking; this has now gained support for double click events. Since it's always enabled now, we can remove the `bool` argument.
2023-01-24LibDebug: Pass `read_from_stream` calls through `read_value` insteadTim Schumacher
2023-01-24LibDNS: Pass `write_to_stream` calls through `write_value` insteadTim Schumacher
2023-01-24LibCore: Add support for non-trivial types to `Stream::*_value`Tim Schumacher
At the moment, there is no immediate advantage compared to just calling the underlying functions directly, but having a common interface feels more ergonomic (users don't have to care about how a type serializes) and maybe we'll find a way to hide the actual implementation from direct access some time in the future.
2023-01-24AK: Print leading zeroes after the dot for FixedPoint numbersNico Weber
As a nearby comment says, "This is a terrible approximation". This doesn't make things less terrible, but it does make things more correct in the given framework of terribleness. Fixes #17156.
2023-01-24LibWeb: Make min-content height equivalent to max-content as appropriateAndreas Kling
Per CSS-SIZING-3, the min-content block size should be equivalent to the max-content block size for some boxes. Honoring this gives more correct results, and avoids unnecessary work in many cases since the cached max-content size can be reused.
2023-01-24LibWeb: Add Layout::Node::is_table() and make is<TableBox>() fastAndreas Kling
2023-01-24LibWeb: Move scroll state from Layout::BlockContainer to Layout::BoxAndreas Kling
Let's allow any box to be scrollable, not just block containers.
2023-01-24LibWeb: Make grid containers be Layout::BoxAndreas Kling
Grid containers were incorrectly represented as BlockContainer before. Furthermore, GridFormattingContext had a bogus inheritance relationship with BlockFormattingContext. This patch brings our architecture closer to spec by making grid containers be plain boxes and making GFC not inherit from BFC.
2023-01-24LibWeb: Make flex containers be Layout::BoxAndreas Kling
Flex containers were incorrectly represented as BlockContainer before, which would make some CSS layout algorithms do the wrong thing.
2023-01-24LibWeb: Make Layout::Node::containing_block() return a Layout::BoxAndreas Kling
Containing blocks can be formed by boxes that aren't block containers, so let's make this return a Box and work towards type correctness here.
2023-01-24LibWeb: Allow BFC auto height calculation on any Layout::BoxAndreas Kling
This algorithm is reused in abspos sizing, and so should not be specific to block containers (even if the name suggests it.)
2023-01-24LibWeb: Remove unused layout sibling getters in Layout::BlockContainerAndreas Kling
2023-01-23LibGfx+icc: Add ICCProfile support for parametricCurveType and print itNico Weber
With this, we can parse all types required in v4 "Three-component matrix-based Input profiles".
2023-01-23LibGfx+icc: Add ICCProfile support for curveType and print itNico Weber
2023-01-23LibGfx: Tweak an error message in XYZTagData::from_bytesNico Weber
2023-01-23LibGfx+icc: Add ICCProfile support for s15Fixed16ArrayType and print itNico Weber
This is the type of the chromaticAdaptationTag, which is a required tag in v4 profiles for all non-DeviceLink profiles.
2023-01-23AK: Make FixedPoint::create_raw public and constexprNico Weber
2023-01-23LibGfx: Do not repeat class name in ICC from_bytes() functionsNico Weber
Makes these more amenable to copy-pasting :^) No behavior change.
2023-01-23LibGfx+icc: Add ICCProfile support for XYZType and print itNico Weber
2023-01-23LibGfx: Fix typo in an error message in TextTagData::from_bytes()Nico Weber
2023-01-23LibGfx+icc: Add ICCProfile support for textDescriptionType and print itNico Weber
This is used in v2 profiles for the required 'desc' tag. In v2 profiles, it's also used by the 'dmnd', 'dmdd', 'scrd', 'vued' tags. In v4 profiles, these all use 'mluc' instead (except for 'scrd', which is no longer part of the spec in v4).
2023-01-23Base: Add a radial gradient with transparent end stops canvas demoMacDue
2023-01-23LibGfx: Use the first/last color for positions before/after a gradientMacDue
This fixes a few rendering bugs especially where the first or last color stop had a zero alpha value. Note we can't just set the first and last values on the gradient line to the first/last colors since that might not be correct (e.g. have a transition hint).
2023-01-23LibJS: Add DisposableStack{, Prototype, Constructor}davidot
Since the async parts of the spec are not stage 3 at this point we don't add AsyncDisposableStack.
2023-01-23LibJS: Add using declaration support in for and for of loopsdavidot
The using declarations have kind of special behavior in for loops so this is seperated.
2023-01-23LibJS: Add using declaration support, RAII like operation in jsdavidot
In this patch only top level and not the more complicated for loop using statements are supported. Also, as noted in the latest meeting of tc39 async parts of the spec are not stage 3 thus not included.
2023-01-23LibJS: Add Symbol.disposedavidot
2023-01-23LibJS: Add an initialize binding hint to all initialize_binding methodsdavidot
This will allow us to specify things like SyncDispose and perhaps AsyncDispose in the future.
2023-01-23LibJS: Add SuppressedError{, Prototype, Constructor}davidot
2023-01-23LibJS: Add custom details to toBe{True, False} shown on failuredavidot
Any test with multiple expect(...).toBe{True, False} checks is very hard to debug.
2023-01-23LibJS: Clarify more errors in test-commondavidot
Without a message these just show 'ExpectationError' even if the check has multiple steps.
2023-01-23LibWeb: Use CSS Pixels for overflow clip rectAliaksandr Kalenik
2023-01-22Ladybird: Add LocationEdit HighlightingCameron Youell
2023-01-22Ladybird: Make LocationEdit its own classCameron Youell
Also make return key behave more like other browsers when editing
2023-01-22LibCards: Use AK::shuffle() for shuffling new decksSam Atkins
2023-01-22AK: Make NonnullPtrVectors shuffleableSam Atkins
AK::shuffle() doesn't work on these, because their operator[] returns a reference to the pointed-at value, instead of to the NonnullPtr itself.