Commit Graph

40552 Commits

Author SHA1 Message Date
davidot
c87d10365b LibCrypto: Make the constructors of (Un)SignedBigInteger templated
This means it can take any (un)signed word of size at most Word.
This means the constructor can be disambiguated if we were to add a
double constructor :^).

This requires a change in just one test.
2022-08-26 19:18:26 +01:00
davidot
48ac6ba372 LibJS: Use the proper to_double method in NumberConstructor 2022-08-26 19:18:26 +01:00
davidot
77d71a5ffd LibCrypto: Add a rounding mode to UnsignedBigInteger::to_double
This allows using different options for rounding, like IEEE
roundTiesToEven, which is the mode that JS requires.

Also fix that the last word read from the bigint for the mantissa could
be shifted incorrectly leading to incorrect results.
2022-08-26 19:18:26 +01:00
Tim Schumacher
8ba6e96d05 Kernel: Reorganize and colorize the scheduler thread list dump 2022-08-26 13:07:07 +02:00
Tim Schumacher
2bf5052608 Kernel: Show more (b)locking info when dumping the process list 2022-08-26 13:07:07 +02:00
Timon Kruiper
47af812a23 Kernel/aarch64: Implement VERIFY_INTERRUPTS_{ENABLED, DISABLED}
This requires to stub `Process::all_instances()`.
2022-08-26 12:51:57 +02:00
Timon Kruiper
026f37b031 Kernel: Move Spinlock functions back to arch independent Locking folder
Now that the Spinlock code is not dependent on architectural specific
code anymore, we can move it back to the Locking folder. This also means
that the Spinlock implemenation is now used for the aarch64 kernel.
2022-08-26 12:51:57 +02:00
Timon Kruiper
c9118de5a6 Kernel/aarch64: Implement critical section related functions 2022-08-26 12:51:57 +02:00
Timon Kruiper
e8aff0c1c8 Kernel: Use InterruptsState in Spinlock code
This commit updates the lock function from Spinlock and
RecursiveSpinlock to return the InterruptsState of the processor,
instead of the processor flags. The unlock functions would only look at
the interrupt flag of the processor flags, so we now use the
InterruptsState enum to clarify the intent, and such that we can use the
same Spinlock code for the aarch64 build.

To not break the build, all the call sites are updated aswell.
2022-08-26 12:51:57 +02:00
Timon Kruiper
6432f3eee8 Kernel: Add enum InterruptsState and helper functions
This commit adds the concept of an InterruptsState to the kernel. This
will be used to make the Spinlock code architecture independent. A new
Processor.cpp file is added such that we don't have to duplicate the
code.
2022-08-26 12:51:57 +02:00
Timon Kruiper
c1b0d254fd Kernel/aarch64: Add stubs for Mutex::lock and Mutex::unlock
Also add the g_scheduler_lock to the Dummy.cpp. This makes the aarch64
build succeeded again.
2022-08-26 12:51:57 +02:00
Robbie Vanbrabant
26a3b42a15 LibGUI: Add visual line mode to VimEditingEngine
Applications using the Vim emulation engine now support line-wise text
selection.

We already have support for character-wise text selection, by pressing
`v` from normal mode.

However now can also trigger line-wise text selection by pressing
`shift+v` from normal mode, and then using vertical motion commands
(e.g. `j` or `k`) to expand the selection. This is a standard vim
feature.

In visual line mode the following operations are supported:

  * `escape`: back to normal mode
  * `u`: convert to lowercase
  * `U`: convert to uppercase
  * `~`: toggle case
  * `ctrl+d`: move down by 50% of page height
  * `ctrl+u`: move up by 50% of page height
  * `d` or `x`: delete selection
  * `c`: change selection
  * `y`: copy selection
  * `page up`: move up by 100% of page height
  * `page down`: move down by 100% of page height

Notably I didn't implement pressing `v` to go to regular
(character-wise) visual mode straight from visual line mode. This is
tricky to implement in the current code base, and there's an
alternative, which is to take a detour via normal mode.
2022-08-26 12:50:30 +02:00
martinfalisse
f8e82da4b4 LibWeb: Handle unknown values in grid-template-*
This commit fixes a bug found when passing exotic values in the
grid-template-columns (or grid-template-rows) which are not yet
supported.

