Commit graph

451 commits

Author SHA1 Message Date
Jan de Visser f3a9d61891 LibSQL: Add SQL files to assist in troubleshooting
These files contain the same SQL statements as the similarly named tests
in Tests/LibSQL/TestSqlStatementExecution.cpp test suite. They can be
fed to the sql utility to assist in troubleshooting failing tests.
2021-11-10 14:47:49 +01:00
Ben Wiederhake f9167c9265 Base+LibCore: Store booleans in human-readable format
Fixes #10640.
2021-11-04 23:44:02 +01:00
thankyouverycool 586a936fac Base: Update tips.txt 2021-10-18 15:55:11 +02:00
Andreas Kling 879ba5bd17 Base: Add a basic SystemServer.ini for the anon user :^) 2021-10-17 22:24:56 +02:00
Ben Wiederhake 7cd0440571 Base: Fix idempotency in 'little' example 2021-10-06 23:52:40 +01:00
Ben Wiederhake 52e9f25403 Everywhere: Change from http to https where feasible
I used "git grep -FIn http://" to find all occurrences, and looked at
each one. If an occurrence was really just a link, and if a https
version exists, and if our Browser can access it at least as well as the
http version, then I changed the occurrence to https.

I'm happy to report that I didn't run into a single site where Browser
can't deal with the https version.
2021-10-05 02:08:08 +02:00
Mustafa Quraish bd83edf148 Base: Add ~/.config/PixelPaint.ini sample file
This is just a config file with the default options that PixelPaint
recognizes and reads so far. Adding this in since the options are
not really documented anywhere so at least the user can now know what
options are available.
2021-09-12 17:15:30 +02:00
thankyouverycool ac24842f48 Welcome: Update tips.txt
Super+Wheeling window opacity was removed in 370d374.
Guilty only of being ahead of its time.
2021-09-02 00:39:12 +02:00
Peter Elliott 8d2c04821f Tests: Test LibMarkdown against commonmark test suite
TestCommonmark runs the CommonMark test suite
(https://spec.commonmark.org/0.30/spec.json) against LibMarkdown.
Currently 44/652 tests pass.
2021-08-31 16:53:51 +02:00
Andreas Kling c915174563 Userland: Remove IRC Client
The IRC Client application made some sense while our main communication
hub was an IRC channel. Now that we've moved on, IRC is just a random
protocol with no particular relevance to this project.

This also has the benefit of removing one major client of the single-
process Web::InProcessWebView class.
2021-08-24 16:37:28 +02:00
Karol Kosek f6f429bfbc Base: Add csv file association 2021-08-22 10:37:20 +04:30
Andreas Kling 16efe603cb Base: Remove System Monitor and Assistant from quick launch bar
System Monitor can already be accessed quickly by clicking one of the
resource graph applets in the task bar, so this icon was redundant.

Assistant can be opened with the Super+Space hotkey, so we don't need a
dedicated icon for it.
2021-08-18 13:03:11 +02:00
Andreas Kling db33a36048 Base: Rename GitHub browser bookmark to "GitHub"
"SerenityOS @ GitHub" was a pointlessly long name for this.
2021-08-18 12:56:05 +02:00
Andreas Kling ad141a2286 Base: Remove "test.frm" from HackStudio test project 2021-07-31 20:09:27 +02:00
LuK1337 fb66feef5e Base: Add file associations for multiple programs
This change adds missing file association for the following programs:
 - ImageViewer
 - PDFViewer
 - PixelPaint
 - Playground
 - Profiler
 - SoundPlayer
2021-07-19 17:42:14 +04:30
Hendiadyoin1 b98e741237 Tests: Change test-filtering mechanism
We have a new config argument to add space separated exclude regex'
This is separate from "NotTestsPattern", because these are still Tests,
although they are not supposed to be run by the runner

This also adds the test for a working UserspaceEmulator to the tests run
2021-07-14 11:26:34 +04:30
Andrew Kaster d0447f23b8 Tests+Base: Convert stack-smash to be LibTest based and stop skipping it
Now that the test is converted to be LibTest based, we can remove it
from the exclude list in /home/anon/.config/Tests.ini.

Prior to this it would crash and fail because it was signaled instead of
returning normally with exit code 0.
2021-07-06 17:22:45 +02:00
Andrew Kaster ad0b8b42eb Base: Pass show-progress=false to run-tests to avoid confusing CI
We pass this to test-js, and since they share some common code, it makes
sense to pass it to run-tests as well. This prevents the OSC 9 escape
sequences from being emitted when running tests via the script.
2021-07-06 17:22:45 +02:00
Andrew Kaster cc0a376c95 Base+Utilities: Add run-tests program to run system tests with LibTest
This test program heavily pulls from the JavaScriptTestRunner/test-js,
but with a twist. Instead of loading JavaScript files into the current
process, constructing a JS environment for them, and executing test
suites/tests directly, run-tests posix_spawns each test file.

Test file stdout is written to a temp file, and only dumped to console
if the test fails or the verbose option is passed to the program. Unlike
test-js, times are always printed for every test executed for better
visibility in CI.
2021-06-30 08:18:28 +04:30
ngc6302h 595ba17cfa LaunchServer: Add flac file association to /bin/SoundPlayer 2021-06-30 00:58:06 +04:30
Spencer Dixon 66c13edb98 Userland: Add new app called Assistant
'Assistant' is similar to macOS spotlight where you can quickly open a
text input, start typing, and hit 'enter' to launch apps or open
directories.
2021-06-28 16:29:02 +02:00
coderdreams 5edc0d11b0 Tests: Enable AK/TestJSON back
now that tests run on their respective directories
2021-06-23 13:07:40 +02:00
coderdreams 6bc7f2204e Tests: Run each test in their respective directories
This is so they can find their associated resources and it's
the same behavior as in Lagom.

This also required changing some tests so that they could
write their resources in a writable location.
2021-06-22 18:54:40 +04:30
bitwitch 5ac9494483 LaunchServer: Make all file handlers configurable including directories
This commit gets rid of hard coded file handlers in Launcher.cpp in
favor of using values in the LaunchServer.ini config file.

The previous commit adds checks for the existence of handler programs
while registering handlers. This commit takes advantage of that and
ensures that LaunchServer will not attempt to open a file with a
nonexistent program and can properly report failure before spawning a
new child process.

Resolves #8120
2021-06-21 22:30:41 +02:00
Andreas Kling 5b47e9b39a Meta: Remove references to the abandoned IRC channel 2021-06-09 18:38:25 +02:00
FalseHonesty db20f7b6d8 Userland: Add matroska program to test parsing Matroska container files 2021-06-06 17:47:00 +02:00
Daniel Bertalan acbd1d14d0 LibVT+Terminal: Add color scheme support
This commit introduces color scheme support to Terminal. These are found
in `/res/terminal_colors` and the default color scheme can be set in
`~/.config/Terminal.ini`. Furthermore, a combo box is added for
setting the color scheme at runtime.

The previously used default color scheme has been added to
`/res/terminal-colors/Default.ini`.

To make the implementation more compatible with other color schemes,
`TerminalWidget` now supports overriding the default foreground and
background colors.
2021-06-04 09:02:43 +01:00
Linus Groh b1e368ef87 Base: Move test PDFs from /res/pdf to /home/anon/Documents/pdf 2021-05-27 18:13:09 +01:00
Jesse Buhagiar 343e66b816 3DFileViewer: Support textured models
Models that contain UV co-ordinates are now supported,
and will display with a texture wrapped around it, provided
a `bmp` with the same name as the object is in the same
directory as the 3D Model.
2021-05-26 16:36:53 +04:30
Andrew Kaster 467ceb15aa Base/CI: Create and check test-results.log file for on-target tests
Change run-tests-and-shutdown.sh to output a dead simple results file
that just records how many tests failed.

In the CI script, mount the _disk_image after running tests and verify
that the number of failed tests is 0. Otherwise, fail the build :^)

