Commit graph

9977 commits

Author SHA1 Message Date
Andreas Kling
772b51038e LibWeb: Parse "input" tags during the "in body" insertion mode 2020-05-28 12:19:18 +02:00
Andreas Kling
7aa7a2078f LibWeb: Parse "td" start tags during "in cell" insertion mode 2020-05-28 11:46:08 +02:00
Andreas Kling
49f3323fa8 LibGUI: Don't show big Buggie in app about dialogs
It was getting to crowded between two Buggies and the app icon.
2020-05-28 11:45:01 +02:00
Andreas Kling
5c35f3c9ba LibWeb: Support named character references (e.g "&") 2020-05-28 11:44:19 +02:00
AnotherTest
ca6e361279 Base: Add manpage for xargs 2020-05-28 11:01:08 +02:00
AnotherTest
0b98924ee7 Userland: Add a basic xargs
This adds a basic implementation of xargs.
The implemenation is missing quite a few options, and is not entirely
POSIX-compliant, but it gets the job done :^)
2020-05-28 11:01:08 +02:00
AnotherTest
dd2f9658f3 LibC: Add a O_CLOEXEC mode element to fopen()
This commit also changes the mode parsing to allow specifying the modes
in any order.
2020-05-28 11:01:08 +02:00
AnotherTest
f9bf2c7e78 AK: Add StringView::split_view() taking a StringView
Since the task of splitting a string via another is pretty common, we
might as well have this overload of split_view() as well.
2020-05-28 11:01:08 +02:00
Andreas Kling
d83d46fd7a Kernel: Remove outdated FIXME in InterruptManagement::locate_apic_data 2020-05-28 10:55:51 +02:00
FalseHonesty
112b4de430 IRCClient: Enable history on the message box 2020-05-28 10:33:20 +02:00
etaIneLp
330aecb5d8
Build: Use a separate byproduct name for the GRUB disk image (#2424)
The grub-image target no longer conflicts with normal image target.
This unbreaks using CMake with Ninja.

Fixes #2423.
2020-05-28 10:08:38 +02:00
etaIneLp
7bc871ca8d Kernel: Stop bootloader from setting video mode with Multiboot
Meta: Update INSTALL.md and grub configs for new boot_mode option
2020-05-28 00:50:55 +02:00
etaIneLp
eae4843712 Documentation: Update INSTALL.md for new build system 2020-05-28 00:50:55 +02:00
etaIneLp
2ec07655cf Meta: Grub configs use correct kernel image name 2020-05-28 00:50:55 +02:00
etaIneLp
0c1ed0ebf3 Meta: build-image-grub.sh looks for grub configs in the right place 2020-05-28 00:50:55 +02:00
etaIneLp
775d44efb5 Build: Add grub-image target to CMake 2020-05-28 00:50:55 +02:00
Andreas Kling
ebb1649a52 LibWeb: Implement more table support in the new HTML parser
This is enough to parse the Google front page! (Note: I did have to
hack the tokenizer while parsing Google, in order to avoid named
character references screwing everything up. We'll fix that too soon
enough!)
2020-05-28 00:27:46 +02:00
Andreas Kling
7f18c51f4c LibWeb: Flesh out "reset the insertion mode appropriately" algorithm 2020-05-28 00:27:00 +02:00
Andreas Kling
2a97127faa LibWeb: Handle various self-closing tags during "in body" insertion
We can now parse self-closing "<img>" tags correctly! :^)
2020-05-28 00:25:56 +02:00
Andreas Kling
f69001339f LibWeb: Handle inline stylesheets a bit better in the new parser
While we're still supporting both the old and the new parser, we have
to deal with the way they load inline stylesheet (and scripts) a bit
differently.

The old parser loads all the text content up front, and then notifies
the containing element. The new parser creates the containing element
up front and appends text inside it afterwards.

