Commit graph

11273 commits

Author SHA1 Message Date
Andreas Kling
d10765bec3 UserspaceEmulator: Add an initial stack and implement PUSH/POP reg32
Programs now start out with a 64 KB stack at 0x10000000. :^)
2020-07-09 16:20:08 +02:00
Andreas Kling
d5c46cf528 UserspaceEmulator: Start sketching out a SoftMMU class :^)
This Emulator sub-object will keep track of all active memory regions
and handle memory read/write operations from the CPU.

A memory region is currently represented by a virtual Region object
that can implement arbitrary behavior by overriding read/write ops.
2020-07-09 16:18:47 +02:00
Andreas Kling
3a73fdd244 UserspaceEmulator: Start executing in _start() instead of main()
This is one step closer to the real thing. :^)
2020-07-09 15:47:10 +02:00
thankyouverycool
066ae29c07 Base+Demos: Add icons to WidgetGallery 2020-07-08 23:48:26 +02:00
Tom
ce5ae83963 Kernel: Detect syscall/sysenter support 2020-07-08 23:47:36 +02:00
Kevin Meyer
5b6920a18a LibWeb: Don't call did_layout in non-main frame documents
Fixes https://github.com/SerenityOS/serenity/issues/2649

Loading a page with iframes could lead to a scenario, where the iframe
document finished layout prior to the main frame beeing laid out
initially. This caused a crash/assertion of the browser.
2020-07-08 23:45:12 +02:00
Kevin Meyer
a5b8cc2d0b LibWeb: Add type for FrameLoader::load
This should enable to destinguish between IFrame, Reload and Navigation
motivated loads in order to call the appropriate hooks.

This change is motivated as loading the IFrame test page causes the
IFrame url to be added to the history and shows up as the current
browser location bar.
2020-07-08 23:45:12 +02:00
Nico Weber
6105f063cb LibLine: Add ctrl-t shortcut for transposing characters 2020-07-07 23:13:25 +02:00
Linus Groh
ec5845212d WindowServer: Apply the "wait" cursor to unresponsive windows 2020-07-07 23:11:39 +02:00
Linus Groh
e99cb74a0c WidgetGallery: Add "Cursors" tab 2020-07-07 23:11:39 +02:00
Linus Groh
899dcba158 WindowServer+LibGUI: Add "wait" cursor 2020-07-07 23:11:39 +02:00
Linus Groh
b8a8e417f1 WindowServer+LibGUI: Add "help" cursor 2020-07-07 23:11:39 +02:00
Linus Groh
b86a59ec05 LibGUI: Use Resize{Column,Row} cursor for Splitter and AbstractTableView 2020-07-07 23:11:39 +02:00
Linus Groh
62866208ee WindowServer+LibGUI: Add "resize row/column" cursors 2020-07-07 23:11:39 +02:00
Nico Weber
2dd40aac4d Piano: Make menu bar consistent with other apps
"Help" should be after "Edit".

The "Quit" menu item should be at the end of the app menu, and
after a separator.
2020-07-07 23:11:08 +02:00
AnotherTest
173effc88d Shell: Suggest aliases when completing program names :^)
Closes #2732
2020-07-07 23:11:01 +02:00
Andreas Kling
8ab601f9e1 UserspaceEmulator: Implement XOR_RM32_reg32
Note that this is a partial implementation since we don't have support
for memory r/m variants yet.
2020-07-07 22:44:58 +02:00
Andreas Kling
934f0b999e UserspaceEmulator: Add arithmetic CPU flags 2020-07-07 22:44:58 +02:00
Andreas Kling
d0dbf92c8d UserspaceEmulator: Break out of emulation when hitting a RET
Until we learn more instructions, we'll have to exit somewhere, so let
us exit when we hit a RET instruction for now.
2020-07-07 22:44:58 +02:00
Andreas Kling
8d8bb07476 UserspaceEmulator: Start building a userspace X86 emulator :^)
This introduces a new X86 CPU emulator for running SerenityOS userspace
programs in a virtualized interpreter environment.

The main goal is to be able to instrument memory accesses and catch
interesting bugs that are very hard to find otherwise. But before we
can do fancy things like that, we have to build a competent emulator
able to actually run programs.

This initial version is able to run a very small program that makes
some tiny syscalls, but nothing more.
2020-07-07 22:44:58 +02:00
Andreas Kling
6440e59ead LibX86: Expose some more things on X86::Instruction 2020-07-07 22:44:58 +02:00
Andreas Kling
7ab2a4dde7 LibX86: Add an abstract X86::Interpreter class
This abstract class has a pure virtual member function for all of the
X86 instructions. This can be used to implement.. something. :^)
2020-07-07 22:44:58 +02:00
Nico Weber
ad8e784938 LibEdit: Make Ctrl-d on an empty line mean EOD again 2020-07-07 18:43:09 +02:00
Linus Groh
8f3151eea8 Base: Add link to test-common.js in test-js(1) man page
This is an easy way to view this file as the link will open it in Text
Editor :^)
2020-07-07 17:42:50 +02:00
Linus Groh
87465f7c54 Help: Handle external links
Links which do not have the "file" protocol (most commonly links to
external websites - http and https) are now not treated as file paths
anymore but instead handled by Desktop::Launcher.

The same applies to files outside of /usr/share/man.