While we're here, bump the timeout for the tests up to 30 minutes, to
make sure that less powerful runners don't fail the job unecessarily.
2021-05-21 22:59:07 +01:00
Andreas Kling 6b25842b10 Base: Remove accidentally added file :^) 2021-05-21 15:11:16 +02:00
Andrew Kaster 0d0f52337c Base/CI: Run tests from /usr/Tests in GitHub Actions
Uncomment the tests that were disabled due to frequent freezes when
running without KVM. This also adds a new github actions group for
every single test, which makes it easier to browse test boundaries
during test runs.

Move catting the serial output log back to its own step, so that it
has higher visibility. The previous solution was also shown to not
actually cat the log in the case of a failed boot and timeout :^(.
2021-05-21 12:05:34 +04:30
Gunnar Beutner 728e6dad73 3DFileViewer: Move the example model into the home directory 2021-05-20 22:22:56 +02:00
Andreas Kling 540acc1a32 DisplaySettings: Give the UI a facelift :^)
- Split the main UI into two tabs: "Background" and "Monitor".
- Use a GUI::IconView for selecting background pictures.
- Tweak layout, spacing, etc.
2021-05-20 00:03:30 +02:00
Matthew Olsson f7ea1eb610 Applications: Add a very simple PDFViewer 2021-05-18 16:35:23 +02:00
stelar7 24c5b0e81c LibGfx: Add support for DDS images 2021-05-18 08:45:53 +01:00
Andreas Kling ed81eb610d Base: Use http://serenityos.org/ for the default browser bookmark
We are currently unable to load the HTTPS version of the site due to
missing cipher suite support.
2021-05-15 12:55:31 +02:00
Andreas Kling 58d73ea36c Userland: Rename QuickShow => Image Viewer
The old name was a bit too ambiguous. This one is crystal clear. :^)
2021-05-14 18:34:44 +02:00
Maciej Zygmanowski 2de0ff28dd Browser: Save search engine setting to preferences 2021-04-29 09:08:22 +02:00
DexesTTP 91c210c39a LibGUI: Make common locations configurable 2021-04-26 18:57:57 +02:00
Marco Biscaro 8124719c3d Tests: Reorganize LibCompress unit tests
Move LibCompress unit tests to LibCompress/Tests directory and register
them with CMake's add_test. This allows us to run these tests with
ninja test instead of running a separate executable.

