Commit graph

898 commits

Author SHA1 Message Date
Nicholas Hollett 3c5f75ed53 LaunchServer: Discover handlers from *.af files, allow launching based on a known handler
Adds metadata about apps for what file types and protocols they can
handle, then consumes that in the LaunchServer. The LaunchServer can
then use that to offer multiple options for what apps can open a given
URL. Callers can then pass back the handler name to the LaunchServer to
use an alternate app :)
2020-05-18 11:27:27 +02:00
Andreas Kling 5aba8cc750 Base: Add thinking face emoji (U+1F914) 🤔 2020-05-18 09:52:48 +02:00
jarhill0 50c116e57b Base: Add smiling face with horns emoji (U+1F608) 😈 2020-05-18 09:36:00 +02:00
jarhill0 50336dc6ff Base: Add splashing sweat emoji (U+1F4A6) 💦 2020-05-18 09:36:00 +02:00
jarhill0 ec8edee19e Base: Add cherries emoji (U+1F352) 🍒 2020-05-18 09:36:00 +02:00
jarhill0 5fa40080cd Base: Add peach emoji (U+1F351) 🍑 2020-05-18 09:36:00 +02:00
jarhill0 aabad11dbf Base: Add eggplant emoji (U+1F346) 🍆 2020-05-18 09:36:00 +02:00
jarhill0 054385ae0e Base: Add Cancer emoji (U+264B) 2020-05-18 09:36:00 +02:00
Linus Groh ab2bb583a4 Base: Add "smiling face with sunglasses" emoji (U+1F60E) 2020-05-17 09:43:51 +02:00
Linus Groh 99a2f9517e Base: Add "smiling face with open mouth and tightly-closed eyes" emoji (U+1F606) 2020-05-17 09:43:51 +02:00
Linus Groh 09e5c37e4e Base: Add "smiling face with open mouth and smiling eyes" emoji (U+1F604) 2020-05-17 09:43:51 +02:00
Linus Groh dcb35739a0 Base: Add "smiling face with open mouth" emoji (U+1F603) 2020-05-17 09:43:51 +02:00
Linus Groh 1f9dcd9174 Base: Add "grinning face" emoji (U+1F600) 2020-05-17 09:43:51 +02:00
Linus Groh 3fb9cad019 Base: Add "no entry" emoji (U+26D4) 2020-05-17 09:43:51 +02:00
Linus Groh 0e15d51a73 Base: Add "warning sign" emoji (U+26A0) 2020-05-17 09:43:51 +02:00
Linus Groh edb795218d Base: Add "eyes" emoji (U+1F440) 2020-05-17 09:43:51 +02:00
Linus Groh bb0c137bdf Base: Add "smiling face with smiling eyes" emoji (U+1F60A) 2020-05-17 09:43:51 +02:00
jarhill0 c52f4923ed Base: Add "Grimacing Face" emoji 2020-05-16 22:49:00 +02:00
jarhill0 ede82e5caa Base: Add "Face Without Mouth" emoji 2020-05-16 22:49:00 +02:00
jarhill0 a2bd4f0c27 Base: add Upside-Down Face emoji
This is not simply an inversion of the Slightly Smiling Face emoji.
The facial features were flipped vertically but the underlying "face"
was kept the same, because for both emojis the top is lighter than the
bottom.
2020-05-16 22:49:00 +02:00
Linus Groh ccc4cf915a Base: Add file containing all emojis we support to /home/anon 2020-05-16 22:25:33 +02:00
Linus Groh b0ae32d09a Base: Add "Fire" emoji (U+1F525) 2020-05-16 22:25:33 +02:00
Linus Groh 9f064d4439 Base: Add "Thumbs down sign" emoji (U+1F44E)
...yes, just a mirrored copy of the thumbs up emoji :^)
2020-05-16 20:57:53 +02:00
Andreas Kling 5ee79e6657 Base: Add a basic "Thumbs up sign" emoji (U+1F44D) :^) 2020-05-16 20:04:15 +02:00
Sergey Bugaev f7ae66cee3 ClipboardHistory: Add a clipboard history applet :^)
It will listen for clipboard content changes in the backgroud. Once you click
on its icon, it will pop up a window listing all recorded clipboard contents.
You can then double-click on an item to copy it again.
2020-05-16 09:13:25 +02:00
Sergey Bugaev 00c166e2ca Base: Allow NotificationServer to access the Clipboard
Otherwise it fails to even start.
2020-05-15 11:43:58 +02:00
Andreas Kling 244efe050a Clipboard: Move the system clipboard to a dedicated service process :^)
This commit moves the clipboard from WindowServer into a new Clipboard
service program. Clipboard runs as the unprivileged "clipboard" user
and with a much tighter pledge than WindowServer.

To keep things working as before, all GUI::Application users now make
a connection to Clipboard after making the connection to WindowServer.
It could be interesting to connect to Clipboard on demand, but right
now that would necessitate expanding every GUI app's pledge to include
"unix" and also unveiling the clipboard portal, which I prefer not to.
2020-05-14 22:53:58 +02:00
Linus Groh 7bfd24ca76 LibWeb: Support the :root pseudo class 2020-05-14 08:49:51 +02:00
Andreas Kling 23ee68c63e PaintBrush: Borrow the "move" cursor for the "move" tool :^) 2020-05-13 00:11:47 +02:00
Andreas Kling 5f9d80d8bc LibWeb: Add basic support for CSS percentages
Many properties can now have percentage values that get resolved in
layout. The reference value (what is this a percentage *of*?) differs
per property, so I've added a helper where you provide a reference
value as an added parameter to the existing length_or_fallback().
2020-05-11 23:07:30 +02:00
Ben Wiederhake 87b6578516 FontEditor: Fix link to icon after it moved
Fixup for 6f2837cb13
2020-05-11 09:29:30 +02:00
Linus Groh 4c1a765076 LibWeb: Add basic support for "border-style: {dotted,dashed}" 2020-05-10 19:41:00 +02:00
Andreas Kling 61e112d3b7 DisplaySettings: Tweak app icon 2020-05-10 14:40:36 +02:00
Andreas Kling 5af4ad097f Base: Open .font files in FontEditor again
This broke when we introduced LaunchServer.
2020-05-10 14:24:04 +02:00
Linus Groh d3d29ea1cc Demos: Add LibGfx Demo :^) 2020-05-10 13:34:59 +02:00
Andres Vieira cbbfc08f1d Docs: Add unzip(1) man page 2020-05-09 23:50:44 +02:00
Andres Vieira 78f334f447 Base: Add a "zip" folder to /home/anon/ with a .zip file to test 2020-05-09 23:50:44 +02:00
Andreas Kling 7b34f5bb92 LaunchServer: Don't use SystemServer keepalive 2020-05-09 16:57:35 +02:00
Andreas Kling 68991855ef Base: Open https:// URLs in Browser 2020-05-09 15:17:29 +02:00
Andreas Kling 3d41cc849c LaunchServer: Run with portal permissions 600
The LaunchServer is personal to "anon" and we don't want other users
accessing it to launch anything.
2020-05-09 15:16:16 +02:00
Nicholas Hollett 2708cc0f72 LaunchServer: Add the LaunchServer to centralise file associations.
Step one of moving DesktopServices::open handling out of process. This
makes it easier to do things like read in associations for which program
opens which files or protocols. This gives users the ability to modify
the associations without having to rebuild :^)
2020-05-09 15:12:56 +02:00
Hüseyin ASLITÜRK 6f2837cb13 Base: Move 32px font editor app icon under 32x32 folder 2020-05-09 10:00:13 +02:00
Andreas Kling 5bfd893292 Kernel+Userland: Add "settime" pledge promise for setting system time
We now require the "settime" promise from pledged processes who want to
change the system time.
2020-05-08 22:54:17 +02:00
Hüseyin ASLITÜRK cef2dce9a1 Base: Add emoji files for 26A1, 2B06 and 2B07 2020-05-08 09:49:41 +02:00
Linus Groh c1a6841cb2 Base: Add "`" to GB keymap 2020-05-07 22:13:46 +02:00
AnotherTest a82419469f LibWeb: Add canvas.fill
This implements only one of the two forms of this function,
ctx.fill(winding_rule).
Also tweaks the quadratic curve demo to have a nice looking filled
shape.
2020-05-06 14:50:29 +02:00
Andreas Kling e73ad78ba6 LibWeb: Add support for "display: inline-block"
This display type is implemented using a LayoutBlock that is_inline().
Basically it behaves like a block internally, and its children are laid
out in the normal block layout fashion. Externally however, it behaves
like an atomic inline-level box.

Layout of inline-block boxes happens in three stages:

1. The outer dimensions of the block are computed during the recursive
   normal layout pass. We skip positioning, but lay out children.

2. Later on, during line layout in the *containing block*, the inline
   block now contributes a linebox fragment. When linebox fragments are
   positioned, we learn the final position of the inline block. That's
   when we set the inline block's position.

3. We re-layout the inline block's children once again. This is done to
   make sure they end up in the right position. The layout tree doesn't
   use relative offsets, so after we position the inline block in (2),
   its children will not have its positions updated. Relayout moves
   all children of inline blocks to the right place.

This is a rather naive approach but it does get the basic behavior into
place so we can iterate on it. :^)
2020-05-05 16:18:28 +02:00
Sergey Bugaev 983e541584 Base: Fix a typo 2020-05-05 11:07:06 +02:00
AnotherTest 0a55679de4 LibWeb: Add canvas.quadraticCurveTo()
Also adds a test, and removes debug spam ™️
2020-05-05 09:21:07 +02:00
Sergey Bugaev 718271c9df Base: Document unveil(2)
Also, escape underscores in chroot_with_mount_flags.
2020-05-04 21:44:50 +02:00
Ben Wiederhake fe178b6234 SystemMenu+MouseDemo: Add menu entry and nice icons 2020-05-04 09:58:14 +02:00
Andreas Kling a83d74b38c Base: Add browser bookmark for Google :^) 2020-05-03 23:01:58 +02:00
Shannon Booth 0e403a43a4 Terminal: Add config for startup command
This is useful when working on a program as you can put the command into
the config file, instead of having to type it up each time on boot.
2020-05-02 14:12:57 +02:00
Brendan Coles 548ecceb75 Screensaver: Add app-screensaver.png 16x16 icon 2020-05-02 14:12:45 +02:00
AnotherTest 72d56b46b5 LibTLS: Make enough stuff work to have a demo run
...maybe, sometimes :^)
2020-05-02 12:24:10 +02:00
Brendan Coles 905de7df58 Fire: Add app-fire.png 16x16 icon 2020-05-02 11:42:29 +02:00
Brendan Coles 6c1e842a7e Cube: Add app-cube.png 16x16 icon 2020-05-02 11:42:21 +02:00
Andreas Kling e9b7a51a9a Base: Tweak MessageBox icons a tiny bit 2020-05-02 01:29:55 +02:00
LepkoQQ c7f0de14b5 LibGfx: Decode paletted and grayscale images with 1/2/4 bit depth
When dealing with png data that has less than 8 bits per pixel, round
up to the next byte when allocating per row buffers and streamers. This
fixes decoding odd sized PNGs with less than 8 bits per pixel.

