Commit Graph

33093 Commits

Author SHA1 Message Date
Maciej
2e8e959896 Taskbar: Abstract out quick launch entries
... into QuickLaunchEntry class. It will be used to implement adding
plain executables to the taskbar. For now, it adds TRY() error handling
to app launching :^)
2022-01-21 13:44:36 +01:00
Maciej
ccb8374434 LibCore: Add Core::System wrapper for disown() 2022-01-21 13:44:36 +01:00
Maciej
0badfd7b32 LibCore: Handle null lines in ConfigFile
Fixes nullptr dereference when trying to read binary files.
2022-01-21 13:44:36 +01:00
Morten Larsen
f71584b917 LibJS: Increase margin in check for stack space limit
test-js crashes with a segmentation fault when running on macOS on Arm.
Increasing the margin in the test in did_reach_stack_space_limit() to
32 * KiB makes the tests pass. To simplify the code, this is applied
independently of platform, and the previous test for use of an address
sanitizer is removed.
2022-01-21 13:37:27 +02:00
David Lindbom
2ed4e47300 zip: Add unveil and pledge promises 2022-01-21 02:00:53 +01:00
David Lindbom
9d7a862509 cal: Add unveil and pledge promises 2022-01-21 02:00:53 +01:00
David Lindbom
5c74e66f85 aplay: Add unveil and pledge promises 2022-01-21 02:00:53 +01:00
mjz19910
2cf02c6f38 adjtime: Port to LibMain 2022-01-21 01:52:22 +01:00
mjz19910
14a267347c LibCore: Add ArgsParser::add_option for Optional double 2022-01-21 01:52:22 +01:00
mjz19910
a9fb34ca6f LibCore: Add ErrorOr wrapper for adjtime 2022-01-21 01:52:22 +01:00
Luke Wilde
5ac57db5e9 LibWeb: Don't match the node querySelector(All) was called on
In querySelector(All)'s use of "Match a Selector Against a Tree", it
passes in the node the function was called on as the "optional scoping
root", which causes it and the nodes which aren't descendants of it 
to be excluded from the list of possible nodes to match against.
For us, this is the equivalent of using the non-inclusive variant of
`for_each_in_subtree_of_type`.

This was tripping up the node re-ordering logic of d3 and would cause
it to try and reinsert nodes into their parent, causing an exception
to be thrown.

Note that this should be shadow-including, but we don't currently have
shadow-including tree traversal as per https://dom.spec.whatwg.org/#concept-shadow-including-tree-order

https://drafts.csswg.org/selectors-4/#match-a-selector-against-a-tree
https://dom.spec.whatwg.org/#scope-match-a-selectors-string
2022-01-20 22:18:07 +00:00
Idan Horowitz
29cb7316d0 LibJS: Implement ECMA-402 compliant TypedArray.prototype.toLocaleString 2022-01-20 12:50:37 +00:00
sin-ack
c63feb4f09 Tests: Add should_error_when_connection_fails test to TestLibCoreStream
This test makes sure that Socket classes such as TCPSocket properly
return an error when connection fails rather than crashing or creating
an invalid object.
2022-01-20 10:40:51 +01:00
sin-ack
ab36fb7a23 LibCore: Use Core::System and Error::from_syscall in Stream classes
This makes what caused a failure more obvious.
The use of Core::System additionally allows us to remove a lot of
boilerplate code from Stream classes.
2022-01-20 10:40:51 +01:00
sin-ack
301f4c469f LibCore: Implement Core::System::lseek 2022-01-20 10:40:51 +01:00
sin-ack
4d2e3de94c LibCore: Don't manually close the fd when connection fails in sockets
This is wrong because we have already set the fd in the
PosixSocketHelper, and the destructor of the respective Socket class
will close the fd for us. With the manual closing of the fd, we attempt
to close the same fd twice which results in a crash.

Thanks to stelar7 for noticing this bug.
2022-01-20 10:40:51 +01:00
sin-ack
2d4261df49 Tests: Fix the TestLibCoreStream local_socket_write test
Accidentally regressed this test during the Core::LocalServer refactor,
and didn't catch it since TestLibCoreStream is disabled in the CI right
now. We have to wait for some data to become available, as pending_bytes
will immediately return 0 and a 0-sized read immediately returns.
2022-01-20 10:39:54 +01:00
Mustafa Quraish
ee74aafdca FileSystemAccessClient: Remove old API returning file descriptors :^)
Since all users of the old API are now removed, this commit removes all
the methods that returned raw file descriptors, in favor of returning
`ErrorOr<NonnullRefPtr<Core::File>`.
2022-01-20 10:39:12 +01:00
Mustafa Quraish
bba32de857 SpreadSheet: Use FileSystemAccessClient::try_* APIs 2022-01-20 10:39:12 +01:00
Mustafa Quraish
ca2c7dced5 3DFileViewer: Use FileSystemAccessClient::try_* APIs
This commit also removed the redundant `filename` parameter from
`GLContextWidget::load_file`, since the filename is already stored
within the file itself.
2022-01-20 10:39:12 +01:00
Mustafa Quraish
abb16683c9 ThemeEditor: Use FileSystemAccessClient::try_* APIs 2022-01-20 10:39:12 +01:00
Mustafa Quraish
f674102447 TextEditor: Use FileSystemAccessClient::try_* APIs 2022-01-20 10:39:12 +01:00
Mustafa Quraish
effb19f996 PDFViewer: Use FileSystemAccessClient::try_* APIs 2022-01-20 10:39:12 +01:00
Mustafa Quraish
1c3e93c6e0 PixelPaint: Use FileSystemAccessClient::try_* APIs 2022-01-20 10:39:12 +01:00
Mustafa Quraish
aae96af812 HexEditor: Use FileSystemAccessClient::try_* APIs 2022-01-20 10:39:12 +01:00
Mustafa Quraish
0c98e553e8 FileSystemAccessClient: Add try_* variants returning Core::File
The current implementation is a bit of a hack since we also want to keep
around the previous variants for now, but will be cleaned up later once
all applications have been ported to the new API.
2022-01-20 10:39:12 +01:00
Sam Atkins
94f2508519 CrashReporter: Don't crash when investigating a HackStudio crash
Previously when opening a crash report for HackStudio, the
`unveil("/bin/HackStudio", "rx")` call was failing because of the
earlier `unveil(executable_path.characters(), "r")` call requesting only
"r" permissions for it. This patch handles this specific case, so you
can crash HackStudio to your heart's content. :^)

