Commit Graph

11676 Commits

Author SHA1 Message Date
Kenneth Myhra
d86c84a700 clear: Port to LibMain :^) 2021-12-11 15:10:42 -08:00
Kenneth Myhra
6e066bf1cd cksum: Port to LibMain :^) 2021-12-11 15:10:42 -08:00
Kenneth Myhra
67a18d51c7 chres: Port to LibMain :^) 2021-12-11 15:10:42 -08:00
Kenneth Myhra
cc3710e19f chown: Port to LibMain :^) 2021-12-11 15:10:42 -08:00
Kenneth Myhra
c4bd46023b LibCore: Add syscall wrapper for getgrnam() 2021-12-11 15:10:42 -08:00
Kenneth Myhra
cd5063555e LibCore: Add syscall wrapper for getpwnam() 2021-12-11 15:10:42 -08:00
Kenneth Myhra
c8080fc2ca chgrp: Port to LibMain :^) 2021-12-11 15:10:42 -08:00
Kenneth Myhra
52a451dcff LibCore: Add syscall wrapper for chown() 2021-12-11 15:10:42 -08:00
Kenneth Myhra
59d299955e checksum: Port to LibMain :^) 2021-12-11 15:10:42 -08:00
Kenneth Myhra
6b6d7286b5 cal: Port to LibMain :^) 2021-12-11 15:10:42 -08:00
Undefine
312bac1967 Mail: Ask the user if they want to see the mail settings 2021-12-11 15:09:54 -08:00
Jelle Raaijmakers
bccfa205d3 LibGL: Improve mipmap lookup in Texture2D
We can get rid of a `VERIFY` since we already do this in `Array::at()`.
Also move `::mipmap()` to the header file so it is inlined in
`Sampler2D`.
2021-12-11 23:15:24 +01:00
Jelle Raaijmakers
65cda8e4aa LibGL: Always inline to_rgba32()
This function popped up in profiles.
2021-12-11 23:15:24 +01:00
Jelle Raaijmakers
930782a155 LibGL: Fix scissor box coordinate system
We were working with (0, 0) being the top-left of the render target,
but `glScissor` documentation states that this should be the
bottom-left instead.
2021-12-11 23:15:24 +01:00
Jelle Raaijmakers
e967d31a98 LibGL: Remove unused default from rasterizer scissor_box
Its value is always set in the constructor.
2021-12-11 23:15:24 +01:00
Jelle Raaijmakers
0be2a76ee7 LibGL: Use simpler syntax for GL_SCISSOR_BOX retrieval 2021-12-11 23:15:24 +01:00
Jelle Raaijmakers
7ad70f623e LibGL: Make glDeleteTextures skip over 0 names
As stated in the manual:
     glDeleteTextures silently ignores 0's and names that do not
     correspond to existing textures.

If we do not skip these 0 names, they end up as invalid free texture
names in our name allocator.
2021-12-11 23:15:24 +01:00
Jelle Raaijmakers
4abd6aa198 LibGL: Remove unnecessary break; from SoftwareGLContext 2021-12-11 23:15:24 +01:00
Jelle Raaijmakers
d885cc102b LibGL: Fix a number of enum values in gl.h
Their values should match the enum values as defined by the Khronos
Group.
2021-12-11 23:15:24 +01:00
Jelle Raaijmakers
5e370e6f96 LibGL: Implement GL_(UN)PACK_ALIGNMENT
These enums are used to indicate byte-alignment when reading from and
to textures. The `GL_UNPACK_ROW_LENGTH` value was reimplemented to
support overriding the source data row width.
2021-12-11 23:15:24 +01:00
Jelle Raaijmakers
0d57f08b98 LibGL: Use Array::back() for last mipmap selection 2021-12-11 23:15:24 +01:00
Jose Flores
65df30d00c Piano: Add track controls to the player widget
Adds the ability to add a track and cycle through the
tracks from player widget. Also displays the current track
being played or edited in a dropdown that allows
for quick track selection.
2021-12-11 23:07:21 +01:00
bugreport0
2b47e1233b Playground: Remove redundant pledge() 2021-12-11 23:06:56 +01:00
bugreport0
595ebe215b Inspector: Update pledge() idiom 2021-12-11 23:06:56 +01:00
bugreport0
1a2ff38609 CrashReporter: Remove redundant pledge() 2021-12-11 23:06:56 +01:00
David Lindbom
235a2b35d6 passwd: Port to LibMain 2021-12-11 13:16:55 -08:00
Daniel Bertalan
4a81b33c07 Everywhere: Fix -Winconsistent-missing-override warnings from Clang
This option is already enabled when building Lagom, so let's enable it
for the main build too. We will no longer be surprised by Lagom Clang
CI builds failing while everything compiles locally.

Furthermore, the stronger `-Wsuggest-override` warning is enabled in
this commit, which enforces the use of the `override` keyword in all
classes, not just those which already have some methods marked as
`override`. This works with both GCC and Clang.
2021-12-11 13:14:15 -08:00
Timothy Flynn
2a7f36b392 LibJS+LibUnicode: Generate unique numeric symbol lists
There are 443 number system objects generated, each of which held an
array of number system symbols. Of those 443 arrays, only 39 are unique.