Also added a test page with some odd sized palleted PNGs.
2020-05-02 01:28:18 +02:00
Linus Groh e37065cc8b Base: Update js(1) manpage
Syntax highlighting is now enabled by default!
2020-05-02 01:23:50 +02:00
Andreas Kling b5039a047f Base: Adjust filetype icons to be right-aligned for consistency
Established convention is for the flavor icon to go on the right side.
2020-05-01 17:23:41 +02:00
Hüseyin ASLITÜRK d8477074b9 Base: Icons for INI, Object and Library file types 2020-05-01 16:58:18 +02:00
Andreas Kling 23d99e92b9 WindowServer: Add action icons to the window menus 2020-04-30 12:58:38 +02:00
Andreas Kling e8a5c10382 Base: Add back the OG grid wallpaper from back in the day, now as a PNG 2020-04-30 12:31:02 +02:00
Andreas Kling 51df4bdbfc DisplaySettings: Rename from DisplayProperties 2020-04-29 15:53:51 +02:00
Andreas Kling 40fe076e10 Base: Tweak default desktop background color slightly 2020-04-29 14:37:10 +02:00
Linus Groh 8f2300afb5 mkdir: Add -p option to create parent directories 2020-04-28 09:36:09 +02:00
Linus Groh 6fd7966d81 mkdir: Use ArgParser, support creating multiple directories 2020-04-28 09:36:09 +02:00
Andreas Kling e3232eb25b LibWeb: Support loading data: URLs transparently via ResourceLoader
This is pretty darn cool! :^)
2020-04-26 22:57:00 +02:00
Hüseyin ASLITÜRK 59f87d12d0 Base: 32x32 icons for cplusplus and header file types 2020-04-26 21:31:41 +02:00
Andres Vieira 88368df9a2 Base+Browser: Add an icon for the serenity Browser and make it use it
Browser was using the filetype-html icon instead of a dedicated one, so
we now have the globe from that icon reimagined and in good Buggie
company :^)
2020-04-26 21:13:57 +02:00
LepkoQQ b094c064d8 Base: Add test page for decoding different basic png formats. 2020-04-26 20:29:17 +02:00
LepkoQQ 35dda6222e Base: Improve cursor arrow to feel more symetrical 2020-04-26 18:17:46 +02:00
Linus Groh 4d0a344da0 Base+LibGUI: Add icon for Python files 2020-04-26 01:12:14 +02:00
Linus Groh a36ceffb56 Emoji: Rename U+1F600.png to U+1F41E.png (ladybug)
The image for U+1F600 "GRINNING FACE" shows a ladybug, but the
codepoint of that emoji is actually U+1F41E "LADY BEETLE" :^)
2020-04-26 01:12:03 +02:00
Andreas Kling cba9550f1c HackStudio: Toolbar icon overhaul 2020-04-25 14:17:02 +02:00
Itamar 74f41d5f98 HackStudio: Add cpp debugger
The HackStudio debugger integrates with LibDebug to provide
source-level debugging.

The user can set breakpoints at various positions in the source code,
and then run the program in debug mode.

When the program is stopped, the current execution position is
displayed, and the user can insert/remove breakpoints, continue
execution, or single step the program.
2020-04-25 13:16:46 +02:00
Itamar 393560d8a2 HackStudio: GUI support for setting breakpoints on source code lines 2020-04-25 13:16:46 +02:00
Brendan Coles 6dde2c7f47 Browser: Add Browser.ini configuration file
The Browser can now load a home page URL from the user's Browser.ini
configuration file rather than using a hard-coded URL.
2020-04-25 10:55:55 +02:00
Andreas Kling 45a932a600 Base: New "cut" action icon 2020-04-24 20:42:34 +02:00
Andreas Kling 9d8620f956 Browser: Add icons for the "new tab" and "close tab" actions 2020-04-24 20:42:34 +02:00
Andreas Kling 2b64cf3efe Base: New "open" and "save" action icons 2020-04-24 20:42:34 +02:00
Andreas Kling 7db0194d4b Base: Tweak Calendar app icon 2020-04-24 20:42:34 +02:00
Andreas Kling 4218b00cb4 Base: Tweak ladybug icon 2020-04-24 17:10:59 +02:00
Linus Groh 746dd5b190 LibJS: Implement computed properties in object expressions 2020-04-23 23:56:04 +02:00
Andreas Kling 5fc02c6f1d Base: Nudge Redmond theme closer to the Windows 95 colors :^) 2020-04-23 19:59:12 +02:00
Andreas Kling 42ddd551ef Base: Tweak filetype-javascript icon and add 32x32 version 2020-04-23 19:08:33 +02:00
Andreas Kling 0f8dca9441 Base: Tweak new/open/save icons (make them a bit smaller) 2020-04-23 18:52:33 +02:00
Andreas Kling 2454c3b7fb Applications: Remove ChanViewer app
The HTTP JSON API this relied on is no longer available via HTTP and
I would rather make the website work in Browser anyway. :^)
2020-04-23 18:38:54 +02:00
Andreas Kling 9142890822 Base: Tweak icons with arrows in them (to be more pointy) 2020-04-23 18:35:15 +02:00
Andreas Kling 622806f570 Base: Tweak go-home icon 2020-04-23 18:31:03 +02:00
Emanuele Torre a804615b9b Base: Close head tag in canvas-path.html and give the document a title 2020-04-23 09:42:43 +02:00
Brendan Coles 9ab4a8179a TextEditor: Add "Find Previous" 16x16 icon 2020-04-22 17:14:36 +02:00
Brendan Coles 802c06ab7b Base: Add missing Syntax color settings for Joi theme 2020-04-22 11:48:38 +02:00
Brendan Coles 7e01e38cf4 Base: Add Sunshine theme 2020-04-22 11:47:42 +02:00
Hüseyin ASLITÜRK 84317df579 Base: Add QuickShow application to system menu 2020-04-21 12:03:35 +02:00
Brendan Coles a47b9fe490 TextEditor: Add "Find Next" 16x16 icon 2020-04-21 09:49:47 +02:00
angel 441c2715bb LibGUI: Add Select all action to TextEditor
Previously, TextEditor processed the Select all command directly on the
keydown event handler. For this reason, WindowManager would not process
it as an action for the focused control and an action with the same
keyboard shortcut from the parent could override the TextEditor's one
even when it is focused.

For instance, when pressing Ctrl+A on the FileManager's path bar, all
files were selected instead, which is not the expected behavior.

Now the Select all command is an actual action on TextEditor, so that
WindowManager can process it correctly before any other actions. I also
added an icon for it!
2020-04-20 22:43:40 +02:00
Andreas Kling badbe8bc99 Solitaire: Sharpen 16x16 icon 2020-04-20 15:24:59 +02:00
Andreas Kling 8311b24620 Solitaire: Use a pre-scaled buggie image for the back of cards
Instead of scaling on the fly, which is not super aesthetic yet.
2020-04-20 15:24:59 +02:00
Linus Groh f38897ef20 Base: Add Demo applications to system menu 2020-04-19 18:16:11 +02:00
Linus Groh 440f017946 Base: Update js(1) manpage
- Include all options
- Update example REPL session to match current output
- Mention REPL's help()
- Add test mode section
2020-04-19 15:22:31 +02:00
Sergey Bugaev 15daf88e93 Base: Document open(1) 2020-04-19 11:14:26 +02:00
Brendan Coles 4e9643981f Base: Update Redmond theme window borders to appear less flat 2020-04-19 10:53:09 +02:00
Andreas Kling 5dd87c18c4 Base: Start a desktop FileManager by default! :^) 2020-04-18 22:09:40 +02:00
Andreas Kling 6adea6069a Base: Tweak Redmond 2000 selection color 2020-04-18 20:35:18 +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
Brendan Coles f8e3aa1ad9 Base: Add Redmond theme 2020-04-18 17:49:50 +02:00
bcoles e2f0e36bdb
Base: Add Browser to QuickLaunch (#1836) 2020-04-18 12:36:00 +02:00
Read H 0ef2efac7c Base files: Add protocols file
This commit adds the standard /etc/protocols file to
the base files to be used by netdb's protoent family of functions.
2020-04-18 10:11:55 +02:00
Andreas Kling 0d93e249c3 LibWeb: Add some basic path drawing functionality to the canvas element
This patch adds the following methods to CanvasRenderingContext2D:

- beginPath()
- moveTo(x, y)
- lineTo(x, y)
- closePath()
- stroke()

We also add the lineWidth property. :^)
2020-04-16 21:06:03 +02:00
Read H ce572c9cb5 Base Files: Add services file.
Adding the services database file to /etc/services. This is the most
common location for this file in *nix systems.
2020-04-16 15:55:45 +02:00
Andreas Kling aab022b77b Base: Add a little test web page for canvas drawImage() :^) 2020-04-14 20:42:14 +02:00
Linus Groh dd7796515f LibJS: Add console.{debug,info,warn,error}() 2020-04-12 18:42:42 +02:00
Hüseyin ASLITÜRK 74a8e3fe1c Base: Add go-first, go-last, zoom-in, zoom-out icons 2020-04-12 18:08:11 +02:00
Linus Groh 54fc972a72 MenuApplets: Support memory usage and custom colors in ResourceGraph
The ResourceGraph menu applet now supports a few command line options:

--cpu / -C to display a CPU usage graph
--memory / -M to display a memory usage graph
--name / -n to set a name which is used to order applets
--color / -c to set the graph color (supports anything
Gfx::Color::from_string() understands)

The SystemServer.ini and WindowServer.ini config files have been updated
to spawn and show two ResourceGraph menu applets, one for CPU usage
(green) and one for memory usage (cyan) - this matches the colors in the
SystemMonitor graphs.
2020-04-11 10:03:12 +02:00
Linus Groh b46a8d7335 MenuApplets: Rename CPUGraph to ResourceGraph
The plan is to extend what currently is known as "CPUGraph" and let the
SystemServer spawn multiple instances of it - which then can show memory
or network usages as well :^)

