Commit graph

18667 commits

Author SHA1 Message Date
AnotherTest
9c201767a0 LibWeb: Fix some FIXMEs related to ExceptionOr<T>
This fixes a few FIXMEs mentioned in 5beacf08a2,
which depended on #6075 being fixed.
2021-04-13 22:31:06 +02:00
AnotherTest
8ba2b5f36f LibWeb: Make ExceptionOr work with non-JS::Value types
Fixes #6075.
2021-04-13 22:31:06 +02:00
Egor Ananyin
d5def1cad0 LibWeb: Use min-height in calculating height 2021-04-13 22:04:25 +02:00
Egor Ananyin
fe544feb17 LibWeb: Start parsing font property 2021-04-13 22:04:25 +02:00
Linus Groh
e4b3591ac4 LibWeb: Fix a TODO in the adoption agency algorithm
There's still a much bigger one at the end of the function though. :^)
2021-04-13 21:59:55 +02:00
Timothy Flynn
cc7c86fdf4 Browser: Remove expired cookies from the CookieJar
The spec doesn't have any exact steps here, it just notes:

     The user agent MUST evict all expired cookies from the cookie store
     if, at any time, an expired cookie exists in the cookie store.

Here, we implement "at any time" as "when a cookie is retrieved or
stored".
2021-04-13 21:59:30 +02:00
Timothy Flynn
329e6252e9 Base: Update cookie test page with cookies expected to be rejected 2021-04-13 21:59:30 +02:00
Jean-Baptiste Boric
900fe5633a Minesweeper: Use one premade mine palette for all mine widgets
Fixes #6283
2021-04-13 21:52:34 +02:00
Jean-Baptiste Boric
c130161d9f LibCore: Don't leak file descriptor inside AnonymousBuffer on Linux 2021-04-13 21:52:34 +02:00
Jean-Baptiste Boric
dcff87215b Kernel: Fix RAM OK test condition for NE2000NetworkAdapter 2021-04-13 21:52:34 +02:00
Jean-Baptiste Boric
a73bd0fff8 Kernel: Remove type from StorageDevice class 2021-04-13 21:52:34 +02:00
Tom Needham
9b75b1be5f Ports: patch config.sub instead of the configure script in the yasm port 2021-04-13 21:47:11 +02:00
Andreas Kling
a959ccc1d0 Meta: Add link to Discord in CONTRIBUTING.md 2021-04-13 18:27:36 +02:00
Andreas Kling
b08d4ccd56 Utilities: Remove the "html" program
This is not used for anything, it was just a simple test program for
LibWeb back in the early days (before Browser existed.)
2021-04-13 18:24:47 +02:00
Andreas Kling
a2baab38fd Everywhere: It's now "Foobar", not "FooBar", and not "foo bar"
I hereby declare these to be full nouns that we don't split,
neither by space, nor by underscore:

- Breadcrumbbar
- Coolbar
- Menubar
- Progressbar
- Scrollbar
- Statusbar
- Taskbar
- Toolbar

This patch makes everything consistent by replacing every other variant
of these with the proper one. :^)
2021-04-13 16:58:15 +02:00
Timothy Flynn
86bdfa1edf Browser: Implement spec-compliant cookie storage
https://tools.ietf.org/html/rfc6265#section-5.3

This includes a bit of an update to how cookies are first parsed. The
storage spec requires some extra information from the parsing steps than
just the actual values that were parsed. For example, it needs to know
whether Max-Age or Expires (or both) were specified to give precedence
to Max-Age. To accommodate this, the parser now uses an intermediate
struct for storing this information. The final Cookie struct is not
created until the storage steps.

The storage itself is also updated to be keyed by a combo of the cookie
name, domain, and path.

