Commit Graph

188 Commits

Author SHA1 Message Date
Andreas Kling
6f85422e8a Base: Add HTML spec (multipage) to the default Browser bookmarks :^) 2020-05-30 12:25:37 +02:00
FalseHonesty
b352a6b59d LibWeb: Implement vendor specific CSS color style for System Palette
Add "-libweb-palette-foo-bar" CSS color properties to allow CSS to
style itself using the currently selected System Theme.
2020-05-26 10:17:50 +02:00
Linus Groh
67b742bf32 LibWeb: Add document.querySelector() 2020-05-26 00:12:20 +02:00
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
ec9f1af0fb Base: Add HTML character escape test document
Test page for Turkish and Swedish custom characters.
2020-05-21 01:19:42 +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
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
7bfd24ca76 LibWeb: Support the :root pseudo class 2020-05-14 08:49:51 +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
Linus Groh
4c1a765076 LibWeb: Add basic support for "border-style: {dotted,dashed}" 2020-05-10 19:41:00 +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
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
68991855ef Base: Open https:// URLs in Browser 2020-05-09 15:17:29 +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
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
AnotherTest
0a55679de4 LibWeb: Add canvas.quadraticCurveTo()
Also adds a test, and removes debug spam ™️
2020-05-05 09:21:07 +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
AnotherTest
72d56b46b5 LibTLS: Make enough stuff work to have a demo run
...maybe, sometimes :^)
2020-05-02 12:24:10 +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
Andreas Kling
e3232eb25b LibWeb: Support loading data: URLs transparently via ResourceLoader
This is pretty darn cool! :^)
2020-04-26 22:57:00 +02:00