Commit graph

24873 commits

Author SHA1 Message Date
Sam Atkins
59a4e87a7e Documentation: Add BuildProfilingInstructions.md
After discussing on Discord about how to speed up the build time, I
received lots of helpful advice on measuring the build time, but none of
it was easily accessible. I thought other people might find it useful,
so I've written it down! :^)

Thanks goes to @bgianfo and @nico.
2021-07-30 20:51:11 +02:00
Luke
4ca14d6e67 Ports: Update OpenSSL to 1.1.1k 2021-07-30 20:49:56 +02:00
Luke
f5d4de8b66 LibC: Stub mlock in sys/mman
mlock is supposed to prevent memory from being paged out to swap, which
we don't have currently.

Required by OpenSSL.
2021-07-30 20:49:56 +02:00
Martin Blicha
add3a02ddd LibChess: Fix hashing of the chess board
The hash function should take the board by reference, not by value.
Also, the fact whether black can castle kingside or not was included
twice in the hash, unnecesarily.
2021-07-30 20:49:18 +02:00
Faeliore
8e3431d56d MailSettings: Add basic mail settings dialog
MailSettings: Add a GML file for Mail settings

MailSettings: Add an AF desktop file for Mail Settings

MailSettings: Unveil /res in mail settings, fix GML

MailSettings: Mail settings texteditor->textbox

MailSettings: Update mail username to correct category in settings

Modified Mail settings GML to properly represent ports >100

MailSettings: Update/fix mail settings GML

MailSettings: Adjust GML, add icons for mail settings

MailSettings: Change Okay button to OK

MailSettings: Change mail setting reset button to revert

MailSettings: Fix incorrect variable names in mail settings

MailSettings: Add newlines af EOF of all mail setting files

MailSettings: Mail settings linting issues fixed

MailSettings: Increase size of icon features
Code cleaning/styling changes as per gunnarbeutner review
Made settings descriptions more friendly per sin-ack review

MailSettings: Fixes as per PR comments

MailSettings: Fix checkbox weirdness

MailSettings: Adjust width of checkbox

MailSettings: Remove unneccessary update() call

MailSettings: Replace port SpinBox with ComboBox

MailSettings: Add colons to labels, remove port 110 option

MailSettings: Remove custom model, use ItemListModel

MailSettings: Change relative icon paths to absolute ones
2021-07-30 20:47:31 +02:00
Thomas Wagenveld
1bfd405353 Documentation: Update instructions for Debian
Simply adding a 'testing' repo on a Debian stable system is destructive
to the system. Add better hints on building Serenity on Debian.
2021-07-30 19:00:46 +02:00
Brian Gianforcaro
7fce0693a5 Prekernel: Disable KASAN, so it has no effect when enabled
I was working on some more KASAN changes and realized the system
no longer links when passing -DENABLE_KERNEL_ADDRESS_SANITIZER=ON.

Prekernel will likely never have KASAN support given it's limited
environment, so just suppress it's usage.
2021-07-30 16:58:09 +02:00
Andreas Kling
25b76462bf Revert "Kernel: Share committed COW pages between whole VMObject lineage"
This reverts commit 2c0df5e7e7.

This caused OOM on CI, so let's roll it back until we can figure it out.
2021-07-30 13:50:24 +02:00
Sam Atkins
5de7775d22 Browser: Show a message when attempting to search with no search engine
Previously, it just showed an error message saying that "" failed to
load, which made me think that search engines were broken.
2021-07-30 13:38:20 +02:00
FrHun
c88756078a LibGfx: Refactor Point.constrain to use AK 2021-07-30 13:21:27 +02:00
FrHun
cc829ed9d2 LibGui: Add bounding of rubber band to IconView
This ensures the selection rubber band in icon views stays within the
visible area.
2021-07-30 13:21:27 +02:00
Andreas Kling
2c0df5e7e7 Kernel: Share committed COW pages between whole VMObject lineage
When cloning an AnonymousVMObject, committed COW pages are shared
between the parent and child object. Whicever object COW's first will
take the shared committed page, and if the other object ends up doing
a COW as well, it will notice that the page is no longer shared by
two objects and simple remap it as read/write.

When a child is COW'ed again, while still having shared committed
pages with its own parent, the grandchild object will now join in the
sharing pool with its parent and grandparent. This means that the first
2 of 3 objects that COW will draw from the shared committed pages, and
3rd will remap read/write.