Also split the existing tests in 3 test files that better follow the
source code structure (inspired by AK tests).
2021-04-21 08:00:32 +02:00
daniel eliad b96c205c98 Tests: fixed test-crypto wrong argument order that failed -
run-tests-and-shutdown.sh
2021-04-14 22:33:50 +02:00
FalseHonesty 2d58549296 LibDebug: Add support for parsing array types
This includes multi-dimensional arrays :O
2021-04-14 13:28:48 +02:00
Andreas Kling a2baab38fd Everywhere: It's now "Foobar", not "FooBar", and not "foo bar"
I hereby declare these to be full nouns that we don't split,
neither by space, nor by underscore:

- Breadcrumbbar
- Coolbar
- Menubar
- Progressbar
- Scrollbar
- Statusbar
- Taskbar
- Toolbar

This patch makes everything consistent by replacing every other variant
of these with the proper one. :^)
2021-04-13 16:58:15 +02:00
Brian Gianforcaro 10d9a8db71 Base: Fix run-tests-and-shutdown.sh output in CI testing mode.
The missing newline made the output look weird, as it was jumbled
up next to the standard QEMU boot output instead of below it.
2021-04-11 12:50:33 +02:00
Andreas Kling f1ea092d8f Base: Make the "little" test program compilable again 2021-04-03 20:36:25 +02:00
Timothy Flynn 316e19c3ac Base: Add a bullet emoji • 2021-03-31 23:58:45 +02:00
Cesar Torres 2e28b8ebcc SoundPlayer: Add playlist supprt
And a M3U(8) parser
2021-03-27 10:20:55 +01:00
Itamar 84e34d76d8 HackStudio+LanguageServers/Cpp: Show scope of symbols in Locator 2021-03-23 18:32:39 +01:00
thankyouverycool 4ef0e4b62e Serendipity: Add new tips and use more GML 2021-03-18 07:50:48 +01:00
Itamar 3658c4c567 LibCpp: Replace defined preprocessor values when parsing 2021-03-13 10:17:02 +01:00
Emanuele Torre 1f81bc6879 Everywhere: Remove unnecessary whitespace at the end of some lines. 2021-03-08 09:20:53 +01:00
thankyouverycool 1ccf9de6b9 Serendipity: Couple more tips and some clean-up 2021-03-07 15:41:32 +01:00
AnotherTest 1496b02203 Meta: Use the new Shell features to improve run-tests-and-shutdown
Fixes two TODOs in that file :^)
2021-03-07 10:59:51 +01:00
thankyouverycool 71a123148a Serendipity: A new welcome app
Provides the basic Help+ReadMe care package to new users and some
interesting tips to get started. Feel free to add more!
2021-03-02 11:57:27 +01:00
Andrew Kaster 8453bb3461 Userland: Gate OSC 9 usage in test-js behind an argument
Instead of assuming that we should use the OSC 9 progress messages
whenever we run on serenity, add a show-progress=[true|false] option.