For now, we simply do an empty "children_changed" notification when
first inserting a text node inside an element. This at least prevents
the CSS parser from choking on a single-character stylesheet.
2020-05-28 00:23:34 +02:00
Andreas Kling
3ce1af27dc LibWeb: Parse documents without DOCTYPE gracefully
Seems like SOMEONE forgot to put a <!DOCTYPE html> on serenityos.org..
No matter, now we can handle it in the new parser! :^)
2020-05-28 00:22:08 +02:00
Andreas Kling
422e00c806 LibWeb: Add a "quirks mode" flag to Document
This doesn't do anything yet, but it will sooner or later. :^)
2020-05-28 00:20:36 +02:00
Andreas Kling
d25ffd3ed8 LibWeb: Fire a DOMContentLoaded event when the new parser is finished
With this change, we can finally load and render welcome.html :^)
2020-05-27 23:32:50 +02:00
Andreas Kling
db6cf9b37d LibWeb: Implement the first half of the Adoption Agency Algorithm
The AAA is a somewhat daunting algorithm you have to run for certain
tag when inserted inside the <body> element. The purpose of it is to
resolve issues with mismatched tags.

This patch implements the first half of the AAA. We also move the
"list of active formatting elements" to its own class, since it kept
accumulating little behaviors. "Marker" entries are now signified by
null Element pointers in the list.
2020-05-27 23:22:42 +02:00
Andreas Kling
4c9c6b3a7b LibWeb: Bring up basic external script execution in the new parser
This only works in some narrow cases, but should be enough for our own
welcome.html at least. :^)
2020-05-27 23:02:03 +02:00
Andreas Kling
2cb50f6750 LibWeb+Browser: Add ability to run Browser with the new HTML parser
You can now pass "-n" to the browser to use the new HTML parser.
It's not turned on by default since it's still very immature, but this
is a huge step towards bringing it into maturity. :^)
2020-05-27 21:57:30 +02:00
FalseHonesty
08e2907210 Browser: Add console history to re-send old commands
The console has now enabled history in its input text box. Pretty
nice to not have to retype things all the time :^)
2020-05-27 20:04:52 +02:00
FalseHonesty
139dbfd5b5 LibGUI: Add up & down arrow hooks and input history to TextBox
This patch adds the ability to enable "input history" on a textbox,
allowing to navigate between the history with the arrow keys.

Also removes a custom TextBox subclass from HackStudio that added
the exact same hooks, and moves it to use the now standard ones.
2020-05-27 20:04:52 +02:00
Andreas Kling
893a9ff5b0 LibTextCodec: Improve Latin-1 decoder so it decodes everything
I can now see Swedish letters when opening Google in the browser. :^)
2020-05-27 19:52:18 +02:00
Andreas Kling
35040dd2c4 LibWeb: LayoutMode line_break_policy => LayoutMode layout_mode 2020-05-27 19:52:18 +02:00
Andreas Kling
a8f0e4d56e LibGUI: Defer line reflow during text insertion
Add a deferral counter and defer reflowing the visual lines until the
counter is at zero. Use this to defer reflow when inserting text.

This fixes glacial slowdown while paste large amounts of text.
2020-05-27 19:52:18 +02:00
Andreas Kling
30edd198ec LibGUI: Make TextEditor::select_all() move the cursor to document head
This feels a lot nicer than moving the cursor to the document end.
2020-05-27 19:52:18 +02:00
Linus Groh
99e775cee3 LibJS: Reformat ArrayPrototype.cpp 2020-05-27 19:51:52 +02:00
Andreas Kling
39b5494aeb LibWeb: Implement the "after attribute name" tokenizer state
One little step at a time towards parsing the monster blob of HTML we
get from twitter.com :^)
2020-05-27 18:30:29 +02:00
Andreas Kling
1b0c39ca60 LibWeb: Handle more benign parse errors in the "in body" insertion mode 2020-05-27 18:30:29 +02:00
Andreas Kling
1de29e3f59 LibWeb: Implement the "self closing start tag" tokenizer state 2020-05-27 18:30:29 +02:00
Andreas Kling
a34258b3d7 ProtocolServer: Forget downloads after they are stopped
Stopping means the client no longer cares about the download, so we
should just forget about it in the server.
2020-05-27 18:30:29 +02:00
Andreas Kling
a5ce09f8e3 LibWeb: Implement partial support for numeric character references 2020-05-27 18:30:27 +02:00
Matthew Olsson
dd08c992e8 LibJS: Simplify and normalize publicly-exposed Object functions
Previously, the Object class had many different types of functions for
each action. For example: get_by_index, get(PropertyName),
get(FlyString). This is a bit verbose, so these methods have been
shortened to simply use the PropertyName structure. The methods then
internally call _by_index if necessary. Note that the _by_index
have been made private to enforce this change.