Simply renaming the applet is the first step.
2020-04-11 10:03:12 +02:00
Linus Groh 31505dde7e LibJS: Add String.prototype.pad{Start,End}() 2020-04-10 16:37:04 +02:00
Brendan Coles 63f8cbfb56 IRCClient: Add NotifyOnMessage/NotifyOnMention config options
Allow IRCClient user to opt out of notifications.
2020-04-10 13:16:07 +02:00
Brendan Coles df7b617ba1 IRCClient: Add ShowNickChangeMessages/ShowJoinPartMessages conf options
Allow IRCClient to hide nick change spam and join/part spam
2020-04-10 12:56:19 +02:00
Brian Gianforcaro 39855fe9ef LibWeb: Add canvas.strokeRect(), and fix scale & translate
Add an implementation of CanvasRenderingContext2DWrapper.strokeRect().
While implementing this I fixed fillRect() and the new strokeRect() to
honor the .scale() and .translate() values that had previously been plumbed.

Also enhance the canvas.html demo to utilize strokeRect(), scale(), and translate().
2020-04-08 11:07:50 +02:00
VAN BOSSUYT Nicolas 694e4e9168 Resources: Added filetype icon for object, library, text and unknown. 2020-04-07 21:27:31 +02:00
Liav A 23fb985f02 Kernel & Userland: Allow to mount image files formatted with Ext2FS 2020-04-06 15:36:36 +02:00
VAN BOSSUYT Nicolas 0d04327318 Ressources: Added more file type icon. 2020-04-06 14:44:09 +02:00
AnotherTest 3ab6c5fd09 DHCPClient: Log errors and cleanup the code
Prior to this, we ran the DHCP client as a high-priority service, but
making the system feel laggy "for some network stuff" is not the
greatest of ideas :^)
2020-04-06 10:58:40 +02:00
Linus Groh bf62625001 Base: Add trigonometry demo webpage 2020-04-06 10:58:16 +02:00
Brendan Coles ddb8597c0c IRCClient: Allow CTCP replies to be user configurable in IRCClient.ini 2020-04-05 15:29:48 +02:00
AnotherTest 3e8cf79efa Servers: Add a new DHCP client
This adds a DHCPClient...Server that leases IPv4s.
2020-04-05 09:50:48 +02:00
Brendan Coles 55b25b3c9b IRCClient: Add icons for channel list, channel invite, channel topic 2020-04-05 09:37:19 +02:00
M 8399b7bc11
Base: Add la-latin1 keyboard layout (#1597) 2020-04-04 10:34:06 +02:00
Andreas Kling 56ca91b9f8 LibWeb: Implement <script src> support for synchronous scripts
Scripts loaded in this way will block the parser until they finish
executing. This means that they see the DOM before the whole document
has been fully parsed. This is all normal, of course.

To make this work, I changed the way we notify DOM nodes about tree
insertion. The inserted_into() callbacks are now incrementally invoked
during parse, as each node is appended to its parent.

To accomodate inline scripts and inline style sheets, we now also have
a children_changed() callback which is invoked on any parent when it
has children added/removed.
2020-04-03 23:06:09 +02:00
Andreas Kling 9ae3cced76 Revert "Kernel & Userland: Allow to mount image files formatted with Ext2FS"
This reverts commit a60ea79a41.

Reverting these changes since they broke things.
Fixes #1608.
2020-04-03 21:28:57 +02:00
Andreas Kling a2b0cc8f08 LibWeb: Add "navigator" object and expose navigator.userAgent
A lot of web content looks for this property. We'll probably have to
tweak this as we go, but at least now we have it. :^)
2020-04-03 18:12:20 +02:00
Liav A a60ea79a41 Kernel & Userland: Allow to mount image files formatted with Ext2FS 2020-04-02 12:03:08 +02:00
Linus Groh 021d78f8f7 Browser: Add error page
Add a simple HTML error page that gets loaded into the HtmlView when
loading the page fails.

Closes #1210 and #1516
2020-04-01 18:49:48 +02:00
Andreas Kling 839beb52f3 Base: Tweak the canvas demo page to stop using fractional RGB values
This is a hack to workaround missing support for fractional values in
"rgb(r,g,b)" color parsing.
2020-03-31 19:10:08 +02:00
Brendan Coles e8b17c42bb Base: Change root user home directory from / to /root 2020-03-31 11:43:46 +02:00
Linus Groh d4e3688f4f LibJS: Start implementing Date :^)
This adds:

- A global Date object (with `length` property and `now` function)
- The Date constructor (no arguments yet)
- The Date prototype (with `get*` functions)
2020-03-30 14:11:54 +02:00
Tibor Nagy c7f3d72a6a HackStudio: Add an upscaled 32x32 icon to the About dialog 2020-03-30 13:03:53 +02:00
Andreas Kling 06aec9667e LibWeb: Support more advanced selectors in document.querySelectorAll()
I made some mistakes in the selector parsing code. It's now able to
parse selectors composed of multiple complex selectors, instead of just
one complex selector.
2020-03-30 11:35:39 +02:00
Andreas Kling 0f7bcd4111 LibWeb: Add naive support for document.querySelectorAll()
This currently returns a JS::Array of elements matching a selector.
The more correct behavior would be to return a static NodeList, but as
we don't have NodeLists right now, that'll be a task for the future.
2020-03-30 11:35:39 +02:00
Hüseyin ASLITÜRK db692a807b Base: Add icons for color-chooser 2020-03-29 19:36:37 +02:00
Hüseyin ASLITÜRK 38dd8f28bd Base: Add tile wallpaper 2020-03-29 19:36:37 +02:00
Hüseyin ASLITÜRK 48a7d7c72d Base: Add monitor.png 2020-03-29 19:36:37 +02:00
Emanuel Sprung c9059c12dc Browser: Let the user add/remove bookmarks to the bookmarks bar
This patchset adds a Button to the toolbar (right next to the location field)
with a star icon. The star is white if the currently visited url is not yet
bookmarked and yellow if a bookmark for the url exists.

After adding or removing a bookmark, the bookmark json file is synced to disk.
Therefore, some new pledge/unveil's have been added.
2020-03-27 14:12:18 +01:00
Emanuel Sprung 337ade9e4c Browser: Add bookmarks bar
This patchset adds a bookmark bar that is backed by a json file backend.
The json file is loaded and checked for the format. According to the
format, the bookmarks bar is populated with the bookmark items.

If the bookmarks do not fit into one line, an expader button is shown
that brings up a menu containing the missing bookmark items.

There is currently no way to add or remove bookmarks. A hover over a
bookmark is also not yet showing the url in the statusbar.
2020-03-27 14:12:18 +01:00
Sergey Bugaev db4da68618 Base: Add a man page for js(1)
This also changes --ast-dump to --dump-ast, because I like it better
and that is what the variable is actually called.
2020-03-26 08:18:08 +01:00
Elisée Maurer d01b97b50a
Base: Replace <!DOCTYPE> with <!DOCTYPE html> in a few files (#1511)
<!DOCTYPE> by itself is not a valid document type declaration.
2020-03-26 07:37:12 +01:00
Andreas Kling 68b04d5c78 LibWeb: Implement getting and setting element.innerHTML
Getting the innerHTML property will recurse through the subtree inside
the element and serialize it into a string as it goes.

Setting it will parse the set value as an HTML fragment. It will then
remove all current children of the element and replace them with all
the children inside the parsed fragment.

Setting element.innerHTML will currently force a complete rebuild of
the document's layout tree.

This is pretty neat! :^)
2020-03-25 18:53:20 +01:00
redoste 30649ed93f Keymap: Add FR keymap layout
This adds the standard French "AZERTY" keyboard layout. Some keys are unmapped
because some characters are not supported : ²éèçà°€¨£¤ùµ§
2020-03-25 16:24:38 +01:00
Andreas Kling faddf3a1db LibJS: Implement "throw"
You can now throw an expression to the nearest catcher! :^)

To support throwing arbitrary values, I added an Exception class that
sits as a wrapper around whatever is thrown. In the future it will be
a logical place to store a call stack.
2020-03-24 22:21:58 +01:00
Andreas Kling 343e224aa8 LibJS: Implement basic exception throwing
You can now throw exceptions by calling Interpreter::throw_exception().
Anyone who calls ASTNode::execute() needs to check afterwards if the
Interpreter now has an exception(), and if so, stop what they're doing
and simply return.

When catching an exception, we'll first execute the CatchClause node
if present. After that, we'll execute the finalizer block if present.

This is unlikely to be completely correct, but it's a start! :^)
2020-03-24 16:14:10 +01:00
Andreas Kling c33d4aefc3 LibJS: Parse "try", "catch" and "finally"
This is the first step towards support exceptions. :^)
2020-03-24 16:14:10 +01:00
myphs f42f300ba3 LibWeb: CSS: Add "position: absolute" with top and left
This momentarily handles the CSS property "position: absolute;" in
combination with the properties "top" and "left", so that elements can
be placed anywhere on the page independently from their parents.

Statically positioned elements ignore absolute positioned elements when
calculating their position as they don't take up space.
2020-03-23 20:17:29 +01:00
Andreas Kling 39045bfde8 LibWeb: Add basic support for requestAnimationFrame()
We now support rAF, driven by GUI::DisplayLink callbacks. It's a bit
strange how we keep registering new callbacks over and over.
That's something we can definitely optimize.

This allows you to update animations/whatever without doing it more
often than the browser can display.
2020-03-22 21:18:03 +01:00
Andreas Kling 065db26d7c Base: Add a demo web page for canvas+setInterval+randomness
Click somewhere in the black area and drag for colorful effect! :^)
2020-03-21 19:07:21 +01:00
Andreas Kling a7d458f76a Base: Tidy up the events.html test page a little bit 2020-03-21 14:53:13 +01:00
Andreas Kling 2106dafd62 LibJS: Delete fully-empty HeapBlocks after garbage collection
We now deallocate GC blocks when they are found to have no live cells
inside them.
2020-03-21 11:46:47 +01:00
0xtechnobabble bc002f807a LibJS: Parse object expressions 2020-03-21 10:08:58 +01:00
Andreas Kling bceabd7c4b LibJS: Add ArrayPrototype and implement Array.prototype.push()
This function is ultimately supposed to be generic and allow any |this|
that has a length property, but for now it only works on our own Array
object type.
2020-03-20 21:56:40 +01:00
Andreas Kling 8f7d4f67a4 LibJS: Support reading/writing elements in an Array via Object get/put
I'm not completely thrilled about Object::get() and Object::put() doing
special-case stuff for arrays, and we should probably come up with a
better abstraction for it.