Fixes #2727.
2020-07-07 17:42:50 +02:00
Andreas Kling
787673b743 WindowServer: Turn an assertion that happens sometimes into a dbg()
It's very annoying to crash the WindowServer when something harmless
is a little weird.
2020-07-07 17:10:12 +02:00
Andreas Kling
5975a425bd LibWeb: Turn floated display:inline elements into block-level elements 2020-07-07 17:10:12 +02:00
Andreas Kling
7527b9ee72 WindowServer: set_active_window() should not assume window has a client
I saw this assertion fire once and I don't know how I made it happen,
but it seems fine for client-less windows to become active, they just
don't have a menubar to install.
2020-07-07 17:10:12 +02:00
Linus Groh
e0e100f009 Base: Add "alias ll='ls -l'" to /etc/shellrc 2020-07-07 16:43:59 +02:00
Linus Groh
d0de3ce0bf Base: Remove "alias sd=SystemDialog" from /etc/shellrc
SystemDialog is no longer a standalone binary.
2020-07-07 16:43:59 +02:00
Nico Weber
564c4634c0 man pages: Consistently use "Otherwise, " in the few places that said "^Else, " 2020-07-07 16:37:46 +02:00
Tom
419703a1f2 Kernel: Fix checking BlockResult
We now have BlockResult::WokeNormally and BlockResult::NotBlocked,
both of which indicate no error. We can no longer just check for
BlockResult::WokeNormally and assume anything else must be an
interruption.
2020-07-07 15:46:58 +02:00
Andreas Kling
1493dd9dc6 Browser: Simplify the History class and fix back/forward history push
This code was previously relying on the PageView::on_load_start hook
firing synchronously when calling PageView::load(). This was not
happening with WebContentView, so it broke the back/forward history.

Instead, we now differentiate between history navigations and normal
loads in Tab::load(). History navigations don't push new entries into
history, but instead just move the history pointer.
2020-07-07 15:09:26 +02:00
AnotherTest
b5e04cb070 Shell: Skip creating a Join node when nothing was parsed
This fixes a crash when Shell tries to highlight `|`.
2020-07-07 14:52:53 +02:00
thankyouverycool
d86dbfe9e8 Help: Make section books open and close when toggled
Much more satisfying!
2020-07-07 13:38:35 +02:00
thankyouverycool
cbf3c2caeb LibGUI: Add on_toggle function to TreeView
This adds a function to expose the index and open/close state
of expandible nodes in TreeView.
2020-07-07 13:38:35 +02:00
thankyouverycool
27109c3467 Base+Help: Add new Help app icons
This adds a new 32x32 Help application icon, a new open book icon,
copies the current book icon as Help's 16x16 icon, and updates
the Help application file to reflect these changes.
2020-07-07 13:38:35 +02:00
Andreas Kling
92374fc942 LibWeb: Make context menus work in WebContentView
As usual, this was just a matter of plumbing the PageClient calls from
the WebContent side over to the WebContentView side. :^)
2020-07-07 12:24:29 +02:00
Andreas Kling
81ea9d1ef6 Base: Turn a whole bunch of /bin symlinks into shell aliases :^) 2020-07-07 11:35:22 +02:00
Andreas Kling
1bc6bb0421 Shell: Run both /etc/shellrc and ~/.shellrc on startup
The global script runs before the local (per-user) one.
2020-07-07 11:35:22 +02:00
Kevin Meyer
7974279a5d LibWeb: Fix PageView::url() null-check 2020-07-07 11:07:44 +02:00
Matthew Olsson
93ebd320ef LibJS: Object.preventExtensions should allow property modfication
Existing properties on a non-extensible object should be changable and
deletable.
2020-07-07 10:47:10 +02:00
Linus Groh
bfbd6df892 test-js: Show progress in taskbar
This was a nice feature the old run-tests.sh script had - let's add it
to test-js as well! :^)
2020-07-07 10:40:06 +02:00
Linus Groh
4c845b35ac Base: Add man page for test-js(1) 2020-07-07 10:39:48 +02:00
Andrew Kaster
02018af0cc Demos: Print out ELF Auxiliary Vector in LinkDemo
This is a test program anyway, so let's double check that the auxv
is done properly here.
2020-07-07 10:38:54 +02:00
Andrew Kaster
f96b827990 Kernel+LibELF: Expose ELF Auxiliary Vector to Userspace
The AT_* entries are placed after the environment variables, so that
they can be found by iterating until the end of the envp array, and then
going even further beyond :^)
2020-07-07 10:38:54 +02:00
Linus Groh
8b76a1e548 js: Remove test mode
Now that we have a standalone test-js program, the "-t" test mode of the
js REPL is unused and can simply be removed. Required functionality has
been duplicated in test-js (isStrictMode function, loading of testing
utilities).

Also remove outdated information about tests from the js(1) man page.
2020-07-07 00:21:30 +02:00
Andreas Kling
651829c1e6 test-js: Use Core::File::is_directory(path) instead of opening file 2020-07-06 23:46:29 +02:00
Matthew Olsson
695ba071a8 test-js: Remove tests_to_run in favor of a DirIterator 2020-07-06 23:40:35 +02:00
Linus Groh
461d90d042 LibJS: Convert Array tests to new testing framework 2020-07-06 23:40:35 +02:00