Andreas Kling
a8dbfc3398
LibCrypto: Yet more ByteBuffer::wrap() removal. Not much left now!
2020-12-19 18:29:13 +01:00
Andreas Kling
497f1fd472
LibWeb: Don't use ByteBuffer::wrap() when loading about: URLs
...
Let's just copy an empty string here to make ourselves a ByteBuffer.
2020-12-19 18:29:13 +01:00
Andreas Kling
48d74c5356
LibHTTP: Make HTTPRequest::from_raw_request() take a ReadonlyBytes
...
This allows us to get rid of some ByteBuffer::wrap() usage.
2020-12-19 18:29:13 +01:00
Andreas Kling
e517505e35
LibTLS: Even more ByteBuffer -> Span conversion
2020-12-19 18:29:13 +01:00
Andreas Kling
f82b0a78ef
LibTLS+LibCrypto: More ByteBuffer -> Span conversion
2020-12-19 18:29:13 +01:00
Andreas Kling
8e20208dd6
LibTLS+LibCrypto: Replace a whole bunch of ByteBuffers with Spans
2020-12-19 18:29:13 +01:00
Brendan Coles
4d89c1885d
MenuApplets: Add Network menu applet
2020-12-19 18:28:56 +01:00
Andreas Kling
7c94856c12
LibELF+LibDebug: Remove use of ByteBuffer::wrap()
2020-12-19 13:14:00 +01:00
Andreas Kling
685d5f4e25
LibProtocol: Remove use of ByteBuffer::wrap() in protocol API
2020-12-19 13:09:02 +01:00
Andreas Kling
77515fead2
LibGfx: Remove use of ByteBuffer::wrap() in BMP decoder
2020-12-19 13:05:48 +01:00
Andreas Kling
8cf6b75dd9
LibGfx: Remove use of ByteBuffer::wrap() in PNG decoder
2020-12-19 12:00:35 +01:00
Andreas Kling
0e4ecca336
LibIPC: Remove use of ByteBuffer::wrap()
...
ByteBuffer::wrap() was useful before we had Span. Let's see if we can't
get rid of some more ByteBuffer wrapping.
2020-12-19 11:30:02 +01:00
Andreas Kling
d893498e57
Kernel: Use fallible KBuffer API in PerformanceEventBuffer
2020-12-19 10:23:12 +01:00
Sahan Fernando
fb9a71bd6a
AK: Add hash implementations for i16 and i64
2020-12-19 10:20:15 +01:00
Andreas Kling
3d02597316
Kernel: Avoid a heap allocation for every outgoing TCP packet
2020-12-18 19:22:26 +01:00
Andreas Kling
befabe31c9
Kernel/Net: Avoid a heap allocation for every outgoing UDP packet
...
We can use a stack buffer to build the UDP packet instead.
2020-12-18 19:22:26 +01:00
Andreas Kling
8cc81c2953
Kernel/Net: Make IPv4Socket::protocol_receive() take a ReadonlyBytes
...
The overrides of this function don't need to know how the original
packet was stored, so let's just give them a ReadonlyBytes view of
the raw packet data.
2020-12-18 19:22:26 +01:00
Andreas Kling
8e79bde2b7
Kernel: Move KBufferBuilder to the fallible KBuffer API
...
KBufferBuilder::build() now returns an OwnPtr<KBuffer> and can fail.
Clients of the API have been updated to handle that situation.
2020-12-18 19:22:26 +01:00
Andreas Kling
d936d86332
Kernel: Add KBuffer::try_create_with_bytes()
...
Here's another fallible KBuffer construction API that creates a KBuffer
and populates it with a range of bytes.
2020-12-18 19:22:26 +01:00
Andreas Kling
bcd2844439
TmpFS: Use fallible KBuffer API
...
If allocation fails, some TmpFS operations can now fail with ENOMEM.
2020-12-18 19:22:26 +01:00
Andreas Kling
47da86d136
Ext2FS: Fail the mount if BGD table cache allocation fails
...
Instead of asserting if we can't allocate enough memory for a BGD table
cache, just fail the mount instead.
2020-12-18 19:22:26 +01:00
Andreas Kling
8cde8ba511
Kernel: Add KBuffer::try_create_with_size()
...
We need to stop assuming that KBuffer allocation always succeeds.
This patch adds the following API:
- static OwnPtr<KBuffer> KBuffer::create_with_size(size_t);
All KBuffer clients should move towards using this (and handling any
failures with grace.)
2020-12-18 19:22:26 +01:00
AnotherTest
5d1425718e
LibLine: Treat leftover data in buffer as a read event
...
Fixes #4328 .
2020-12-18 19:20:37 +01:00
AnotherTest
5e6b9cbc91
LibLine: Be less lazy when moving prompt origin row
...
Fixes the issue where adding multiple lines in one refresh cycle would
break cursor positioning.
2020-12-18 19:20:37 +01:00
Brendan Coles
27a5c51f3f
LibCore: UDPServer::bind: Replace bind failure assert() with perror()
2020-12-18 19:20:30 +01:00
Linus Groh
fe88f46bc9
LibGUI: Don't assume main widget exists in Window::handle_resize_event()
...
Just like the other event handler functions, handle_resize_event()
shouldn't assume that the window has a main widget (which is being
resized in this case).
Fixes #4450 .
2020-12-18 19:20:15 +01:00
Nico Weber
573d5b7ff2
LibGfx: Give Size and Rect * and *= operators
2020-12-18 17:35:30 +01:00
Nico Weber
b67eed5b80
LibGfx: Fix type of scale factor in Point scale operators
2020-12-18 17:35:30 +01:00
Brendan Coles
098f06f042
ClipboardHistory: Add window icon
2020-12-18 17:25:24 +01:00
Sahan Fernando
354a1a7891
HackStudio: Remove duplicate auto-indentation in HackStudio Language Server
2020-12-18 16:25:42 +01:00
Sahan Fernando
8dc0d9b7b7
LibGUI: Make autoformatting performed on InsertTextCommand visible to on_edit_action
2020-12-18 16:25:42 +01:00
Andreas Kling
4232874270
Kernel: Don't dump core when OOM-killing a process
...
Trying to generate a core dump under low memory conditions is not the
best idea.
Fixes #4428 .
2020-12-18 11:22:21 +01:00
Andreas Kling
18f1f4e1a2
LibWeb: Only preserve full whitspace for white-space: pre{,-wrap}
2020-12-18 11:04:29 +01:00
Andreas Kling
b322452ef4
LibWeb: Silence BFC spam about not knowing how to place boxes
...
This gets way too noisy on some pages, and isn't even interesting.
2020-12-18 10:25:50 +01:00
Liav A
5a146187cf
Kernel: Workaround QEMU bug and initialize i8042 controller
...
ACPI 2 declared the third revision of FADT, that should have
IAPC_BOOT_ARCH flags in it, also to indicate if i8042 is present.
Q35 machine reports that it has FADT with revision 3, but the code
in QEMU simply ignores these flags and put zero on them no matter
the revision of FADT.
2020-12-18 10:02:14 +01:00
Linus Groh
176fe1795d
Base: Add app-libgfx-demo.png 32x32 icon
...
The 16x16 icon already looks great, so this is a larger version of it,
with the same shapes and colors.
2020-12-18 10:01:18 +01:00
Linus Groh
9dc4f8bc06
Base: Add app-fire.png 32x32 icon
...
This is an upscaled (no interpolation) version of the 16x16 icon, which
looks pretty neat given the pixelated appearance of the "Fire" demo
application. :^)
2020-12-18 10:01:18 +01:00
Linus Groh
13697ae108
Base: Add app-cube.png 32x32 icon
2020-12-18 10:01:18 +01:00
Linus Groh
b9e3dbfbd1
Base: Tweak app-cube.png 16x16 icon
2020-12-18 10:01:18 +01:00
Brendan Coles
219d039639
Screensaver: Add app-screensaver.png 32x32 icon
2020-12-18 10:01:09 +01:00
Andreas Kling
6d7892cfc4
LibWeb: Whitespace that causes a line to wrap should be hidden
...
We were only pruning trailing whitespace on lines. This patch makes it
so we also don't add whitespace as the leading line box fragment on new
lines.
This logic is pretty crufty and I think we can do better, but for now
I've just made it handle this extra case so we can stop having lines
that start with a space character. :^)
2020-12-17 21:10:57 +01:00
Brendan Coles
172707a945
Chess: Prevent board changes when waiting for ChessEngine to move
2020-12-17 19:45:05 +01:00
Tom
07badd9530
WindowServer: Add the ability to animate cursors
...
This adds the ability to specify cursor attributes as part of their
file names, which allows us to remove hard coded values like the hot
spot from the code. The attributes can be specified between the last
two dots of the file name. Each attribute begins with a character,
followed by one or more digits that specify a uint value.
Supported attributes:
x: The x-coordinate of the cursor hotspot
y: The y-coordinate of the cursor hotspot
f: The number of animated frames horizontally in the image
t: The number of milliseconds per frame
For example, the filename wait.f14t100.png specifies that the image
contains 14 frames that should be cycled through at a rate of 100ms.
The hotspot is not specified, so it defaults to the center.
2020-12-17 19:40:05 +01:00
Brendan Coles
853664bd3c
LibC: stdlib: Add clearenv() function
2020-12-17 19:39:56 +01:00
Linus Groh
3436317c08
LibWeb: Escape text nodes in innerHTML getter
2020-12-17 19:39:48 +01:00
Linus Groh
4833f0066e
LibWeb: Include element attributes in innerHTML getter
2020-12-17 19:39:48 +01:00
Liav A
f36feb42bd
Kernel: Return a correct name string of async write request
2020-12-17 19:36:56 +01:00
Andreas Kling
4c8dbc908c
LibWeb: Notify the PageClient when the children of <title> change
2020-12-17 02:02:00 +01:00
Andreas Kling
2a5877b02c
LibWeb: Fix shrink-to-fit layout for position:absolute
...
We were following the spec incorrectly. The comment was right, but the
code was wrong.
2020-12-17 01:47:42 +01:00
Andreas Kling
a5422a210f
LibWeb: Use the correct containing block for position:absolute width
2020-12-17 01:46:51 +01:00