But at least it works for now, which is really nice. :^)
2020-03-20 21:56:40 +01:00
Andreas Kling a82f64d3d6 LibJS: Parse ArrayExpression and start implementing Array objects
Note that property lookup is not functional yet.
2020-03-20 21:56:40 +01:00
myphs 0891f860f7 LibWeb: Add CSS property 'border'
This makes it possible to write shorter CSS. Instead of writing
.foo {
        border-width: 3px;
        border-style: solid;
        border-color: blue;
}
it is now possible to write
.foo {
        border: 3px solid blue;
}
while the order of values is irrelevant.
Currently only the basic values are supported. More values should be
added in the future.

Three more value specific parse functions were added:
parse_line_width, parse_color, and parse_line_style

Additionally a few test cases were added to borders.html.
2020-03-20 21:40:55 +01:00
rhin123 a0bc6a8f37 Base: Add Calendar.af 2020-03-19 22:54:30 +01:00
rhin123 8bc412c80b Calendar: Add a 16x16 app icon 2020-03-19 22:54:30 +01:00
Andreas Kling a37c29e353 LibWeb: Add <canvas> element and start fleshing out CRC2D
This patch adds HTMLCanvasElement along with a LayoutCanvas object.
The DOM and layout parts are very similar to <img> elements.

The <canvas> element holds a Gfx::Bitmap which is sized according to
the "width" and "height" attributes on the element.

Calling .getContext("2d") on a <canvas> element gives you a context
object that draws into the underlying Gfx::Bitmap of the <canvas>.
The context weakly points to the <canvas> which allows it to outlive
the canvas element if needed.

This is really quite cool. :^)
2020-03-19 19:07:56 +01:00
Andreas Kling 73d28a0551 LibJS: Prefer FunctionDeclaration if a statement begins with "function" 2020-03-19 18:07:07 +01:00
Andreas Kling e265058768 LibWeb: Fire "mousedown" and "mousemove" events in the DOM :^) 2020-03-18 17:13:22 +01:00
Andreas Kling f39e5352f0 LibWeb: Start working on DOM event support
This patch adds the EventTarget class and makes Node inherit from it.

You can register event listeners on an EventTarget, and when you call
dispatch_event() on it, the event listeners will get invoked.

An event listener is basically a wrapper around a JS::Function*.

This is pretty far from how DOM events should eventually work, but it's
a place to start and we'll build more on top of this. :^)
2020-03-18 17:13:22 +01:00
Itamar bd9f14e27e SystemServer: Add WorkingDirectory support
Services can now have their initial working directory
configured via `SystemServer.ini`.

This commit also configures Terminal's working directory
to be /home/anon
2020-03-18 08:23:31 +01:00
Conrad Pankoff 46a897b59b LibJS: Implement typeof operator 2020-03-17 21:28:02 +01:00
marprok 666f84b933 Base: Add Joi theme 2020-03-17 09:41:15 +01:00
Andreas Kling 086f68e878 LibJS: Replace the global print() function with console.log() :^) 2020-03-16 14:58:20 +01:00
0xtechnobabble 6780d70fb1 js: Fix simple scopes example
Weirdly enough, the "simple-scopes" test doesn't return undefined
anymore, at first I thought the scoping was somehow broken, turns out
the interpreter doesn't consider the returned y as the last evaluated
value anymore, possibly because it's undefined (?).
2020-03-16 13:42:13 +01:00
0xtechnobabble dfbaa8e543 LibJS: Implement abstract equality and inequality 2020-03-16 13:42:13 +01:00
Oriko 2b162ef794 LibGUI: Use themes for syntax highlighting 2020-03-16 13:39:34 +01:00
Přemysl Janouch 66794d51ef Keymap: Add a US Dvorak keyboard layout
It is yet undecided how to name regional variants.
2020-03-16 07:42:19 +01:00
Andreas Kling 23b1d97b0d LibJS: Add ObjectPrototype and implement hasOwnProperty()
All Objects will now have ObjectPrototype as their prototype, unless
overridden.
2020-03-15 15:25:43 +01:00
Andreas Kling 2c5b9fb8f9 LibJS: Add StringPrototype and make it the prototype of StringObject
This patch adds String.prototype.charAt() to demonstrate that prototype
property lookup works, and that you can call a prototype function on an
object, and it will do what you expect. :^)
2020-03-15 15:02:49 +01:00
myphs 57646e362f Keymap: Add DE keymap layout
This makes it easier to work with the german keyboard layout.

Some keys are left unset because their corresponding letters
aren't supported yet.
2020-03-15 11:49:59 +01:00
Stephan Unverwerth 3389021291 LibJS: Unescape strings in Token::string_value() 2020-03-14 16:00:28 +01:00
Andreas Kling b5a22fc408 LibWeb: Implement Document.getElementById()
This was pleasantly simple! We don't have an ElementWrapper yet, so it
just returns a NodeWrapper, but it still basically works. :^)
2020-03-14 13:25:40 +01:00
Andreas Kling 1c406294fc LibWeb: Start implementing basic JavaScript DOM bindings
This patch introduces the Wrapper and Wrappable classes.

Node now inherits from Wrappable, and can be wrapped in a GC-allocated
Bindings::NodeWrapper object. The only property we expose right now is
the very simple nodeName property.

When a Document's JS::Interpreter is first instantiated, we add a
"document" property with a DocumentWrapper object to the global object.

This is pretty cool! :^)
2020-03-14 13:25:40 +01:00
Andreas Kling 9c9d3f0904 LibWeb: Parse <script> elements and run any JavaScript found inside
This patch begins integrating LibJS into LibWeb. Document holds the
JS::Interpreter for now, and it is created on demand when you first
call Document::interpreter().

We also add a simple "alert()" function to the global object.
2020-03-14 13:25:38 +01:00
Stephan Unverwerth c0e6234219 LibJS: Lex single quote strings, escaped chars and unterminated strings 2020-03-14 12:13:53 +01:00
Stephan Unverwerth 15d5b2d29e LibJS: Add operator precedence parsing
Obey precedence and associativity rules when parsing expressions
with chained operators.
2020-03-14 00:11:24 +01:00
Oriko 8285102b6d HackStudio: Add Javascript projects 2020-03-13 20:19:01 +01:00
Till Mayer 62422eecdc Solitaire: Add about dialog and 32x32 icon 2020-03-13 10:40:45 +01:00
Andreas Kling d1d136b4e5 LibJS: Replace $gc() hack with a NativeFunction on the global object
To make this work, also start passing Interpreter& to native functions.
2020-03-12 20:04:54 +01:00
Andreas Kling 7912f33ea0 LibJS: Add NativeFunction, a callable wrapper around a C++ lambda
This can be used to implement arbitrary functionality, callable from
JavaScript.

To make this work, I had to change the way CallExpression passes
arguments to the callee. Instead of a HashMap<String, Value>, we now
pass an ordered list of Argument { String name; Value value; }.

This patch includes a native "print(argument)" function. :^)
2020-03-12 19:54:47 +01:00
Conrad Pankoff 023d121e05 Meta: Add for-loop JavaScript test program 2020-03-12 13:42:23 +01:00
howar6hill 9f3f0d9983 LibJS: Add test for function with arguments 2020-03-12 13:27:28 +01:00
Andreas Kling f405cb6a77 LibJS: Implement basic MemberExpression parsing
At last we can parse "hello friends".length :^)
2020-03-12 13:05:57 +01:00
Andreas Kling 4d942cc1d0 js: Take the script file as a command-line argument
Now that we have the beginnings of a parser, let's take the script to
run as a command-line argument and move all the test scripts into
/home/anon/js :^)

To run a script, simply use "js":

$ js my-script.js

To get an AST dump before execution, you can use "js -A"
2020-03-12 10:52:47 +01:00
Till Mayer fe5cc7ce68 Games: Added solitaire
Added a solitaire game. Currently there are graphics missing on some
of the cards, but the game is fully functional.

Press F12 to show the game-over animation manually.
2020-03-09 21:36:59 +01:00
Andreas Kling 830a57c6b2 LibWeb: Rename directory LibHTML => LibWeb
Let's rename this to LibWeb since it aims to provide more parts of the
web platform than just HTML. :^)
2020-03-07 10:32:51 +01:00
Shannon Booth 57f1c919df LibCore: Remove all remaining C prefix references
LibCore's GZip is also moved into the Core namespace with this change.
2020-03-07 01:33:53 +01:00
Andreas Kling 87582d5e63
Keymap: Add ABNT2 keymap (#1347) 2020-03-05 17:37:06 +01:00
BenJilks 91f5555eed Keymap: Add GB keymap layout
Replaced GBP with a hash symbol, as unicode is not supported
2020-03-05 16:36:14 +01:00
Andreas Kling 37c71bad8a Inspector: Add special icon for timer objects 2020-03-05 11:27:03 +01:00
Andreas Kling 6bcda1875e Inspector: Add a special icon for layout classes 2020-03-05 11:13:44 +01:00
Andreas Kling 71e96ee728 Base: Add anon user to the phys group
This allows anon to shut down and reboot the system.

Fixes #775.
2020-03-03 16:39:06 +01:00
Mathias Danielsen 88e12f7632 Keymaps: Added keymap for norwegian keyboards 2020-03-01 10:53:15 +01:00
Andreas Kling e705e4e083 About: Adopt Buggie :^)
Simon Struthers drew a SerenityOS ladybug and since it's so cute,
I figured we could adopt it!
2020-02-29 15:12:58 +01:00
Andreas Kling f72e5bbb17 Kernel+LibC: Rename shared buffer syscalls to use a prefix
This feels a lot more consistent and Unixy:

    create_shared_buffer()   => shbuf_create()
    share_buffer_with()      => shbuf_allow_pid()
    share_buffer_globally()  => shbuf_allow_all()
    get_shared_buffer()      => shbuf_get()
    release_shared_buffer()  => shbuf_release()
    seal_shared_buffer()     => shbuf_seal()
    get_shared_buffer_size() => shbuf_get_size()

Also, "shared_buffer_id" is shortened to "shbuf_id" all around.
2020-02-28 12:55:58 +01:00
thatlittlegit 30556a0a93 SystemMenu: Move SystemDialog into SystemMenu and remove INI config
I probably would've done INI config removal in another commit, but it
fit well here because I didn't want to pledge wpath for SystemMenu if I
didn't need to.

