Commit Graph

720 Commits

Author SHA1 Message Date
Andreas Kling
e44c87cfff LibWeb: Implement enough HTML parsing to handle a small simple DOM :^)
We can now parse a little DOM like this:

<!DOCTYPE html>
<html>
    <head></head>
    <body>
        <div></div>
    </body>
</html>

This is pretty slow work, but the incremental progress is satisfying!
2020-05-24 00:49:22 +02:00
Andreas Kling
634ce37663 LibWeb: Make hit-testing work with display: inline-block;
When hit testing encountered a block with inline children, we assumed
that the inline children are nothing but text boxes. An inline-block
box is actually a block child of a block with inline children, so we
have to handle that scenario as well. :^)

Fixes #2353.
2020-05-23 21:08:25 +02:00
Bryan Steele
b5c0703e14 Base: Add a really bad, but yummy Slice of Pizza emoji 🍕 2020-05-23 19:49:42 +02:00
Spencer Dixon
ecb03716d4 Base: Add red heart emoji ❤️ 2020-05-23 16:33:05 +02:00
Andreas Kling
6caa5661f3 LibWeb: Teach HTMLTokenizer how to tokenize attributes
Properly tokenize single-quoted, double-quoted and unquoted attributes!
2020-05-23 01:22:15 +02:00
Andreas Kling
272b35d2e1 LibWeb: Begin work on a spec-compliant HTML parser
In order to actually view the web as it is, we're gonna need a proper
HTML parser. So let's build one!

This patch introduces the Web::HTMLTokenizer class, which currently
operates on a StringView input stream where it fetches (ASCII only atm)
codepoints and tokenizes acccording to the HTML spec tokenization algo.

The tokenizer state machine looks a bit weird but is written in a way
that tries to mimic the spec as closely as possible, in order to make
development easier and bugs less likely.

This initial version is far from finished, but it can parse a trivial
document with a DOCTYPE and open/close tags. :^)
2020-05-22 21:46:13 +02:00
Linus Groh
65d94a1e74 Base: Add simple setInterval() test 2020-05-21 15:18:08 +02:00
Hüseyin ASLITÜRK
8790d6bafc Base: Extend fonts to 384 character to support LatinExtendedA 2020-05-21 01:19:42 +02:00
Hüseyin ASLITÜRK
ec9f1af0fb Base: Add HTML character escape test document
Test page for Turkish and Swedish custom characters.
2020-05-21 01:19:42 +02:00
Hüseyin ASLITÜRK
7aa9cf472b Base: Add markdown file icon 2020-05-21 01:19:13 +02:00
Andreas Kling
58fa9c6e89 PixelPaint: Rename from PaintBrush :^) 2020-05-20 20:35:35 +02:00
Andreas Kling
ff4eaa12b4 ClipboardHistory: Always place the applet at the same location :^) 2020-05-20 20:24:44 +02:00
Linus Groh
a51adf27bf Base: Add more characters to Katica10 and CsillaThin7x10
£, ×, ÷, Ä, à, á, â, ã, ä, ñ, ò, ó, ô, õ, ù, ú, û, ß
2020-05-20 19:19:16 +02:00
Sergey Bugaev
7d8bfe4f3a Base: Tweak SystemServer.ini
Notably, adjust service priorities.
2020-05-20 15:42:48 +02:00
Hüseyin ASLITÜRK
da23514431 Base: Add MessageBox question icon 2020-05-20 13:54:10 +02:00
Hüseyin ASLITÜRK
426cdaf65b Base: Add new characters to Katica and Csilla 2020-05-20 13:40:24 +02:00
Andreas Kling
3b11e471bd LibWeb: Allow reloading the current page with location.reload() 2020-05-18 22:05:13 +02:00
Andreas Kling
71007f6ebb LibWeb: Add location.protocol and location.host 2020-05-18 21:59:16 +02:00
Andreas Kling
efdfdbabdb LibWeb: Allow navigating to a new URL by setting window.location.href 2020-05-18 21:52:50 +02:00
Andreas Kling
1ec4db04cd LibWeb: Add a simple window.location object with some getters :^) 2020-05-18 21:42:40 +02:00
Andreas Kling
42651200d4 Base: Tweak browser toolbar icons to make them a bit livelier :^) 2020-05-18 19:38:20 +02:00
Nicholas Hollett
02cc3ac21f Base: Add file type & protocol definitions for known handlers.
This matches the existing user configuration in /home/anon/LaunchServer.ini
2020-05-18 11:27:27 +02:00
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