Previously, we would "fork" the shared committed pages when cloning,
which could lead to a situation where the grandparent held on to 1 of
the 3 needed shared committed pages. If both the child and grandchild
COW'ed, they wouldn't have enough pages, and since the grandparent
maintained an extra +1 ref count on the page, it wasn't possible to
to remap read/write.
2021-07-30 13:17:55 +02:00
Andreas Kling
bccdc08487 Kernel: Unmapping a non-mapped region with munmap() should be a no-op
Not a regression per se from 0fcb9efd86
since we were crashing before that which is obviously worse.
2021-07-30 13:16:55 +02:00
Brian Gianforcaro
c9395d7e9a Tests: Validate unmapping 0x0 doesn't crash the Kernel
Previously unmapping any offset starting at 0x0 would assert in the
kernel, add a regression test to validate the fix.

Co-authored-by: Federico Guerinoni <guerinoni.federico@gmail.com>
2021-07-30 11:28:55 +02:00
Brian Gianforcaro
0fcb9efd86 Kernel: Return an error when unmap finds no intersecting region
We currently always crash if a user attempts to unmap a range that
does not intersect with an existing region, no matter the size. This
happens because we will never explicitly check to see if the search
for intersecting regions found anything, instead loop over the results,
which might be an empty vector. We then attempt to deallocate the
requested range from the `RangeAllocator` unconditionally, which will
be invalid if the specified range is not managed by the RangeAllocator.
We will assert validating m_total_range.contains(..) the range we are
requesting to deallocate.

This fix to this is straight forward, error out if we weren't able to
find any intersections.

You can get stress-ng to attempt this pattern with the following
arguments, which will attempt to unmap 0x0 through some large offset:

```
stress-ng --vm-segv 1
```

Fixes: #8483

Co-authored-by: Federico Guerinoni <guerinoni.federico@gmail.com>
2021-07-30 11:28:55 +02:00
Linus Groh
e7c5c3d507 LibJS: Implement Temporal.PlainTime.prototype.getISOFields() 2021-07-30 09:41:11 +01:00
Linus Groh
c7bef42975 LibJS: Implement Temporal.PlainDate.prototype.getISOFields() 2021-07-30 09:41:11 +01:00
Luke
dc34cbe28b Ports: Update curl to 7.78.0 2021-07-30 10:23:33 +02:00
Karol Kosek
c126ffa9b8 LibGfx: Use correct variable size on bitmap to buffer convertion
The issue was that size_in_bytes() returns size_t, but the buffer used
a size of the unsigned for itself, which only matched on 32-bit
systems and caused an assert error otherwise.

This fixes a crash on drag in FileManager on non 32-bit systems!
2021-07-30 10:14:07 +02:00
Idan Horowitz
d1ee31c5de LibJS: Implement Temporal.PlainTime.prototype.toPlainDateTime 2021-07-29 22:47:56 +01:00
Idan Horowitz
8f9b4a5ea6 LibJS: Implement Temporal.PlainDateTime.prototype.inLeapYear 2021-07-29 22:47:56 +01:00
Idan Horowitz
b9ed19c850 LibJS: Implement Temporal.PlainDateTime.prototype.monthsInYear 2021-07-29 22:47:56 +01:00
Idan Horowitz
fb5c0ed0d0 LibJS: Implement Temporal.PlainDateTime.prototype.daysInYear 2021-07-29 22:47:56 +01:00
Idan Horowitz
2d86cbae45 LibJS: Implement Temporal.PlainDateTime.prototype.daysInMonth 2021-07-29 22:47:56 +01:00
Idan Horowitz
01d33174c8 LibJS: Implement Temporal.PlainDateTime.prototype.daysInWeek 2021-07-29 22:47:56 +01:00
Idan Horowitz
d4e9d572f5 LibJS: Implement Temporal.PlainDateTime.prototype.weekOfYear 2021-07-29 22:47:56 +01:00
Idan Horowitz
0800c2a958 LibJS: Implement Temporal.PlainDateTime.prototype.dayOfYear 2021-07-29 22:47:56 +01:00
Idan Horowitz
c41b7b27c9 LibJS: Implement Temporal.PlainDateTime.prototype.dayOfWeek 2021-07-29 22:47:56 +01:00
Idan Horowitz
518a9f3eab LibJS: Implement Temporal.PlainDateTime.prototype.nanosecond 2021-07-29 22:47:56 +01:00
Idan Horowitz
23bf840326 LibJS: Implement Temporal.PlainDateTime.prototype.microsecond 2021-07-29 22:47:56 +01:00
Idan Horowitz
b2f66a06ac LibJS: Implement Temporal.PlainDateTime.prototype.millisecond 2021-07-29 22:47:56 +01:00
Idan Horowitz
3fdb314a39 LibJS: Implement Temporal.PlainDateTime.prototype.second 2021-07-29 22:47:56 +01:00
Idan Horowitz
6dd0815fad LibJS: Implement Temporal.PlainDateTime.prototype.minute 2021-07-29 22:47:56 +01:00
Idan Horowitz
f553ab3104 LibJS: Implement Temporal.PlainDateTime.prototype.hour 2021-07-29 22:47:56 +01:00
Idan Horowitz
f93b6ea58c LibJS: Implement Temporal.PlainDateTime.prototype.day 2021-07-29 22:47:56 +01:00
Idan Horowitz
677a631e87 LibJS: Implement Temporal.PlainDateTime.prototype.monthCode 2021-07-29 22:47:56 +01:00
Idan Horowitz
78e63b34fa LibJS: Implement Temporal.PlainDateTime.prototype.month 2021-07-29 22:47:56 +01:00
Idan Horowitz
23d0fd2659 LibJS: Implement Temporal.PlainDateTime.prototype.year 2021-07-29 22:47:56 +01:00
sin-ack
667124dc22 LibGUI: Do not wrap text in statusbar segments
This commit adds a new property to Label which allows one to enable or
disable text wrapping. Statusbar now uses this property to disable text
wrapping in its segments, since text wrapping in statusbars doesn't make
sense.
2021-07-29 22:33:34 +01:00
sin-ack
1e44a0c2d9 LibCore: Support registration of TextWrapping properties
This is basically a named boolean.
2021-07-29 22:33:34 +01:00
Andrew Kaster
07a3830036 CI: Use updated libjs-test262 build workflows
After linusg/libjs-test262/pull/30 goes into libjs-test262, we'll need
to pass SERENITY_SOURCE_DIR manually to the job to prevent it from
trying to do its own shallow clone. Also, remove the now defunct static
library build from the test262 workflow.
2021-07-29 21:46:25 +01:00
Andrew Kaster
32d076ef54 Lagom: Add proper install rules
Create the proper export files to allow Lagom to be a well-behaved
ExternalProject, based on the example project from the cmake-init
project generator here:

