Commit graph

10327 commits

Author SHA1 Message Date
Sergey Bugaev
31b025fcfc Kernel: Allow sys$accept(address = nullptr) 2020-06-09 21:12:34 +02:00
Nico Weber
33d6d640d3
Ports: Use keyserver.ubuntu.com as .sig keyserver (#2535)
Increases the number of successfully building ports from
27 to 36 (of 56) on my system.
2020-06-09 21:10:00 +02:00
Andreas Kling
a85506009f LibC: Don't assert on unknown mode character in fopen()
Just carry on with some debug log whining.
Gets rid of one dropbear patch. :^)
2020-06-08 21:57:13 +02:00
Andreas Kling
c88ea2f54a LibC: Add nanosleep() wrapper around clock_nanosleep(CLOCK_REALTIME)
Gets rid of one dropbear patch. :^)
2020-06-08 21:53:41 +02:00
Andreas Kling
57b6f51137 LibC: Add IPPORT_RESERVED and IPPORT_USERRESERVED
Gets rid of one dropbear patch. :^)
2020-06-08 21:50:45 +02:00
Andreas Kling
5448a670c0 Base: Symlink /dev/urandom to /dev/random
Some software expects to find /dev/urandom so we might as well provide.
Gets rid of one dropbear patch. :^)
2020-06-08 21:42:33 +02:00
Andreas Kling
3ee1b3cbd4 LibC: Add ws_xpixel and ws_ypixel members to struct winsize
This matches what other systems have, although we don't use them.
Gets rid of one dropbear patch. :^)
2020-06-08 21:40:22 +02:00
Stephen Gregoratto
53d4c7e207
Ports: Add editline library (#2532) 2020-06-08 21:38:13 +02:00
Andreas Kling
883dc9260d LibWeb: Unbreak favicon notifications after Page refactoring
Favicon updates now get plumbed from FrameLoader to the PageClient.
2020-06-08 21:35:31 +02:00
Andreas Kling
e04d68a03a LibWeb: Remove unnecessary on_foo hooks from Frame
Frame can just call through the PageClient instead of using hooks.
2020-06-08 21:31:53 +02:00
Andreas Kling
5042e560ef LibJS: Make more Interpreter functions take a GlobalObject& 2020-06-08 21:25:16 +02:00
Andreas Kling
053863f35e LibJS: Interpreter::this_value() => this_value(GlobalObject&)
Once the Interpreter has no global object attached to it, we have to
provide it everywhere.
2020-06-08 21:12:20 +02:00
Andreas Kling
25f2a29d84 LibJS: Pass GlobalObject& to AST node execute() functions
More work towards supporting multiple global objects.
2020-06-08 21:12:20 +02:00
Andreas Kling
92392398a2 LibWeb: Add Page abstraction between PageView and main Frame
* A PageView is a view onto a Page object.
* A Page always has a main Frame (root of Frame tree.)
* Page has a PageClient. PageView is a PageClient.

The goal here is to allow building another kind of view onto
a Page while keeping the rest of LibWeb intact.
2020-06-08 21:12:20 +02:00
Linus Groh
5072d4e02d LibJS+js: Support getting last value from "_" variable
The interpreter now has an "underscore is last value" flag, which makes
Interpreter::get_variable() return the last value if:

- The m_underscore_is_last_value flag is enabled
- The name of the variable lookup is "_"
- The result of that lookup is an empty value

That means "_" can still be used as a regular variable and will stop
doing its magic once anything is assigned to it.

Example REPL session:

> 1
1
> _ + _
2
> _ + _
4
> _ = "foo"
"foo"
> 1
1
> _
"foo"
> delete _
true
> 1
1
> _
1
>
2020-06-08 14:01:31 +02:00
Sergey Bugaev
89004a3a40 LibCore: Make sure to disable notifiers when closing a socket
RefPtr<Notifier> doesn't work quite like it appears to, since the notifier
is also a "child" of the socket, in Core::Object sense. Thus we have to both
remove it from the parent (socket) and drop the additional RefPtr<Notifier> for
it to actually go away.

A proper fix for this would be to untangle parent-child relashionship from
refcounting and inspectability.

This fixes use-after-close of client file descriptors in IPC servers.
2020-06-08 13:58:32 +02:00
Sergey Bugaev
bb19eb8f23 IPCCompiler: Properly handle stream read errors
If we exhaust the buffer stream, the reads appear to succeed, but the stream
itself panics when we later attempt to drop it. To prevent it, we check for
errors explicitly.
2020-06-08 13:58:32 +02:00
Sergey Bugaev
fc481552f5 LibIPC+LibGfx+IPCCompiler: Drop some unused includes 2020-06-08 13:58:32 +02:00
Andreas Kling
affc479e83 LibJS+LibWeb: Remove a bunch of calls to Interpreter::global_object()
Objects should get the GlobalObject from themselves instead. However,
it's not yet available during construction so this only switches code
that happens after construction.

To support multiple global objects, Interpreter needs to stop holding
on to "the" global object and let each object graph own their global.
2020-06-08 12:25:45 +02:00
Andreas Kling
ff8bb962b6 LibJS: Always keep a reference to the global object in Shape
We need to move towards supporting multiple global objects, which will
be a large refactoring. To keep it manageable, let's do it in steps,
starting with giving Object a way to find the GlobalObject it lives
inside by asking its Shape for it.
2020-06-08 12:15:58 +02:00
Andreas Kling
10aebabf0b LibJS: BigInts and Symbols values are cells and the GC needs this info
Make Value::is_cell() return true for BigInts and Symbols. This makes
all the tests pass when running run-tests.sh -g (GC after every alloc.)
2020-06-08 12:08:51 +02:00
Matthew Olsson
4e33fbdb67 LibJS: Add interpreter exception checks 2020-06-08 09:57:29 +02:00
Hüseyin ASLITÜRK
f306ddb78b Userland: Remove keymap app from system
We have new KeyboardSettings application and it supports both GUI and CLI.
2020-06-08 09:28:18 +02:00
Hüseyin ASLITÜRK
ddeb0ab1ad Applications: Add new KeyboardSettings application
GUI application to manage Keyboard settings.
2020-06-08 09:28:18 +02:00
Hüseyin ASLITÜRK
57a99015a1 Base: Add Keyboard application icons 2020-06-08 09:28:18 +02:00
Hüseyin ASLITÜRK
eba285bdb8 Base: Move DisplaySettings app to Settings menu 2020-06-08 09:28:18 +02:00
AnotherTest
0fe3b0dbaf functrace: Output colors only when stdout is a tty 2020-06-08 09:27:51 +02:00
AnotherTest
2714bba3f0 Shell: Highlight redirections 2020-06-08 09:27:51 +02:00
AnotherTest
07c070745f ls: Emit plain text when output is not a tty 2020-06-08 09:27:51 +02:00
Matthew Olsson
bc1c556755 LibJS: Move regex logic to main Lexer if statement
This prevents a regex such as /=/ from lexing into TokenType::SlashEquals,
preventing the regex logic from working.
2020-06-08 09:18:27 +02:00
Matthew Olsson
cc7462daeb LibJS: Properly consume escaped backslash in regex literal 2020-06-08 09:18:27 +02:00
AnotherTest
492df51e70 LibLine: Correctly handle line content overflow when on last line
Fixes #2525
2020-06-07 23:54:21 +02:00
AnotherTest
aa3e440a58 LibLine: Use more descriptive names for row/column
The names x and y caused confusion because of their typical use as
horiz/vert.
2020-06-07 23:54:21 +02:00
Andreas Kling
9b17bf3dcd LibWeb: Use HTML::TagNames globals in the new HTML parser 2020-06-07 23:53:16 +02:00
Andreas Kling
992697d99f LibWeb: Add HTML::TagNames namespace for global tag name FlyStrings
Instead of "iframe", we can now say HTML::TagNames::iframe and avoid
a FlyString lookup.
2020-06-07 23:27:03 +02:00
Andreas Kling
10851d87a2 LibWeb: Add (stub) HTMLTable{,Cell,Row}Element C++ classes
We'll need a place to implement the various presentational attributes
for table parts, and more stuff.
2020-06-07 23:10:45 +02:00
Andreas Kling
3654710c41 LibIPC+Services: Support URL as a native IPC type 2020-06-07 22:55:33 +02:00
Andreas Kling
b81b2a85c4 LibGUI: Don't scroll cursor into view while reflows are deferred
We don't have up-to-date visual line rects until after reflow, and we
already do a "scroll cursor into view" when deferral ends anyway.

Fixes #2524.
2020-06-07 21:05:05 +02:00
Andreas Kling
86eeac86a4 AK: Add basic percent encoder/decoder (urlencode and urldecode) 2020-06-07 21:05:05 +02:00
Andreas Kling
83ee76a53e AK: Add StringView::{begin,end} so we can range-for over StringViews 2020-06-07 21:05:05 +02:00
Matthew Olsson
1fadde2483 LibJS: Fix big int division lexing as UnterminatedRegexLiteral 2020-06-07 20:05:16 +02:00
Linus Groh
0ff9d7e189 LibJS: Add BigInt 2020-06-07 19:29:40 +02:00
AnotherTest
40829b849a Meta: Run Crypto tests in CI
We skip the tests that are not self-contained (TLS) to avoid adding
extra variables to the tests.
2020-06-07 19:29:40 +02:00
AnotherTest
a3ff4ff8a1 test-crypto: Return 1 if any test failed 2020-06-07 19:29:40 +02:00
AnotherTest
02c53fd1f9 LibCrypto: Add bitwise operations (and/or/xor) 2020-06-07 19:29:40 +02:00
Linus Groh
fbb1d9afe5 LibCrypto: Make ModularFunctions.h compile as part of Lagom
Compiler was complaining about two ambiguous overloads.

Also make some functions "inline" to fix warnings about unused
functions.
2020-06-07 19:29:40 +02:00
Linus Groh
75b4cc13a0 LibCrypto: Fix to_base10() for zero-value BigIntegers
All the magic is happening in a "while != 0" loop, so we ended up with
an empty string for zero-value BigIntegers. Now we just check that
upfront and return early.
2020-06-07 19:29:40 +02:00
Linus Groh
5b88aa8e96 LibJS: Move Value::as_accessor() to Value.h 2020-06-07 19:29:40 +02:00
Linus Groh
5a983c238b LibJS: Use switch/case for Value::to_{string{_w/o_side_effects},boolean}
This makes them a bit more compact and improves consistency as
to_boolean() and to_number() already use this style as well.

Also re-order the types to match the table in the spec document.
2020-06-07 19:29:40 +02:00
Linus Groh
9f399f7341 LibJS: Remove reduntant set_prototype() calls
If we're inheriting from Object() we already call its constructor which
sets the prototype - no need to do it again.
2020-06-07 19:29:40 +02:00