1
0
mirror of https://github.com/SerenityOS/serenity synced 2024-07-09 12:00:49 +00:00
Commit Graph

46670 Commits

Author SHA1 Message Date
Tim Schumacher
787f4d639a AK: Port LEB128 to the new AK::Stream 2023-02-04 18:41:27 -07:00
Tim Schumacher
31f59855b4 AK: Don't restore the stream offset when failing to read an LEB128
Pretty much no other read function does this, and getting rid of the
typename template parameter for the stream makes the transition to the
new AK::Stream a bit easier.
2023-02-04 18:41:27 -07:00
Tim Schumacher
371c51f934 AK: Make SeekableStream::truncate() take a size_t
Similar to the return values earlier, a signed value doesn't really make
sense here. Relying on the much more standard `size_t` makes it easier
to use Stream in all contexts.
2023-02-04 18:41:27 -07:00
Karol Kosek
a85c18d3c4 Base: Add .ico file association to Image Viewer and Pixel Paint 2023-02-04 18:02:03 -07:00
Karol Kosek
e7cc426e05 LibGfx: Port ICOLoader to the new AK::Stream 2023-02-04 18:02:03 -07:00
Karol Kosek
492d5d7cb2 LibGfx: Return ErrorOr<> in ICOLoader internal functions 2023-02-04 18:02:03 -07:00
Lucas CHOLLET
3f932081ae HexEditor: Create a function to initialize a HexDocumentFile
This function is made from what composed `set_file()` (which now calls
the new function). It allows to create a `HexDocumentFile` without
calling the hackish `set_file(move(m_file))`.
2023-02-04 17:20:31 -07:00
Lucas CHOLLET
689b3c2c26 HexEditor: Propagate errors from HexDocumentFile::set_title() 2023-02-04 17:20:31 -07:00
Lucas CHOLLET
a2dca2b762 HexEditor: Propagate errors when using "Save" 2023-02-04 17:20:31 -07:00
Lucas CHOLLET
2bba743c24 HexEditor: Propagate errors when using "Save as" 2023-02-04 17:20:31 -07:00
Lucas CHOLLET
3d914247cc HexEditor: Port to Core::Stream 2023-02-04 17:20:31 -07:00
Lucas CHOLLET
b1d8404c92 HexEditor: Use the constructor pattern 2023-02-04 17:20:31 -07:00
Lucas CHOLLET
a621b5f015 HexEditor: Add a default move constructor to HexDocumentFile 2023-02-04 17:20:31 -07:00
nipos
c31b547fae AK: Use constexpr instead of consteval on OpenBSD 2023-02-04 16:11:54 -07:00
kleines Filmröllchen
e5dea00bb1 Base: Add a quote to the fortunes database
t.how.does.it.even.workis /shrug
2023-02-04 16:04:45 -07:00
Karol Kosek
039bb4e22d Utilities: Rename special target binaries only if they exist
Before 6490529ef7, all programs in the
SPECIAL_TARGETS list were built because they didn't have an
EXCLUDE_FROM_ALL property set.

That commit set the property for all targets, but because of this, the
minimal "Required" build configuration no longer built, as CMake failed
to rename every special target. Even the not built ones.

This commit makes the rename action run only if the executable exists,
which makes us build Serenity without the `install` utility, and also
by using the minimal configuration set. :^) :^)
2023-02-04 15:53:07 -07:00
Karol Kosek
bc587b89d8 CMake: Don't require to install glapi.h to system
This failed when a current build configuration hadn't got any program
depending on LibGL.
2023-02-04 15:53:07 -07:00
Karol Kosek
22a99e39d8 Lagom/ConfigureComponents: Run cmake command last
Previously the tool was removing the Root directory after configuring
cmake which was breaking the build, as some cmake rules put some
necessary files there.

Moving the cmake command to be the last one makes it regenerate those
files automatically. :^)
2023-02-04 15:53:07 -07:00
Ollrogge
64b1d4dc8b Documentation: Add formatting section to nvim documenation 2023-02-04 15:47:24 -07:00
Liav A
ed67a877a3 Kernel+SystemServer+Base: Introduce the RAMFS filesystem
This filesystem is based on the code of the long-lived TmpFS. It differs
from that filesystem in one keypoint - its root inode doesn't have a
sticky bit on it.

