Commit graph

40735 commits

Author SHA1 Message Date
Timothy Flynn
1778462d97 LibJS: Resolve FIXMEs in DurationFormat's PartitionDurationFormatPattern
These are normative changes in the Intl.DurationFormat proposal. See:
https://github.com/tc39/proposal-intl-duration-format/commit/e2e18d1
https://github.com/tc39/proposal-intl-duration-format/commit/f1e8ed3
https://github.com/tc39/proposal-intl-duration-format/commit/2ed31b8
https://github.com/tc39/proposal-intl-duration-format/commit/2d51d64
https://github.com/tc39/proposal-intl-duration-format/commit/64cc5db
https://github.com/tc39/proposal-intl-duration-format/commit/a1d7876
https://github.com/tc39/proposal-intl-duration-format/commit/47a3a69
https://github.com/tc39/proposal-intl-duration-format/commit/3e9358e
https://github.com/tc39/proposal-intl-duration-format/commit/f4ecb46
https://github.com/tc39/proposal-intl-duration-format/commit/b454c8c
2022-08-30 14:26:11 -04:00
Timothy Flynn
d57b92da09 LibJS: Default to "short" for DurationFormat's style option
This is a normative change in the Intl.DurationFormat proposal. See:
https://github.com/tc39/proposal-intl-duration-format/commit/b289494
2022-08-30 14:26:11 -04:00
Timothy Flynn
765d016670 LibJS: Default to 0 for DurationFormat's fractionalDigits option
This is a normative change in the Intl.DurationFormat proposal. See:
https://github.com/tc39/proposal-intl-duration-format/commit/ac7e184
2022-08-30 14:26:11 -04:00
Timothy Flynn
2fb332da7b LibJS: Update spec steps to validate DurationFormat's numberingSystem
This is a normative change in the Intl.DurationFormat proposal. See:
https://github.com/tc39/proposal-intl-duration-format/commit/63a9202
2022-08-30 14:26:11 -04:00
thankyouverycool
cce9172cd4 Applications+DevTools: Remove fixed sizes from Splitters
And adjust some GML properties. Since a808cfa, splitters grow
opportunistically. Setting them to fixed sizes now quite literally
fixes them in place. Fixes immovable splitters missed in the
aforementioned commit.
2022-08-30 16:28:44 +01:00
Linus Groh
6cedb1b9d9 LibJS: Implement $262.evalScript() according to the given algorithm
test262's INTERPRETING.md specifies the exact steps for this function,
so let's shuffle some things around and add "spec" comments.

Most importantly this now returns the result of the evaluated script,
which at least one test relies on:
https://github.com/tc39/test262/blob/main/test/built-ins/Proxy/revocable/tco-fn-realm.js
2022-08-30 12:00:04 +01:00
Linus Groh
69415f0608 LibJS: Make string_to_bigint() a standalone function
This now matches the newly added string_to_number().
2022-08-30 10:30:54 +01:00
Linus Groh
15e3a99250 LibJS: Trim non-ASCII whitespace as well in StringToBigInt
This was never caught since the original implementation AFAICT, and
isn't being covered by test262 either:
https://github.com/tc39/test262/issues/1354
2022-08-30 10:30:43 +01:00
Linus Groh
c88c33dc22 LibJS: Trim non-ASCII whitespace as well in StringToNumber
This regressed in f4b3bb5.
2022-08-30 10:20:45 +01:00
Slappy826
f4b3bb519f LibJS: Handle non-decimal integer literals in Value::to_number
Implements support for parsing binary and octal literals, and fixes
instances where a hex literal is parsed in ways the spec doesn't
allow.
2022-08-30 01:00:48 +01:00
Xexxa
583c0dc782 Base: Add more emoji
🤰 - U+1F930 Pregnant Woman
🧌 - U+1F9CC Troll
🦘 - U+1F998 Kangaroo
🦋 - U+1F98B Butterfly
🛌 - U+1F6CC Person in Bed
🌽 - U+1F33D Ear of Corn
🔦 - U+1F526 Flashlight
🎯 - U+1F3AF Bullseye
🍴 - U+1F374 Fork and Knife
🍵 - U+1F375 Teacup Without Handle
🏮 - U+1F3EE Red Paper Lantern
🍶 - U+1F376 Sake
🐻‍❄️ - U+1F43B_U+200D_U+2744 Polar Bear
🥢 - U+1F962 Chopsticks
🥒 - U+1F952 Cucumber
™️ - U+2122 Trade Mark
🎋 - U+1F38B Tanabata Tree
🛴 - U+1F6F4 Kick Scooter
‼️ - U+203C Double Exclamation Mark
⁉️ - U+2049 Exclamation Question Mark
2022-08-30 00:58:06 +01:00
Liav A
2c84466ad8 Kernel/Storage: Introduce new boot device addressing modes
Before of this patch, we supported two methods to address a boot device:
1. Specifying root=/dev/hdXY, where X is a-z letter which corresponds to
a boot device, and Y as number from 1 to 16, to indicate the partition
number, which can be omitted to instruct the kernel to use a raw device
rather than a partition on a raw device.
2. Specifying root=PARTUUID: with a GUID string of a GUID partition. In
case of existing storage device with GPT partitions, this is most likely
the safest option to ensure booting from persistent storage.

