Commit graph

46705 commits

Author SHA1 Message Date
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
Staubfinger
6b9344e86c AK: Use AK:quickselect_inline to compute AK::Statistics::median
Quick select is an algorithm that is able to find the median
of a Vector without fully sorting it.
This replaces the old very naive implementation
for `AK::Statistics::median()` with `AK::quickselect_inline`
2023-02-03 19:04:15 +01:00
Staubfinger
becd6d106f AK: Testing for AK::quickselect_inline
The testing code found here is mainly derived from the Tests for
`AK::quick_sort`.
2023-02-03 19:04:15 +01:00
Staubfinger
607441de56 AK: Implement the quick select algorithm as AK::quickselect_inplace
This adds the quick select algorithm that finds
the kth smallest element for any collection.
Whilst doing so it also partially sorts the collection.
I have also included the option to use different pivoting functions
including median of medians which makes the quick select have
a truely linear time complexity at the costs of enormous overhead,
so this that only really useful for really large datasets.
The same was chosen to reflect the fact that it modifies
the collection in place during the selection process.
2023-02-03 19:04:15 +01:00
Itamar
8fce807b10 Kernel: Fix usermode verification in ptrace with PT_SETREGS
When doing PT_SETREGS, we want to verify that the debugged thread is
executing in usermode.

b2f7ccf refactored things and flipped the relevant check around, which
broke things that use PT_SETREGS (for example, stepping over
breakpoints with sdb).
2023-02-03 17:39:13 +01:00
Cubic Love
85ca19ffd5 Base: Add British English Apple Macintosh keymap
Full support for EN-GB Mac Laptop and Magic Keyboards
2023-02-03 12:50:42 +00:00
Aliaksandr Kalenik
ab99e95549 LibWeb: Parse font-stretch CSS property 2023-02-03 12:49:13 +00:00
Sam Atkins
968481c7cd Settings: Change initial window size to fit the current content
Previously, it would open with a scrollbar visible which felt a little
silly. :^)
2023-02-03 12:44:04 +00:00
Sam Atkins
7d0529b89c AK: Remove JsonObject::get_deprecated() and ::get_ptr() :^) 2023-02-03 07:19:52 -05:00
Sam Atkins
d48e632696 Utilities/w: Replace uses of JsonObject::get_deprecated()/get_ptr() 2023-02-03 07:19:52 -05:00
Sam Atkins
8c4abf0ed8 Utilities/route: Replace uses of JsonObject::get_deprecated()/get_ptr() 2023-02-03 07:19:52 -05:00
Sam Atkins
f1f02b33e6 Utilities/pmap: Replace uses of JsonObject::get_deprecated()/get_ptr() 2023-02-03 07:19:52 -05:00
Sam Atkins
39f3a15022 Utilities/netstat: Replace uses of JsonObject::get_deprecated()/get_ptr 2023-02-03 07:19:52 -05:00
Sam Atkins
f14a1da633 Utilities/mount: Replace uses of JsonObject::get_deprecated()/get_ptr() 2023-02-03 07:19:52 -05:00
Sam Atkins
c1d3f39cc4 Utilities/lsusb: Replace uses of JsonObject::get_deprecated()/get_ptr() 2023-02-03 07:19:52 -05:00
Sam Atkins
e8ebbcdbc5 Utilities/lsof: Replace uses of JsonObject::get_deprecated()/get_ptr() 2023-02-03 07:19:52 -05:00