Commit graph

32980 commits

Author SHA1 Message Date
Timothy Flynn
d51d5f9591 FontEditor: Retrieve code point abbreviations from LibUnicode
Rather than using a hard-coded list from AK::UnicodeUtils, LibUnicode
contains the up-to-date official names and contains abbreviations for
more control code points.
2022-01-18 15:13:25 +00:00
Timothy Flynn
701b7810ba LibUnicode: Generate code point abbreviations 2022-01-18 15:13:25 +00:00
Timothy Flynn
444b2d9ec2 LibJS: Implement UTF-16 surrogate pair concatenation without iteration
Performance of string concatenation regressed in a57e2f9. That commit
iterates over the LHS string to find the last code unit, to check if it
is a high surrogate. Instead, first look at the 3rd-to-last byte in the
UTF-8 encoded string to check if it is a 3-byte code point; then decode
just those bytes to check if we have a high surrogate. Similarly, check
the first 3 bytes of the RHS string to check if we have a low surrogate.
2022-01-18 09:46:55 +00:00
Pankaj Raghav
567b3a4810 Kernel: Add individual struct definitions for NVMeSubmission
Only a generic struct definition was present for NVMeSubmission. To
improve type safety and clarity, added an union of NVMeSubmission
structs that are applicable to the command being submitted.
2022-01-18 11:37:04 +02:00
Pankaj Raghav
ba7846647c Kernel: Fix m_ready_timeout calculation in NVMe
The CAP.TO is 0 based. Even though I don't see that mentioned in the
spec explicitly, all major OSs such as Linux, FreeBSD add 1 to the
CAP.TO while calculating the timeout.
2022-01-18 11:37:04 +02:00
Pankaj Raghav
3441eac960 Kernel: Remove delay during NVMe reset and start controller
IO::delay was added as a lazy alternative to looping with a timeout
error if the condition was not satisfied. Now that we have the
wait_for_ready function, remove the delay in the reset and start
controller function.
2022-01-18 11:37:04 +02:00
Pankaj Raghav
31c4c9724b Kernel: Add UNMAP_AFTER_INIT to NVMe member functions
NVMeController, NVMeQueue and NVMeNameSpace had functions which are not
used after init. So add them to UNMAP_AFTER_INIT section.
2022-01-18 11:37:04 +02:00
Rummskartoffel
487377d1d7 disasm: Don't fail when trying to disassemble empty files
Given an empty file, disasm would try to create a zero-size memory
mapping of that file, which would fail with EINVAL.
2022-01-18 09:08:14 +01:00
Rummskartoffel
0aa5725f72 disasm: Convert to east-const and C++-style casts 2022-01-18 09:08:14 +01:00
Marcus Nilsson
28a2a01dc3 LibGUI: Use autoscroll from AbstractView when rubberbanding in IconView
We can re-use the logic used for automatic scrolling in AbstractView
when we're doing rubberband scrolling in IconView. This removes some
duplicated code.
2022-01-18 09:04:50 +01:00
Brian Gianforcaro
89592601b6 HackStudio: Hookup git commit message detection and highlighting 2022-01-18 09:01:16 +01:00
Brian Gianforcaro
974e36e7a9 TextEditor: Hookup git commit message detection and highlighting 2022-01-18 09:01:16 +01:00
Brian Gianforcaro
8e8d24fe29 LibGUI: Add a GitCommit SyntaxHighlighter implementation
This highlighter just syntax highlights the commented lines in your git
commit message. It could potentially be enhanced to handle the rebase
UI or other more advanced cases in the future.
2022-01-18 09:01:16 +01:00
Brian Gianforcaro
d32736582e LibSyntax: Add a language enum entry for git commit messages 2022-01-18 09:01:16 +01:00
Brian Gianforcaro
413d8ccd5f Playground: Enable line numbers in the GML editor
Most folks expect line numbers when editing code, so lets enable them in
when editing GML in the Playground app.
2022-01-18 09:00:27 +01:00
Brian Gianforcaro
bcfc87fcc2 Ports: Add a port of tig 2.5.5 2022-01-18 08:50:40 +01:00
Brian Gianforcaro
3fdc2d8dcf Ports/readline: Fix config.sub refresh for the readline port
The new `use_fresh_config_sub` option puts the config.sub in the root of
the tree, but `readline` puts it in the `support/` folder. So we need to
tell the ports infrastructure to place the file in that folder.
2022-01-18 08:50:40 +01:00
Brian Gianforcaro
4bf88bb732 Kernel: Fix typo in Socket::getsockopt tracing 2022-01-18 08:47:22 +01:00
Lady Gegga
ac11e646d0 Base: Add emojis to PUA codepoints
Yaks! 10CD00-10CDFF
https://serenityos.net/~xexxa/10CD
2022-01-17 20:48:49 -08:00
Timothy Flynn
a57e2f9a76 LibJS: Combine UTF-16 surrogate pairs when concatenating strings
In the following use case:

    "\ud834" + "\udf06"