The bug seems to have been something like:
grid-template-columns: 0 minmax(0, calc(10px - var(--some-color)));
2022-08-26 12:48:57 +02:00
thankyouverycool
3dd522a109 SpreadSheet: Pass parent window when constructing About action
Fixes About dialog not blocking the app's main window.
2022-08-26 12:48:05 +02:00
thankyouverycool
7b2becad52 FileSystemAccessServer: Set dummy child to WindowMode::Passive
so Dialogs can join the modal chain of the window parenting them.
Fixes apps that use FileSystemAccess to sandbox FilePicker not
respecting its blocking effect.
2022-08-26 12:48:05 +02:00
thankyouverycool
aa045a9fdf WindowServer: Always restore modal chain when clicking a window
Refactors restore helper into move_to_front_and_make_active().
Fixes not bringing all modal children to the front when any modal
child or its modeless parent is clicked.
2022-08-26 12:48:05 +02:00
thankyouverycool
d815f659cc LibGUI+Taskbar+WindowServer: Prevent minimization when blocked
This was intentionally enabled with WindowModes as a new Taskbar
convenience, but on second thought, it doesn't add up visually.

Taskbar buttons show blockers' context menus when available,
which is a bit confusing when the window isn't visible. The
modeless window's disabled context menu options and inactive title
bar also contradict the button. So, this patch reenables the
restriction for now. Blocking modals you don't want to answer to
immediately can still be tucked away on another workspace.
2022-08-26 12:48:05 +02:00
thankyouverycool
18b111b802 WindowServer: Ignore modal blocking if capturing input
This exception is necessary for ComboBoxes used in some blocking
Dialogs. CaptureInput is now the only mode which can spawn from
a blocking modal and it won't accept any children of its own.
2022-08-26 12:48:05 +02:00
Jean Lourenço
bab8bd143f Chess: Highlight piece origin square when dragging piece 2022-08-26 09:53:13 +01:00
Andreas Kling
49deb936be PixelPaint: Make selection changes undoable
Using the Rectangle Select Tool will now generate undo/redo commands
like any other tool. :^)
2022-08-26 01:04:52 +02:00
Andreas Kling
d571159aeb PixelPaint: Move selection from ImageEditor to Image
This is preparation for making selection state undoable.
2022-08-26 01:04:52 +02:00
Andreas Kling
67596d9546 PixelPaint: Move "marching ants" painting logic to ImageEditor
Since this code needs to look at a bunch of ImageEditor state anyway,
it makes more sense for it to live in ImageEditor.
2022-08-26 01:04:52 +02:00
Andreas Kling
e6d860f2fe PixelPaint: Round mouse event coordinates instead of truncating
This makes the rectangle select tool feel a lot better when zoomed in.
2022-08-26 01:04:52 +02:00
Andreas Kling
d32f7112dc LibWeb: Intentionally leak the main thread JS VM
This way we avoid doing an expensive full GC on exit.
2022-08-26 01:04:51 +02:00
Andreas Kling
a3b2b20782 Kernel: Remove global MM lock in favor of SpinlockProtected
Globally shared MemoryManager state is now kept in a GlobalData struct
and wrapped in SpinlockProtected.

A small set of members are left outside the GlobalData struct as they
are only set during boot initialization, and then remain constant.
This allows us to access those members without taking any locks.
2022-08-26 01:04:51 +02:00
Linus Groh
36225c0ae7 LibJS: Allow undefined for calendar in MaybeFormatCalendarAnnotation
This is an editorial change in the Temporal spec.

Now that this is spec'd as either an Object or undefined, we can change
the parameter type from arbitrary JS::Value to JS::Object*.

See: https://github.com/tc39/proposal-temporal/commit/cdfcffd
2022-08-25 23:41:09 +01:00
Linus Groh
741cc08221 LibJS: Use fully spec'd algorithm for ToISOWeekOfYear
This is an editorial change in the Temporal spec.

