Commit graph

12083 commits

Author SHA1 Message Date
Hendiadyoin1
5885e70df7 LibRegex: Remove some meaningless/useless const-qualifiers
Also replace String creation from `""` with `String::empty()`
2021-12-21 18:17:28 -08:00
Hendiadyoin1
ca69ded9a5 LibRegex: Collapse some if(...) return true; else return false; blocks 2021-12-21 18:17:28 -08:00
Hendiadyoin1
a2563496f5 LibRegex: Remove some else-after-returns 2021-12-21 18:17:28 -08:00
Hendiadyoin1
b674de6957 LibRegex: Add some implied auto qualifiers 2021-12-21 18:17:28 -08:00
Brian Gianforcaro
1fdd1915c2 LibC: Add POSIX spec comments for stat APIs 2021-12-21 18:16:48 -08:00
Brian Gianforcaro
890fba95f7 LibC: Add POSIX spec comments for posix_spawn APIs 2021-12-21 18:16:48 -08:00
Brian Gianforcaro
6fe71970f5 LibC: Add POSIX spec comments for signal APIs 2021-12-21 18:16:48 -08:00
Brian Gianforcaro
ea355fbf17 LibC: Add POSIX spec comments for search APIs 2021-12-21 18:16:48 -08:00
Brian Gianforcaro
140a544051 LibC: Add POSIX spec comments for stdio APIs 2021-12-21 18:16:48 -08:00
Brian Gianforcaro
7fd1de01a7 LibC: Add POSIX spec comments for stdlib APIs 2021-12-21 18:16:48 -08:00
Brian Gianforcaro
11a12c2312 LibC: Add POSIX spec comments for string APIs 2021-12-21 18:16:48 -08:00
Brian Gianforcaro
0f53e0aaea LibC: Add POSIX spec comments for sched APIs 2021-12-21 18:16:48 -08:00
Brian Gianforcaro
6db9b6cf79 LibC: Add POSIX spec comments for qsort 2021-12-21 18:16:48 -08:00
Brian Gianforcaro
e9c46a23c8 LibC: Add POSIX spec comments for select APIs 2021-12-21 18:16:48 -08:00
Brian Gianforcaro
5568aee35f LibC: Add POSIX spec comments for memory management APIs 2021-12-21 18:16:48 -08:00
Brian Gianforcaro
4484634d8a LibC: Add POSIX spec comments for socket APIs 2021-12-21 18:16:48 -08:00
Brian Gianforcaro
3c897d0443 LibC: Add POSIX spec comments for poll 2021-12-21 18:16:48 -08:00
Brian Gianforcaro
954fa724b3 LibPthread: Add POSIX spec comments to our implementations 2021-12-21 18:16:48 -08:00
Linus Groh
e4bba2fab9 LibGfx: Keep alpha value of previous pixel for QOI_OP_RGB chunk
I accidentally skipped this part of the spec in the QOI decoder:

> The alpha value remains unchanged from the previous pixel.

