Commit graph

12808 commits

Author SHA1 Message Date
Linus Groh
b27d90db1f LibJS: Actually change size in generic storage's set_array_like_size()
Looks like an oversight to me - we were not actually setting a new value
for m_array_size, which would cause arrays created with generic storage
to report a .length of 0.
2020-09-01 21:35:59 +02:00
Linus Groh
ae9d64e544 LibJS: Let set_array_like_size() switch to generic storage if necessary
This is already considered in put()/insert()/append_all() but not
set_array_like_size(), which crashed the interpreter with an assertion
when creating an array with more than SPARSE_ARRAY_THRESHOLD (200)
initial elements as the simple storage was being resized beyond its
limit.

Fixes #3382.
2020-09-01 21:35:59 +02:00
Andreas Kling
28ff8f3376 Ports: Bump version of the "vttest" port 2020-09-01 17:48:37 +02:00
Andreas Kling
171868e4f7 Kernel: Preserve internal state in cloned PurgeableVMObjects
When cloning a purgeable memory region (which happens on fork),
we need to preserve the "was purged" and "volatile" state of the
original region, or they will always appear as non-volatile and
unpurged regions in the child process.

Fixes #3374.
2020-09-01 17:45:28 +02:00
Andreas Kling
a56360f787 LibGUI: Implement the virtual ListView::scroll_into_view()
Instead of shadowing the one from AbstractView.
2020-09-01 17:45:28 +02:00
Andreas Kling
04507e288f LibGUI: Remove ListView::doubleclick_event()
We can just let AbstractView take care of this. :^)
2020-09-01 17:45:28 +02:00
asynts
7efd2a6d59 AK: Add OutputMemoryStream class. 2020-09-01 17:25:26 +02:00
asynts
3a2658951b AK: Add DuplexMemoryStream::copy_into_contiguous_buffer. 2020-09-01 17:25:26 +02:00
asynts
b68a873067 AK: Move memory streams into their own header. 2020-09-01 17:25:26 +02:00
asynts
f9516a99bf AK: Remove history from DuplexMemoryStream.
That feature was really only useful for Compress::DeflateDecompressor
but that is now using CircularDuplexBuffer instead.
2020-09-01 17:25:26 +02:00
asynts
9ce4475907 Streams: Distinguish recoverable and fatal errors. 2020-09-01 17:25:26 +02:00
Andreas Kling
daeb2bdc60 LibGUI: Don't return early from AbstractView::set_cursor()
Calling set_cursor() with the same cursor index is not necessarily
a no-op! For example, we may want to toggle the selection.
2020-09-01 16:33:31 +02:00
Andreas Kling
37df36dbed LibGUI: Implement move_cursor() in ColumnsView 2020-09-01 16:26:32 +02:00
Andreas Kling
386c7201d8 LibC: Move the static String in getlogin() out of the function
For some reason, this stops it from adding __cxa_guard_acquire/release
calls around its initialization. This unbreaks building ports.
2020-09-01 16:17:17 +02:00
Andreas Kling
27e86c03da LibGUI: Implement the virtual IconView::scroll_into_view()
This is virtual in AbstractView so let's not shadow it with an IconView
specific variant.
2020-09-01 16:17:17 +02:00
Andreas Kling
72443bd1ab LibGUI: Teach IconView to use AbstractView::move_cursor()
This makes it possible to manipulate the cursor programmatically via
the AbstractView interface.
2020-09-01 16:17:17 +02:00
Erlend Fagerheim
22265f1445 LibC: add getopt.h to unistd.h 2020-09-01 15:45:35 +02:00
busybox
5fce518049
Meta: Fixed small typo in readme (#3373) 2020-09-01 13:49:16 +02:00
Andreas Kling
e002cbb06b Build: Add some -Wno-unknown-warning-option flags to CXXFLAGS
Patch from Anonymous.
2020-09-01 12:00:53 +02:00
AnotherTest
084a5c6a90 LibLine: Reset suggestion state on any non-tab key
This fixes the following (and more!):
```sh
$ /bin/dis<tab><tab><backspace><backspace><backspace><backspace><tab>
$ /bink_benchmark
```
2020-08-31 23:06:07 +02:00
AnotherTest
7e72285049 Userland: Allow unquoted 'filename' values in 'pro' 2020-08-31 23:05:58 +02:00
AnotherTest
441807f96d AK: Add is_any_of(StringView) to GenericLexer 2020-08-31 23:05:58 +02:00
AnotherTest
861ce62e14 Userland: Improve 'ContentDispositionParser' in 'pro'
This patch just applies a suggestion, making the code more readable.
2020-08-31 23:05:58 +02:00
Luke
124c52b3b5 LibWeb: Implement document ready state 2020-08-31 23:05:51 +02:00
Luke
8aabec1c94 LibWeb: Expose window.self and window.frames
"self" is a way to refer to the global object that will work in both
a window context and a web worker context.

"frames" apparently used to return a list of frame objects according
to MDN, but it now just returns the window object.
2020-08-31 23:05:10 +02:00
asynts
1c8312fa50 LibCompress: Fix a bug when wrapping around the buffer. 2020-08-31 23:04:55 +02:00
asynts
0ebf56efb0 LibCompress: Add support for dynamic deflate blocks. 2020-08-31 23:04:55 +02:00
asynts
d5c5507a0e LibCompress: Deflate: Don't assert that the codes are valid. 2020-08-31 23:04:55 +02:00
asynts
c4799576ea LibCompess: Add missing state update in DeflateDecompressor::read. 2020-08-31 23:04:55 +02:00
asynts
ef7bec6a3b LibCompress: CanonicalCode: Don't leave unused code uninitialized. 2020-08-31 23:04:55 +02:00
Luke
8a2fd0e436 Kernel: Fix Processor::features_string() stopping too early and detect more features
The exit condition for the loop was sizeof(m_features) * 8,
which was 32. Presumably this was supposed to mean 32 bits, but it
actually made it stop as soon as it reached the 6th bit.

Also add detection for more SIMD CPU features.
2020-08-31 18:57:54 +02:00
Peter Nelson
259f8541fc LibGfx: implement GIF RestorePrevious frame disposal mode 2020-08-31 18:54:44 +02:00
Peter Nelson
c3ee5e3451 LibGfx: clear previous GIF frame to transparent instead of whole image 2020-08-31 18:54:44 +02:00
Peter Nelson
f63592f871 LibGfx: add GIF test suite
Adds a GIF test suite HTML page that contains a selection of test
GIF images and reference PNGs for each frame

Adds a link to the GIF test suite on welcome.html
2020-08-31 18:54:44 +02:00
Luke
8be708454c Kernel: Add more detailed debug output for E1000 {in,out}{8,16,32}
Also adds FIXME for VirtualBox.
2020-08-31 18:54:04 +02:00
Andreas Kling
a8d52a68f6 LibWeb: Take care of a FIXME in the "in table text" insertion mode 2020-08-31 18:51:34 +02:00
thankyouverycool
60872a7c5a DevTools+Apps: Set correct icons for ThemeEditor and VisualBuilder
VB appears deprecated in favor of HackStudio, but until it's
officially gone-no app left behind!
2020-08-31 09:14:18 +02:00
AnotherTest
9adbbff4dd LibC: Partially implement 'freopen' 2020-08-31 09:14:11 +02:00
AnotherTest
cb7526fca0 Userland: Make 'pro' capable of guessing a filename
The whole thing with `pro url > filename` was getting annoying, so let's
just have it support Content-Disposition and guessing from the URL.
2020-08-31 09:14:11 +02:00
thankyouverycool
199c1da31c LibGUI: Hide ResizeCorner in StatusBar when window is maximized
Fully expands status bars when maximized and prevents maximized
windows from being erroneously resized.
2020-08-31 09:08:26 +02:00
thankyouverycool
72deaa3423 WindowServer: Return correct IsMaximized response 2020-08-31 09:08:26 +02:00
Nico Weber
4b5cfce6b1 UserspaceEmulator: Emulate two FPU instructions! 2020-08-30 19:48:59 +02:00
Tibor Nagy
463ffbf83e Base: Remove obsolete .gitignore files
Leftovers from the time when the system used raw icons instead of PNGs.
2020-08-30 17:37:45 +02:00
Nico Weber
d1990281e1 ntpquery: Add routines for converting timeval<->ntp timestamps
Use them to set the transmit timestamp on the outgoing packet and
to print the returned timestamps as ISO 8601 strings.
2020-08-30 17:37:20 +02:00
Nico Weber
73db67e806 Userland: Add an extremely simple NTP client
This only queries a single NTP server, only does a point-to-point
request, doens't do any filtering, doesn't display the response
in any useful format, and is generally very bare-bones.

But maybe, over time it can learn to query more servers, do
filtering, run as a service that keeps state over time to
improve filtering, adjust system time, and maybe learn to
run as an NTP server then.
2020-08-30 17:37:20 +02:00
Nico Weber
f2135d7d00 AK: Make %llx work in printf 2020-08-30 17:37:20 +02:00
Sergey Bugaev
3d936d51fd Userland: Fix passing a non-format string to fprintf() 2020-08-30 17:35:27 +02:00
Sergey Bugaev
f808810d00 LibC: Deprecate strcpy(), strncpy(), strcat() and strncat() :^)
And also mark strlcpy() and strlcat() with __attribute__((warn_unused_result)).

Since our code is warning-free, this ensures we never misuse those functions.
(Or are very sure about doing it when turning off the warning for a particular
piece of code.)
2020-08-30 17:35:27 +02:00
Sergey Bugaev
0106647ab8 Tests: Assert the path fits 2020-08-30 17:35:27 +02:00
Sergey Bugaev
1cdd798ac7 LibC: Replace some strncpy() calls with memcpy()
In case we know exactly how many bytes we're copying (and not copying a string
while limiting its length to that of a buffer), memcpy() is a more appropriate
function to call.

Also, fix null-terminating the %c pointer.
2020-08-30 17:35:27 +02:00