We were previously combining these as two individual code points. When
concatenating strings, we must take care to combine the high surrogate
from the left-hand side with the low surrogate from the right-hand side.
2022-01-18 00:49:16 +00:00
Lady Gegga
ab02e3981e EmojiInputDialog: Increase size of buttons and dialog
Display some emojis earlier hidden behind "..." and add spacing.
2022-01-18 00:27:29 +00:00
Jesse Buhagiar
865e7bbe5e LibGL+LibSoftGPU+3DFileViewer: Implement Specular highlighting :^) 2022-01-18 01:48:51 +02:00
Jesse Buhagiar
5bb8c14c8f LibGL+LibSoftGPU: Remove unused variable specular_exponent
This was a duplicate of the `Material::shininess` variable.
2022-01-18 01:48:51 +02:00
Jesse Buhagiar
5a735602b0 LibSoftGPU: Add sgi_dot lambda
This function is used quite a bit during the lighting calculations, so
it's a bit cleaner having it in a centralized spot instead of just
arbitrarily calling `dot()` with numerous `FloatVector3` conversions.
2022-01-18 01:48:51 +02:00
Jesse Buhagiar
fc8dd0bf68 LibSoftGPU: Use correct position for vertex_to_light
The spec has a few stipulations on what this value should actually be,
and hence we should follow it accordingly.
2022-01-18 01:48:51 +02:00
Jesse Buhagiar
38fc7361ca LibGfx: Add ::xyz() swizzle operator to Vector4 2022-01-18 01:48:51 +02:00
Jesse Buhagiar
53ed93d909 LibGfx: Add unary operator-() to Vector2/3/4 2022-01-18 01:48:51 +02:00
Idan Horowitz
27ca7bbbd7 LibJS: Make parseFloat slightly more specification-compliant 2022-01-17 14:46:07 +00:00
Idan Horowitz
de2f5bb5a7 LibJS: Rewrite parseInt to be more specification-compliant 2022-01-17 14:46:07 +00:00
Idan Horowitz
877ae85017 LibJS+LibUnicode: Make static const Utf8View variables constexpr 2022-01-17 14:46:07 +00:00
Idan Horowitz
4774bed589 AK: Make Utf8View constexpr-constructible 2022-01-17 14:46:07 +00:00
Idan Horowitz
d5507191a9 LibJS: Implement the TrimString Abstract Operation
This was already implemented and duplicated across the
String.prototype.trim{, Start, End} methods, so this simply extracts it
into a separate method that can also be used by other users.
2022-01-17 14:46:07 +00:00
Jelle Raaijmakers
8f33e55726 LibSoftGPU: Add stencil statistic to debug overlay 2022-01-17 12:49:00 +01:00
Jelle Raaijmakers
34a0f790a2 LibGL: Use number of lights from stored device info 2022-01-17 12:49:00 +01:00
Jelle Raaijmakers
11c807ebd1 LibGL+LibSoftGPU: Implement the stencil buffer
This implements an 8-bit front stencil buffer. Stencil operations are
SIMD optimized. LibGL changes include:

* New `glStencilMask` and `glStencilMaskSeparate` functions
* New context parameter `GL_STENCIL_CLEAR_VALUE`
2022-01-17 12:49:00 +01:00
Jelle Raaijmakers
6386671944 LibGL: Convert stencil front/back function and operation to Arrays 2022-01-17 12:49:00 +01:00
Jelle Raaijmakers
3609ffc450 LibGL+LibSoftGPU: Enumize material front/back face selection 2022-01-17 12:49:00 +01:00
Brian Gianforcaro
64dfb3a28f Base: Add icons to man pages for GUI applications
Differentiate GUI applications in man pages with icons.

This is the revert of the revert commit, now that the icon processing
was fixed in 89c0f84a28.
Revert: dae298e9df
Original: 74238d0aba

Co-authored-by: electrikmilk <brandonjordan124@gmail.com>
2022-01-17 03:38:54 -08:00
Tobias Christiansen
89c0f84a28 Meta: Add icons to online man pages
Previously all the added icons weren't available in the online version
of the man pages. This patch adds functionality to copy all the used
icons over when assembling the HTML version.
2022-01-17 02:22:33 -08:00
Tobias Christiansen
76563c56dd Base: Remove file:// prefix from image 2022-01-17 02:22:33 -08:00
Dmitry Petrov
19c2b96b0c Documentation: Update qt creator guide to have up to date paths 2022-01-17 11:18:19 +01:00
Ali Mohammad Pur
63b02859bc Meta+Ports: Make 'package.sh showproperty' report multiple properties
And use that to avoid shelling out multiple times for checking
properties in lint-ports.py.
2022-01-17 11:17:15 +01:00
Brian Gianforcaro
7a26f6523a Ports/git: Update git to the latest 2.34.1 release 2022-01-17 11:17:15 +01:00
Brian Gianforcaro
d20c5da0da Meta: Optimized lint-ports.py by avoiding duplicate execs of package.sh
The way that lint-ports.py obtains the ports properties is unfortunately
very process intensive. You have to execute `./package.sh showproperty`
once for each property, for each port. Resulting in hundreds of
executions.

We were doing this work twice in both `check_package_files()` and in
`read_port_dirs()`. This resulted in a runtime of around ~10 seconds on
my machine. Removing the duplicate work and allowing the other code path
to utilize the to use the cached properties brought the runtime down to
~5 seconds on my machine.
2022-01-17 11:17:15 +01:00
Brian Gianforcaro
4b2bbe6a7e Meta: Skip shellcheck for Ports in pre-commit hook
Shellcheck barfs on many of the patterns we use in port scripts, the
check is already disabled when we run the script in CI, so we might as
well disable the check for pre-commit as well.
2022-01-17 11:17:15 +01:00
Brian Gianforcaro
d08a1aae63 Kernel: Remove non existent friend class from Process.h
clang-tidy correctly flagged that ProcFSProcessOpenFileDescriptions
does not exist.
2022-01-17 11:17:04 +01:00
Brian Gianforcaro
dae298e9df Revert "Base: Add icons to man pages for GUI applications"
This reverts commit 74238d0aba.
2022-01-17 00:47:01 -08:00
electrikmilk
74238d0aba Base: Add icons to man pages for GUI applications
Differentiate GUI applications in man pages with icons.
2022-01-16 22:41:31 -08:00
Thijs Waalen
6210f62b1d readelf: Fall back to default interpreter path on empty path
This fixes readelf failing to map the interpreter for dynamic
libraries. When an ELF does not have the PT_INTERP header the
StringView will be of the inline capacity of the StringBuilder, not a
null StringView. This would cause readelf not to fallback on the
default interpreter path.
2022-01-16 22:36:06 -08:00
Tom
a9ec0c30eb WindowServer: Pick font with glyphs for digits for ScreenNumberOverlay
We want to make sure we pick a font that has at least glyphs defined
for all the digits that we may need to display.
2022-01-17 02:10:09 +01:00