This led to incorrect rendering of some images with transparency,
visible in form of a horizontal line of non-transparent pixels (that
shouldn't exist), e.g. for the following chunk sequence:

- QOI_OP_RGBA with alpha = 0
- QOI_OP_RGB
- QOI_OP_RUN

The QOI_OP_RGB should 'inherit' the alpha value of the previous
QOI_OP_RGBA chunk, instead of always setting it to 255.
I'm unsure why the encoder added the QOI_OP_RGB chunk to the specific
image where the bug was noticed in the first place - they effectively
both had fully transparent color values.
2021-12-22 01:12:51 +01:00
r00ster91
b6d921f682 PixelPaint: Refactor falloff computation and extend hardness range 2021-12-21 13:52:55 -08:00
Luke Wilde
7fae46361b LibWeb: Fix null-deref in <table> delete_row with index = -1 and no rows
This wasn't quite following what the spec says for step 2:
"If index is −1, then remove the last element in the rows collection
from its parent, or do nothing if the rows collection is empty."

It was behaving like:
"If index is −1 and the rows collection is not empty, then remove the
last element in the rows collection from its parent."

Which is not the same, as it will fall into the "Otherwise" if
`index == -1` and the rows collection is empty and try and get the -2nd
element of the rows.

Found with Domato.
2021-12-21 13:51:15 -08:00
Luke Wilde
54454952e0 LibWeb: Capture <script> element's node document on execution
Step 1 of the spec is to capture the <script> element's node document
into a local variable.

When I originally implemented this, I thought this was not necessary.
However, I realised that the script that runs can adopt the current
script element into a different document, meaning step 5.4 and 6 then
operate on the incorrect document.

Covered by this WPT: 7b0ebaccc6/html/semantics/scripting-1/the-script-element/moving-between-documents-during-evaluation.html
2021-12-21 13:50:00 -08:00
creator1creeper1
cacac7927b Calculator: Construct KeypadValue precisely from the Clipboard contents
Previously, we would use lossy strtod() conversion. This was bad,
especially since we switched from internally storing Calculator
state in a double to storing it in the KeypadValue class
some time ago. This commit adds a constructor for the KeypadValue
class that is not lossy by using strtoll(). It handles numbers
with and without decimal points as well as negative numbers
correctly.
2021-12-21 13:22:12 -08:00
Michel Hermier
7ea3d40e19 LibCore: Unconditionally report error in EventLoop::wait_for_event
When `select` fails and `VERIFY_NOT_REACHED()` is reached, it is wise
to always have a trace of what went wrong.
2021-12-21 13:15:17 -08:00
Nick Johnson
08e4a1a4dc AK+Everywhere: Replace __builtin bit functions
In order to reduce our reliance on __builtin_{ffs, clz, ctz, popcount},
this commit removes all calls to these functions and replaces them with
the equivalent functions in AK/BuiltinWrappers.h.
2021-12-21 22:13:51 +01:00
Xavier Defrang
26bb3e1acf chmod+mkdir: Use convert_to_uint_from_octal 2021-12-21 13:13:04 -08:00
Xavier Defrang
6ca34f5647 mkdir: Implement --mode option
Only supports permissions given in octal format
at the moment.
2021-12-21 13:13:04 -08:00
Xavier Defrang
1255316d26 mkdir: Use LibMain 2021-12-21 13:13:04 -08:00
Astraeus-
9971bb0b05 Profiler: Add horizontal_scrollbar height to initial_height
This prevents the scrollbar from covering the TimelineTrack
when there is one
2021-12-21 22:10:33 +01:00
Ali Mohammad Pur
b8f03bb072 LibRegex: Make append_alternation() significantly faster
...by flattening the underlying bytecode chunks first.
Also avoid calling DisjointChunks::size() inside a loop.
This is a very significant improvement in performance, making the
compilation of a large regex with lots of alternatives take only ~100ms
instead of many minutes (I ran out of patience waiting for it) :^)
2021-12-21 22:10:07 +01:00
Ali Mohammad Pur
66249612d6 LibRegex: Avoid calling DisjointChunks::size() in get_opcode()
That method is O(n), and should generally be avoided.
2021-12-21 22:10:07 +01:00
Timothy Flynn
c417374dd6 LibUnicode: Remove linkage from LibUnicode to LibUnicodeData
LibUnicodeData can now be loaded dynamically at runtime.
2021-12-21 13:09:49 -08:00
Timothy Flynn
15e1498419 LibUnicode: Dynamically load the generated UnicodeDateTimeFormat symbols 2021-12-21 13:09:49 -08:00
Timothy Flynn
a1f0ca59ae LibUnicode: Dynamically load the generated UnicodeNumberFormat symbols 2021-12-21 13:09:49 -08:00
Timothy Flynn
09be26b5d2 LibUnicode: Dynamically load the generated UnicodeLocale symbols 2021-12-21 13:09:49 -08:00
Timothy Flynn
3fd53baa25 LibUnicode: Dynamically load the generated UnicodeData symbols
The generated data for libunicodedata.so is quite large, and loading it
is a price paid by nearly every application by way of depending on
LibRegex. In order to defer this cost until an application actually uses
one of the surrounding APIs, dynamically load the generated symbols.

