Commit Graph

5922 Commits

Author SHA1 Message Date
Andrew Kaster
5e8a0c014e LibRegex: Make regex::Regex move-constructible and move-assignable
For some reason the default move constructor and default move-assign
operator were deleted, so we explicitly default them instead.
2021-06-30 08:18:28 +04:30
Andrew Kaster
b15fe2b926 LibCore: Add getter for how many groups exist in a Core::ConfigFile
This can be used by an application to find out if any config sections
were loaded from the file after a reparse.
2021-06-30 08:18:28 +04:30
davidot
fc9cc74555 LibJS: Handle the different realms case in ArraySpeciesCreate 2021-06-29 23:34:06 +01:00
Andreas Kling
384cffaa04 LibWeb: Fix build breakage after merging the oldish DOM inspector PR 2021-06-29 23:11:09 +02:00
Adam Hodgen
1e5e02c70b LibWeb+Browser: Support DOM Inspector for OutOfProcessWebView
This introduces a new DOMTreeJSONModel, which provides the Model for the
InspectorWidget when the Browser is running using the
OutOfProcessWebView.

This Model is constructed with a JSON object received via IPC from the
WebContentServer.
2021-06-29 23:06:48 +02:00
Adam Hodgen
cd6b9613c5 LibWeb+WebContent: Add IPC flow for Inspect DOM Tree
Add `inspect_dom_tree` to WebContentServer and 'did_get_dom_tree' to
WebContentClient.

These two async methods form a request & response for requesting a JSON
representation of the Content's DOM tree.
2021-06-29 23:06:48 +02:00
Adam Hodgen
4affe052b8 LibWeb: Add JSON serialization method to DOM::Node
This method builds a JSON object representing the full state of the
DOM tree.