This lets us avoid seeing esc sequence spam in GitHub Actions logs.
2021-03-02 09:00:21 +01:00
Andrew Kaster e8fd53c247 Base: Add test-math to set of tests run on CI
It currently fails though :( Likely contributes to innacuracies in LibJS
tests as well.
2021-03-01 11:12:36 +01:00
Andrew Kaster 611bbc43be Base/CI: Boot serenity in CI in a mode that runs tests on target
Build a new version of Serenity in CI that doesn't have all the debug
symbols on, or we'd be waiting a very long time to boot.

Insert a TestRunner entry into SystemServer.ini that will run a shell
script that runs tests in /bin and /usr/Tests and shuts down the system
in the new self-test boot mode. Also make sure enough basic services are
started in self-test such that the tests will actually run properly.
2021-02-28 18:19:37 +01:00
Andreas Kling 1ba1ca76d8 Base: Add jcs.org to Browser bookmarks
This page is great for testing and it exposes a bunch of issues we
should look into in LibWeb. :^)
2021-02-24 21:55:04 +01:00
Andreas Kling d475460ea1 Base: Add a lion emoji 🦁 2021-02-21 15:07:25 +01:00
thankyouverycool 94e494d6d2 FileManager: Add layout options to View menu
File Manager's toolbar, location bar, status bar and folder pane
can now be toggled on/off
2021-02-13 11:01:59 +01:00
thankyouverycool cb42ba0ab1 FileManager: Save 'Show dotfiles' setting in FileManager.ini 2021-02-13 11:01:59 +01:00
thankyouverycool 5a03b326a7 TextEditor: Add layout options to View menu
Toolbar, status bar, and ruler can now be toggled on/off and their
settings are saved in ~/.config/TextEditor.ini
2021-02-13 11:01:59 +01:00
Itamar 72fdab7bfb LanguageServers/Cpp: ParserAutoComplete engine inspects header files
... and performs preprocessing on the source code before parsing.

To support this, we are now able to keep track of multiple
files in the autocomplete engine. We re-parse a file whenever it is
edited.
2021-02-08 23:10:38 +01:00
Itamar fa18010477 HackStudio: Integate with C++ parser-based autocomplete
By default, C++ auto completion will still be performed by the
lexer-based logic.
However, the parser-based logic can be switched on via the menubar.
2021-01-27 21:10:57 +01:00
Itamar e318a3d3d4 little: Remove "-Os" compile flag
This flag made gcc generate location info of type "location_list" for
'my_struct', which we do not yet support in LibDebug.
2021-01-09 10:55:46 +01:00
Andreas Kling 8a5c1d1d4e Browser: Add a very basic content filter list
Let's start out with something small, just to make sure the feature
gets tested.
2021-01-05 21:58:14 +01:00
Brendan Coles 5c0c4f4b2d Playground: Support opening gml file by path as command line argument 2021-01-05 17:12:54 +01:00
Idan Horowitz 7e457b98c3 Terminal: Remove redundant scroll length settings option
This is no longer needed as a global one is now available
under mouse settings.
2020-12-30 11:58:52 +01:00
Linus Groh bed240d4b3 LaunchServer+Base: Stop using Browser as default protocol handler
Browser supports very few protocols (http, https, gemini, file) at the
moment, so there's no point in using it as a catch-all and default
protocol handler. I added an explicit association for gemini to
/bin/Browser instead.