To be able to load the symbols dynamically, the generated methods must
have demangled names. Typically, this is accomplished with `extern "C"`
blocks. The clang toolchain complains about this here because the types
returned from the generators are strictly C++ types. So to demangle the
names, we use the asm() compiler directive to manually define a symbol
name; the caveat is that we *must* be sure the symbols are unique. As an
extra precaution, we prefix each symbol name with "unicode_". For more
details, see: https://gcc.gnu.org/onlinedocs/gcc/Asm-Labels.html

This symbol loader used in this implementation provides the additional
benefit of removing many [[maybe_unused]] attributes from the LibUnicode
methods. Internally, if ENABLE_UNICODE_DATABASE_DOWNLOAD is OFF, the
loader is able to stub out the function pointers it returns.

Note that as of this commit, LibUnicode is still directly linked against
LibUnicodeData. This commit is just a first step towards removing that.
2021-12-21 13:09:49 -08:00
Timothy Flynn
749d5ebd68 LibUnicode: Add missing forward declarations to forwarding header 2021-12-21 13:09:49 -08:00
Timothy Flynn
97508b74eb LibUnicode: Remove declaration of function which moved to another header
Unicode::get_number_system_symbol is declared in UnicodeNumberFormat and
defined in UnicodeNumberFormat.cpp.
2021-12-21 13:09:49 -08:00
Timothy Flynn
10a8b6d411 Userland: Add unveil/pledge requisites for dynamic Unicode data loading
Loading libunicodedata.so will require dlopen(), which in turn requires
mmap(). The 'prot_exec' pledge is needed for this.

Further, the .so itself must be unveiled for reading. The "real" path is
unveiled (libunicodedata.so.serenity) as the symlink (libunicodedata.so)
itself cannot be unveiled.
2021-12-21 13:09:49 -08:00
Jelle Raaijmakers
7fa2e792a8 LibGL: Simplify glDrawPixels checks and reduce debug spam 2021-12-21 12:58:58 -08:00
Jelle Raaijmakers
a1fb16e89c LibGL: Implement GL_POLYGON rendering
This is a deprecated feature that is still in use in some older games,
most notably Grim Fandango in ScummVM makes heavy use of it.

Luckily, since you can only draw convex polygons, the end result is
exactly the same as when you would have used `glBegin(GL_TRIANGLE_FAN)`
- so we just reuse that code as-is.
2021-12-21 12:58:58 -08:00
Jelle Raaijmakers
604eea5827 LibGL: Allow querying maximum matrix stack depths 2021-12-21 12:58:58 -08:00
Jelle Raaijmakers
18399d00fa LibGL: Implement matrix mode GL_TEXTURE
Implement support for the `GL_TEXTURE` matrix mode, the texture matrix
stack and texture coordinate matrix transformation.

Also, an unused `m_current_matrix` was removed to make room for
`m_texture_matrix`.
2021-12-21 12:58:58 -08:00
Jelle Raaijmakers
4703e8cbcf LibGL: Make texture coordinates a FloatVector4
In OpenGL, texture coordinates can have up to 4 values. This change
will help with easy application of texture coordinate matrix
transformations in the future.