Retrieving cookies was updated to use the spec's domain-matching
algorithm, but otherwise is not written to the spec yet. This also does
not handle evicting expired cookies yet.
2021-04-13 15:52:50 +02:00
Idan Horowitz
a0111f6a3e Meta: Enable pull_request_target context for the notify_discord action
While we did allow the notify_discord job to run inside the context,
we didnt ask github to run in that context. This commit also uses the
"action-wait-for-check" sub-action to ensure the posted build results
are accurate for pull requests (since the build workflow is done in a
separate context for PRs)
2021-04-13 15:51:44 +02:00
Linus Groh
45133d8ada LibJS: Unset m_unwind_until_label in stop_unwind()
I don't see a reason to keep this intact, that might only surprise us
down the line...
2021-04-13 15:40:52 +02:00
Linus Groh
4ee965f916 LibJS: Add set_exception() and change throw_exception() to take a reference
Sometimes we just want to set m_exception to some value we stored
previously, without really "throwing" it again - that's what
set_exception() does now. Since we have clear_exception(), it does take
a reference, i.e. you don't set_exception(nullptr). For consistency I
updated throw_exception() to do the same.
2021-04-13 15:40:52 +02:00
Linus Groh
f2abe42ecb LibJS: Update empty TryStatement result value to undefined
It's what the spec wants us to do, although I'm not sure if it has an
observable effect anywhere, as we don't expose empty values. Let's do it
anyway.
2021-04-13 15:40:52 +02:00
Linus Groh
7cbede4342 LibJS: Fix return value of TryStatement with finalizer
Previously we would always return the result of executing the finalizer,
however the spec dictates the finalizer result must only be returned for
a non-normal completion.
I added some more comments along the way, which should make it more
clear what's going on - the unwinding and exception flow isn't super
straightforward here.
2021-04-13 15:40:52 +02:00
Linus Groh
e8cbcc2fbf LibJS: Replace two more uses of unwind(ScopeType::None) with stop_unwind()
Same thing, but a lot more clear.
2021-04-13 15:40:52 +02:00
Itamar
f52c3cabcf HackStudio: Add ClassView tab for viewing classes in a tree structure
This enables the user to view and navigate classes with a TreeView that
is updated by the LanguageServer as it parses the code.

It offers a new neat way to view the project's structure :^)
2021-04-13 15:16:27 +02:00
Itamar
5adfcd54d8 LanguageServers: Only notify client about updated declarations
If the declarations haven't changed since we last notified the client,
then there's no need to do so.
2021-04-13 15:16:27 +02:00
Itamar
667926df73 HackStudio: Store known symbol declarations in ProjectDeclarations
They were previously stored inside the Locator widget. I moved them to
the globally visible ProjectDeclarations class so they can also be used
by other widgets.
2021-04-13 15:16:27 +02:00
Itamar
b87791cada LibCpp: Add 'Namespace' and 'Member' declaration types 2021-04-13 15:16:27 +02:00
Itamar
c6c83bd80e HackStudio+LibCpp: Include class members in Locator 2021-04-13 15:16:27 +02:00
tuqqu
c8ad1df143 LibJS: Array.from mapFn fixes + thisArg support
* Callback mapFn now properly supports second argument (index)
* Support of thisArg to be passed as "this" in vm.call
* Tests for all cases
2021-04-13 15:16:16 +02:00
FalseHonesty
2ed5d19407 LibGUI+HackStudio: Add way to tell FilePicker to open a folder
This now means that when trying to open a folder, one can click on
the folder and press open instead of having to actually step into
the desired folder. Of course, it also means it won't let you open
non-directories anymore.
2021-04-13 15:16:07 +02:00
Brendan Coles
ce010de74f LibC: getaddrinfo: Set addrinfo sin_port to 0 if service arg is NULL 2021-04-13 15:10:14 +02:00
Andreas Kling
bf1ef6533c FileManager+FileOperation: Show byte progress of current file
What I meant for the GUI progress bars to show:

- Bytes copied of the current file
- Files copied of the total set

What it actually showed:

- Bytes copied of the total bytes
- Files copied of the total set

