Commit graph

45665 commits

Author SHA1 Message Date
MacDue
09f02d912a FontEditor: Fix more ignored .to_string() errors 2023-01-13 21:09:26 +00:00
MacDue
f428d17a17 LibWeb: Fix more ignored .to_string() errors in StyleValue 2023-01-13 21:09:26 +00:00
MacDue
92cea3216f AK: Don't inherit Formatter<ErrorOr<T>> for Formatter<IPv6Address> 2023-01-13 21:09:26 +00:00
MacDue
d5152c49a1 AK: Don't inherit Formatter<ErrorOr<T>> for Formatter<IPv4Address> 2023-01-13 21:09:26 +00:00
Tim Schumacher
2150e1b3a5 Shell: Use AllocatingMemoryStream to search for the IFS 2023-01-14 00:33:35 +03:30
Tim Schumacher
156b6e83cd LibCore: Add AllocatingMemoryStream::offset_of 2023-01-14 00:33:35 +03:30
Tim Ledbetter
ecc202c59d PixelPaint: Hold shift to constrain polygonal select tool line angle
Holding shift while using the polygonal select tool now constrains the
line angle in 22.5 degree increments. This matches the behavior of the
line tool.
2023-01-13 15:52:57 +01:00
Tim Ledbetter
569ef94228 PixelPaint: Don't allow the move tool to resize to zero pixels
This prevents an error message appearing when we attempt to scale
a layer to zero pixels using the move tool.
2023-01-13 15:45:28 +01:00
Arda Cinar
037744e62a Kernel/Net: Get the correct interface type in SIOCGIFHWADDR ioctl
When calling ioctl on a socket with SIOCGIFHWADDR, return the correct
physical interface type. This value was previously hardcoded to
ARPHRD_ETHER (Ethernet), and now can also return ARPHRD_LOOPBACK for the
loopback adapter.
2023-01-13 15:44:04 +01:00
Liav A
6f9b84a64a Kernel: Remove outdated FIXME in the DeviceManagement code 2023-01-13 15:42:33 +01:00
Arda Cinar
3f99a8734e LibCore: Call the mkstemp function in a slightly prettier way
This removes a FIXME, although the new version isn't less char-pointery.
2023-01-13 09:29:44 -05:00
Timothy Flynn
8ccd6a31dc GamesSettings: Draw one of the previewed cards as "highlighted"
And draw a valid "moving" card over it to indicate that it is
highlighted for a reason.
2023-01-13 12:58:06 +00:00
Timothy Flynn
c0756d8e55 GamesSettings: Paint the card preview frame using a CardGame subclass
We currently paint the 3 previewed cards using ImageWidget. This works
fine, but in order to preview a card hovering over a valid target card,
it will be easier to use the already-existing CardGame paint logic. So
this patch changes GamesSettings to display the preview as-is using a
CardGame.
2023-01-13 12:58:06 +00:00
Timothy Flynn
208653a93c GamesSettings: Move classes into the GamesSettings namespace
This is to allow registering future classes as with GML.
2023-01-13 12:58:06 +00:00
Liav A
e241b47fee Userland: Remove a bunch of unveil calls on /sys/kernel/processes
These are not needed anymore since the introduction of the new
get_root_session_id syscall.
2023-01-13 13:41:30 +01:00
Liav A
16b6e644d7 Kernel: Require "stdio" pledge promise when calling get_root_session_id 2023-01-13 13:41:30 +01:00
Sam Atkins
a5ff6769f5 LibGUI: Make undo work for TextDocument ReplaceAllTextCommand
The undo code here was just replacing the new text with the new text.
Now we actually save the old text and use that instead. :^)
2023-01-13 13:37:19 +01:00
Sam Atkins
7164b2f758 GMLPlayground: Add a toolbar
No new features, but it sure makes things look more fancy. :^)
2023-01-13 13:37:19 +01:00
Sam Atkins
9d3e174040 Base: Add an icon for reformatting code 2023-01-13 13:37:19 +01:00
Sam Atkins
d443a51b50 GMLPlayground: Move layout to GML
There isn't much layout right now, but it felt very wrong to not have
the GML editor use GML. :^)
2023-01-13 13:37:19 +01:00
BodilessSleeper
0bc591a69b LibJS: Use integer days in RoundDuration
Before we used the value of days which may also contain a fraction.
The algorithm expects it to be an integer.
This was addressed upstream in: tc39/proposal-temporal@02379da
2023-01-13 10:21:54 +00:00
MacDue
e2db717bf5 LibWeb: Fix ignored .to_string() errors in Web::dump_sheet() 2023-01-12 23:29:57 +00:00
MacDue
0e3e9d9883 LibWeb: Fix ignored .to_string() errors in StyleValue 2023-01-12 23:29:57 +00:00
MacDue
969aacd627 Kernel: AK: Fix ignored .to_string() errors in IPv4Socket 2023-01-12 23:29:57 +00:00
MacDue
514224c015 AK: Fix ignored .to_string() errors in IPv6Address 2023-01-12 23:29:57 +00:00
MacDue
35e1e12360 AK: Fix ignored .to_string() errors in IPv4Address 2023-01-12 23:29:57 +00:00
Linus Groh
f183745f4e LibWebView+Ladybird: Move preferred color scheme to ViewImplementation 2023-01-12 23:39:36 +01:00
Linus Groh
5bf5697f16 LibWebView+Ladybird: Move text selection to ViewImplementation 2023-01-12 23:39:36 +01:00
Linus Groh
8c11a2c253 LibWebView+Ladybird: Move running JavaScript to ViewImplementation 2023-01-12 23:39:36 +01:00
Linus Groh
55609f744d LibWebView+Ladybird: Move debug request to ViewImplementation 2023-01-12 23:39:36 +01:00
Linus Groh
de1c0c87fe LibWebView+Ladybird: Move page loading to ViewImplementation 2023-01-12 23:39:36 +01:00
Linus Groh
2428e3e675 LibWebView+Ladybird: Move DOM inspection helpers to ViewImplementation 2023-01-12 23:39:36 +01:00
Linus Groh
f313708237 LibWebView+Ladybird: Move get source request to ViewImplementation 2023-01-12 23:39:36 +01:00
Linus Groh
5d9f4b2ffc LibWebView+Ladybird: Move zoom logic to ViewImplementation 2023-01-12 23:39:36 +01:00
Linus Groh
5411adca22 LibWebView+Ladybird: Begin de-duplicate WebView implementations
This starts moving code equally shared between the OOPWV and Ladybird
WebContentView implementations to WebView::ViewImplementation, beginning
with the client state.
2023-01-12 23:39:36 +01:00
Brandon Jordan
121181e392 Base: Add video file type icon
This adds a file type icon for video files.
2023-01-12 22:25:31 +01:00
Andreas Kling
d132ce54e1 LibWeb: Don't mark layout tree as selected when selection is zero-length 2023-01-12 20:27:16 +01:00
Andreas Kling
2eaebdea5b Ladybird: Add Ctrl+= as an alternate "zoom in" shortcut
On many keyboards, Ctrl++ is actually Ctrl+Shift+=, and Ctrl+= makes
more sense as it's symmetric with Ctrl+-.

