Commit graph

8593 commits

Author SHA1 Message Date
Sergey Bugaev
eacde6c499 Browser: Fix opening non-file URLs passed in argv 2020-04-19 11:14:26 +02:00
Sergey Bugaev
0aeff9c0c4 AK: Add URL::create_with_url_or_path()
This is an utility to create a URL from a given string, which may be either a
URL such as http://example.com (which will be used as-is), or a file path such
as /etc/fstab (which will be transformed into file:///etc/fstab).
2020-04-19 11:14:26 +02:00
Sergey Bugaev
5a96a6565b AK: Consider more URLs invalid
Not just http or https. This fixes "foo" being recognized as a valid URL with
protocol "foo", empty host and empty path.
2020-04-19 11:14:26 +02:00
Sergey Bugaev
50c139e61c LibCore: Check for fork() failure
For those good boy points :^)
2020-04-19 11:14:26 +02:00
Sergey Bugaev
f8b2a7b4a7 LibCore+LibGUI: Move DesktopServices to LibCore 2020-04-19 11:14:26 +02:00
Linus Groh
03f2024b6e LibJS: Improve CallExpression::execute()'s error messages 2020-04-19 11:00:39 +02:00
Brendan Coles
4e9643981f Base: Update Redmond theme window borders to appear less flat 2020-04-19 10:53:09 +02:00
Noah Rosamilia
3c9a870b8f
Ports: Add frotz port (#1859) 2020-04-19 02:10:41 +02:00
Brendan Coles
1c44ae6d19 Demos: Add Screensaver demo 2020-04-19 02:09:50 +02:00
Kesse Jones
856ab9c600 LibJS: Add Array.prototype.slice 2020-04-19 02:09:06 +02:00
Linus Groh
3474d7c88e WindowServer/LibGUI: Enforce minimum window size 2020-04-19 02:07:45 +02:00
Linus Groh
71d6459b7f LibJS: Use AK::String::index_of() for StringPrototype::index_of() 2020-04-18 22:24:22 +02:00
Stephan Unverwerth
bf5b251684 LibJS: Allow reserved words as keys in object expressions. 2020-04-18 22:23:20 +02:00
Andreas Kling
0345fdcb77 WindowServer: Allow WindowType::Desktop windows to become active
This allows us to focus the desktop and interact with it normally. :^)
2020-04-18 22:15:59 +02:00
Andreas Kling
5dd87c18c4 Base: Start a desktop FileManager by default! :^) 2020-04-18 22:09:40 +02:00
Andreas Kling
dee5d8a047 Build: Make sure to create a /home/anon/Desktop directory 2020-04-18 22:07:15 +02:00
Andreas Kling
7dbb8b6f09 FileManager: Allow running in desktop mode
FileManager can now be started with the --desktop argument. When it's
started in this mode, it will run as a WindowType::Desktop window and
not create any of its regular UI.

The desktop version of the file manager is currently pretty bare-bones
but we can improve it over time and share more code with the regular
file manager windows.

I think this is pretty cool! :^)
2020-04-18 22:04:41 +02:00
Andreas Kling
d42e380906 FileManager: Use URL::create_with_file_protocol() in one place 2020-04-18 22:03:05 +02:00
Andreas Kling
afb9ee2af8 Browser: Use URL::create_with_file_protocol() in one place 2020-04-18 22:02:41 +02:00
Andreas Kling
79eee65372 AK: Add URL::create_with_file_protocol(path)
This is a convenience helper that allows you to easily construct a
file:// URL from an absolute path.
2020-04-18 22:02:04 +02:00
Andreas Kling
75daf3857b FileManager: Use GUI::DesktopServices::open() to open files
Instead of squirreling away this logic deep in the FileManager app,
we now delegate file opening to GUI::DesktopServices.
2020-04-18 21:58:04 +02:00
Andreas Kling
3f08dd5ddc LibGUI: Add GUI::DesktopServices::open(URL)
This API is used to open a URL in whatever way the desktop system feels
is best. If you give it a file:// URL, it will try to work out a good
application to open the URL with. For all other protocols, it will open
a Browser instance. :^)
2020-04-18 21:56:28 +02:00
Andreas Kling
d17b42b28d LibGUI: Make view widgets fill background by default
Most clients will want background autofill, so let's make it the
default mode.
2020-04-18 21:55:37 +02:00
Andreas Kling
c7b7b65309 LibGUI: Fix ItemView crash when rubberbanding in main widget view
For some reason this was trying to access the Palette of the parent
widget which is obviously not going to work if the ItemView itself is
the main widget in its window.
2020-04-18 21:25:43 +02:00
Andreas Kling
54c980dbf2 LibGUI: Make ItemView respect Widget::fill_with_background_color()
This makes it possible to create a see-through ItemView. :^)
2020-04-18 21:23:39 +02:00
Andreas Kling
95805c0e56 WindowServer: Give the desktop window the whole exact desktop rect 2020-04-18 21:18:11 +02:00
Andreas Kling
3d31f2e44b WindowServer: Add WindowType::Desktop
This new window type can be used to implement a desktop file manager
for example. :^)
2020-04-18 21:10:16 +02:00
Andreas Kling
88908be350 LibWeb: Parse <br/> into a self-closed br element
We were parsing "<br/>" as an open tag with the name "br/". This fixes
that specific scenario.