Frankly, that's something that I think should be done: allow ConfigFile
to be used read-only.
2020-02-23 22:03:03 +01:00
thatlittlegit 9784ab99d2 SystemDialog+Base: Add icon for SystemDialog 2020-02-23 22:03:03 +01:00
thatlittlegit efc4861786 SystemDialog: Revamp to be more Win95-like
Only thing I don't like right now is the fact that we rely on the shell.
2020-02-23 22:03:03 +01:00
howar6hill 7ff256aab6 Base: Add a man page for lspci 2020-02-20 15:13:42 +01:00
howar6hill 83668299a6
host: Use ArgsParser to parse arguments, and add man page (#1252)
Fixes #1246.
2020-02-20 15:12:55 +01:00
Tibor Nagy 6e2a16c8a8 LibGfx+LibGUI: Allow theming the focus outline of AbstractButton 2020-02-20 14:19:30 +01:00
Tibor Nagy c8bc53e987 LibGfx+LibGUI: Allow theming the text cursor 2020-02-20 14:19:30 +01:00
howar6hill 940de40f28
Userland: Add userdel program (#1217) 2020-02-19 12:59:09 +01:00
Tibor Nagy e1da7ca979 Base: Add ruler colors to system themes 2020-02-19 12:24:39 +01:00
howar6hill 94ed183774 Man: Use ArgsParser to parse arguments 2020-02-18 12:23:15 +01:00
Andreas Kling b711f1eab5 SystemMenu: Finish the implementation and start this at boot :^)
Fixes #1231.
2020-02-17 20:20:32 +01:00
Andreas Kling 7afd9039d1 Base: Add a Minesweeper app icon that's actually 16x16
The one we were using was actually 15x15 which tripped up an assertion
when loading it into a menu using the GUI::Action code path.
2020-02-17 19:58:33 +01:00
Andreas Kling 9f54ea9bcd NotificationServer: Add a system service for desktop notifications
This patch adds NotificationServer, which runs as the "notify" user
and provides an IPC API for desktop notifications.

LibGUI gains the GUI::Notification class for showing notifications.

NotificationServer is spawned on demand and will unspawn after
dimissing all visible notifications. :^)

Finally, this also comes with a small /bin/notify utility.
2020-02-16 21:58:17 +01:00
Andreas Kling 9794e18a20 Base: Run WindowServer as a separate "window" user
This was actually rather painless and straightforward. WindowServer now
runs as the "window" user. Users in the "window" group can connect to
it via the socket in /tmp/portal/window as usual.
2020-02-16 21:58:17 +01:00
Andreas Kling 0415db30c6 WindowServer: Move configuration file into /etc/WindowServer
This is in preparation for running WindowServer as a separate user.
2020-02-16 21:58:17 +01:00
Tibor Nagy fc24b2b57d LibGUI: Make ResizeCorner theme-aware 2020-02-16 08:01:20 +01:00
thatlittlegit d5617fc855 Welcome: 'Welcome to Serenity' -> 'Welcome to SerenityOS' 2020-02-15 20:46:10 +01:00
thatlittlegit 7a3bdf3563 Welcome: Add icons to welcome entries 2020-02-15 20:46:10 +01:00
thatlittlegit bc28e55d61 Base: Add documentation for the welcome.txt format 2020-02-15 20:46:10 +01:00
thatlittlegit ba27b56200 Welcome: Add some more pages for Development and Multimedia 2020-02-15 20:46:10 +01:00
thatlittlegit a55b96a1ea Welcome: Separate text from source code by parsing
This allows modification at runtime, as well as easier editing than C++
structures.
2020-02-15 20:46:10 +01:00
Tibor Nagy e455af8d33 Base: Add inactive selection colors to the system themes 2020-02-15 18:42:13 +01:00
asliturk 077ef556a7 WindowServer: Move applet code from MenuManager to AppletManager.
Move applet logic to the own class. Remove applet code from MenuManager.
With new AppletManager applet order is configurable via WindowManager.ini file.
2020-02-10 18:33:28 +01:00
Andreas Kling 6c752c15a2 WebServer: Implement a very basic HTTP server :^)
This server listens on port 8000 and serves HTML files from /www.
It's very simple and quite naive, but I think we can start here and
build our way to something pretty neat.

Work towards #792.
2020-02-09 14:15:55 +01:00
Hüseyin ASLITÜRK 9b5e0b6247 WindowServer: Remove username from MenuManager.
Now, we have UserName applet.
2020-02-09 10:37:35 +01:00
Andreas Kling d34ad44f90 Base: Add man page for posix_openpt(3) 2020-02-07 22:37:27 +01:00
Jesse Buhagiar f9609fe08a Userland: useradd utility
This commit implements the `useradd` utility that is found on most,
if not all *NIX systems. It allows the root user to add new users
to the password file found in `/etc/passwd`, thereby making
it easier to manipulate the file.
2020-02-02 10:58:45 +01:00
Andreas Kling 9ce4ef2dd3 Base: Remove two unused icons 2020-01-29 12:27:37 +01:00
Andreas Kling c26560ec26 LookupServer: Rename setting "DNS/IPAddress" => "DNS/Nameserver" 2020-01-26 15:44:51 +01:00
Andreas Kling 95504b5850 Base: Note in pledge(2) man page which promises are extensions
Also add a little "History" section noting that pledge() is an original
OpenBSD invention and that our implementation differs in many ways.
2020-01-23 10:41:07 +01:00
Atilla Lonny 24f2596345 Base: Add Nord theme
Nord (specifically Polar Night) is a popular soft dark blue/grey theme.

Personally, I find it to be a very nice middle-ground between the contrast of the
dark and light (default) theme.

![Preview](https://i.imgur.com/6sVnT4i.png)
2020-01-21 11:25:44 +01:00
Sergey Bugaev 3e1ed38d4b Kernel: Do not return ENOENT for unresolved symbols
ENOENT means "no such file or directory", not "no such symbol". Return EINVAL
instead, as we already do in other cases.
2020-01-18 23:51:22 +01:00
Andreas Kling 26a31c7efb Kernel: Add "accept" pledge promise for accepting incoming connections
This patch adds a new "accept" promise that allows you to call accept()
on an already listening socket. This lets programs set up a socket for
for listening and then dropping "inet" and/or "unix" so that only
incoming (and existing) connections are allowed from that point on.
No new outgoing connections or listening server sockets can be created.

In addition to accept() it also allows getsockopt() with SOL_SOCKET
and SO_PEERCRED, which is used to find the PID/UID/GID of the socket
peer. This is used by our IPC library when creating shared buffers that
should only be accessible to a specific peer process.

This allows us to drop "unix" in WindowServer and LookupServer. :^)

It also makes the debugging/introspection RPC sockets in CEventLoop
based programs work again.
2020-01-17 11:19:06 +01:00
Brian Gianforcaro b553a86048 man: Fix minor inconsistencies in pledge(2) man page
- tty promise was listed twice.

- Fix a few typos
2020-01-14 08:00:35 +01:00
Andreas Kling fd64e97c8a LibDraw+LibHTML: Make link colors themeable
Add "Link", "ActiveLink" and "VisitedLink" colors to the system theme
definition, and implement support for them in LibHTML.

Note that <body link="foo" alink="bar" vlink="baz"> takes precedence
over the system colors. Author style also takes precedence, since we
only fetch the system color in case the CSS color is -libhtml-link.
2020-01-13 20:33:15 +01:00
Sergey Bugaev 9513f54932 Base: Document new chroot abilities 2020-01-12 20:02:11 +01:00
Sergey Bugaev fee6d0a3a6 Kernel+Base: Mount root as nodev,nosuid
Then bind-mount /dev and /bin while adding back the appropriate permissions :^)
2020-01-12 20:02:11 +01:00
Andreas Kling 198cd77307 Base: Tweak language in pledge(2) man page 2020-01-12 19:08:42 +01:00
Andreas Kling f3eb06a46f Base: Add a man page about pledge(2) 2020-01-12 16:11:12 +01:00
Sergey Bugaev b37bd28053 Base: Document mount(2) and mount(8) 2020-01-11 18:57:53 +01:00
Sergey Bugaev 71f1d3f819 Base: Apply some filesystem flags by default
Notably, /tmp is now mounted nodev,nosuid :^)
2020-01-11 18:57:53 +01:00
Andreas Kling d0a708fda4 Base: Run ProtocolServer as a separate "protocol" user
This is probably not the final design we'll want for this, but for now
let's run the HTTP client code as a separate user to reduce exposure
for the standard "anon" user account.

Note that "protocol" is also added to the "lookup" group, in order to
allow ProtocolServer to contact LookupServer for DNS requests.
2020-01-11 13:07:32 +01:00
Andreas Kling 3f9e4cd24e chroot: Add a little chroot program
This program changes the current filesystem root and spawns a shell.
2020-01-10 23:23:20 +01:00
Sergey Bugaev 7bc8fa884a FileManager: Add a columns view
This new view, backed by a GColumnsView, joins the existing table and icon
views :^) Even though it displays a file tree, its data is provided by the very
same GFileSystemModel that the other two views use.

This commit also includes my attempt at making an icon for the new mode.
2020-01-10 17:45:59 +01:00
Andreas Kling f5d9f11e52 Base: Add a "lookup" user+group that runs LookupServer
LookupServer now runs as lookup:lookup, allowing connections from other
members of the "lookup" group.

This is enforced through file system permissions by having the service
socket (/tmp/portal/lookup) be mode 0660.

Now the LookupServer program can't overwrite other people's files if it
starts misbehaving. That's pretty cool :^)
2020-01-09 21:36:17 +01:00
Andreas Kling 7dd03b46ee SystemServer: Allow specifying per-service socket file permissions 2020-01-09 21:35:33 +01:00
0xtechnobabble 123dcada05 Themes: Support rubberband selection theming 2020-01-07 11:02:43 +01:00
Jami Kettunen 08c7b5068e Base: Space out some names in app files 2020-01-04 22:29:21 +01:00
Andreas Kling f558c8e36a Base: Add an "audio" group that gets to write to /dev/audio 2020-01-04 13:25:13 +01:00
Andreas Kling 498659773c Base: Add a "phys" group for users with physical access
Only users in this group can access the screen, mouse and keyboard.
2020-01-04 13:21:33 +01:00
Andreas Kling 9bd4bf41fb SystemServer: Explicitly open /dev/null for services without StdIO
Spawning services with nothing open at all on the standard I/O fds is
way too harsh. We now open /dev/null for them instead.
2020-01-04 13:15:01 +01:00
Andreas Kling c2b7c43f3c SystemServer: Fetch any extra GIDs and call setgroups() before spawn
We now pick up all the user's extra GIDs from /etc/group and make
sure those are set before exec'ing a service.

