Commit Graph

18049 Commits

Author SHA1 Message Date
thankyouverycool
7beae8042a Spreadsheet: Set default width for columns 2021-03-18 07:49:55 +01:00
thankyouverycool
3cc7862487 LibGUI: Support double-click resizing column headers
Columns can now be best-fit resized by double-clicking their
grabbable edges. When a default width is set and all data is empty,
double-clicking will restore the column to its original state.
2021-03-18 07:49:55 +01:00
Vyacheslav Pukhanov
663fd9abb4 CppLanguageServer: Make preprocessor ignore unsupported keywords
During typing the entered keywords can be incomplete and crash
preprocessor. We enable the newly introduced option to prevent
that crash.
2021-03-18 07:49:18 +01:00
Vyacheslav Pukhanov
0b5d414eba LibCpp: Add preprocessor option to ignore unsupported keywords
Under some circumstances we need to ignore unsupported preprocessor
keywords instead of crashing the processing, for example during live
parsing in HackStudio.
2021-03-18 07:49:18 +01:00
Jean-Baptiste Boric
711a47b784 truncate: Make 64 bit clean 2021-03-17 23:22:42 +01:00
Jean-Baptiste Boric
570bb81a31 ls: Make 64 bit clean 2021-03-17 23:22:42 +01:00
Jean-Baptiste Boric
10df91b424 df: Make 64 bit clean 2021-03-17 23:22:42 +01:00
Jean-Baptiste Boric
607fac662d AK: Implement terabytes, petabytes, exabytes 2021-03-17 23:22:42 +01:00
Jean-Baptiste Boric
7ffc6c371a AK: Add 64 bit methods to JsonValue 2021-03-17 23:22:42 +01:00
Jean-Baptiste Boric
b896d58d1f Tests: Create stress-writeread 2021-03-17 23:22:42 +01:00
Jean-Baptiste Boric
71b433a6f9 Kernel: Add 64 bit file size support to Ext2FS 2021-03-17 23:22:42 +01:00
Jean-Baptiste Boric
ade6343fca Userland: Fix printf specifiers with off_t
In theory we should probably use the 'j' qualifier, but we don't
support it.
2021-03-17 23:22:42 +01:00
Jean-Baptiste Boric
7a079f7780 LibC+Kernel: Switch off_t to 64 bits 2021-03-17 23:22:42 +01:00
Jean-Baptiste Boric
b05b4d4b24 Kernel: Refactor storage stack with u64 as file operations offset 2021-03-17 23:22:42 +01:00
Jean-Baptiste Boric
999c57ef2d Kernel: Refactor storage stack with u64 as block index 2021-03-17 23:22:42 +01:00
Jean-Baptiste Boric
9a3aa7eb0b Kernel: Refactor storage stack with u64 as number of blocks 2021-03-17 23:22:42 +01:00
Jean-Baptiste Boric
aeef14ae28 Kernel: Rationalize logs inside Ext2Fs 2021-03-17 23:22:42 +01:00
Oleg Sikorskiy
9ea15a84ac Piano: Avoid selecting out of range notes.
Fixes #5736. The selected note value could also underflow if
you drag to the left, but the assert got triggered only in
case you're dragging past the end of the note roll.
2021-03-17 21:58:26 +01:00
Idan Horowitz
ea7bdf02b8 LibCompress: fail gracefuly on invalid symbols in DeflateDecompressor 2021-03-17 21:57:16 +01:00
Idan Horowitz
071ee7c6f4 LibCompress: Check for impossible back references in DeflateDecompressor
This commit makes sure that we fail if an encoded lz77 back reference
references bytes that are outside our sliding window, instead of just
silently failing, which triggers an assertion down the line.
2021-03-17 21:57:16 +01:00
Andreas Kling
9e6d0dd879 LibJS: Always synthesize "arguments" object when there's a callee
Instead of counting the number of call frames on the VM stack, we now
always fake the "arguments" object when the current call frame has
a callee value.

This fixes an issue with DOM event handlers in LibWeb not being able
to access "arguments" since they were called without an outer frame.
2021-03-17 21:54:52 +01:00
Andreas Kling
3217e6237c LibJS: Add a basic test for arguments.callee 2021-03-17 21:54:52 +01:00
Linus Groh
b985fa989e LibJS: Actually use eval() in non-string arg eval test 2021-03-17 21:28:14 +01:00
Andreas Kling
60e630d5a0 LibJS: eval(x) should return x without evaluation if x is not a string 2021-03-17 20:57:29 +01:00
Andreas Kling
d792200a55 LibJS: Rename GlobalObject::initialize() => initialize_global_object()
This function was shadowing Object::initialize() which cannot be called
on global objects and has a different set of parameters.
2021-03-17 16:53:35 +01:00
Andreas Kling
ea81dc13cf AK: Move move() into the "std" namespace
This makes GCC emit warnings about redundant and pessimizing moves.
It also allows static analyzers like clang-tidy to detect common bugs
like use-after-move.
2021-03-17 16:31:17 +01:00
Andreas Kling
f59ad2dc57 Everywhere: Remove pessimizing and redundant move() 2021-03-17 16:30:15 +01:00
Brendan Coles
fa28cc85e6 AK: Tests: TestURL: Add port_int_overflow_wrap test 2021-03-17 12:39:03 +01:00
Linus Groh
10843a2c8c QuickShow: Animate animated images :^)
With a little help (read: copy & paste) from ImageWidget, QuickShow will
now cycle through the frames of animated images - enjoy the cat GIFs!