Additionally, correct the initial value for texture coordinates to
`{ 0.f, 0.f, 0.f, 1.f}`.
2021-12-21 12:58:58 -08:00
Ali Mohammad Pur
ccb9cae8e9 LibC: Make WEOF a signed value on clang
The actual value is unchanged, but the previous `0xffffffff` was an
unsigned value, which lead to clang getting mad at `foowc() == WEOF`.
This commit makes it a signed int on clang, which *should* serve
the same purpose and not lead to clang getting mad at us.
2021-12-21 21:24:36 +03:30
Ali Mohammad Pur
0d7d2b825e LibC: Add POSIX spec links to all applicable wide character functions 2021-12-21 21:24:36 +03:30
Ali Mohammad Pur
0fdf52f6dd LibC: Define WCHAR_{MIN,MAX} 2021-12-21 21:24:36 +03:30
Ali Mohammad Pur
687a3351c2 LibC: Stub out wcsftime() 2021-12-21 21:24:36 +03:30
Ali Mohammad Pur
e717ca32d1 LibC: Implement ungetwc() 2021-12-21 21:24:36 +03:30
Ali Mohammad Pur
14b91a3fe9 LibC: Stub out some wscanf variants 2021-12-21 21:24:36 +03:30
Ali Mohammad Pur
f0709c7a24 LibC+AK: Implement all sorts of wprintf variants 2021-12-21 21:24:36 +03:30
Ali Mohammad Pur
db7a6d6e74 LibC: Implement f{get,put}ws() 2021-12-21 21:24:36 +03:30
Ali Mohammad Pur
bd9a22e7e7 LibC: Stub out fwide()
This is a mess, and I'd rather not perform checks on every single stdio
operation, so just make it a noop.
2021-12-21 21:24:36 +03:30
Ali Mohammad Pur
cb90856756 LibC: Implement {f,}putwc() 2021-12-21 21:24:36 +03:30
Ali Mohammad Pur
a4e8a09188 LibC: Implement getwchar() 2021-12-21 21:24:36 +03:30
Ali Mohammad Pur
cf17677206 LibC: Implement {f,}getwc() 2021-12-21 21:24:36 +03:30
Ali Mohammad Pur
3b281baf75 LibC: Implement wcs{,c}spn() 2021-12-21 21:24:36 +03:30
Ali Mohammad Pur
4f8d095f5a LibC: Sort the SOURCES entries in CMakeLists.txt 2021-12-21 21:24:36 +03:30
Ali Mohammad Pur
cacc3ee857 LibC: Switch to using east const in wchar.cpp 2021-12-21 21:24:36 +03:30
Linus Groh
a00a3fa1ef LibGfx: Remove 'QOIImageDecoderPlugin: ' prefix from error messages
What the component which did the actual decoding is called is not
relevant for the error, and would be rather distracting once we show
decoding error messages e.g. in ImageViewer (instead of just silently
failing).
Also makes them more consistent as many already don't include it - a
mistake which is now turned into a feature :^)
2021-12-21 17:37:10 +01:00
Luke Wilde
6d5531112f LibJS: Add TypedArray.prototype.@@iterator 2021-12-21 15:40:41 +01:00
Timothy Flynn
4fe47ed86e LibJS: Update spec link for InstallErrorCause AO 2021-12-21 14:56:28 +01:00
Timothy Flynn
d69f5ca128 LibJS: Update spec numbers for Operations on Objects AOs
The error cause proposal was merged, so some spec numbers were bumped.
2021-12-21 14:56:28 +01:00
Timothy Flynn
968f6e2432 LibJS: Define RegExp.prototype methods in spec order 2021-12-21 14:56:00 +01:00
Timothy Flynn
7ea85ed10b LibJS: Add spec comments to RegExp.prototype AOs
This also replaces an instance of TRY with MUST as the spec indicates
that step 35b of RegExpBuiltinExec cannot throw. Further, this moves
some lines of code around to align with the spec as best as we can,
though the end effect is the same.
2021-12-21 14:56:00 +01:00
Timothy Flynn
179ca9d058 LibJS: Add spec comments to RegExp.prototype.[flags, source, exec, test] 2021-12-21 14:56:00 +01:00
Timothy Flynn
4a915fc9fa LibJS: Add spec comments to RegExp.prototype.compile 2021-12-21 14:56:00 +01:00
Timothy Flynn
c6e2b03073 LibJS: Add spec comments to RegExp.prototype [ @@split ]
In doing so, this caught another erroneous ToObject invocation.
2021-12-21 14:56:00 +01:00
Timothy Flynn
cb901f70af LibJS: Add spec comments to RegExp.prototype [ @@search ] 2021-12-21 14:56:00 +01:00
Timothy Flynn
25b6e79238 LibJS: Add spec comments to RegExp.prototype [ @@replace ]
In doing so, this caught an erroneous ToObject invocation. In the one
spot that requires the value to be an object (the invocation to
LengthOfArrayLike), we know by then the value is an object because all
other possibilities have been handled.
2021-12-21 14:56:00 +01:00
Timothy Flynn
9f7c3e6cad LibJS: Add spec comments to RegExp.prototype [ @@matchAll ] 2021-12-21 14:56:00 +01:00
Timothy Flynn
5eb4d2e96e LibJS: Add spec comments to RegExp.prototype [ @@match ]
In doing so, this fixes a few minor issues:

1. We were accessing the "unicode" and "lastIndex" properties out of
   order. This is somewhat frequently tested by test262, but not in
   this case.

2. We were doing a Value::to_object() followed by Object::get(), rather
   than just Value::get() as the spec dictates.

3. We were TRYing a step (CreateDataPropertyOrThrow) that should never
   fail, and should have been a MUST.
2021-12-21 14:56:00 +01:00
Timothy Flynn
26294a2d27 LibJS: Convert a RegExp throw_exception to throw_completion
RegExpExec already returns a ThrowCompletionOr so this potentional error
should be a completion. RegExp.prototype [ @@replace ] is tripped up by
this mistake when implemented closer to the spec.
2021-12-21 14:56:00 +01:00
davidot
154ed3994c LibRegex: Parse capture group names according to the ECMA262 spec 2021-12-21 14:04:23 +01:00
davidot
733a70671b LibRegex: Disallow duplicate named capture groups in ECMA262 parser 2021-12-21 14:04:23 +01:00
davidot
be3b806487 LibJS: Parse assert clauses of in- and export statements
Based on proposal: https://tc39.es/proposal-import-assertions
Since imports are not supported yet this is not functional.
2021-12-21 14:04:23 +01:00
davidot
81312986fe LibJS: Disallow async generator functions called 'await' or 'yield' 2021-12-21 14:04:23 +01:00
davidot
c8e80690a7 LibJS: Don't treat yield after void as identifier in generator functions 2021-12-21 14:04:23 +01:00
davidot
a1308bfc60 LibJS: Make new lines in block comments reset line has token
Before this a closing html comment would not be treated as a comment if
directly following a block comment which was not the first token of its
first line.
2021-12-21 14:04:23 +01:00
davidot
45578f58dc LibJS: Allow super property lookup and new.target in static init blocks 2021-12-21 14:04:23 +01:00
Linus Groh
92672b1520 Meta: Add a fuzzer for the QOILoader 2021-12-21 13:27:27 +01:00
Linus Groh
67788641d3 LibWeb: Add a workaround to assign a proper mime type to QOI images 2021-12-21 13:27:27 +01:00
Linus Groh
0717e484f6 file: Add description & image details for image/x-qoi 2021-12-21 13:27:27 +01:00
Linus Groh
ae0d6ba72c LibCore: Add support for the image/x-qoi mime type
We can guess it both from the magic bytes 'qoif' or the file extension
'.qoi'. The mime type is made up, I don't think it has an official one
yet - using the 'x-' prefix should be fine though.
2021-12-21 13:27:27 +01:00
Linus Groh
0356ee95bc LibGfx: Add support for "The Quite OK Image Format" (QOI)
The spec had its first stable release today, so I figured we should
support it as well!
As usual, by using the regular LibGfx image decoder plugin architecture,
we immediately get support for it everywhere: ImageViewer, FileManager
thumbnails, PixelPaint, and (with a small change in the subsequent
commit) even the Browser :^)
2021-12-21 13:27:27 +01:00
Ali Mohammad Pur
ed9e7f1ad0 LibWasm: Tolerate modules with invalid sections and mark them as invalid
We should not crash, but rather just fail to verify them.
2021-12-21 05:03:44 +03:30
Ali Mohammad Pur
2db27be2df LibWasm: Make shown instruction names match the names in the spec 2021-12-21 05:03:44 +03:30
Ali Mohammad Pur
afa3d06ea6 LibWasm: Add a instruction_from_name getter 2021-12-21 05:03:44 +03:30
Ali Mohammad Pur
d471405caf LibWasm: Print the block type for structured arguments 2021-12-21 05:03:44 +03:30
Ali Mohammad Pur
76ed7f2b20 LibWasm: Fix silly typo in f32 reinterpret validation 2021-12-21 05:03:44 +03:30
Ali Mohammad Pur
fecbf0e03a LibWasm: Make blocks that take arguments actually work
Previously we were ignoring the actual parameters and setting the arity
to an incorrect value, which could cause crashes (or unexpected traps).
2021-12-21 05:03:44 +03:30
Ali Mohammad Pur
b5ca290605 LibWasm: Implement memory.init and passive mode data 2021-12-21 05:03:44 +03:30
Andreas Kling
5911d1c880 LibCore: Fix Lagom build of Core::System::utime() 2021-12-21 01:28:59 +01:00
Andreas Kling
7f5d060450 LibCore: Add missing <utime.h> include to System.h 2021-12-21 01:27:51 +01:00
Andreas Kling
bcd49ad834 touch: Port to LibMain :^) 2021-12-20 22:16:05 +01:00
Andreas Kling
db766d0972 LibMain: Print serenity_main() errors to the debug log
And let's make them red too, to help us notice them. :^)
2021-12-20 22:16:05 +01:00
Andreas Kling
bd8f10db80 LibCore: Add syscall wrapper for utime() 2021-12-20 22:16:05 +01:00
Andreas Kling
186de9fe4d LibGUI: Make GUI::try_create_default_icon() tolerate single-size icons
Some icons only exist in 16x16 and we should still allow them to be
loaded via the LibGUI default icon system.