This means we finally get to enjoy being in more than one group. :^)
2020-01-04 13:11:43 +01:00
Andreas Kling 20ac4e44d1 Base: Add "tty" group and make /dev/tty* be root:tty mode 610
This fixes an issue where anyone could snoop on the virtual consoles.
2020-01-04 12:46:09 +01:00
Tibor Nagy 790eaab6f5 Keymap+Base: Keycode fixes, remove workaround
Add missing keymap entries for the dollar sign and escape key and reformat
the Hungarian keymap.

Remove the workaround for "0x08", replace it with '\b'.

Fix the octal/hex mixup in the value of escape key. (033 != 0x33, 033 == 0x1B)
2020-01-03 01:20:47 +01:00
Andreas Kling 7f843ef3b2 Kernel: Make the purge() syscall superuser-only
I don't think we need to give unprivileged users access to what is
essentially a kernel testing mechanism.
2020-01-02 13:39:49 +01:00
Andreas Kling 4fa7146da1 Base: Move the modload and modunload command documentation to man8
These are system administration commands, not intended for use by
all users. These tend to go in section 8.
2020-01-02 12:37:19 +01:00
Andreas Kling 05b004ec64 Base: Remove "idle" priority note from SystemServer(5)
The "idle" priority was never meant to be exposed to userspace, as it's
only used by the kernel's internal idle thread.
2020-01-02 12:36:15 +01:00
Andreas Kling 0c22646e2b Base: Document EPERM error in module_load(2) and module_unload(2)
Only the superuser can use these system calls.
2020-01-02 12:35:19 +01:00
Andreas Kling 38f93ef13b Kernel: Disable x86 RDTSC instruction in userspace
It's still possible to read the TSC via the read_tsc() syscall, but we
will now clear some of the bottom bits for unprivileged users.
2020-01-01 18:22:20 +01:00
Andreas Kling f598bbbb1d Kernel: Prevent executing I/O instructions in userspace
All threads were running with iomapbase=0 in their TSS, which the CPU
interprets as "there's an I/O permission bitmap starting at offset 0
into my TSS".

Because of that, any bits that were 1 inside the TSS would allow the
thread to execute I/O instructions on the port with that bit index.

Fix this by always setting the iomapbase to sizeof(TSS32), and also
setting the TSS descriptor's limit to sizeof(TSS32), effectively making
the I/O permissions bitmap zero-length.

This should make it no longer possible to do I/O from userspace. :^)
2020-01-01 17:31:41 +01:00
Andreas Kling 9c0836ce97 Kernel: Enable x86 UMIP (User Mode Instruction Prevention) if supported
This prevents code running outside of kernel mode from using the
following instructions:

* SGDT - Store Global Descriptor Table
* SIDT - Store Interrupt Descriptor Table
* SLDT - Store Local Descriptor Table
* SMSW - Store Machine Status Word
* STR - Store Task Register

There's no need for userspace to be able to use these instructions so
let's just disable them to prevent information leakage.
2020-01-01 13:21:15 +01:00
Jami Kettunen 6af301edec Base: Update Finnish keymap with proper AltGr support 2019-12-31 19:46:40 +01:00
Tibor Nagy d8ddf803e2 Base: Add Hungarian keymap 2019-12-31 19:31:42 +01:00
Shannon Booth d0f9906c17 Crash: Add a "Test All Crash Types" option
Add an option "-A", that will run all of the crash types in the crash
program. In this mode, all crash tests are run in a child process so
that the crash program does not crash.

Crash uses the return status of the child process to ascertain whether
the crash happened as expected.
2019-12-31 02:14:36 +01:00
Andreas Kling b0bbdc53e9 Base: Remove misplaced backtick in syscall(1) 2019-12-30 14:15:18 +01:00
Tibor Nagy a7040078e5 Base: Add glyph spacing fields to fonts 2019-12-30 14:02:12 +01:00
Jami Kettunen edba444aa9 Base: Add man page for keymap(1) 2019-12-30 14:02:00 +01:00
Jami Kettunen 107612209d Base: Add ASCII-friendly fi.json 2019-12-30 14:02:00 +01:00
Andreas Kling e0ec4f89b2 Base: Add man page for purge(8) 2019-12-29 13:23:21 +01:00
Tibor Nagy ac0b8caa42 Base: Add 2x upscaled Liza fonts 2019-12-28 21:06:02 +01:00
Hüseyin ASLITÜRK e50deb55d3 WindowServer: Remove Clock from server.
We have clock applet.
2019-12-27 22:47:31 +01:00
Shannon Booth c85bdff57a PaintBrush: Add an "ellipse tool"
The tool currently supports drawing an elliptical line of a specified
thickness. Further improvements can include adding a fill mode, and
holding down shift to draw a perfect circle.

Closes #375.
2019-12-27 00:52:17 +01:00
Shannon Booth b830639912 PaintBrush: Add a "rectangle tool"
Fill, line, and gradient modes initially supported :^)
2019-12-26 21:22:29 +01:00
Tibor Nagy f0a82e1bcc Base: Add 3x upscaled Liza fonts
Upscaled with hq3x then cleaned up the glyphs manually.
2019-12-26 14:35:51 +01:00
Andreas Kling 5be6a43860 LibDraw: Add MenuBaseText and MenuSelectionText color roles
This allows the very aesthetic "Hotdog Stand" theme to have quite
reasonable looking menus.
2019-12-26 00:58:46 +01:00
Conrad Pankoff 5330593e38 Base: Add Hotdog Stand theme 2019-12-26 00:46:16 +01:00
Andreas Kling 33efeaf71a crash: Add "-X" option for attempting to execute non-executable memory 2019-12-25 13:35:57 +01:00
Andreas Kling aae54bdbde LibDraw: Add ColorRole::BaseText (to be painted on ColorRole::Base) 2019-12-24 22:01:32 +01:00
Mauri de Souza Nunes cb4e51a7a5 Userland: Add syscall -l option and man page 2019-12-24 20:23:37 +01:00
Andreas Kling b6eba388e3 LibDraw: Add Selection and SelectionText system theme colors 2019-12-24 12:13:49 +01:00
Conrad Pankoff 033de7efe2 Base: Describe kernel modules, syscalls, and programs 2019-12-24 11:52:01 +01:00
Andrés Vieira 488d755ccd Docs: Add cal(1) man page 2019-12-24 11:48:16 +01:00
Andreas Kling 2cdab2c925 Themes: Add a simple "Dark" theme :^) 2019-12-24 02:25:50 +01:00
Andreas Kling df3a2dba43 LibDraw: Add Button and ButtonText system theme colors
These are now separate from the Window and WindowText colors.
2019-12-24 02:25:50 +01:00
Andreas Kling 411058b2a3 WindowServer+LibGUI: Implement basic color theming
Color themes are loaded from .ini files in /res/themes/
The theme can be switched from the "Themes" section in the system menu.

The basic mechanism is that WindowServer broadcasts a SharedBuffer with
all of the color values of the current theme. Clients receive this with
the response to their initial WindowServer::Greet handshake.

When the theme is changed, WindowServer tells everyone by sending out
an UpdateSystemTheme message with a new SharedBuffer to use.

This does feel somewhat bloated somehow, but I'm sure we can iterate on
it over time and improve things.

To get one of the theme colors, use the Color(SystemColor) constructor:

    painter.fill_rect(rect, SystemColor::HoverHighlight);

Some things don't work 100% right without a reboot. Specifically, when
constructing a GWidget, it will set its own background and foreground
colors based on the current SystemColor::Window and SystemColor::Text.
The widget is then stuck with these values, and they don't update on
system theme change, only on app restart.

All in all though, this is pretty cool. Merry Christmas! :^)
2019-12-23 20:33:01 +01:00
Andreas Kling 91ba94fbd4 LibHTML: Support the :only-child pseudo class 2019-12-16 19:52:11 +01:00
Andreas Kling 085cafd80a LibHTML: Support the :empty pseudo class 2019-12-16 19:46:02 +01:00
Andreas Kling c1474e594e LibHTML: Support the :first-child and :last-child pseudo classes 2019-12-16 19:34:52 +01:00
Andreas Kling e1940f365b WindowServer+MenuApplets: Move the "Audio" applet to its own program
This patch introduces the second MenuApplet: Audio. To make this work,
menu applet windows now also receive mouse events.

There's still some problem with mute/unmute via clicking not actually
working, but the call goes from the applet program over IPC to the
AudioServer, where something goes wrong with the state change message.
Need to look at that separately.

Anyways, it's pretty cool to have more applets running in their own
separate processes. :^)
2019-12-16 15:33:42 +01:00
Andreas Kling e4267020c4 ProfileViewer: Show kernel frames with a red icon :^) 2019-12-14 16:16:53 +01:00
Valtteri Koskivuori c0696ad3aa LookupServer: Switch to a more privacy-respecting DNS provider 2019-12-11 12:01:16 +01:00
Andreas Kling 5d7c0b0123 Fonts: Add two little marker glyphs to CsillaThin7x10
ASCII values 0x1 and 0x2 of this font now contain little helper glyphs
for showing left and right side markers around something.
2019-12-10 22:06:52 +01:00
Andreas Kling e339c2bce8 WindowServer: Disambiguate "dragging" a bit, use "moving" more instead
Windows that are being moved around by the user are now called "moving"
windows instead of "dragging" windows, to avoid confusion with the
drag and drop stuff.
2019-12-08 23:41:02 +01:00
Andreas Kling 39c2d04a9b WindowServer: Add a dedicated drag cursor 2019-12-08 20:29:14 +01:00
Andreas Kling 20bbeba6d5 CPUGraph: Launch the CPUGraph menu applet on startup 2019-12-05 19:44:22 +01:00
Sergey Bugaev f2546d15ce Taskbar: Add a quick launch bar
This is a tiny bar at the left of the taskbar where you can put
your most used apps to launch them with a single click. In a way,
it's another replacement for the Launcher, in addition to the app
menu. Unlike the launcher and the menu, it's not meant to be the
primary way to launch apps; it's only a faster way to launch a few
most often used utilities.
2019-12-04 14:32:15 +01:00
Andreas Kling f41ae755ec Kernel: Crash on memory access in non-readable regions
This patch makes it possible to make memory regions non-readable.
This is enforced using the "present" bit in the page tables.
A process that hits an not-present page fault in a non-readable
region will be crashed.
2019-12-02 19:18:52 +01:00
Andreas Kling 4e6cd541c9 PaintBrush: Add a "line" tool for drawing straight lines
This implements "preview" of the line by allowing tool subclasses to
hook the second_paint_event on the PaintableWidget.