While option 2 is more advanced and reliable, the first option has 2
caveats:
1. The string prefix "/dev/hd" doesn't mean anything beside a convention
on Linux installations, that was taken into use in Serenity. In Serenity
we don't mount DevTmpFS before we mount the boot device on /, so the
kernel doesn't really access /dev anyway, so this convention is only a
big misleading relic that can easily make the user to assume we access
/dev early on boot.
2. This convention although resemble the simple linux convention, is
quite limited in specifying a correct boot device across hardware setup
changes, so option 2 was recommended to ensure the system is always
bootable.

With these caveats in mind, this commit tries to fix the problem with
adding more addressing options as well as to remove the first option
being mentioned above of addressing.
To sum it up, there are 4 addressing options:
1. Hardware relative address - Each instance of StorageController is
assigned with a index number relative to the type of hardware it handles
which makes it possible to address storage devices with a prefix of the
commandset ("ata" for ATA, "nvme" for NVMe, "ramdisk" for Plain memory),
and then the number for the parent controller relative hardware index,
another number LUN target_id, and a third number for LUN disk_id.
2. LUN address - Similar to the previous option, but instead we rely on
the parent controller absolute index for the first number.
3. Block device major and minor numbers - by specifying the major and
minor numbers, the kernel can simply try to get the corresponding block
device and use it as the boot device.
4. GUID string, in the same fashion like before, so the user use the
"PARTUUID:" string prefix and add the GUID of the GPT partition.

For the new address modes 1 and 2, the user can choose to also specify a
partition out of the selected boot device. To do that, the user needs to
append the semicolon character and then add the string "partX" where X
is to be changed for the partition number. We start counting from 0, and
therefore the first partition number is 0 and not 1 in the kernel boot
argument.
2022-08-30 00:50:15 +01:00
Liav A
13c8695523 AK: Add find_first_split_view() helper for StringView container
Similar to the find_last_split_view() helper, but in this helper we
search for the first split view instead of the last one.
2022-08-30 00:50:15 +01:00
davidot
123cdfa1f1 LibJS: Properly initialize the global object for $262.createRealm 2022-08-29 22:44:35 +01:00
Timothy Flynn
48cb15283a LibRegex: Explicitly check if a character falls into a table-based range
Previously, for a regex such as /[a-sy-z]/i, we would incorrectly think
the character "u" fell into the range "a-s" because neither of the
conditions "u > s && U > s" or "u < a && U < a" would be true, resulting
in the lookup falling back to assuming the character is in the range.

