Commit graph

32950 commits

Author SHA1 Message Date
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
electrikmilk bd9c4a6de5 Base: Add more emojis 2022-01-16 15:26:34 -08:00
flyingwombat921 ed271aa7c5 Documentation: Swap 'Right' and 'Wrong' code practice 2022-01-16 15:16:44 -08:00
Daniel Bertalan 6e00dd64a1 Tests: Test whether stdio streams are flushed correctly on exit 2022-01-16 14:59:21 -08:00
Daniel Bertalan a1dfa1efb2 LibC: Flush all file streams on exit
The POSIX standard specifies the following:

> If the main() function returns to its original caller, or if the
> exit() function is called, all open files are closed (hence all output
> streams are flushed) before program termination.

This means that flushing `stdin` and `stdout` only is not enough, as the
program might have pending writes in other file buffers too.

Now that we support `fflush(nullptr)`, we call that in `exit()` to flush
all streams. This fixes one of bash's generated headers not being
written to disk.
2022-01-16 14:59:21 -08:00
Daniel Bertalan 6a6dbf5b0b LibC: Implement fflush(nullptr)
This caused all open file streams to be flushed.

This commit also changes `FILE::create` to handle buffer allocation
failure gracefully.
2022-01-16 14:59:21 -08:00
Andreas Kling b4e864d02d Kernel: Make Process::m_list_node non-mutable
The mutable keyword was not achieving anything, so let's remove it.
2022-01-16 23:31:01 +01:00
Andreas Kling df34f7b90b Kernel: Use an IntrusiveRedBlackTree for kernel regions
We were already using a non-intrusive RedBlackTree, and since the kernel
regions tree is non-owning, this is a trivial conversion that makes a
bunch of the tree operations infallible (by being allocation-free.) :^)
2022-01-16 23:31:01 +01:00
thankyouverycool 66e72ed5e6 LibGUI: Allow selecting glyphs by dragging in GlyphMapWidget 2022-01-16 21:36:39 +01:00
thankyouverycool c094bb60bc FontEditor: Set GlyphEditor glyph on initialization
Fixes GlyphEditor appearing blank on start and subsequent
re-initializations.
2022-01-16 21:36:39 +01:00
thankyouverycool 8f60ea4470 FontEditor: Disambiguate save function from save-as action 2022-01-16 21:36:39 +01:00
thankyouverycool c2b7bbbb2c FontEditor: Update GlyphEditor and width widgets on paste and delete
Fixes unsynced state between widgets after paste and delete actions.
2022-01-16 21:36:39 +01:00
thankyouverycool 7d7f683715 FontEditor: Correct GroupBox height
Font Metadata's GroupBox height was off by an _unsightly_ 2 pixels.
Now we make heights explicit for all child widgets and let shrink_to_fit
automatically calculate things.
2022-01-16 21:36:39 +01:00
thankyouverycool 24bd2a427c FontEditor: Calculate GlyphEditor toolbar widths more precisely
Fixes pixel imperfect toolbar widths when editing small fonts.
2022-01-16 21:36:39 +01:00
thankyouverycool 2e849250eb FontEditor: Remove unnecessary call during GlyphEditor init
GlyphEditor's relative rect is automatically set during layout.
2022-01-16 21:36:39 +01:00
thankyouverycool ff42ad88ee FontEditor: Remove .gitignore artifact from old build system 2022-01-16 21:36:39 +01:00
creator1creeper1 326c6130a5 Kernel: Don't access directory table of uninitialized PageDirectory
PageDirectory gets initialized step-by-step in
PageDirectory::try_create_for_userspace(). This initialization may fail
anywhere in this function - for example, we may not be able to
allocate a directory table, in which case
PageDirectory::try_create_for_userspace() will return a null pointer.
We recognize this condition and early-return ENOMEM. However, at this
point, we need to correctly destruct the only partially initialized
PageDirectory. Previously, PageDirectory::~PageDirectory() would assume
that the object it was destructing was always fully initialized. It now
uses the new helper PageDirectory::is_cr3_initialized() to correctly
recognize when the directory table was not yet initialized. This helper
checks if the pointer to the directory table is null. Only if it is not
null does the destructor try to fetch the directory table using
PageDirectory::cr3().
2022-01-16 12:08:57 -08:00
electrikmilk 3a6d4d14e1 Base: Add some symbols to Katica
Adds 20A0—20CF, 20D0—20FF, and 2150—218F to Katica.
2022-01-16 12:04:41 -08:00
Idan Horowitz 2297d0b4bf LibJS: Rewrite the Encode AO to handle unpaired UTF-16 surrogates 2022-01-16 19:31:59 +01:00
Idan Horowitz be9cbd428e LibJS: Check validity of encoded unicode code points in the Decode AO
As required by the specification:
7. If Octets does not contain a valid UTF-8 encoding of a Unicode code
point, throw a URIError exception.
2022-01-16 19:31:59 +01:00
Ali Mohammad Pur afabfc1964 Ports: Correct the config.sub path for freetype
This regressed in cdd6d68, setting the correct path makes it build
again.
2022-01-16 19:57:37 +03:30
Marcus Nilsson 8b39ec7c18 SystemMonitor: Don't display empty CPU graphs when number of CPUs < 4
When we have less than 4 CPUs we don't need to display a whole row of
CPU graphs.
2022-01-16 15:04:40 +01:00
davidot a5b11f7484 LibJS: Fix that '_' no longer accessed the last value in the REPL
This is now also not a concept that VM knows about and handled
completely by the REPL.
2022-01-16 14:57:12 +01:00
Linus Groh 30af8121ce LibJS: Fix value of Generator.prototype.constructor
The spec says:

    27.5.1.1 Generator.prototype.constructor
    https://tc39.es/ecma262/#sec-generator.prototype.constructor

    The initial value of Generator.prototype.constructor is
    %GeneratorFunction.prototype%.

But we had it set to %GeneratorFunction% (the GeneratorFunction
constructor).
2022-01-16 14:50:22 +01:00
Linus Groh 4ed49e05a9 LibJS: Rename GeneratorObjectPrototype to GeneratorPrototype
Given we usually call objects Foo{Object,Constructor,Prototype} or
Foo{,Constructor,Prototype}, this name was an odd choice.
The new one matches the spec better, which calls it the "Generator
Prototype Object", so we simply omit the Object suffix as usual as it's
implied.
2022-01-16 14:50:22 +01:00
Kenneth Myhra b76c66a9ed groupadd: Port to LibMain and use the new Core::Group abstraction :^) 2022-01-16 11:19:07 +01:00
Kenneth Myhra a99b50ce8c LibCore: Add Core::Group abstraction for group management :^)
This adds the Core::Group C++ abstraction to ease interaction with the
group entry database, as well as represent the Group entry.

Core::Group abstraction currently contains the following functionality:
- Add a group entry - 'Core::Group::add_group()'
2022-01-16 11:19:07 +01:00
Michel Hermier adfdb63e02 LibC: Fix scandir not checking for allocation failure 2022-01-16 11:18:04 +01:00
Michel Hermier 1af072e0f3 LibC: Make *alloc return NULL in case of failure (POSIX) 2022-01-16 11:18:04 +01:00
Michel Hermier 3bf89f1859 LibC: Document some posix *alloc urls 2022-01-16 11:18:04 +01:00
Michel Hermier cb3cc6ec27 AK: Remove kfree definition 2022-01-16 11:18:04 +01:00