This patch also reimplements GUI::default_icon() as a MUST() wrapper
around try_create_default_icon().
2021-12-20 21:13:42 +01:00
Andreas Kling
452a5531be AK+LibMain: Improve formatter for AK::Error in userspace
Print the full associated string metadata by default (if available.)
2021-12-20 21:13:42 +01:00
Sam Atkins
85a54261b3 Help: Include page names in the search
This fixes the problem before, where searching "Shell" would list
"Shell-vars" in the results, but searching "Shell-vars" would make it
disappear.

Also removed some now-unnecessary includes.
2021-12-20 10:58:41 -08:00
Sam Atkins
8461f8c1cd Help: Add support for launching with a section and page, like man
I found it strange that `man` and `Help` did not accept the same command
line arguments since they are so similar. So... now they do. :^)

This means you can now open for example the `tar` man page in Help with
`Help tar`, or `Help 1 tar` if you want to disambiguate between pages in
different sections.

If the result is not found, it falls back to the previous behavior,
treating the input as a search query.

Initially I had this written as two optional positional arguments, but
when told to parse `[optional int] [optional string]`, and then given a
string input, ArgsParser forwards it to the [optional int], which then
fails to parse. Ideally it would pass it to the second, [optional
string] arg instead, but that looks like a fairly big change to make to
ArgsParser's internals, and risk breaking things. Maybe this ugly hack
will be an incentive to fix it. :^)
2021-12-20 10:58:41 -08:00
Sam Atkins
4c91f736c7 Help: Move update_actions() code into open_page()
These two lambdas are always called together, in this order, so why not
make them one instead?

Also converted a couple of west-consts to east-const.
2021-12-20 10:58:41 -08:00
Sam Atkins
4bf2ef2a4c Help: Always show the welcome page on launch if nothing else is there
Previously, launching Help with a query like `Help tar` left the page
blank, which looks like something has gone wrong. Instead, let's show
the usual welcome page.
2021-12-20 10:58:41 -08:00
Junior Rantila
5238308d6f Magnifier: Add timeline for easy checking of animations
This patch adds a 512 frame timeline to Magnifier and the ability to
step through it with the arrow keys.

This makes it easier to check Serenity animations frame by frame for
correctness etc.
2021-12-20 10:48:03 -08:00
PerikiyoXD
bdc028da1c cp: Print proper error message with strerror
When cp fails, now it prints an error string (strerror)
instead of an error code.
2021-12-20 10:40:02 -08:00
Junior Rantila
105f741131 Piano: Make Key_Space shortcut to toggle playback 2021-12-20 10:39:37 -08:00
Jelle Raaijmakers
4e3ed16527 LibGL: Only pass bound texture units to rasterizer
Before, `SoftwareRasterizer` was iterating over all 32 possible texture
units for each fragment and checking each if they're bound to a texture.