This stops Desktop::Launcher::open() from reporting success for any URL,
which really isn't the case (Browser shows an error page...).
2020-12-24 10:25:18 +01:00
Alex McGrath f1d7d864ae LibVT+Terminal: Add the option to disable the bell 2020-12-21 00:17:12 +01:00
Andreas Kling c139b7fe78 Base: Remove *.hsp files
HackStudio no longer has dedicated project files, so let's get rid of
the *.hsp file concept. It'll eventually produce some files again,
but they won't be the same kind of "project" files.
2020-12-10 20:43:19 +01:00
Daniel Lemos 4ae0de9a37
Browser: Add DuckDuckGo to bookmarks (#4288) 2020-12-05 13:39:30 +01:00
Brendan Coles 4dd104607d LaunchServer: Add hsp=/bin/HackStudio file association to config 2020-11-10 19:04:24 +01:00
Brendan Coles e62b604ec5 Base: remove unnecessary Game config files from /home/anon/.config/ 2020-11-10 19:03:59 +01:00
Andreas Kling eed78ffa5a Base: Tweak CXXFLAGS for the "little" test projects
Let's build with -std=c++2a since we're C++20 nowadays. :^)
2020-11-05 10:02:57 +01:00
Jesse Buhagiar 4713e6185f Chess: Add missing default config file in .config :^)
Following 9f8a8e07c2, let's add a default
`.ini` to prevent `unveil` from failing.
2020-11-04 19:36:54 +01:00
Brendan Coles e558f6b184 Minesweeper+Snake: load config file before calling unveil() 2020-11-04 19:36:27 +01:00
Brendan Coles 9f8a8e07c2 Games: Use pledge and unveil 2020-11-02 13:16:01 +01:00
Brendan Coles 75dec15b43 LaunchServer: Add sheets=/bin/Spreadsheet file association to config 2020-11-01 10:33:20 +01:00
Linus Groh d412fbdcf3 Shell+LibLine: Support HISTCONTROL environment variable
This is implemented in Line::Editor meaning not only the Shell will
respect it, but also js, Debugger etc.

Possible values are "ignorespace", "ignoredups" and "ignoreboth", as
documented in Shell-vars(7), for now.