https://github.com/friendlyanon/cmake-init-shared-static
2021-07-29 21:46:25 +01:00
Linus Groh
7392a73066 Lagom: Exclude GMLAutocompleteProvider.cpp from GML library sources 2021-07-29 21:46:25 +01:00
Andrew Kaster
b6e5117f65 Lagom: Change to shared library build for all Lagom code
Split the Lagom build into shared libraries to match the Serenity build.

This reduces the cognitive load when trying to edit the Lagom CMakeLists
significantly. It also reduces the amount of source files that must be
compiled to run each test or host program significantly.

Also re-organize all the build rules into sections. And reorganize the
CMakeLists file in general.
2021-07-29 21:46:25 +01:00
Andrew Kaster
38707f4a20 LibUnicode: Make unicode data generation logic more relocatable
The previous logic had several checks for Lagom directories and
subdirectories. All we really want to do for these header checks is make
sure that the files end up in an included folder prefixed with
LibUnicode. We also don't need to hard code the path to the generator,
the $<TARGET_FILES> generator expression can create the path for us.
2021-07-29 21:46:25 +01:00
Andrew Kaster
de2bf3f333 Meta/LibTest: Build object libraries for test main files
By using the power of object libraries and $<TARGET_OBJECTS> we can make
sure to only build TestMain.cpp and JavaScriptTestRunnerMain.cpp once.

Previously we built these cpp files into object files once for every
single test executable. This change reduces the number of total compile
jobs in a Serenity target build by around 100.
2021-07-29 21:46:25 +01:00
Andrew Kaster
af9be6e093 LibTTF/LibGfx: Remove circular dependency by merging LibTTF into LibGfx
LibTTF has a concrete dependency on LibGfx for things like Gfx::Bitmap,
and LibGfx has a concrete dependency in the TTF::Font class in
Gfx::FontDatabase. This circular dependency works fine for Serenity and
Lagom Linux builds of the two libraries. It also works fine for static
library builds on Lagom macOS builds.

However, future changes will make Lagom use shared libraries, and
circular library dependencies are not tolerated in macOS.
2021-07-29 21:46:25 +01:00
Faeliore
08ddfb30d7 Base: Remove coffee theme height and width metrics 2021-07-29 21:27:24 +01:00
Faeliore
9fff0c77dc Base: Make coffee theme icons smaller so they fit in the title bar
Fixes #4713
2021-07-29 21:27:24 +01:00
Luke
999448066f Ports: Update bash to 5.1.8
Also switches to using a sha256 signature check.
2021-07-29 19:35:03 +01:00