After this change, an intrusive list containing only texture units with
bound textures is passed to the rasterizer. In GLQuake, this results in
a performance improvement of ~30% (from 12 to 16 FPS in the first demo)
on my machine.
2021-12-20 10:36:53 -08:00
Jelle Raaijmakers
f201567153 LibGL: Use 8x8 block size in SoftwareRasterizer
This smaller block size allows us to use an `u8` for the pixel mask
during triangle rasterization. These changes result in better FPS in
3DFileViewer, which periodically shoots up to 250-300 FPS on my
machine. Before, the peaks were somewhere in the range of 160-170 FPS.
2021-12-20 10:36:53 -08:00
Rok Povsic
a3c732b8ae Profiler: Display tooltip when hovering over flamegraph bars 2021-12-20 11:31:47 +01:00
Rok Povsic
d3a80b1a6e Profiler: Extract the bar label String into a private method 2021-12-20 11:31:47 +01:00
Stephan Unverwerth
47a4737110 LibGL: Fix texture sampling texel coordinate calculation
Previously we multiplied the interpolated texture coordinates by
width - 1 and height - 1 instead of width and height which resulted in
some wrongly mapped textures, especially visible in the glquake light
maps.

This also corrects the wrap mode being wrongly swapped for s/t
coordinates.

Since we do not have texture borders implemented yet we always use
GL_CLAMP_TO_EDGE for all clamping wrap modes for the time being.
2021-12-19 18:39:26 -08:00
Junior Rantila
3d63e688f7 watch: Port to LibMain 2021-12-19 18:26:57 -08:00
Junior Rantila
4178479ee5 LibCore: Add wrapper for signal() 2021-12-19 18:26:57 -08:00
Tim Schumacher
8eca395e4c LibC: Implement wcsdup 2021-12-19 18:22:41 -08:00
Michel Hermier
7a44c11378 LibTest: Add EXPECT_NO_CRASH 2021-12-19 14:22:06 -08:00
Michel Hermier
4c6e826c05 LibTest: Add EXPECT_CRASH_WITH_SIGNAL 2021-12-19 14:22:06 -08:00
Michel Hermier
b1b94692e6 LibTest: Handle test reporting in the a unique path 2021-12-19 14:22:06 -08:00
Michel Hermier
2f8fac3528 LibTest: Change Crash forked process communication
Now it returns `Failure` value via `exit`, and the caller is
responsible of reporting errors to the user.
2021-12-19 14:22:06 -08:00
Michel Hermier
c8cabd433a LibTest: Handle Crash printing in a private method 2021-12-19 14:22:06 -08:00
Jonta
18dab0384d SystemServer: Fixed grammatical error "a charm" 2021-12-19 13:43:34 -08:00
Idan Horowitz
d82c91ac2c SystemMonitor: Add back accidentally removed veil lock
Since the call to lock the veil was missing, the protections provided
by unveil() were not actually enabled.
2021-12-19 13:41:35 +01:00
PerikiyoXD
ff49285a02 LibGUI: Adjust focus rect for Buttons with icons
Reduced focus rect inflation value for buttons with icons
to match the expected focus rect for buttons without icons.

As mentioned in 'SerenityOS Office Hours / Q&A (2021-12-17)'
2021-12-19 13:39:02 +01:00
Linus Groh
9271005357 LibJS: Fix typo in spec comment 2021-12-19 09:35:02 +00:00
Linus Groh
f7fe7f8c77 LibJS: Capture TimeFraction parse result instead of Fraction
Not much of a difference as TimeFraction just parses Fraction, but let's
do it correctly. Small mistake I did in 4b7f716.

Thanks to YouTube user gla3dr for noticing this :^)
2021-12-19 09:29:46 +00:00
Max Trussell
99b263a2db Userland/Notify: Check if optional icon arg is null before loading
The commandline "notify" application was always attempting to load an
icon path from an optional argument, even when the argument was
omitted. In this case, the image icon argument would be a null pointer
and the notify program would crash.

This fix adds a conditional to only attempt to load the icon file if
the icon_path variable is not a null pointer
2021-12-19 00:50:53 -08:00
Michel Hermier
0bfb7f9675 LibC: Move _abort next to abort
It should be now the only user of it, and it is more logical to have it
in `stdlib.h` than in `assert.h`
2021-12-18 21:01:10 -08:00
Michel Hermier
2c62d51e25 LibC: Remove VERIFY_NOT_REACHED() from assert.h
Both `AK/Assertions.h` and `assert.h` would define the macro if `NDEBUG`
is set.