To uniquely store these, this change moves the generated NumericSymbol
enumeration to the public LibUnicode/NumberFormat.h header with a pre-
defined set of symbols that we need. This is to ensure the generated,
unique arrays are created in a known order with known symbols. While it
is unfortunate to no longer discover these symbols at generation time,
it does allow us to ignore unwanted symbols and perform less string-to-
enumeration conversions at lookup time.
2021-12-11 14:17:47 +00:00
bugreport0
8a4b9c0926 passwd: Remove redundant pledge() 2021-12-11 03:17:11 -08:00
Linus Groh
aa2b85c697 LibJS: Use AK::NaN<double> in Date::date_value() to fix build error
This was not happening locally for me, neither when building Lagom on
Linux nor with the SerenityOS toolchain...

    error: implicit conversion from ‘float’ to ‘double’ to match other
    result of conditional [-Werror=double-promotion]
2021-12-10 23:32:54 +00:00
Linus Groh
de00a7594f LibJS: Implement the thisTimeValue() AO and use it where applicable 2021-12-10 23:02:35 +00:00
Linus Groh
038d354b5d LibJS: Remove Object::value_of()
Being really close to Object.prototype.valueOf() name wise makes this
unnecessarily confusing - while it sometimes serves as the
implementation of a valueOf() function, it's an abstraction which the
spec doesn't have.
Use the appropriate getters to retrieve specific internal slots instead,
most commonly [[FooData]] from the primitive wrapper objects.
For the Object class specifically, use the Value(Object*) ctor instead.
2021-12-10 22:52:36 +00:00
Timothy Flynn
07c5419a82 LibJS: Add test case for locales which do not define day periods
Some locales do not define morning, night, etc. day period ranges.
TR-35 states they should fall back to the fixed day periods AM and PM.
Add a test case for the "as" locale, which is one such locale, to ensure
its AM/PM symbols are used.
2021-12-10 21:27:24 +00:00
Timothy Flynn
5bdee9e38a LibJS: Use locale-aware day period time ranges to format period symbols
For the test cases changed here, we now recognize "morning2" and
"afternoon2" from the CLDR, so the expected results now match the specs
and other engines.
2021-12-10 21:27:24 +00:00
Timothy Flynn
a417c23de0 LibUnicode: Parse and generate per-locale day period ranges 2021-12-10 21:27:24 +00:00
Timothy Flynn
fa8e881cfa LibUnicode: Parse and generate secondary day period symbols
Generate morning2, afternoon2, evening2, and night2 symbols.
2021-12-10 21:27:24 +00:00
Timothy Flynn
76aab821f4 LibJS+LibUnicode: Rename some Unicode::DayPeriod values
In the CLDR, there aren't "night" values, there are "night1" & "night2"
values. This is for locales which use a different name for nighttime
depending on the hour. For example, the ja locale uses "夜" between the
hours of 19:00 and 23:00, and "夜中" between the hours of 23:00 and
04:00. Our CLDR parser is currently ignoring "night2", so this rename
is to prepare for that.

We could probably come up with better names, but in the end, the API in
LibUnicode will be such that outside callers won't even see Night1, etc.
2021-12-10 21:27:24 +00:00
Luke Wilde
1a5bf15b4d LibWeb: Implement AbortSignal.throwIfAborted
See: https://github.com/whatwg/dom/commit/cfe2f1e
2021-12-10 23:05:36 +02:00
Luke Wilde
64040c136e LibWeb: Add support for AbortSignal.reason 2021-12-10 23:05:36 +02:00
Sam Atkins
197759e30f LibWeb: Fix off-by-one error when highlighting unquoted HTML attributes
This fixes #11166
2021-12-10 21:27:13 +01:00
Timothy Flynn
2e4e0195de LibJS: Implement ECMA-402 Date.prototype.toLocaleTimeString 2021-12-10 13:58:33 +00:00
Timothy Flynn
4d310fd7aa LibJS: Implement ECMA-402 Date.prototype.toLocaleDateString 2021-12-10 13:58:33 +00:00
Timothy Flynn
9a62c01ebc LibJS: Implement ECMA-402 Date.prototype.toLocaleString 2021-12-10 13:58:33 +00:00
Sam Atkins
54bbb97ac6 Browser+LibWeb+WebContent: Add variables display to Inspector
This allows us to see which custom properties apply to a given element,
which previously wasn't shown.
2021-12-10 06:52:17 +01:00
Timothy Flynn
53df13fed7 LibJS: Implement Intl.DateTimeFormat.prototype.formatRangeToParts 2021-12-09 23:43:04 +00:00
Timothy Flynn
04f8fb07e1 LibJS: Implement Intl.DateTimeFormat.prototype.formatRange 2021-12-09 23:43:04 +00:00
Timothy Flynn
1f35eda37b LibJS: Store range format patterns in the Intl.DateTimeFormat object
Now that LibUnicode generates these patterns, the AO steps to retrieve
them may be implemented.
2021-12-09 23:43:04 +00:00
Timothy Flynn
7a0d5e3f7a LibJS: Do not return views into potentially freed memory
In a future commit, the "part" view returned from FormatDateTimePattern
may be a view into a string that goes out of scope. Ensure the AO only
returns valid views. A similar approach is used in Intl.NumberFormat.
2021-12-09 23:43:04 +00:00
Timothy Flynn
2024d9e9ea LibUnicode: Add method to combine two format pattern skeletons
The fields of the generated elements must be in the same order as the
table here:
https://unicode.org/reports/tr35/tr35-dates.html#Date_Field_Symbol_Table

Further, only one field from each group of fields is allowed.
2021-12-09 23:43:04 +00:00
Timothy Flynn
9d4c4303fd LibUnicode: Parse and generate date time range format patterns 2021-12-09 23:43:04 +00:00