Therefore, we mount it on /dev, to ensure only root can modify files on
that directory. In addition to that, /tmp is mounted directly in the
SystemServer main (start) code, so it's no longer specified in the fstab
file. We ensure that /tmp has a sticky bit and has the value 0777 for
root directory permissions, which is certainly a special case when using
RAM-backed (and in general other) filesystems.

Because of these 2 changes, it's no longer needed to maintain the TmpFS
filesystem, hence it's removed (renamed to RAMFS), because the RAMFS
represents the purpose of this filesystem in a much better way - it
relies on being backed by RAM "storage", and therefore it's easy to
conclude it's temporary and volatile, so its content is gone on either
system shutdown or unmounting of the filesystem.
2023-02-04 15:32:45 -07:00
Andrew Kaster
fa637e29d2 Documentation: Reorganize Ladybird build docs to put easy path first
Instead of explaining custom build directories first and then following
that up with a an explainer that Meta/serenity.sh is the easiest way to
get the browser up and running to try it out was not very ergonmic.

Also reorganize some of the per-distro documentation to put the compiler
requirements front and center.
2023-02-04 12:30:36 +01:00
Rodrigo Tobar
82bac7e665 LibPDF: Fix clipping of painting operations
While the clipping logic was correct (current v/s new clipping path),
the clipping path contents weren't. This commit fixed that.

We calculate the clipping path in two places: when we set it to be the
whole page at graphics state creation time, and when we perform clipping
path intersection to calculate a new clipping path. The clipping path is
then used to limit painting by passing it to the painter (more
precisely, but passing its bounding box to the painter, as the latter
doesn't support arbitrary path clipping). For this last point the
clipping path must be in device coordinates.

There was however a mix of coordinate systems involved in the creation,
update and usage of the clipping path:

 * The initial values of the path (i.e., the whole page) were in user
   coordinates.
 * Clipping path intersection was performed against m_current_path,
   which is in device coordinates.
 * To perform the clipping operation, the current clipping path was
   assumed to be in user coordinates.

This mix resulted in the clipping not working correctly depending on the
zoom level at which one visualised a page.

This commit fixes the issue by always keeping track of the clipping path
in device coordinates. This means that the initial full-page contents
are now converted to device coordinates before putting them in the
graphics state, and that no mapping is performed when applied the
clipping to the painter.
2023-02-04 12:29:57 +01:00
Sam Atkins
08e30a17c5 Base: Delete the "test" chess piece set
We have several nice sets to choose from now, and so we no longer need
this one, which is "ugly" even according to its original author. ;^)
2023-02-04 12:29:03 +01:00
Sam Atkins
0f2936d8cd Chess+GamesSettings: Give chess pieces some breathing room
Draw pieces around 80% of the size of a square, instead of 100%, so that
there is a nice gap around them. This feels more comfy, and makes it
actually possible to read the coordinates while a piece is on their
square.
2023-02-04 12:29:03 +01:00
Sam Atkins
7e4186de63 Chess+GamesSettings: Use the correct term for chess squares
"Square" is the technical term, so let's use it. :^)