Secondly, a clear distinction has been made between "putting" and
"defining" an object property. "Putting" should mean modifying a
(potentially) already existing property. This is akin to doing "a.b =
'foo'".

This implies two things about put operations:
    - They will search the prototype chain for setters and call them, if
      necessary.
    - If no property exists with a particular key, the put operation
      should create a new property with the default attributes
      (configurable, writable, and enumerable).

In contrast, "defining" a property should completely overwrite any
existing value without calling setters (if that property is
configurable, of course).

Thus, all of the many JS objects have had any "put" calls changed to
"define_property" calls. Additionally, "put_native_function" and
"put_native_property" have had their "put" replaced with "define".

Finally, "put_own_property" has been made private, as all necessary
functionality should be exposed with the put and define_property
methods.
2020-05-27 13:17:35 +02:00
Andreas Kling
59a32f29b0 test-crypto: Tweaks to make this build properly in Lagom 2020-05-27 12:39:58 +02:00
Andreas Kling
5f9de61bf2 Lagom: Build LibCrypto, LibTLS and test-crypto :^) 2020-05-27 12:28:39 +02:00
Andreas Kling
c1dd67e792 LibCrypto+LibTLS: Use AK/Random.h
This makes it possible to build both of these on Linux.
2020-05-27 12:28:17 +02:00
Andreas Kling
9a113b0229 AK: Add a simple randomness API
This can be used in code that builds on non-Serenity platforms.
2020-05-27 12:25:46 +02:00
Nick Vella
e53fa97cfb LibGUI, About: Implement system-wide W2k-esque About dialog
The new About dialog reads version information from /res/version.ini,
which is generated at build time.
2020-05-27 11:44:19 +02:00
Emanuele Torre
0d5b43552d Meta: Update C++ standard to C++20 in CONTRIBUTING.md
We are compiling with `-std=c++2a` and we are using some C++20 features,
e.g. in Kernel/VM/Region.h
    bool m_shared : 1 { false };
    bool m_user_accessible : 1 { false };
    bool m_cacheable : 1 { false };
    bool m_stack : 1 { false };
    bool m_mmap : 1 { false };
2020-05-27 11:22:14 +02:00
Sergey Bugaev
ae21b8ee56 Base: Replace TTYServer with text mode Shell
Now that we have SystemServer that can (re)spawn the Shell, we don't need a
separate server just for that.

The two shells (on tty0 and tty1) are configured to only be started when booting
in text mode. This means you can now simply say boot_mode=text on the kernel
command line, and SystemServer will set up the system and spawn a comfy root
shell for you :^)
2020-05-27 11:19:38 +02:00
Sergey Bugaev
856e4853f4 SystemServer: Add BootModes and Environment service options
SystemServer will now look at the boot mode, as specified on the kernel command
line, and only launch the services configured for that boot mode.
2020-05-27 11:19:38 +02:00
Sergey Bugaev
df128821b2 Kernel: Introduce "boot_mode" and "init" cmdline options
Together, they replace the old text_debug option.

* boot_mode should be either "graphical" (the default) or "text". We could
  potentially support other values here in the future.
* init specifies which userspace process the kernel should spawn to bootstrap
  userspace. By default, this is SystemServer, but you can specify e.g.
  init=/bin/Shell to run system diagnostics.
2020-05-27 11:19:38 +02:00
Sergey Bugaev
f11270e7ce Kernel: Port VirtualConsole to LibVT :^)
Unfortunately this drops the feature of preserving VGA buffer contents.

Resolves https://github.com/SerenityOS/serenity/issues/2399
2020-05-27 11:19:38 +02:00
Sergey Bugaev
620697d924 LibVT: Move most of key press handling logic into VT::Terminal
This will let us share it between the userspace (TerminalWidget) and the Kernel.
2020-05-27 11:19:38 +02:00