Nico Weber
f7f592f5d3
LibGfx: Pass offset and size instead of full TagTableEntry to read_tag
...
read_tag() has no business knowing the tag signature.
2023-01-24 14:45:27 +00:00
Sam Atkins
a19e54c1db
WindowServer: Reuse existing WindowManager::desktop_rect()
method
2023-01-24 14:41:16 +00:00
Tim Schumacher
1cb306cbe3
LibGfx: Use Core::Stream
to decode QOI images
2023-01-24 14:40:02 +00:00
Tim Schumacher
e6f5a208a0
LibGfx: Pass the first QOI chunk byte to the operation implementation
...
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-24 14:40:02 +00:00
Nico Weber
55e45856ae
LibGfx: Use x-mac-roman TextCodec for decoding MacRoman text
2023-01-24 14:37:20 +00:00
Nico Weber
eac2b2382c
LibTextCodec: Add a MacRoman decoder
...
Allows displaying `<meta charset="x-mac-roman">` html files.
(`:set fenc=macroman`, `:w` in vim to save in that encoding.)
2023-01-24 14:37:20 +00:00
Nico Weber
b14b5a4d06
LibTextCodec: Simplify Latin1Decoder::process() a tiny bit
2023-01-24 14:37:20 +00:00
Andreas Kling
850b4a03e6
LibGfx: Cache font pixel metrics in ScaledFont
...
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-24 14:13:59 +01:00
Jelle Raaijmakers
83488cd102
WindowServer: Double click a window's frame to latch to screen's edge
2023-01-24 12:53:26 +00:00
Jelle Raaijmakers
3e70d41c57
WindowServer: Always process double clicks for mouse events
...
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-24 12:53:26 +00:00
Tim Schumacher
448b187782
LibDebug: Pass read_from_stream
calls through read_value
instead
2023-01-24 12:47:39 +00:00
Tim Schumacher
6972e98efa
LibDNS: Pass write_to_stream
calls through write_value
instead
2023-01-24 12:47:39 +00:00
Tim Schumacher
6ccda76a71
LibCore: Add support for non-trivial types to Stream::*_value
...
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-24 12:47:39 +00:00
Nico Weber
8b5b767465
AK: Print leading zeroes after the dot for FixedPoint numbers
...
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-24 13:24:21 +01:00
Andreas Kling
4e06e86438
LibWeb: Make min-content height equivalent to max-content as appropriate
...
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-24 11:44:03 +01:00
Andreas Kling
aa19c4a340
LibWeb: Add Layout::Node::is_table() and make is<TableBox>() fast
2023-01-24 11:44:03 +01:00
Andreas Kling
3dd006f719
LibWeb: Move scroll state from Layout::BlockContainer to Layout::Box
...
Let's allow any box to be scrollable, not just block containers.
2023-01-24 11:44:03 +01:00
Andreas Kling
8fe748bb89
LibWeb: Make grid containers be Layout::Box
...
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-24 11:44:03 +01:00
Andreas Kling
44cf418975
LibWeb: Make flex containers be Layout::Box
...
Flex containers were incorrectly represented as BlockContainer before,
which would make some CSS layout algorithms do the wrong thing.
2023-01-24 11:44:03 +01:00
Andreas Kling
51555dea7c
LibWeb: Make Layout::Node::containing_block() return a Layout::Box
...
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-24 11:44:03 +01:00
Andreas Kling
d5480a44e5
LibWeb: Allow BFC auto height calculation on any Layout::Box
...
This algorithm is reused in abspos sizing, and so should not be specific
to block containers (even if the name suggests it.)
2023-01-24 11:44:03 +01:00
Andreas Kling
a1d37420d5
LibWeb: Remove unused layout sibling getters in Layout::BlockContainer
2023-01-24 11:44:03 +01:00
Nico Weber
fa00d94e82
LibGfx+icc: Add ICCProfile support for parametricCurveType and print it
...
With this, we can parse all types required in v4
"Three-component matrix-based Input profiles".
2023-01-23 23:37:33 +00:00
Nico Weber
67f718aa3f
LibGfx+icc: Add ICCProfile support for curveType and print it
2023-01-23 18:20:55 +00:00
Nico Weber
ea31aba0f4
LibGfx: Tweak an error message in XYZTagData::from_bytes
2023-01-23 18:09:23 +00:00
Nico Weber
9756842734
LibGfx+icc: Add ICCProfile support for s15Fixed16ArrayType and print it
...
This is the type of the chromaticAdaptationTag, which is a required tag
in v4 profiles for all non-DeviceLink profiles.
2023-01-23 18:09:23 +00:00
Nico Weber
9c5820326d
AK: Make FixedPoint::create_raw public and constexpr
2023-01-23 18:09:23 +00:00
Nico Weber
b347aebc3e
LibGfx: Do not repeat class name in ICC from_bytes() functions
...
Makes these more amenable to copy-pasting :^)
No behavior change.
2023-01-23 16:36:02 +01:00
Nico Weber
6cfb057430
LibGfx+icc: Add ICCProfile support for XYZType and print it
2023-01-23 12:08:25 +00:00
Nico Weber
2bfd09b173
LibGfx: Fix typo in an error message in TextTagData::from_bytes()
2023-01-23 10:09:01 +00:00
Nico Weber
e7eccf4ac8
LibGfx+icc: Add ICCProfile support for textDescriptionType and print it
...
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-23 10:09:01 +00:00
MacDue
8272cfc9f3
Base: Add a radial gradient with transparent end stops canvas demo
2023-01-23 10:03:54 +00:00
MacDue
a43d892c4e
LibGfx: Use the first/last color for positions before/after a gradient
...
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-23 10:03:54 +00:00
davidot
6255ca4a42
LibJS: Add DisposableStack{, Prototype, Constructor}
...
Since the async parts of the spec are not stage 3 at this point we don't
add AsyncDisposableStack.
2023-01-23 09:56:50 +00:00
davidot
bff038411a
LibJS: Add using declaration support in for and for of loops
...
The using declarations have kind of special behavior in for loops so
this is seperated.
2023-01-23 09:56:50 +00:00
davidot
541637e15a
LibJS: Add using declaration support, RAII like operation in js
...
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-23 09:56:50 +00:00
davidot
2c87ff2218
LibJS: Add Symbol.dispose
2023-01-23 09:56:50 +00:00
davidot
a746739cb0
LibJS: Add an initialize binding hint to all initialize_binding methods
...
This will allow us to specify things like SyncDispose and perhaps
AsyncDispose in the future.
2023-01-23 09:56:50 +00:00
davidot
3353cf68f1
LibJS: Add SuppressedError{, Prototype, Constructor}
2023-01-23 09:56:50 +00:00
davidot
0d8bab82f0
LibJS: Add custom details to toBe{True, False} shown on failure
...
Any test with multiple expect(...).toBe{True, False} checks is very hard
to debug.
2023-01-23 09:56:50 +00:00
davidot
fa030d7b9c
LibJS: Clarify more errors in test-common
...
Without a message these just show 'ExpectationError' even if the check
has multiple steps.
2023-01-23 09:56:50 +00:00
Aliaksandr Kalenik
802d9336f0
LibWeb: Use CSS Pixels for overflow clip rect
2023-01-23 10:21:23 +01:00
Cameron Youell
3bd96f29d2
Ladybird: Add LocationEdit Highlighting
2023-01-22 21:15:22 -07:00
Cameron Youell
b97f9f5809
Ladybird: Make LocationEdit its own class
...
Also make return key behave more like other browsers when editing
2023-01-22 21:15:22 -07:00
Sam Atkins
926e61dec6
LibCards: Use AK::shuffle() for shuffling new decks
2023-01-22 21:31:36 +00:00
Sam Atkins
c7a66882f4
AK: Make NonnullPtrVectors shuffleable
...
AK::shuffle() doesn't work on these, because their operator[] returns a
reference to the pointed-at value, instead of to the NonnullPtr itself.
2023-01-22 21:31:36 +00:00
Sam Atkins
ccabc8e930
LibCards+Games: Return ErrorOr from CardStack::add_all_grabbed_cards()
...
...and CardGame::pick_up_cards_from_stack() which is its only caller.
2023-01-22 21:31:36 +00:00
Sam Atkins
c7c4d70f6e
LibCards+Games: Return ErrorOr from deck-creation factory functions :^)
...
Also, be smarter about appending cards to the deck: we can
unchecked_append them to the deck, since we already ensured enough
capacity earlier.
2023-01-22 21:31:36 +00:00
Sam Atkins
0855e9f014
LibCards+Game: Return ErrorOr from CardGame::drop_cards_on_stack()
2023-01-22 21:31:36 +00:00
Sam Atkins
8b3a94ffbc
LibCards+Games+GamesSettings: Return ErrorOr from CardStack::push()
...
Very few of these calls can propagate their errors yet, but one step at
a time. :^)
2023-01-22 21:31:36 +00:00