See: https://github.com/tc39/proposal-temporal/commit/33b62a3
2022-08-25 23:41:09 +01:00
Linus Groh
b438839fcc LibJS: Reject ambiguous time string even with a calendar
This is a normative change in the Temporal spec.

See: https://github.com/tc39/proposal-temporal/commit/5e2afb9
2022-08-25 23:41:09 +01:00
Linus Groh
2cf5f5c278 LibJS: Remove unused nonterminals from the ISO8601 parser
This is an editorial change in the Temporal spec.

See: https://github.com/tc39/proposal-temporal/commit/fe9ef00
2022-08-25 23:41:09 +01:00
Linus Groh
42452a81a2 LibJS: Simplify TimeSpecWithOptionalTimeZoneNotAmbiguous
This is a normative change in the Temporal spec.

See: https://github.com/tc39/proposal-temporal/commit/77b0163
2022-08-25 23:41:09 +01:00
Linus Groh
f29c7cab16 LibJS: Remove exception rule from TimeZoneIANAName production
This is an editorial change in the Temporal spec.

See: https://github.com/tc39/proposal-temporal/commit/6a758d6
2022-08-25 23:41:09 +01:00
MacDue
965237efb8 LibWeb: Don't return an opaque origin for file:// URLs
The protocol of the origin is used for checking if the a file://
iframe is allowed to be loaded (a document with a file:// origin
can load other files in iframes).

This used to be the case, but was changed in
6e71e400e6, which broke file:// iframes.
2022-08-26 00:21:10 +02:00
MacDue
8d2c2f7c52 LibWeb: Determine the origin when navigating across documents 2022-08-26 00:21:10 +02:00
Luke Wilde
9643a5c63f LibJS: Accept and ignore calendar annotation in Instant strings
This is a normative change in the Temporal spec.

See: https://github.com/tc39/proposal-temporal/commit/3cd9669
2022-08-25 23:07:08 +01:00
Luke Wilde
54bb6bf2c0 LibJS: Avoid calling ToString on calendar when calendarName is "never"
This is a normative change in the Temporal spec.

See:
- https://github.com/tc39/proposal-temporal/commit/6122f4e
- https://github.com/tc39/proposal-temporal/commit/cf586bc
2022-08-25 21:11:23 +01:00
Xexxa
0d7b634313 Base: Add more emoji
☃️ - U+2603 Snowman
❄️ - U+2744 Snowflake
💐 - U+1F490 Bouquet
👸 - U+1F478 Princess
🐧 - U+1F427 Penguin
2022-08-25 20:12:20 +01:00
Xexxa
f3be312e7b Base: Improve emoji
🪢 - U+1FAA2 KNOT (the knot was not knotting)
🌲 - U+1F332 Evergreen Tree (adding some shadow)
2022-08-25 20:12:20 +01:00
Timothy Flynn
6309b8773d LibJS: Guard IntegerIndexedElementSet with receiver check
This is a normative change in the ECMA-262 spec. See:
https://github.com/tc39/ecma262/commit/3620f11
2022-08-25 19:50:04 +01:00
Timothy Flynn
a803d9226f LibJS: Always access RegExp flags by its "flags" property
This is a normative change in the ECMA-262 spec. See:
https://github.com/tc39/ecma262/commit/35b7eb2

Note there is a bit of weirdness between the mainline spec and the set
notation proposal as the latter has not been updated with this change.
For now, this implements what the spec PR and other prototypes indicate
how the proposal will behave.
2022-08-25 16:39:45 +01:00
Timothy Flynn
9a1f55afe5 LibJS: Fix spec steps and links for RegExp set notation proposal 2022-08-25 16:39:45 +01:00
Timothy Flynn
3748370dfd LibTimeZone: Fix tests when ENABLE_TIME_ZONE_DATABASE_DOWNLOAD is OFF 2022-08-25 16:20:22 +01:00
Timothy Flynn
6af9bf1a1e LibUnicode: Fix compilation when ENABLE_UNICODE_DATABASE_DOWNLOAD is OFF 2022-08-25 16:20:22 +01:00
Xexxa
f488726c82 Base: Add more emoji
 - U+267F Wheelchair Symbol