The default value for the anon user (set in .shellrc) is "ignoreboth".
2020-10-26 11:27:54 +01:00
Linus Groh bcfc6f0c57 Everywhere: Fix more typos 2020-10-03 12:36:49 +02:00
Andreas Kling 0245e0f03a DevTools: Remove VisualBuilder and FormCompiler
This functionality is being moved to HackStudio so let's not confuse
people by keeping the old stuff around.
2020-10-01 21:07:12 +02:00
thankyouverycool 30ad295fa1 Base+HackStudio: Rename project file extensions to .hsp
More concise in Views and consistent with other extensions.
2020-08-26 16:59:34 +02:00
Itamar e793cc3d13 Base: Modify "little" project 2020-08-15 15:06:35 +02:00
Andreas Kling ad2e84b71a Browser: Move bookmarks.json to ~/.config 2020-08-05 17:40:47 +02:00
Andreas Kling 4f3e8547d2 Base: Add ~/Documents and put miscellaneous files there 2020-08-05 17:40:47 +02:00
Andreas Kling db450dbc44 Base: Move "js" and "little" HackStudio projects into ~/Source/ 2020-08-05 17:40:47 +02:00
Andreas Kling bc615572a9 LibCore+Base: Move user-specific config files to $HOME/.config 2020-08-05 17:40:47 +02:00
Linus Groh 5cee150a91 Base: Open .hackstudio files in HackStudio 2020-08-05 16:54:23 +02:00
Linus Groh 0d493c1879 HackStudio: Rename project file format from .files to .hackstudio 2020-08-05 16:54:23 +02:00
Andreas Kling 1bc6bb0421 Shell: Run both /etc/shellrc and ~/.shellrc on startup
The global script runs before the local (per-user) one.
2020-07-07 11:35:22 +02:00
AnotherTest bc3285abb0 Shell: Read and evaluate an init file on start
This behaviour is overridable with the `--skip-init' flag.
The default file is at '~/shell-init.sh'
2020-07-05 15:43:14 +02:00
Andreas Kling a378500b45 Base: Remove /home/anon/myfile.txt
I added this file while originally testing the kernel's file system
support. We have plenty of random files lying around these days. :^)
2020-07-04 21:21:04 +02:00
Andreas Kling da66d99566 Base: Add TextEditor to the quick-launch area in the Taskbar :^)
I'm always starting text editors by opening a Terminal and typing "te"
which is a bit silly when I can have an icon for it instead!
2020-07-03 21:34:12 +02:00
Andreas Kling 14477eb565 Terminal: Bump the default ScrollLength to 4
This feels so much better than scrolling one line at a time. :^)
2020-06-30 18:33:09 +02:00
devashish 58a5af1dcd LaunchServer: Associate JPEG files with QuickShow 2020-06-27 18:33:11 +02:00
Hüseyin ASLITÜRK 57ef3b27ec Base: Add PGM file type to QuickShow file type list 2020-06-27 13:01:27 +02:00
Hüseyin ASLITÜRK 7f30d933b5 Base: Add PPM file type to QuickShow file type list 2020-06-22 18:11:22 +02:00
Hüseyin ASLITÜRK 58c3356472 Base: Add pbm file type to QuickShow file type list 2020-06-21 16:42:46 +02:00
Matthew Olsson 3f5c80e490 LibGfx: Add BMP suite html files 2020-06-21 10:08:25 +02:00
Andreas Kling 3f87c98f44 Base: Fix broken ACID2 browser bookmark :^) 2020-06-18 16:47:04 +02:00
Andreas Kling de12cf6821 Base: Move all the HTML test content into /res/html/misc 2020-06-17 20:09:44 +02:00
Paul Roukema eb11ab2480 Base: Add some interlaced PNGs to the local copies of the pngsuite tests 2020-06-13 19:47:43 +02:00
Andreas Kling c91981eba8 LibWeb: Handle negative values when collapsing vertical margins
In the presence of negative margins, we subtract the largest negative
margin from max(0, largest positive margin).
2020-06-12 18:47:18 +02:00
Andreas Kling 21b1f1653d LibWeb: Implement very basic margin collapsing
We now collapse a block's top margin with the previous sibling's
bottom margin so that the larger margin wins.
2020-06-12 18:47:18 +02:00
Andreas Kling 260427f0ad LibWeb: Some improvements to absolute positioning
Absolutely positioned blocks now register themselves with their
containing block (and note that the containing block of an absolutely
positioned box is the nearest non-statically positioned block ancestor
or the ICB as fallback.)

Containing blocks then drive the layout of their tracked absolutely
positioned descendants as a separate layout pass.

This is very far from perfect but the general direction seems good.
2020-06-12 13:43:46 +02:00
Andreas Kling 2b489f492d Base: Put the ACID2 test on the browser bookmarks bar :^) 2020-06-10 16:14:09 +02:00
Andreas Kling 422bbe98a5 LibWeb: Start adding support for the <iframe> element! :^)
This patch introduces a bunch of things:

- Subframes (Web::Frame::create_subframe())
- HTMLIFrameElement (loads and owns the hosted Web::Frame)
- LayoutFrame (layout and rendering of the hosted frame)

There's still a huge number of things missing, like scrolling, overflow
handling, event handling, scripting, etc. But we can make a little
iframe in a document and it actually renders another document there.
I think that's pretty cool! :^)
2020-06-05 23:36:02 +02:00
FalseHonesty f958c693ee HackStudio: Support debugging variables with Enum types
Variables with enum types can now be both viewed and modified in the
variables view!
2020-06-03 08:12:50 +02:00
Andreas Kling ffae239e91 Base: Fix bad URL in welcome page 2020-06-02 22:05:29 +02:00
Andreas Kling d4ddb0013c LibWeb: Share decoded images at the Resource level :^)
This patch adds ImageResource as a subclass of Resource. This new class
also keeps a Gfx::ImageDecoder so that we can share decoded bitmaps
between all clients of an image resource inside LibWeb.

With this, we now share both encoded and decoded data for images. :^)

I had to change how the purgeable-volatile flag is updated to keep the
volatile-images-outside-the-visible-viewport optimization working.
HTMLImageElement now inherits from ImageResourceClient (a subclass of
ResourceClient with additional image-specific stuff) and informs its
ImageResource about whether it's inside the viewport or outside.

This is pretty awesome! :^)
2020-06-02 20:32:38 +02:00
FalseHonesty 75e42648e1 HackStudio: Allow changing variable values in debugger
This patch adds a context menu to variables in the debugger variable
tree view that has an option to set the value of a variable. An input
box will pop up asking for the new value of the variable, which
is then parsed and used to set the actual variable.
2020-05-31 10:52:25 +02:00
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
LepkoQQ b094c064d8 Base: Add test page for decoding different basic png formats. 2020-04-26 20:29:17 +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
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
Linus Groh 746dd5b190 LibJS: Implement computed properties in object expressions 2020-04-23 23:56:04 +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
bcoles e2f0e36bdb
Base: Add Browser to QuickLaunch (#1836) 2020-04-18 12:36:00 +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
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
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
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
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 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
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
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
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
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
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
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