Work towards #375.
2019-11-29 22:41:19 +01:00
Andreas Kling f99e554c5e Calculator: Add a 16x16 app icon 2019-11-29 21:04:19 +01:00
Andreas Kling e56daf547c Kernel: Disallow syscalls from writeable memory
Processes will now crash with SIGSEGV if they attempt making a syscall
from PROT_WRITE memory.

This neat idea comes from OpenBSD. :^)
2019-11-29 16:30:05 +01:00
Sergey Bugaev fe0aa2ca53 Base: Document SystemServer 2019-11-26 19:58:25 +01:00
Sergey Bugaev 52b0bd06a8 SystemServer: Implement lazy spawning
For services explicitly configured as lazy, SystemServer will now listen
on the socket and only spawn the service once a client attempts to connect
to the socket.
2019-11-26 19:58:25 +01:00
Sergey Bugaev ab98969403 LookupServer: Port to socket takeover 2019-11-26 19:58:25 +01:00
Sergey Bugaev 9eaac26eda ProtocolServer: Port to socket takeover 2019-11-26 19:58:25 +01:00
Sergey Bugaev bd55938985 AudioServer: Port to socket takeover 2019-11-26 19:58:25 +01:00
Sergey Bugaev 22a05621d5 WindowServer: Port to socket takeover 2019-11-26 19:58:25 +01:00
Sergey Bugaev 396ad4d6b2 SystemServer: Implement keepalive
When reaping a child, SystemServer will now match up child's pid with its own
record of the services, and respawn the service if keepalive is enabled for it.

For example, we want to restart the WindowServer if it crashes, but we wouldn't
want to restart the Terminal if it gets closed.
2019-11-26 19:58:25 +01:00
Sergey Bugaev b93065359e SystemServer: Read service list from a config file
This replaces the hardcoded services list with a very simple config
file in /etc/SystemServer.ini :^)

Closes https://github.com/SerenityOS/serenity/issues/610
2019-11-26 19:58:25 +01:00
Andreas Kling 6d1c4ae5a9 LibHTML: Implement basic <form> and <input> element support
This patch adds "submit" inputs and default (text box) inputs, as well
as form elements that can be submitted.

Layout of input elements is implemented via a new LayoutWidget class
that allows you to put an arbitrary GWidget in the layout tree.
At the moment, the DOM node sets the initial size of the LayoutWidget,
and then the positioning is done by the normal layout algorithm.

We also now support submitting a <form method="GET">, which does a full
replacing load with a URL based on the form's action + a query string
built from the name/value of input elements within the submitted form.

This is pretty neat! :^)
2019-11-25 21:21:55 +01:00
Andreas Kling 10d67879c3 Base: Import the 1st and 2nd Acid tests for web standards compliance
Getting these to work will take a lot of work, but most of it will be
pretty fun, so I guess we start by importing them. :^)
2019-11-25 17:48:51 +01:00
Andreas Kling 05b1ecf1b1 LibHTML: Draw each CSS border edge separately with their own style
The borders still look very wrong with any border-width other than 1,
but at least we can see that they have the right color, and end up in
mostly the right place :^)
2019-11-25 13:17:14 +01:00
Hüseyin ASLITÜRK 197b2dcd36 Base: Add trq.json and en.json 2019-11-25 11:53:02 +01:00
Andreas Kling 9009390f9c WindowServer: Add an audio icon to the menu bar
Clicking on this icon toggles the AudioServer muted state.

It currently does not react to muted state changes caused by other
programs, since it has no way of learning about those from AudioServer,
other than performing a synchronous IPC call (GetMuted), which we don't
want to be doing in the WindowServer :^)
2019-11-22 22:15:39 +01:00
Andreas Kling 6fbe0f17f2 Docs: Add avol(1) 2019-11-22 21:52:52 +01:00
Andreas Kling 61ba19f031 LibHTML: Handle stand-alone attribute selectors
A selector like "[foo]" is now parsed as a universal selector component
with an attribute match type. Pretty neat :^)
2019-11-21 20:19:00 +01:00
Andreas Kling 8946e50986 LibHTML: Implement some attribute selector support
This patch adds a[foo] and a[foo=bar] attribute selectors.

Note that an attribute selector is an optional part of a selector
component, and not a component on its own.
2019-11-21 20:07:43 +01:00
Andreas Kling 7b3f1218be little: Make this build by default, and add some curlies 2019-11-18 19:01:50 +01:00
Andreas Kling 70e220a81f Docs: Add note about EINVAL to isatty(3) 2019-11-17 20:09:12 +01:00
Andreas Kling 1bb296ea70 Docs: Add isatty(3) man page 2019-11-17 20:03:42 +01:00
Andreas Kling 3d558f47b0 Docs: Add uname(1) and uname(2) man pages 2019-11-17 19:48:11 +01:00
Andreas Kling 189f234b47 Docs: Add info about -T and -t to crash(1) 2019-11-17 19:23:35 +01:00
Andreas Kling fabdc8cdcb Base: Add Help.af :^)
Whoops, I forgot to add an .af file for the Help app!
2019-11-12 21:25:52 +01:00
Andreas Kling f3e7dc65cd Katica10: Tweak the 'L' and 'Q' glyphs 2019-11-12 19:14:38 +01:00
Andreas Kling dd2900eda0 Launcher: Remove the Launcher app, and all hacks in support of it
The Launcher's functionality has been replaced by the app shortcuts in
the system menu.

There were various window management hacks to ensure that the launcher
stayed below all other windows while also being movable, etc.
2019-11-11 13:13:08 +01:00
Andreas Kling 26f41c7ecb Base: Add .af files for Minesweeper, Snake and VisualBuilder 2019-11-11 13:13:08 +01:00
Andreas Kling 77de51d251 Base: Add Piano.af and SoundPlayer.af 2019-11-11 13:13:08 +01:00
Andreas Kling 3a71c018bf Base: Put DisplayProperties, FontEditor and PaintBrush into a category
These apps are now in a "Graphics" category :^)
2019-11-11 13:13:08 +01:00
Andreas Kling bd0a8d078f Base: Add TextEditor.af 2019-11-11 13:13:08 +01:00
Andreas Kling b6a6f34caa WindowServer: Populate system menu with app launchers from /res/apps
The new system directory /res/apps now contains ".af" files describing
applications (name, category, executable path, and icon.)
These are used to populate the system menu with application shortcuts.

This will replace the Launcher app. :^)
2019-11-11 13:13:08 +01:00
Andreas Kling a04ab219d1 HackStudio: Use a visually distinct icon for the cursor tool
Using the default cursor bitmap as the cursor tool icon in HackStudio
was predictably making it impossible to tell if it's the real cursor
or not. Replace it with a color-inverted cursor. :^)
2019-11-10 21:19:08 +01:00
Andreas Kling 2da058c7f2 HackStudio: Use the GWidget class registry to populate the toolbar
This will allow HackStudio to learn about new GWidget types without
having to do anything in HackStudio :^)
2019-11-10 12:57:37 +01:00
Marcel Schneider edd0959c83 Base: Add link to bettermotherfuckingwebsite in welcome.html 2019-11-10 12:52:23 +01:00
Till Mayer 660db0f79a SoundPlayer: Added 32x32 icon for the about dialog 2019-11-09 20:55:47 +01:00
Hüseyin ASLITÜRK aba6e6de6a FileManager: Remember my last position and size. 2019-11-09 20:50:53 +01:00
Andreas Kling d016d5e365 HackStudio: Start fleshing out the GUI for a GUI designer :^)
I'll be reconstructing parts of the VisualBuilder application here and
then we can retire VisualBuilder entirely once all the functionality
is available in HackStudio.
2019-11-09 00:41:00 +01:00
Andreas Kling 306cd0d840 Base: Add a local copy of bettermotherfuckingwebsite.com for testing 2019-11-07 21:40:04 +01:00
Till Mayer e7ccbdbe30 SoundPlayer: Added playback control icons and application icon 2019-11-04 20:55:46 +01:00
Hüseyin ASLITÜRK e2f0ac13a4 FileManager: Remember my last view mode (#731) 2019-11-04 17:27:56 +01:00
Andreas Kling 7c71040ba9 HackStudio: Show documentation preview in tooltip on identifier hover
When hovering over a C++ token that we have a man page for, we now show
the man page in a tooltip window.

This feels rather bulky at the moment, but the basic mechanism is quite
neat and just needs a bunch of tuning.
2019-10-30 20:28:44 +01:00
Andreas Kling d24164ac6a HackStudio: Add little icons for ".cpp" and ".h" files
This makes it easier to tell them apart in locator suggestions. :^)
2019-10-28 19:08:48 +01:00
Andreas Kling 307cbf83c3 HackStudio: Start building a C++ lexer to help with syntax highlighting 2019-10-25 19:52:44 +02:00
Andreas Kling 84a2208b5c HackStudio: Add some toolbar icons to liven up the UI a bit :^) 2019-10-24 22:25:26 +02:00
Andreas Kling 5a2dd451b5 HackStudio: Add "little" test project file list 2019-10-23 12:28:25 +02:00
Andreas Kling 708543c3d6 HackStudio: Add a simple "Run" action
Ctrl+R will now execute "make run" in the project directory. :^)
2019-10-22 22:18:46 +02:00
Andreas Kling a6b153abf1 HackStudio: Show the currently open file in bold (in the project list)
Also import a little default C++ project called "little" :^)
2019-10-22 21:38:58 +02:00
Andreas Kling 2638a94094 HackStudio: Add a simple app icon and some initial menus 2019-10-21 22:13:20 +02:00
Andreas Kling eb77e680ed LibHTML: Implement "text-align: justify"
In order for this to work nicely, I made the line box classes use float
instead of int for its geometry information.

Justification works by distributing all of the whitespace on the line
(including the trailing whitespace before the line break) evenly across
the spaces in-between words.

We should probably use floating point (or maybe fixed point?) for all
the layout metrics stuff. But one thing at a time. :^)
2019-10-20 12:55:55 +02:00
Andreas Kling c41bae3d54 LibHTML+Browser: Support scrolling to anchor with <a href="#foo">
This patch implements basic support for <a href="#foo"> fragment links.