This patch fixes it by showing byte progress of the current file
instead of byte progress of total bytes.
2021-04-13 10:12:50 +02:00
Andreas Kling
1ca22b46f9 LibGUI: Allow GUI::ProgressBar to have min() == max() 2021-04-13 10:12:50 +02:00
Andreas Kling
a5420ee3d0 FileManager: Use a Core::File for the FileOperation pipes
Instead of popen()/pclose(), we now open the pipes manually and wrap
them in a friendly Core::File object.
2021-04-13 10:12:50 +02:00
Andreas Kling
f54e290548 FileManager: Use FileOperation to perform drag&drop copy out-of-process
And display the progress of the copy operation in a separate window. :^)

Note that this patch only updates the drag&drop code path to use the new
mechanism. We still have to go through FileManager and make use of this
everywhere.

We also need to support additional operations, like Move, Delete, etc.

Still, this is quite cool! :^)
2021-04-13 10:12:50 +02:00
Andreas Kling
4205038c45 FileOperation: Add a new helper program for out-of-process file ops
This is a helper program for FileManager that performs a file operation
in a separate process and reports progress on standard out.

This initial implementation only supports the "Copy" operation and does
not do any detailed error handling.
2021-04-13 10:12:50 +02:00
breakgimme
42abda2a19
Keymaps: Add pl keymap (#6282) 2021-04-13 00:06:18 +02:00
jacob gw
42e63d0a94 Shell: flush stderr and stdout when using builtins
This fixed some tests that were failing.
Thanks @alimpfard for this fix!
2021-04-13 00:02:46 +02:00
jacob gw
cb22a6642d Shell: add type builtin 2021-04-13 00:02:46 +02:00
Brian Gianforcaro
1d7a0ab5ea Kernel: Mark s_syscall_table const so it ends up in ro_data. 2021-04-12 23:56:57 +02:00
Gunnar Beutner
84ad8a51d3 Ports: Link curl against openssl and disable non-blocking I/O
For some reason curl complains that SSL_connect() fails when
non-blocking I/O is enabled. With blocking I/O it works just
fine though.
2021-04-12 22:44:49 +02:00
Gunnar Beutner
317b2d7f92 Ports: Remove configure option which disables getattrinfo() for curl 2021-04-12 22:44:49 +02:00
Gunnar Beutner
f34d951f28 Ports: Fix for building openssh 2021-04-12 22:44:49 +02:00
Gunnar Beutner
30b038f8d9 LibC: Implement getaddrinfo(), freeaddrinfo(), gai_strerror() and getnameinfo() 2021-04-12 22:44:49 +02:00
Gunnar Beutner
8fcf91b030 LibC: The port numbers returned by getservby*() should be in network byte order 2021-04-12 22:44:49 +02:00
Gunnar Beutner
287a93a2a4 LibC: Validate the len argument for inet_ntop() 2021-04-12 22:44:49 +02:00
FalseHonesty
bffa1a0df8 LibDebug: Stop parsing unhandled variable types
Previously, when trying to debug variables with more complex
types (such as String), we would crash the debugger simply because
it didn't know how to handle types that were irrelevant anyways.
Now we just skip data we don't yet know how to handle.
2021-04-12 22:43:33 +02:00
FalseHonesty
cffc0a4f45 HackStudio: Fix debugger preview for char variables 2021-04-12 22:43:33 +02:00
FalseHonesty
d295095993 LibDebug+HackStudio: Fix crashes relating to debugger variable preview
For one, viewing a variable who's type contained a subprogram will
no longer crash HackStudio. Additionally, the variable view will
handle invalid enum values gracefully now, fixing another crash.
Finally, deeply nested (nest count > 1) structures will have their
memory addresses properly set, fixing the final crash I found.
2021-04-12 22:43:33 +02:00
FalseHonesty
c778164f64 HackStudio: Properly support Debugger's new source root concept
HackStudio's debugger instance has its source root property updated
when switching projects, and breakpoints will properly canonicalize
their file paths as the Debugger now expects.
2021-04-12 22:43:33 +02:00
Gunnar Beutner
0f98569617 Ports: Remove obsolete patches for <limits.h> 2021-04-12 22:37:34 +02:00