Instead, first explicitly check if the character falls into the range,
rather than checking if it falls outside the range. If the explicit
checks fail, then we know the character is outside the range.
2022-08-29 16:34:47 -04:00
djwisdom
27f5a18ce6 HexEditor: Add Help->Manual entry in Menu 2022-08-29 09:25:29 +01:00
Andreas Kling
35c9aa7c05 LibJS: Hide all the constructors!
Now that the GC allocator is able to invoke Cell subclass constructors
directly via friendship, we no longer need to keep them public. :^)
2022-08-29 03:24:54 +02:00
Andreas Kling
d54ba587f3 LibJS: Make Heap a friend of everyone who uses JS_CELL
This will allow Heap to invoke non-public constructors when allocating
new cells.
2022-08-29 03:24:54 +02:00
Andreas Kling
49fd92d92a LibJS: Make JS_OBJECT and JS_ENVIRONMENT forward to JS_CELL 2022-08-29 03:24:54 +02:00
Andreas Kling
6e973ce69b LibJS: Add JS_CELL macro and use it in all JS::Cell subclasses
This is similar to what we already had with JS_OBJECT (and also
JS_ENVIRONMENT) but sits at the top of the Cell inheritance hierarchy.
2022-08-29 03:24:54 +02:00
Jelle Raaijmakers
94f016b363 LibGL+LibGPU+LibSoftGPU: Report texture env add extension
The Quake 3 port makes use of this extension to determine a more
efficient multitexturing strategy. Since LibSoftGPU supports it, let's
report the extension in LibGL. :^)
2022-08-28 23:45:43 +01:00
Valtteri Koskivuori
adf85c719a Ports: Disable libsamplerate dependency for SDL2
On Arch Linux, the build was picking up the system libsamplerate, which
is undesirable. Unlikely that it is needed on Serenity, so disabling it
is a good workaround.
2022-08-28 22:54:11 +01:00
djwisdom
e388d13c05 Base: Add Box Drawing glyphs to Csilla Regular+Bold12 2022-08-28 20:25:03 +01:00
djwisdom
681490c35c Base: Add new MouseSettings.md help document 2022-08-28 20:24:28 +01:00
djwisdom
88db594691 Base: Add new Mouse.md help document 2022-08-28 20:24:28 +01:00
djwisdom
83dd8f12de Base: Update Terminal's help documentation 2022-08-28 19:48:17 +01:00
Linus Groh
d53a369e7f LibJS: Implement ShadowRealmConstructor::construct() closer to spec
Defer creation of the global object to Realm::set_global_object(), and
use the newly added set_default_global_bindings() AO as intended.
2022-08-28 19:34:10 +01:00
Linus Groh
040e3abb1d LibJS: Implement SetDefaultGlobalBindings as a standalone function
Instead of hardcoding all the property definitions in GlobalObject's
initialize() function, make it the standalone AO it is supposed to be
that can then be used by other global objects that don't inherit from
JS::GlobalObject.
2022-08-28 19:34:10 +01:00
Linus Groh
e3804e6426 LibJS: Move construction of GlobalObject native functions to Intrinsics
This will later allow global objects not inheriting from the regular
JS::GlobalObject to pull in these functions without having to implement
them from scratch. The primary use case here is, again, a wrapper-less
HTML::Window in LibWeb :^)

Allocating these upfront now allows us to get rid of two hacks:

- The GlobalObject assigning Intrinsics private members after finishing
  its initialization
- The GlobalObject defining the parseInt and parseFloat properties of
  the NumberConstructor object, as they are supposed to be identical
  with the global functions of the same name
2022-08-28 19:34:10 +01:00
crpz1
3d5300a25e Base: Horizontally center socket and remove pixel from CrashReporter 2022-08-28 16:38:57 +01:00
Linus Groh
52543fc771 LibJS+LibWeb: Let Realm store a plain Object for [[GlobalObject]]
This removes the requirement of having a global object that actually
inherits from JS::GlobalObject, which is now a perfectly valid scenario.

With the upcoming removal of wrapper objects in LibWeb, the HTML::Window
object will inherit from DOM::EventTarget, which means it cannot also
inherit from JS::GlobalObject.
2022-08-28 16:36:56 +01:00
Linus Groh
72730422bb LibJS: Remove Shape::global_object() and Object::global_object()
Same reason as in commit 275dea9.
2022-08-28 16:36:56 +01:00
Linus Groh
4f436bd323 LibJS: Let NewGlobalEnvironment take a plain Object
The object is passed directly to NewObjectEnvironment, which has no
requirement for this being a JS::GlobalObject. This is needed for the
next change, which will make Realm store a plain Object as for the
global object as well.
2022-08-28 16:36:56 +01:00
Linus Groh
cfa5885855 LibJS: Turn initialize_global_object() into a regular initialize()
There's nothing special about global object initialization anymore, this
can just work the same way as for any other object now.
2022-08-28 16:36:56 +01:00
Linus Groh
867ad03995 LibJS: Move Console ownership from GlobalObject to ConsoleObject
GlobalObject is now a regular object with no special properties :^)
2022-08-28 16:36:56 +01:00
Linus Groh
78eca3ae64 LibJS: Move ConsoleObject construction from GlobalObject to Intrinsics
This will allow us to move the underlying console from GlobalObject to
ConsoleObject without still having to do a 'console' property lookup on
the GlobalObject.
2022-08-28 16:36:56 +01:00
Linus Groh
d35f53c344 LibJS: Remove Console's reliance on GlobalObject
This was not being used for anything meaningful, just store a reference
to the VM directly.
2022-08-28 16:36:56 +01:00
Ryan Liptak
9d14ed6c14 Meta: Enforce no leading zeros for emoji filenames
The current lookup code and emoji.txt generator expects codepoints to
not include leading zeros. This may change in the future, but it's worth
enforcing the current convention until then.
2022-08-28 16:07:00 +01:00
djwisdom
5297c22eaa Base: Add several new emojis
📤 - U+1F4E4 OUTBOX TRAY
📥 - U+1F4E5 INBOX TRAY
📦 - U+1F4E6 PACKAGE
📧 - U+1F4E7 E-MAIL
📨 - U+1F4E8 INCOMING ENVELOPE
📩 - U+1F4E9 ENVELOPE WITH DOWN ARROW
📪 - U+1F4EA CLOSED MAILBOX WITH LOWERED FLAG
📫 - U+1F4EB CLOSED MAILBOX WITH RAISED FLAG
📬 - U+1F4EC OPENED MAILBOX WITH RAISED FLAG
📭 - U+1F4ED OPENED MAILBOX WITH LOWERED FLAG