Also, we were unveiling the executable path twice, once manually and
once implicitly as part of the coredump's libraries, so we now check for
the latter and avoid it.

Thanks to Daniel for noticing what was right in front of me and I didn't
see!

Co-authored-by: Daniel Bertalan <dani@danielbertalan.dev>
2022-01-20 10:38:10 +01:00
Dmitry Petrov
1662213737 Userland: Add horizontal mouse scroll support 2022-01-20 10:37:52 +01:00
Dmitry Petrov
d61cc47055 Kernel: Add horizontal mouse scroll support 2022-01-20 10:37:52 +01:00
electrikmilk
1afb6d5eca Base: Add red theme 2022-01-20 10:36:46 +01:00
electrikmilk
4fd58a8bef Base: Tweak Silver theme
Tweak silver theme to look even more like Mac OS 9
2022-01-20 10:36:21 +01:00
electrikmilk
8ec0b2fa32 Base: Add Olive Green Theme
Add Olive theme
2022-01-20 10:35:35 +01:00
Jelle Raaijmakers
a8655fbf52 LibGL+LibSoftGPU: Clean up some for loops 2022-01-20 10:35:01 +01:00
Jelle Raaijmakers
12d7b4e9ac LibGL: Rename GLMat.cpp to GLMatrix.cpp 2022-01-20 10:35:01 +01:00
Jelle Raaijmakers
08826d60ad LibGL: Transpose matrix in glGetDoublev and glGetFloatv
We were returning row-major matrices when OpenGL clients are expecting
column-major instead.
2022-01-20 10:35:01 +01:00
Jelle Raaijmakers
16255d161e LibGL: Use 4 hex characters for error code constants in gl.h 2022-01-20 10:35:01 +01:00
Jelle Raaijmakers
c846ed0a2c LibGL: Report GL errors to debug console 2022-01-20 10:35:01 +01:00
Jelle Raaijmakers
c5abef86db LibGL: Stub GL_BACK implementation for glPolygonMode
This prevents overwriting the front face mode when providing `GL_BACK`
as a parameter.
2022-01-20 10:35:01 +01:00
Jelle Raaijmakers
453f62c935 LibGL+LibSoftGPU: Implement GL_POLYGON_OFFSET_FILL capability 2022-01-20 10:35:01 +01:00
Jelle Raaijmakers
991cbc56a2 LibGL: Implement glColor4b 2022-01-20 10:35:01 +01:00
Jelle Raaijmakers
29dc17b7b9 LibGL: Correct values for GL_BGR and GL_BGRA 2022-01-20 10:35:01 +01:00
Undefine
9a28ef7aa9 SystemMonitor: Show unknown in PCI devices
In case when the PCI class, device or vendor is unknown, show
that it is unknown instead of just putting the ID
2022-01-19 21:47:40 -08:00
electrikmilk
fa1d07a45d Base: Add C64 theme for Terminal 2022-01-19 21:45:30 -08:00
electrikmilk
357b12f315 Base: Add Github theme for Terminal 2022-01-19 21:45:30 -08:00
Lady Gegga
231cf787d5 Base: Add Hiragana characters to font Katica Regular 10
3041-309F https://www.unicode.org/charts/PDF/U3040.pdf
2022-01-19 23:17:21 +00:00
Lady Gegga
764e33f318 Base: Add Chinese characters to font Katica Regular 10
4E06, 4E07, 524D, 56FA, 56D7-56E0, 6708
https://www.unicode.org/charts/PDF/U4E00.pdf
2022-01-19 23:17:21 +00:00
Sam Atkins
b34950a825 LibWeb: Add Formatters for Length, Percentage and LengthPercentage 2022-01-20 00:04:10 +01:00
Sam Atkins
bfcbab0dcf LibWeb: Remove reference_for_percent parameter from Length::resolved()
Despite looking like it was still needed, it was only used for passing
to other calls to Length::resolved() recursively. This makes the
various `foo.resolved().resolved()` calls a lot less awkward.
(Though, still quite awkward.)

I think we'd need to separate calculated lengths out to properly tidy
these calls up, but one yak at a time. :^)
2022-01-20 00:04:10 +01:00
Sam Atkins
cff44831a8 LibWeb: Remove Length::Type::Percentage :^)
All `<percentage>`s in the CSS grammar are now represented by the
`Percentage` class, and `<length-percentage>` by `LengthPercentage`.
2022-01-20 00:04:10 +01:00
Sam Atkins
5e9a6302e5 LibWeb: Convert opacity property from Length to Percentage 2022-01-20 00:04:10 +01:00