We also rename is_self_closing_tag() to is_void_element() to better fit
the specs.
2020-04-18 20:35:18 +02:00
Andreas Kling
6adea6069a Base: Tweak Redmond 2000 selection color 2020-04-18 20:35:18 +02:00
Brendan Coles
e87347e1d3 IRCClient: Use sub-menus for app channel menu and member context menu 2020-04-18 19:49:05 +02:00
Andreas Kling
2de843692c Base: Tweak Redmond 2000 menu selection color 2020-04-18 19:44:57 +02:00
Andreas Kling
3bed5e28fb Base: Add a "Redmond 2000" theme from the 32-bit era :^) 2020-04-18 19:42:38 +02:00
Andreas Kling
638130591c Taskbar: Remove frame around quick-launch icons 2020-04-18 18:22:37 +02:00
Emanuel Sprung
bf00e33a04 ProfileViewer: Make the invert menu item visible again :^) 2020-04-18 18:01:00 +02:00
Brendan Coles
f8e3aa1ad9 Base: Add Redmond theme 2020-04-18 17:49:50 +02:00
Andreas Kling
e3b450005f Kernel: Remove CommandLine::get() in favor of lookup()
lookup() returns an Optional<String> which allows us to implement easy
default values using lookup(key).value_or(default_value);
2020-04-18 14:22:42 +02:00
Stephan Unverwerth
cebb619f8e LibJS: Fix parsing of IfStatement, fixes #1829 2020-04-18 14:04:24 +02:00
Andreas Kling
3072f9fd82 LibJS: Move the empty object shape from Interpreter to GlobalObject
The big remaining hurdle before a GlobalObject-agnostic Interpreter is
the fact that Interpreter owns and vends the GlobalObject :^)
2020-04-18 13:59:20 +02:00
wilsonk
75f6454de7
AK: Dual pivot quicksort implementation (#1838) 2020-04-18 13:58:49 +02:00
Sergey Bugaev
54550365eb Kernel: Use shared locking mode in some places
The notable piece of code that remains to be converted is Ext2FS.
2020-04-18 13:58:29 +02:00
Sergey Bugaev
05ba4295e9 Kernel: Introduce shared locking mode
A Lock can now be held either in shared or exclusive mode. Multiple threads can
hold the same lock in shared mode at one time, but if any thread holds the lock
in exclusive mode, no other thread can hold it at the same time in either mode.
2020-04-18 13:58:29 +02:00
Sergey Bugaev
2f15449531 Kernel: Compactify FileDescrption
The next commit is going to make it bigger again by increasing the size of Lock,
so make use of bitfields to make sure FileDescription still fits into 64 bytes,
and so can still be allocated with the SlabAllocator.
2020-04-18 13:58:29 +02:00
Andreas Kling
9a109128f8 Cube: Two small tweaks
I noticed these when playing with the demo locally:

- Use RGB32 instead of RGBA32 for the bitmap buffer. This avoids some
  flickering that would sometimes occur.

- Clip the gradient fill to the widget rect rather than the painter
  clip rect. In practice, the painter was always clipped to the widget
  rect here, but it seems logical to say "fill widget with gradient."
2020-04-18 13:46:55 +02:00
Andreas Kling
fca08bd000 LibJS: Move builtin prototypes to the global object
This moves us towards being able to run JavaScript in different global
objects without allocating a separate GC heap.
2020-04-18 13:24:45 +02:00
Stephan Unverwerth
cbcf317e76 LibGfx: Fix draw_triangle() clipping calculations 2020-04-18 13:24:34 +02:00
bcoles
e2f0e36bdb
Base: Add Browser to QuickLaunch (#1836) 2020-04-18 12:36:00 +02:00
Linus Groh
d14ddb6461 LibJS: Implement nullish coalescing operator (??) 2020-04-18 12:34:13 +02:00
Stephan Unverwerth
1806592d58 Demos: Add 3D Cube Demo
This renders a spinning 3D cube and demonstrates the 3D math classes
from LibGfx.
2020-04-18 12:28:54 +02:00
Stephan Unverwerth
2dcc38d7bf LibGfx: Add Vector3 and Matrix4x4 classes
This adds two templated 3D math classes. They have already been typedf'd
as FloatVector3, DoubleVector3, FloatMatrix4x4 and DoubleMatrix4x4
2020-04-18 12:28:54 +02:00
Stephan Unverwerth
acd4676803 LibGfx: Add draw_triangle() for drawing filled triangles 2020-04-18 12:28:54 +02:00