Coverage: https://emoji.serenityos.net
2022-08-28 16:06:33 +01:00
thankyouverycool
1dd9086e1a WindowServer: Remove misbehavior conditions for modals
This was too restrictive and there are already UI elements that rely
on this behavior. Now Blocking modals will preempt interaction with
all windows in their modal chain except those descending from them.
Fixes crashing in FilePicker when permission is denied.
2022-08-28 16:04:35 +01:00
thankyouverycool
b2b68a7551 WindowServer: Continue processing ongoing resizes after tiling
Just like tiling behavior during ongoing moves, now resizing
does not finish until a MouseUp event, letting you drag out of
undesired tile states. Resize tiling only works with vertical
and horizontal cursors now to cut down on unintentional tiling
from the corners.
2022-08-28 16:04:35 +01:00
thankyouverycool
38e13772e0 LibGUI: Make CommandPalette and EmojiInputDialog passive modals
Now they can be dismissed by clicking anywhere outside themselves,
including on their parent windows. This is a better default for
them since they don't have title bars to flash, and it's more
consistent with other frameless windows in the system.
2022-08-28 16:04:35 +01:00
Kenneth Myhra
e22311370b Ports/glib: Update GLib to version 2.73.3 2022-08-28 15:42:14 +01:00
Kenneth Myhra
54435dea59 LibC: Add stubs for 'removexattr()' and friends
This add stubs for 'removexattr()', 'lremovexattr()', and
'fremovexattr()'.

These are needed by GLib version 2.73.3.
2022-08-28 15:42:14 +01:00
Kenneth Myhra
f99eb2d11b Ports/glib: Switch to the offical Release tarball for GLib
The GLib repository contains several submodules which is part of the
build process, but the source code for these submodule is not part of
the Source code tarball generated by Gitlab. Switching to download the
Release tarball from download.gnome.org solves this issue. It first
became apparent in version 2.73.x.

Additional information at: https://gitlab.gnome.org/GNOME/glib/-/issues/2716
2022-08-28 15:42:14 +01:00
kleines Filmröllchen
7a2b8d3d65 Base: Add a bunch of heart emoji and others
U+00A9 © COPYRIGHT SIGN
U+00AE ® REGISTERED SIGN
1F192 🆒 SQUARED COOL
1F193 🆓 SQUARED FREE
1F195 🆕 SQUARED NEW
1F493 💓 BEATING HEART
1F495 💕 TWO HEARTS
1F497 💗 GROWING HEART
1F498 💘 HEART WITH ARROW
1F49D 💝 HEART WITH RIBBON
2022-08-28 15:40:37 +01:00
kleines Filmröllchen
8d2823ca8d Base: Add a quote to the fortunes database 2022-08-28 15:39:56 +01:00
Xexxa
8ee1b2d127 Base: Add more emoji
🇱🇷 - U+1F1F1 U+1F1F7 LR Flag: Liberia
🪂 - U+1FA82 Parachute
🏖️ - U+1F3D6 Beach with Umbrella
🏕️ - U+1F3D5 Camping
🥌 - U+1F94C Curling Stone
2022-08-28 13:41:20 +02:00
electrikmilk
5f8def0f71 Base: Add 9 new emojis and improve 13 emojis
This adds 9 new emojis and improves 13 emojis.
2022-08-28 13:41:04 +02:00
b14ckcat
550b3c7330 Kernel/USB: Rework UHCI interrupt transfer schedule
This reworks the way the UHCI schedule is set up to handle interrupt
transfers, creating 11 queue heads each assigned a different
period/latency, so that interrupt transfers can be linked into the
schedule with their specified period more easily.
2022-08-28 13:40:07 +02:00