Both Firefox and Chrome already support this alternate shortcut,
so let's be nice and support it in Ladybird as well. :^)
2023-01-12 19:05:07 +00:00
Andreas Kling
c8ea23a4fe Ladybird: Use QKeySequence::StandardKey as much as possible
Let Qt pick the most appropriate native shortcut when it knows one.
2023-01-12 19:05:07 +00:00
Andreas Kling
0e53003f72 LibWeb: Remove now-unused LayoutRange and LayoutPosition classes :^) 2023-01-12 19:55:10 +01:00
Andreas Kling
9c7e26b8d4 Ladybird: Add "Copy" and "Select All" actions to the Edit menu 2023-01-12 19:55:10 +01:00
Andreas Kling
b79bc25a1f LibWeb: Use DOM Selection instead of ad-hoc layout tree selection
Before this patch, we were expressing the current selection as a range
between two points in the layout tree. This was a made-up concept I
called LayoutRange (2x LayoutPosition) and as it turns out, we don't
actually need it!

Instead, we can just use the Selection API from the Selection API spec.
This API expresses selection in terms of the DOM, and we already had
many of the building blocks implemented.

To ensure that selections get visually updated when the underlying Range
of an active Selection is programmatically manipulated, Range now has
an "associated Selection". If a range is updated while associated with
a selection, we recompute layout tree selection states and repaint the
page to make it user-visible.
2023-01-12 19:55:10 +01:00
Andreas Kling
1c4328902d LibWeb: Implement BrowsingContext::select_all() in terms of Selection
We do what other browsers do and create a selection anchored at the
document's body element.
2023-01-12 19:55:10 +01:00
Andreas Kling
bf69f4370e LibWeb: Implement BrowsingContext::selected_text() in terms of Selection
Instead of sifting through the layout tree to extract the selected text,
look at the DOM selection instead.

Note that we can't just stringify the DOM Range, as that would include
non-visible things (like the content of <style> elements, etc.) so we
run it through an ad-hoc variant of the range stringification algorithm.
This can probably be factored better, but it's a start. :^)
2023-01-12 19:55:10 +01:00
Andreas Kling
3cabd17f9b LibWeb: Add convenient Selection::range() accessor
This is a lot smoother than calling the throwsy get_range_at() API,
especially since we know there at most 1 range in the selection.
2023-01-12 19:55:10 +01:00
Linus Groh
36866730ce Browser: Implement zoom :^)
Largely based on the Ladybird implementation in 0cc151b.
2023-01-12 18:52:32 +00:00
Linus Groh
966d808135 Ladybird: Replace ColorScheme enum with Web::CSS::PreferredColorScheme
This matches OutOfProcessWebView::set_preferred_color_scheme().
2023-01-12 18:27:34 +00:00
Tim Schumacher
877be0eb43 SoundPlayer: Don't silently ignore parsing failures
If we failed to decode a sample we'd presumably want to tell the user,
and we definitely don't want to just go into another round of decoding
somewhere in the middle of a broken sample.
2023-01-12 16:52:34 +01:00
Tim Schumacher
1caad457ef LibAudio: Don't assume that a non-full span means EOF
Especially if buffered streams are involved, not filling the span
completely can also mean that we just ran out of filled buffer space and
we need to refill it on the beginning of the next read call.
2023-01-12 16:52:34 +01:00
Linus Groh
0cc151bc1c Ladybird: Implement zoom :^) 2023-01-12 15:14:09 +00:00