Remove the definition from `assert.h` since it is not an ISO-C
requirement.
2021-12-18 21:01:10 -08:00
Michel Hermier
ee42acddf8 LibC: Make __assertion_failed always defined
The symbol should be always defined, in case Serenity is built with
`NDEBUG` defined, and users wants to use `assert` from `LibC`.
2021-12-18 21:01:10 -08:00
Michel Hermier
35a5305264 LibC: Remove undefined __generate_unique_filename declaration 2021-12-18 21:01:10 -08:00
Luke Wilde
cf5f08b317 LibJS: Only allow TimeZone this value in TimeZone#getPlainDateTimeFor
This is a normative change in the Temporal spec.

See: https://github.com/tc39/proposal-temporal/commit/2644fc6
2021-12-19 00:13:01 +00:00
Luke Wilde
7729598b5b LibJS: Only allow TimeZone this value in Temporal.TimeZone#toJSON
This is a normative change in the Temporal spec.

See: https://github.com/tc39/proposal-temporal/commit/2644fc6
2021-12-19 00:13:01 +00:00
Luke Wilde
6c8c34ed6c LibJS: Only allow TimeZone this value in Temporal.TimeZone#id
This is a normative change in the Temporal spec.

See: https://github.com/tc39/proposal-temporal/commit/2644fc6
2021-12-19 00:13:01 +00:00
Luke Wilde
803e96f0c5 LibJS: Only allow Calendar this value in Temporal.Calendar#toJSON
This is a normative change in the Temporal spec.

See: https://github.com/tc39/proposal-temporal/commit/2644fc6
2021-12-19 00:13:01 +00:00
Linus Groh
5277646f46 LibJS: Fix 'precision != "auto"' check in temporal_duration_to_string()
If the Variant does *not* have a StringView, it *also* is not "auto".

Thanks to YouTube user JWeis for noticing this :^)
2021-12-18 23:20:00 +00:00
Astraeus-
a961a51692 Profiler: Convert to try_create_default_icon
and sprinkle in some more TRY() statements
2021-12-18 23:36:59 +01:00
Astraeus-
8513aff1cd Playground: Convert to try_create_default_icon
and sprinkle in some more TRY() statements
2021-12-18 23:36:59 +01:00
Astraeus-
64a5f990b1 Inspector: Convert to try_create_default_icon 2021-12-18 23:36:59 +01:00
Astraeus-
d12359ff20 WidgetGallery: Convert to try_create_default_icon 2021-12-18 23:36:59 +01:00
Astraeus-
1adc808664 Mouse: Convert to try_create_default_icon 2021-12-18 23:36:59 +01:00
Astraeus-
b9579de2b5 ModelGallery: Convert to try_create_default_icon 2021-12-18 23:36:59 +01:00
Astraeus-
683077c894 LibGfxScaleDemo: Convert to try_create_default_icon 2021-12-18 23:36:59 +01:00
Astraeus-
1c189dbba5 LibGfxDemo: Convert to try_create_default_icon 2021-12-18 23:36:59 +01:00
Astraeus-
4db2f5b4ae Eyes: Convert to try_create_default_icon 2021-12-18 23:36:59 +01:00
Astraeus-
b02da2442f CatDog: Convert to try_create_default_icon 2021-12-18 23:36:59 +01:00
Astraeus-
3e4e055c76 ClipboardHistory: Convert to try_create_default_icon 2021-12-18 23:36:59 +01:00
Astraeus-
3ca72831d1 Solitaire: Convert to try_create_default_icon 2021-12-18 23:36:59 +01:00
Astraeus-
bb214dd7e8 Pong: Convert to try_create_default_icon 2021-12-18 23:36:59 +01:00
Astraeus-
07cf17f328 2048: Convert to try_create_default_icon 2021-12-18 23:36:59 +01:00
Astraeus-
c1820770bb Minesweeper: Convert to try_create_default_icon 2021-12-18 23:36:59 +01:00
Astraeus-
421f91e4ca Hearts: Convert to try_create_default_icon 2021-12-18 23:36:59 +01:00