Linus Groh
e93ce1ff69
LibJS: Fix nanoseconds formatting in format_time_zone_offset_string()
...
Two issues:
- The format string said "{:9}", which left-pads with spaces and not
zeros as required
- Even when correcting that, we were not accounting for step 11 b:
"Set fraction to the longest possible substring of fraction starting
at position 0 and not ending with the code unit 0x0030 (DIGIT ZERO)."
We can safely use trim() for that as the formatted string is known to
not contain only zeros (which would leave the left-most in place).
Also adds tests for "UTC" and various numeric offsets.
2021-11-07 20:06:28 +00:00
Linus Groh
68d80d239b
LibJS: Fix fraction substring in parse_time_zone_offset_string()
...
We're supposed to get the substring from `fraction`, which is guaranteed
to have the required length. `fraction_part` is the user-supplied value
and trying to get a substring view from 0-9 might crash.
2021-11-07 20:01:31 +00:00
Linus Groh
df2ccb3d38
LibJS: Implement Temporal.Duration.prototype.toLocaleString()
2021-11-07 15:31:28 +01:00
Linus Groh
90fa356b93
LibJS: Implement Temporal.Duration.prototype.toJSON()
2021-11-07 15:31:28 +01:00
Linus Groh
b2548393d2
LibJS: Implement Temporal.Duration.prototype.toString()
...
I hereby claim "implemented largest AO in LibJS ever" (450 lines). :^)
2021-11-07 15:31:28 +01:00
Linus Groh
36b51276d5
LibJS: Change calendar_date_add() date parameter from PlainDate to Value
...
Turns out use of this AO is a bit more flexible than I anticipated.
2021-11-07 15:31:28 +01:00
Luke Wilde
706296374b
LibJS: Implement Temporal.ZonedDateTime.prototype.equals
2021-11-07 15:35:16 +02:00
Luke Wilde
ac12581140
LibJS: Implement Temporal.ZonedDateTime.compare
2021-11-07 15:35:16 +02:00
Luke Wilde
c9ec3295d9
LibJS: Implement Temporal.ZonedDateTime.from
2021-11-07 15:35:16 +02:00
Luke Wilde
2b89d2a360
LibJS: Implement ToTemporalZonedDateTime and the required AOs
2021-11-07 15:35:16 +02:00
Musab Kılıç
3b8853c3cd
Shell: Add min and max iteration times to time -n
in builtin_time
2021-11-06 22:09:25 -07:00
Musab Kılıç
f6a43c7cf5
AK: Add min and max functions to Statistics
2021-11-06 22:09:25 -07:00
Tim Schumacher
5c75216361
Ports: Update byacc to 20210808
2021-11-06 20:49:47 -07:00
Tim Schumacher
b26e4874ec
Ports: Update to ncurses 6.3
2021-11-06 20:49:18 -07:00
Simon Woertz
727cdcf82c
Revert "WindowServer: Remove redundant Window::set_visible()..."
...
This reverts commit 239520ae54
.
The call to set_visible() is not redundant. Removing the call leads
to the "start" button in the taskbar not being painted as "pressed" even
when it is.
2021-11-07 00:49:48 +01:00
Ben Wiederhake
1d777073fd
grep: Add ability to output line numbers
2021-11-06 08:57:05 -07:00
Ben Wiederhake
b9a270e5e7
grep: Simplify lambda signature for readability
...
Those 'optional' arguments are always supplied anyway. Making them
compulsory means there's one thing fewer to keep track of.
2021-11-06 08:57:05 -07:00
Tim Schumacher
18792a6305
Ports: Remove the obsolete howto guide from cmake
...
We have long been able to build CMake fully on the host.
2021-11-06 18:07:15 +03:30
Tim Schumacher
e3a0e93390
Ports: Add a missing hyphen to GNinja in cmake
2021-11-06 18:07:15 +03:30
Davi
0d459553fd
TextEditor: Fix hang on "Replace All"
2021-11-06 12:25:15 +01:00
AMACB
60362ef401
Kernel: Initialize regs.fs in Processor::init_context
...
Commit f285241c
replaced the line that sets regs.fs with a line that
sets regs.gs, but not vice versa.
2021-11-06 11:54:28 +01:00
Tim Schumacher
b220b45c5e
Ports: Don't add ports to the "built" list unless successful
2021-11-06 11:54:00 +01:00
Tim Schumacher
85db9aac49
Ports: Update pcre to 8.45
2021-11-06 12:40:19 +02:00
Brian Gianforcaro
abf1585a3f
Ports: Fix cmatrix version in AvailablePorts.md to appease the linter
2021-11-06 01:24:28 -07:00
Tim Schumacher
d1588dc806
Ports: Add a dependency on pcre to glib
...
This previously only worked because glib will automatically try and
compile pcre, but due to ftp.pcre.org being down this no longer works.
Instead, just rely on the pcre port that we already have anyways.
2021-11-06 01:16:14 -07:00
EWouters
2b5c377781
Ports/cmatrix: Fix hash and update version
...
The download links to the master branch of a repository, hence the
hash doesn't match anymore. Now setup to download a new version
with a known hash.
2021-11-06 00:42:02 -07:00
Tim Schumacher
7391104e5d
Ports: Update pcre2 to 10.39
...
PCRE2 has moved to GitHub for code and release hosting, and ftp.pcre.org
is decommissioned.
2021-11-06 00:32:36 -07:00
Tim Schumacher
3d3304332a
LibC: Correctly evaluate addr in IN6_IS_ADDR_LOOPBACK
...
Without putting the argument in parentheses we might not evaluate it
correctly.
2021-11-06 00:31:01 -07:00
Hendiadyoin1
1bbdce7e81
Documentation: Update and simplify VSCode Task recommendation
...
With these you'll only need 3 tasks to cover lagom and all of normal
build and launch with just 3 Tasks and two option menus.
2021-11-06 00:45:45 +01:00
Sam Atkins
7613586097
ThemeEditor: Offset the preview vertically to center it better
...
Previously, the active window being centered, and then the inactive one
being higher, meant having an awkward gap at the bottom. This is a
simple fix, and not perfect, but it helps. :^)
2021-11-05 23:34:22 +01:00
Sam Atkins
b51d2fee05
ThemeEditor: Add support for FlagRoles
...
The GUI for this is a bit odd, especially since we only have one flag,
but otherwise adding new flags would require modifying ThemeEditor. At
least it is consistent with the other theme properties.
2021-11-05 23:34:22 +01:00
Sam Atkins
f22043a225
LibGfx: Add FlagRole to GUI::Variant
2021-11-05 23:34:22 +01:00
Sam Atkins
d68268f791
LibGfx: Use read_bool_entry()
to read theme flags
...
I didn't notice this function existed the first time around. Oops!
2021-11-05 23:34:22 +01:00
Ben Wiederhake
5e9cf47627
Documentation: Recommend a comment style
2021-11-05 21:07:35 +01:00
Liav A
066b1183cd
Kernel: Return ENOTIMPL when trying to read from SysFS inodes
...
Instead of asserting, just return reasonable error back to userland.
2021-11-05 16:26:45 +02:00
Luke Wilde
b8db0ddc70
LibJS: Implement Temporal.ZonedDateTime.prototype.withCalendar
2021-11-05 09:49:47 +01:00
Luke Wilde
58bb73b60f
LibJS: Implement Temporal.ZonedDateTime.prototype.withTimeZone
2021-11-05 09:49:47 +01:00
Luke Wilde
d5f2745a19
LibJS: Implement Temporal.ZonedDateTime.prototype.withPlainDate
2021-11-05 09:49:47 +01:00
Luke Wilde
132a56f07c
LibJS: Implement Temporal.ZonedDateTime.prototype.withPlainTime
2021-11-05 09:49:47 +01:00
Andreas Kling
c098a6495b
LibGUI: Use default Button and TextBox heights in InputBox
2021-11-05 01:37:00 +01:00
Andreas Kling
7a1a8d267d
WindowServer: Add menus to open menu stack before making them visible
...
This prevents an issue where the first mouse event in a newly opened
would not get handled because we didn't think the menu was open yet.
2021-11-05 01:37:00 +01:00
Andreas Kling
239520ae54
WindowServer: Remove redundant Window::set_visible() in Menu::do_popup()
...
We're already calling MenuManager::open_menu(), which will take care of
making the menu window visible if needed.
2021-11-05 01:37:00 +01:00
Andreas Kling
5f8c949ea1
WindowServer: Remove redundant check in MenuManager::open_menu()
...
We've already returned early if the menu is open, so there's no need to
verify that it isn't present in the stack of open menus before pushing
it onto said stack.
2021-11-05 01:37:00 +01:00
Linus Groh
1dc32fed8f
LibJS: Adjust approximated result in year_from_time() if necessary
2021-11-05 01:18:27 +01:00
Linus Groh
37146e305a
LibJS: Account for leap days in year_from_time()
...
A year has 365.2425 days, not 365. This lead to off-by-one results for
time values (milliseconds) near the end of a year, which would lead to
calculation issues and crashes in other AOs.
Fixes #10796 .
2021-11-05 01:09:18 +01:00
Aziz Berkay Yesilyurt
bfb36fec89
WindowServer: Return ShareableBitmap() on fail
...
WindowServer returns {} on non-existing screen index,
however shot program hangs instead of retriving an empty
ShareableBitmap. With this change, the function returns an empty
ShareableBitmap and shot exits gracefully.
2021-11-05 00:10:23 +01:00
Aziz Berkay Yesilyurt
7f8794f902
shot: Fix hanging due to zero sized Rect
...
shot was refactored to retrive crop_region,
but it is empty when -r is not used.
2021-11-05 00:10:23 +01:00
Linus Groh
0dae7c9420
LibJS: Replace a couple of TODO()'s in Temporal with InternalError
...
This helps us to distinguish between crashes because of incomplete code
paths and crashes because of genuine bugs more easily when running
test262.
2021-11-04 23:59:40 +01:00
Linus Groh
dd1a808f7e
LibJS: Remove TODO() from implemented code path
...
Well, that's embarassing. TODO()'d it, implemented it, forgot to remove
the TODO().
2021-11-04 23:59:40 +01:00
Elyse
5c845dbfcb
SoundPlayer: Allow playback progress slider jump to cursor
...
This fix allows us to move the knob wherever we click inside the slider.
The 'jump_to_cursor()' mechanism wasn't working properly because the
player was overwriting the value we had just clicked.
2021-11-04 23:45:26 +01:00