Future improvement: cache decoded images like LibWeb's ImageResource to
waste less CPU - the same applies to LibGUI though, maybe we can put
something shared in LibGfx.

Closes #5837.
2021-03-17 12:37:48 +01:00
Linus Groh
41e5155467 LibGUI: Animate any image in ImageWidget, not just *.gif
The image decoder already tells us whether the image is animated and it
can provide more than one frame, let's not put this behind an artificial
"file path must end with lowercase .gif" barrier.
2021-03-17 12:37:48 +01:00
Oleg Sikorskiy
961137ea4c LibGfx: Don't truncate macroblock indices in JPG decoder. 2021-03-16 22:17:15 +01:00
Linus Groh
47645fc976 LibJS: Ensure SequenceExpression has two or more expressions
Just a sanity check, as we should be able to make this assumption
elsewhere - this way we can catch silly mistakes early.
2021-03-16 22:12:56 +01:00
Linus Groh
88a3267e46 LibJS: Replace global_object.global_object() with just global_object
That's just silly...
2021-03-16 22:12:56 +01:00
Linus Groh
4f36b6bfbd LibJS: Only set receiver value fallback once in Object::get() 2021-03-16 22:12:56 +01:00
Idan Horowitz
8533cceed5 LibCompress: Fail gracefuly on missing huffman codes in DeflateDecompressor 2021-03-16 21:57:44 +01:00
Idan Horowitz
be5a8d9c7f LibCompress: Check and fail for input stream errors in DeflateDecompressor
Since we were not checking for error flags set by read_bits we would
just always read 0 as the bits' value, which in some edge cases could
lead to an infinite loop.
2021-03-16 21:57:44 +01:00
Brendan Coles
46c7f52896 UserspaceEmulator: Add symlink, rename, set_coredump_metadata syscalls 2021-03-16 21:57:13 +01:00
thatdutchguy
569d6d47fe Kernel: sysconf(_SC_CLK_TCK): Use TimeManagement::ticks_per_second() 2021-03-16 21:56:47 +01:00
thatdutchguy
10e3e8f6d4 Kernel: Add _SC_CLK_TCK to sysconf.
Unbreaks the hatari port.
2021-03-16 21:56:47 +01:00
Linus Groh
fa6bce5087 LibJS: Throw RangeError on BigInt exponentiation with negative exponent
https://tc39.es/ecma262/#sec-numeric-types-bigint-exponentiate
2021-03-16 21:54:51 +01:00
Linus Groh
11138f5c1f LibJS: Throw RangeError on BigInt division/modulo by zero
https://tc39.es/ecma262/#sec-numeric-types-bigint-divide
https://tc39.es/ecma262/#sec-numeric-types-bigint-remainder
2021-03-16 21:54:51 +01:00
Idan Horowitz
1d8ab74cbf LibCompress: Allow partial header reads in GzipDecompressor
We now read the header into a temporary header byte array that is used
as the header once its filled up by the input stream, instead of just
ending the stream if we are out of bytes mid header.
2021-03-16 21:53:34 +01:00
Dan MacDonald
3dfa3d2d9d
Ports: Add Hatari Atari ST/STE/TT/Falcon emulator (#5812) 2021-03-16 21:53:13 +01:00
Idan Horowitz
211031e4f4 LibGfx: Fail gracefuly on invalid interlace method in PNGLoader
This fixes https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=29791
2021-03-16 21:52:05 +01:00
AnotherTest
80d21f120f LibLine: Make the DSR response parser a bit more robust
At the cost of using more read() syscalls, process the DSR response
character-by-character.
This avoids blocking forever waiting for an 'R' that will never come :P
2021-03-16 21:51:49 +01:00
Brendan Coles
fe97aec8c3 UserspaceEmulator: Print PID in mmap nullptr with MAP_FIXED reportln() 2021-03-16 21:48:29 +01:00
Andreas Kling
cad4cc9a2a LibWeb: Invalidate element style after setting Element.style.foo
This makes us recompute style for the element so the change actually
takes effect. :^)
2021-03-16 19:00:42 +01:00
Linus Groh
6c8185151e LibCpp: Return empty TranslationUnit from Parser::parse() if no tokens exist
Fixes #5704.
Fixes #5825.
Fixes #5827.
2021-03-16 18:59:19 +01:00
Linus Groh
8e84ca6b16 LibJS: Don't apply arguments object hack to global execution context
Checking for the existence of a call frame is not enough to check if
we're in a function call, as the global execution context is a regular
call frame as well.

Found by OSS-Fuzz, where simply accessing "arguments" in the global
scope would crash due to call_frame().callee being an empty value
(https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=32115).
2021-03-16 18:48:25 +01:00
Idan Horowitz
00f1cb924b LibAudio: decrease WavLoader's size limit to a more reasonable size
A 4 GiB wav (current size limit) is very unreasonable, and larger
than oss-fuzz's 2.5 GiB per-process memory limit.
2021-03-16 18:40:42 +01:00