Also, stop using size_t for pixel sizes, that's not what that means.
2023-02-04 12:29:03 +01:00
Xexxa
f9742d53c5 Base: Add more emoji
🤳 - U+1F933 SELFIE
🏄 - U+1F3C4 PERSON SURFING
🏄‍♂️ - U+1F3C4 U+200D U+2642 MAN SURFING
🏄‍♀️ - U+1F3C4 U+200D U+2640 WOMAN SURFING
🥋 - U+1F94B MARTIAL ARTS UNIFORM
🚭 - U+1F6AD NO SMOKING
📴 - U+1F4F4 MOBILE PHONE OFF
2023-02-04 12:28:26 +01:00
Cubic Love
2586b8faf1 Base: Fix typo of MasterWrod.af
MasterWrod.af becomes MasterWord.af - too small a change?
2023-02-04 12:27:28 +01:00
Sam Atkins
f7aead8086 SpaceAnalyzer: Rename widget variables to match code style 2023-02-04 12:27:10 +01:00
Sam Atkins
534039fdf5 SpaceAnalyzer: Stop treating selecting a node as a path change
This served no obvious purpose, but did make the breadcrumb bar change
confusingly.
2023-02-04 12:27:10 +01:00
Sam Atkins
ad92b16887 SpaceAnalyzer: Rename TreeMapWidget::m_path -> m_path_segments
This is clearer to me at least.
2023-02-04 12:27:10 +01:00
Sam Atkins
87f4c9e580 SpaceAnalyzer: Give the Analyze action an icon and F5 shortcut
This action is basically equivalent to "Refresh", so let's use the
common shortcut for that.
2023-02-04 12:27:10 +01:00
Sam Atkins
1ec59cc52a SpaceAnalyzer: Make TreeMapWidget responsible for filesystem analysis
Also, the Tree object was only ever used by the TreeMapWidget, so its
creation can happen inside `analyze()`, fixing the memory leak issue.
Plus, it doesn't have to be RefCounted.
2023-02-04 12:27:10 +01:00
Sam Atkins
98e9ee07e3 SpaceAnalyzer: Propagate more errors 2023-02-04 12:27:10 +01:00
Sam Atkins
16bbdc812d SpaceAnalyzer: Extract ProgressWindow into its own class 2023-02-04 12:27:10 +01:00
MacDue
bcc4e5ee0b Base: Add a test page for canvas patterns 2023-02-03 20:36:21 +01:00
MacDue
f74e2da875 LibWeb: Implement CanvasRenderingContext2D.createPattern()
This is a first pass at implementing CRC2D.createPattern() and the
associated CanvasPattern object. This implementation only works for a
few of the required image sources [like CRC2D.drawImage()], and does
not yet support transforms. Other than that it supports everything
else (which is mainly the various repeat modes).
2023-02-03 20:36:21 +01:00
MacDue
0c313c586b Meta: Register CanvasPattern as a platform object 2023-02-03 20:36:21 +01:00
MacDue
b106fd640b LibWeb: Fix typo and use auto where possible 2023-02-03 20:36:21 +01:00
Timothy Flynn
e96df1599c SQLStudio: Display real column names in the results tab 2023-02-03 20:34:45 +01:00
Timothy Flynn
4fe437b4d2 SQLStudio: Separate the script and results tabs with a vertical splitter 2023-02-03 20:34:45 +01:00
Timothy Flynn
cb06031180 LibSQL+SQLServer: Send result column names over IPC to SQL clients 2023-02-03 20:34:45 +01:00
Timothy Flynn
d6dee8c0e8 LibSQL+Userland: Pass SQL IPC results to clients in a structure
SQLClient exists as a wrapper around SQL IPC to provide a bit friendlier
interface for clients to deal with. Though right now, it mostly forwards
values as-is from IPC to the clients. This makes it a bit verbose to add
values to IPC responses, as we then have to add it to the callbacks used
by all clients. It's also a bit confusing seeing a sea of "auto" as the
parameter types for these callbacks.

This patch moves these response values to named structures instead. This
will allow adding values without needing to simultaneously update all
clients. We can then separately handle the new values in interested
clients only.
2023-02-03 20:34:45 +01:00
Timothy Flynn
f0441ee16a LibSQL: Store selected column names in the results for SELECT statements 2023-02-03 20:34:45 +01:00
Steffen Rusitschka
198f2945bf Kernel/aarch64: Include Error.h to fix aarch64 missing ErrorOr 2023-02-03 20:26:26 +01:00
Lucas CHOLLET
a053807be5 TextEditor: Propagate errors from read_file() 2023-02-03 19:58:41 +01:00
Lucas CHOLLET
3454185d08 TextEditor: Use request_file_read_only_approved for the drop event
This allows TextEditor to open the file without asking for user consent.
2023-02-03 19:58:41 +01:00
Lucas CHOLLET
40f9cf2de6 TextEditor: Port to Core::Stream 2023-02-03 19:58:41 +01:00
Lucas CHOLLET
36e66502c9 grep: Port to Core::Stream
It also adds support for `ErrorOr` in one lambda.
2023-02-03 19:43:41 +01:00
Liav A
f354b52099 SystemServer: Propagate errors properly in the main code
To do this properly, we also create Strings with formatting of device
nodes' names, taking into consideration errors when doing that.
Also, we use LibCore System mknod method instead of raw LibC functions
to be able to propagate errors from these calls too.
2023-02-03 19:38:23 +01:00
Staubfinger
da1023fcc5 AK: Add thresholds to quickselect_inline and Statistics::Median
I did a bit of Profiling and made the quickselect and median algorithms
use the best of option for the respective input size.
2023-02-03 19:04:15 +01:00