The JSON that is built will be used for building the DOM Inspector
widget for the OutOfProcessWebView.
2021-06-29 23:06:48 +02:00
Ali Mohammad Pur
f4eab69785 LibHTTP: Finish the request up on TLS connection finish
...unless it has already been done.
Otherwise we'd be spinning in RequestServer waiting for more read
events.
2021-06-30 01:23:25 +04:30
ngc6302h
e2187f2956 SoundPlayer: Don't limit duration inference to WAV files 2021-06-30 00:58:06 +04:30
Ali Mohammad Pur
2665cdf2a1 LibGUI: Don't allocate a scope-local MouseEvent on the heap
This fixes the build by hiding the problem from the compiler, but it's
a useful change in and of itself anyway.
A malloc/free per every mouse event is pretty annoying, especially when
we can actually avoid it.
2021-06-29 21:40:41 +02:00
Liav A
3d89938c4a SystemServer+Meta: Use the new SysFS
We make SystemServer to mount the new SysFS in /sys.
2021-06-29 20:53:59 +02:00
Daniel Bertalan
65b2d3add3 Shell: Don't do null check on NonnullRefPtr<T>
This will cause a problem when `NonnullRefPtr<T>::operator T*` will be
declared as RETURNS_NONNULL. Clang emits a warning for this pointless
null check, which breaks CI.
2021-06-29 22:57:52 +04:30
Gunnar Beutner
2016354c12 Kernel+LibCoreDump: Implement more x86_64 coredump functionality 2021-06-29 20:03:36 +02:00
Gunnar Beutner
d3127efc01 LibELF: Implement PLT relocations for x86_64 2021-06-29 20:03:36 +02:00
Gunnar Beutner
1d4ae9194e LibC: Fix struct layout for sys_dirent on x86_64 2021-06-29 20:03:36 +02:00
Gunnar Beutner
5afec84cc2 LibELF: Add stub for R_X86_64_TPOFF64 2021-06-29 20:03:36 +02:00
Gunnar Beutner
811f9d562d LibELF: Make sure the mmap() regions are large enough
Sometimes we'd end up requesting a smaller range for .text and .data
than was actually necessary.
2021-06-29 20:03:36 +02:00
Gunnar Beutner
2eb025b2ea LibELF: Use correct accessor macros on x86_64 for some ELF fields 2021-06-29 20:03:36 +02:00
Gunnar Beutner
c81d959afb LibELF: Implement GNU hash section lookups for x86_64 2021-06-29 20:03:36 +02:00
Gunnar Beutner
d138424549 DynamicLoader: Implement self relocations for x86_64 2021-06-29 20:03:36 +02:00
Idan Horowitz
3cfe1a8914 LibJS: Support the radix argument in BigInt.prototype.toString 2021-06-29 16:55:54 +01:00
Idan Horowitz
005d75656e LibCrypto: Replace from_base{2,8,10,16}() & to_base10 with from_base(N)
This allows us to support parsing and serializing BigIntegers to and
from any base N (such that 2 <= N <= 36).
2021-06-29 16:55:54 +01:00
Idan Horowitz
12e66de410 LibJS: Check the target function of a bound function in is_constructor
This is not exactly compliant with the specification, but our current
bound function implementation isn't either, so its not currently
possible to implement it the way the specification requires.
2021-06-29 16:03:21 +01:00
Idan Horowitz
1d94d7a367 LibJS: Make Array.of(...items) generic
As well as bring it generally closer to the specification.
2021-06-29 16:03:21 +01:00
Andreas Kling
3ecd1d603f Assistant: Add subtitle field to the Result class
This allows providers to specify an appropriate subtitle instead of
making that something the UI layer has to figure out. :^)
2021-06-29 13:23:51 +02:00
Max Wipfli
9c8a2a5f69 AK+Spreadsheet+LibWeb: Remove JsonObject::get_or()
This removes JsonObject::get_or(), which is inefficient because it has
to copy the returned value. It was only used in a few cases, some of
which resulted in copying JsonObjects, which can become quite large.
2021-06-29 13:18:03 +02:00
Max Wipfli
f45273649f AK+Everywhere: Change int to size_t in JsonObject and JsonArray 2021-06-29 13:18:03 +02:00
Max Wipfli
e0ed160372 AK: Use OrderedHashMap in JsonObject
This changes JsonObject to use the new OrderedHashMap instead of an
extra vector for tracking the insertion order.

This also adds a default value for the KeyTraits template argument in
OrderedHashMap. Furthermore, it fixes two cases where code iterating
over a JsonObject relied on the value argument being copied before
invoking the callback.
2021-06-29 13:18:03 +02:00
Andreas Kling
9179a2ea73 Assistant: Fix crash when activating empty search result
If there are no search results in the list, we shouldn't do anything
when you try to active the selected result, since there isn't one.

Fix this by using an Optional<size_t> to store the selected index.
2021-06-29 13:08:21 +02:00
Andreas Kling
bec2b3086c LibGUI: Don't fire on_change hook at start of TextEditor::paint_event()
If something happens in response to on_change that causes the widget
to get unparented, creating a GUI::Painter will fail since it can't
find the window to paint into.

Since painting only cares about the syntax highlighting spans, what we
really want is to ensure that spans are up-to-date before we start
painting.

The problem was that rehighlighting and the on_change hook were bundled
together in an awkward lazy update mechanism. This patch fixes that by
decoupling rehighlighting and on_change. Rehighlighting is now lazy
and only happens when we handle either paint or mouse events. :^)