To figure out where we actually want to scroll to, we have to do
something different based on the layout node's box type. So if it's a
regular LayoutBox we can just use the LayoutBox::position().

However, if it's an inline layout node, we use the position of the
first line box fragment in the containing block contributed by this
layout node or one of its descendants.
2019-10-20 10:07:26 +02:00
Andreas Kling 5a34225999 LibHTML: Implement basic tiled background image support
It's now possible to set a page background image via <body background>.
Also, HtmlView now officially handles rendering the body element's
background (color, image or both.) LayoutBox is responsible for all
other background rendering.

Note that it's not yet possible to use CSS background-image properties
directly, since we can't parse them yet. :^)
2019-10-19 11:49:46 +02:00
Andreas Kling 06f084fedd LibHTML: Add the <center> element
This is really just "center { display: block; text-align: center; }" in
the default stylesheet, but it totally works!
2019-10-16 20:33:00 +02:00
Andreas Kling 6dbba6ad85 LibHTML: Implement CSS text-align: left/center/right
This was easier than I imagined; we just shift each line box to the
left based on the alignment and the remaining space on each line. :^)
2019-10-16 20:32:17 +02:00
Andreas Kling 61ef17b87a LibHTML: Implement basic :hover pseudo-class support
This is currently very aggressive. Whenever the Document's hovered node
changes, we invalidate all style and do a full relayout.

It does look cool though. So cool that I'm adding it to the default
stylesheet. :^)
2019-10-14 17:55:04 +02:00
Brandon Scott 48ef1d1bd1 HexEditor: Initial application release
The very first release of the Hex Editor for Serenity.
2019-10-13 08:45:49 +02:00
Andreas Kling 08209cc665 LibHTML: Handle comments in the CSS parser
Turn consume_whitespace() into consume_whitespace_or_comments() and
have it swallow /* comments */ as well.
2019-10-13 00:28:15 +02:00
Andreas Kling b083a233d8 LibHTML: Add Comment and CharacterData nodes and improve HTML parsing
This patch adds the CharacterData subclass of Node, which is now the
parent class of Text and a new Comment class.

A Comment node is one of these in HTML: <!--hello friends-->
Since these occur somewhat frequently on the web, we need to be able
to parse them.

This patch also adds a child rejection mechanism to the DOM tree.
Nodes can now override is_child_allowed(Node) and return false if they
don't want a particular Node to become a child of theirs. This is used
to prevent Document from taking on unwanted children.
2019-10-12 23:34:05 +02:00
Andreas Kling 6242459c0f LibHTML: Implement the <br> element for line breaking
The <br> element will produce a special LayoutBreak node in the layout
tree, which forces a break in the line layout whenever encountered.

This patch also makes LayoutBlock use the current line-height as the
minimum effective height for each line box. This ensures that having
multiple <br> elements in a row doesn't create 0-height line boxes.
2019-10-12 13:47:49 +02:00
Andreas Kling 76266862d1 LibGUI+WindowServer: Add a "Hand" cursor to the standard cursors 2019-10-10 21:35:12 +02:00
Andreas Kling fdbad6284c LibHTML: Implement the <blink> element
Just in time for Serenity's 1st birthday, here is the <blink> element!

This patch adds a bunch of different mechanisms to enable partial
repaints of the layout tree (LayoutNode::set_needs_display()))
It also adds LayoutNode::is_visible(), which can be toggled to prevent
a LayoutNode from rendering anything (it still takes up space though.)
2019-10-09 21:25:29 +02:00
Andreas Kling 3be6d1aff0 LibHTML: Add ResourceLoader to support protocol-agnostic URL loading
We now support loading both file:// and http:// URLs. Feel free to
visit http://www.serenityos.org/ and enjoy the fancy good times. :^)
2019-10-08 19:37:15 +02:00
Andreas Kling 71e8ddcd1c LibHTML: Start adding support for <link rel="stylesheet">
This patch adds basic support for external stylesheets. It currently
only works with file:// URLs.

We do a synchronous full relayout after loading a stylesheet, which is
definitely on the aggressive side, but it gives us something to work
on improving. :^)
2019-10-07 19:06:47 +02:00
Andreas Kling 122d12e617 LibDraw: Parse some more color string formats found on the web
This patch adds the 17 color names from CSS2.1, as well as support for
the "#rgb" shorthand where each component is a hex digit that gets
multiplied by 17.
2019-10-06 21:40:14 +02:00
Andreas Kling bedb00603c LibHTML: Add adjacent (+) and general (~) sibling combinators
This patch implements two more selector features:

- "div + p" matches the <p> sibling immediately after a <div>.
- "div ~ p" matches all <p> siblings after a <div>.
2019-10-06 19:59:07 +02:00
Andreas Kling cad326f323 LibHTML: Implement immediate-child selectors (#foo > #bar) 2019-10-06 15:41:16 +02:00
Andreas Kling 156b35742a LibHTML: Implement matching for descendant selectors
The CSS engine now correctly matches selectors like "#foo #bar #baz".
2019-10-06 15:34:42 +02:00
Conrad Pankoff 6eef6f4f1d Base: Add a page for image features to the www directory 2019-10-06 14:33:00 +02:00
Andreas Kling 31e361b827 Base: Add a little welcome page for the browser at ~/www/welcome.html 2019-10-05 10:29:52 +02:00
Andreas Kling 4f47146433 LibGUI: Add a "reload" action to GCommonActions 2019-10-05 10:14:09 +02:00
Andreas Kling 3feb452bf4 Base: Add a little HTML test for presentational hints 2019-10-04 21:15:52 +02:00
Sergey Bugaev afdc5688ec LibC: Implement dirname() and basename()
And write section 3 man pages for them.
2019-10-03 08:23:54 +02:00
Sergey Bugaev 8fbcfa934a Base: Add some "See also" links to the man pages
We can do this now that we have link support in LibMarkdown and LibHTML ^)
2019-10-03 08:23:54 +02:00
Andreas Kling 53db492aba Base: Rename the "html" test directory to "www"
It was conflicting with the html program and I'm too lazy to deal with
that right now. :^)
2019-10-01 20:16:09 +02:00
Brandon Scott 08a1fb8f1a LibGUI+PaintBrush: Fix to GFilePicker and PaintBrush enhancements.
GFilePicker
- Fixed GFilePicker to use new ref-counted construct method to stop crashing on open dialog.
  - PaintBrush is still crashing on open dialog due to an unrelated issue.

PaintBrush
- Created 16x16 icon for PaintBrush
- Moved Open option into App menu.
- Changed help menu to make use of the standardized About dialog.
2019-10-01 09:17:56 +02:00
Larkin Nickle 3fb88cb76d Help+man.md: Add man sections
Also correct minor formatting mistake in TelnetServer.md.
2019-09-30 21:38:39 +02:00
Larkin Nickle e7c2467231 Add TelnetServer man page 2019-09-30 21:38:39 +02:00
Andreas Kling 3900eebf15 FileManager+LibGUI+html: Add an icon to represent HTML files
This also becomes the app icon for the little "html" program. :^)
2019-09-29 21:00:41 +02:00
Andreas Kling 17c06d7c9a Base: Move HTML test pages into /home/anon/html
Also add a simple test page for inline style sheets.
2019-09-29 18:07:36 +02:00
Andreas Kling b5c587a106 Base: Add some title attributes to the small HTML test file :^) 2019-09-29 12:26:15 +02:00
Andreas Kling dba74abe93 Base: Fix minor typos in man pages 2019-09-28 23:06:22 +02:00
Andreas Kling 3ed41abba4 Base: Add a little hyperlink to the small HTML test page
This will be useful for testing rendering, hit testing, etc.
2019-09-28 23:00:47 +02:00
Andreas Kling eb18825fce Base: Add man pages for create_shared_buffer() and share_buffer_with() 2019-09-28 21:16:26 +02:00
Andreas Kling 5673ff3694 Base: Add a bold variant of the Pebbleton 11px font 2019-09-28 19:14:23 +02:00
Sergey Bugaev fed96f455d Base: Write some initial man pages
It ain't much, but it's honest work!
2019-09-28 18:29:42 +02:00
Andreas Kling 48b1b55629 Emoji: Make the "Unicorn" emoji transparent :^) 2019-09-20 15:41:39 +02:00
Andreas Kling db9172b509 Base: Add a 16x16 "book" icon, requested by Sergey 2019-09-20 15:39:36 +02:00
Andreas Kling 270adea22f WindowServer: Remove the default background wallpaper
Booting without a wallpaper is significantly faster in QEMU when the
host machine is under load (e.g while recording the screen..)

Using a wallpaper is now optional. :^)
2019-09-18 16:36:15 +02:00
Dan MacDonald 9145a720ec Emoji: Add “Unicorn” (#581) 2019-09-18 07:19:07 +02:00
Andreas Kling 4f184114de VisualBuilder: Add icons for the layout menu actions 2019-09-17 22:39:48 +02:00
Andreas Kling 3d0dba94ec Emoji: Add "Face With Tears of Joy"
By request from Sergey. :^)
2019-09-17 22:17:28 +02:00
Andreas Kling d754ac5bcb LibGUI+VisualBuilder: Add move-to-front/back to GCommonActions
Also give them nice little icons. :^)
2019-09-14 22:42:39 +02:00
Andreas Kling 9d2c4d223a TextEditor+Base: Add an icon for the "Find" action :^) 2019-09-13 23:56:37 +02:00
Andreas Kling ff72b4d475 FileManager+Base: Add "properties" icon
Something to show for the properties action in FileManager. It still
doesn't actually do anything, but at least now it looks neat. :^)
2019-09-13 23:07:59 +02:00
Andreas Kling 414b0f4f9e Base: Add a 16x16 icon for sound files 2019-09-13 22:39:39 +02:00
Andreas Kling 3d4935a223 Emoji: Add some simple emojis I drew on the train
We're gonna need a lot more of these, and I don't know if the size is
quite right, but here's a start. :^)
2019-09-13 14:44:45 +02:00
Jesse Buhagiar ecbc0322c1 Applications: Create a display properties manager
An interactive application to modify the current display settings, such as
the current wallpaper as well as the screen resolution. Currently we're
adding the resolutions ourselves, because there's currently no way to
detect was resolutions the current display adapter supports (or at least
I can't see one... Maybe VBE does and I'm stupid). It even comes with
a very nice template'd `ItemList` that can support a vector of any type,
which makes life much simpler.
2019-09-07 16:51:15 +02:00