🪸 - U+1FAB8 Coral
🦐 - U+1F990 Shrimp
🐟 - U+1F41F Fish
🐠 - U+1F420 Tropical Fish
🐡 - U+1F421 Blowfish
🥬 - U+1F96C Leafy Green
🫖 - U+1FAD6 Teapot
🫐 - U+1FAD0 Blueberries
🫘 - U+1FAD8 Beans
🍞 - U+1F35E Bread
🥭 - U+1F96D Mango
🥗 - U+1F957 Green Salad
2022-08-25 16:16:25 +01:00
Xexxa
71b6c896d7 Base: Add more emoji
🖨️ - U+1F5A8 Printer
🛸 - U+1F6F8 Flying Saucer
🥚 - U+1F95A Egg
 - U+26C4 Snowman Without Snow
🐍 - U+1F40D Snake
🇲🇱 - U+1F1F2 U+1F1F1 ML Flag: Mali
🇹🇯 - U+1F1F9 U+1F1EF TJ Flag: Tajikistan
🇯🇲 - U+1F1EF U+1F1F2 JM Flag: Jamaica
🇲🇺 - U+1F1F2 U+1F1FA MU Flag: Mauritius
🇸🇨 - U+1F1F8 U+1F1E8 SC Flag: Seychelles
🇸🇩 - U+1F1F8 U+1F1E9 SD Flag: Sudan
🇷🇼 - U+1F1F7 U+1F1FC RW Flag: Rwanda
🇲🇬 - U+1F1F2 U+1F1EC MG Flag: Madagascar
🇸🇷 - U+1F1F8 U+1F1F7 SR Flag: Suriname
🇸🇳 - U+1F1F8 U+1F1F3 SN Flag: Senegal
🇸🇸 - U+1F1F8 U+1F1F8 SS Flag: South Sudan
🇧🇦 - U+1F1E7 U+1F1E6 BA Flag: Bosnia & Herzegovina
🇷🇪 - U+1F1F7 U+1F1EA RE Flag: Réunion
🇸🇱 - U+1F1F8 U+1F1F1 SL Flag: Sierra Leone
🇦🇴 - U+1F1E6 U+1F1F4 AO Flag: Angola
🇦🇬 - U+1F1E6 U+1F1EC AG Flag: Antigua & Barbuda
🇨🇼 - U+1F1E8 U+1F1FC CW Flag: Curaçao
🇹🇹 - U+1F1F9 U+1F1F9 TT Flag: Trinidad & Tobago
🇳🇷 - U+1F1F3 U+1F1F7 NR Flag: Nauru
2022-08-25 15:07:40 +01:00
martinfalisse
79a630adef LibWeb: Begin formatting the grid
This is a really starter attempt at formatting the grid. It doesn't yet
take into account the computed_values of grid-template-rows, nor the
values in grid-column-start and like CSS properties.

But these changes are a start and make it so the examples in
display-grid.html work.

To be fleshed out further..
2022-08-25 13:47:48 +02:00
martinfalisse
7bb3a8d646 LibWeb: Parse grid-column and grid-row CSS values 2022-08-25 13:47:48 +02:00
martinfalisse
44d08b81b7 LibWeb: Parse grid-column-start and related CSS properties
Parse grid-column-start, end, and the equivalent for rows.
2022-08-25 13:47:48 +02:00
martinfalisse
92a00648b1 LibWeb: Parse grid-template-columns and grid-template-rows
Add functionality to begin parsing grid-template-columns and
grid-template-rows. There are still things to be added, like parsing
functions, but I would say a couple of the major points are already
adressed like length, percentage, and flexible-length.
2022-08-25 13:47:48 +02:00
martinfalisse
c40dd9ee78 LibWeb: Add GridTrackPlacementShorthandStyleValue
Add GridTrackPlacementShorthandStyleValue for the use of grid-column and
grid-row.
2022-08-25 13:47:48 +02:00
martinfalisse
08b832eb69 LibWeb: Add GridTrackPlacementStyleValue
Add GridTrackPlacementStyleValue for the use of CSS properties
grid-column-start, grid-column-end, grid-row-start, grid-row-end.
2022-08-25 13:47:48 +02:00