Fixes #8302.
2021-06-29 11:22:57 +02:00
Andreas Kling
114e8fffcd LibELF: Don't validate PT_LOAD alignment in ET_CORE files
This was causing CrashDaemon to choke on our coredumps. Note that we
didn't care about the validation failures before this change either,
this patch simply reorders the checks to avoid divide-by-zero when
validating an ET_CORE file.
2021-06-29 10:43:58 +02:00
Diego Garza
c37ad5a1d3 LibC: Add struct keyword to FBRects.rects to make it C compiler safe 2021-06-29 10:04:29 +02:00
Tom
85bb13e081 WindowServer: Fix animations not triggering rendering
When starting the first animation and while animations are ongoing we
need to make sure we trigger rendering.
2021-06-29 10:03:53 +02:00
Andrew Kaster
882002c566 LibSantizer: Read $UBSAN_OPTIONS to set deadliness on first print
The first time we want to print a UBSAN violation, the UBSAN runtime
in userspace will get the UBSAN_OPTIONS environment variable to check if
it contains the string "halt_on_error=1". This is clearly not robust to
invalid options or adding more options, but it gets the job done at the
moment. :^)
2021-06-29 07:17:34 +04:30
Andrew Kaster
97444f0a25 LibCrypto: Avoid unaligned reads in GHash constructor
The fact that this always reads 16 bytes from the input byte stream
for the key data is still a bit on the suspicious side, but at least
it won't crash UBSAN anymore.
2021-06-29 07:17:34 +04:30
Ali Mohammad Pur
3058ff1500 LibHTTP: Relax the finish_up() "must be called once" limitation a bit
It's alright for this function to be called multiple times, as it quits
early when a partial flush doesn't empty the download buffer.
Relax the assertion to having scheduled "did_finish()" only once.
2021-06-29 01:57:16 +04:30
Erik Sommer
b12e5de047 WindowServer: Change animation time to duration
The time interval for animations is most often described as `duration`
in animation contexts and the `WindowServer::Animation` class
should reflect that.
2021-06-28 22:29:39 +02:00
Gunnar Beutner
0cb937416b Meta: Install 64-bit libgcc_s.so for x86_64 targets 2021-06-28 22:29:28 +02:00
Gunnar Beutner
086b7a4537 LibC: Implement memcpy and memset for x86_64 2021-06-28 22:29:28 +02:00
Gunnar Beutner
d4c0d28035 Kernel: Properly set up the userland context for new processes on x86_64 2021-06-28 22:29:28 +02:00
Gunnar Beutner
158355e0d7 Kernel+LibELF: Add support for validating and loading ELF64 executables 2021-06-28 22:29:28 +02:00
Xavier Defrang
04fc7d708c LibVT: Paste full path when dropping file on widget
Prioritize URLs over plain text content in order to
insert absolute path instead of basename
2021-06-29 00:23:40 +04:30
Itamar
ab3aa0759a LanguageServers: Don't VERIFY that set_todo_entries callback exists
The callback may not exist if the CodeComprehensionEngine is running
in the context of tests (i.e CppLanguageServer -t).
2021-06-29 00:07:19 +04:30
Itamar
4123be7639 LibCpp: Update Parser test data after Type=>NamedType change 2021-06-29 00:07:19 +04:30
Itamar
ccb52b005e CppLanguageServer: Make properties_of_type return any property
Previously, CppComprehensionEngine::properties_of_type only returned
variables.
2021-06-29 00:07:19 +04:30
Itamar
d7aa831a43 LibCpp: Differentiate between Type and NamedType
This adds a new ASTNode type called 'NamedType' which inherits from
the Type node.

Previously every Type node had a name field, but it was not logically
accurate. For example, pointer types do not have a name
(the pointed-to type may have one).
2021-06-29 00:07:19 +04:30
Itamar
10cad8a874 LibCpp: Add LOG_SCOPE() macro for debugging the parser's flow
LOG_SCOPE() uses ScopeLogger and additionally shows the current token
in the parser's state.
2021-06-29 00:07:19 +04:30
Itamar
c1ee0c1685 LibCpp: Support parsing enum classes 2021-06-29 00:07:19 +04:30
Linus Groh
5ee753ffaa LibJS/Tests: Fix toBeFalse() details prefix
Copy/paste error from toBeTrue().
2021-06-28 19:16:06 +01:00
Leon Albrecht
57b7f4ec5b
LibJS: Mark FunctionObject::is_ordinary_function() as override 2021-06-28 19:25:35 +02:00