Commit graph

4374 commits

Author SHA1 Message Date
Linus Groh
9c19e62675 LibMarkdown: Wrap code block language string in escape_html_entities()
This would allow HTML injection as the string was inserted into the HTML
output with no sanitation whatsoever.

Fixes #7123.
2021-05-19 23:31:00 +01:00
Andreas Kling
0a70e1728a DisplaySettings: Fix broken path to MonitorSettingsWidget's GML 2021-05-20 00:25:15 +02:00
Linus Groh
c2fb252ebf LibWeb: Use -libweb-palette-base-text for text color in default CSS
This makes un-styled text readable when using a dark system theme,
previously such text would be black, regardless of the theme background
color.

Fixes #7274.
2021-05-19 23:23:48 +01:00
Andreas Kling
6394ea00d8 DisplaySettings: Remove icon from browse-for-wallpaper button
The icon on this button looked out of place.
2021-05-20 00:13:56 +02:00
Andreas Kling
7f206ca6de DisplaySettings: Select the currently used wallpaper on startup 2021-05-20 00:03:30 +02:00
Andreas Kling
7ba644456e LibGUI: Don't invalidate FileSystemModel indices on thumbnail update
Finishing a thumbnail generation doesn't affect indices at all.
2021-05-20 00:03:30 +02:00
Andreas Kling
bb9e955ef8 DisplaySettings: Make MonitorWidget update itself on property changes 2021-05-20 00:03:30 +02:00
Andreas Kling
c79e33d00c DisplaySettings: Rename DisplaySettingsWidget => MonitorSettingsWidget 2021-05-20 00:03:30 +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
Andreas Kling
ff519e5421 LibGUI: Add widget registration for GUI::IconView 2021-05-20 00:03:30 +02:00
Andreas Kling
c14ffdef00 DisplaySettings: Tweak main window layout & setup code
Get rid of the menu and put some padding around the main tab widget.
2021-05-20 00:03:30 +02:00
Andreas Kling
83f43b6464 DisplaySettings: Replace the monitor image with something more thematic
This is a drawing of my own monitor in a familiar style. :^)
2021-05-20 00:03:30 +02:00
Ali Mohammad Pur
a57f152ec7 LibHTTP: Relax the assertion on extra reads after transfer is finished
This was added in #4831, but it didn't account for extra newlines after
the response (seems like some servers like to do this).
2021-05-19 23:57:04 +02:00
Itamar
832e9c6e02 LibCpp: Add regression tests for the parser
For each .cpp file in the test suite data, there is a .ast file that
represents the "known good" baseline of the parser result.

Each .cpp file goes through the parser, and the result of
invoking `ASTNode::dump()` on the root node is compared to the
baseline to find regressions.

We also check that there were no parser errors when parsing the .cpp
files.
2021-05-19 23:19:07 +02:00
Itamar
fbf796cd9f LibCpp: Fix "NumricLiteral" => "NumericLiteral" typo 2021-05-19 23:19:07 +02:00
Itamar
402483ec1f LibCpp: Generalize ASTNode::dump() to support redirecting its output
Previously, ASTNode::dump() used outln() for output, which meant it
always wrote its output to stdout.

After this commit, ASTNode::dump() receives an 'output' argument (which
is stdout by default). This enables writing the output to somewhere
else.

This will be useful for testing the LibCpp Parser with the output of
ASTNode::dump.
2021-05-19 23:19:07 +02:00
Itamar
463a91c4a2 Utilities: Rename CppParserTest => cpp-parser
This is a utility program that runs the LibCpp parser on a program and
dumps out the AST.
2021-05-19 23:19:07 +02:00
Itamar
ef95ddcbfa LibCpp: Fix match_expression()
match_expression() will now return true if there's a match for a Name
node.
2021-05-19 23:19:07 +02:00
Itamar
f28d944122 LibCpp: Support 'auto' Type 2021-05-19 23:19:07 +02:00
Itamar
eeb98335d5 CppLanguageServer: Put cpp test files in /home/anon/cpp-tests/
This is similar to the LibJS test data that resides in
/home/anon/js-tests.
It's more convenient than storing the test programs as raw strings
in the code.
2021-05-19 23:19:07 +02:00
Stephan Unverwerth
28ed518142 LibGL: Implement all of glVertex{2,3,4}{d,dv,f,fv,i,iv,s,sv} 2021-05-19 23:18:13 +02:00
Marcus Nilsson
41e74d4d31 CatDog: Don't show context menu when clicking outside of widget
The context menu for CatDog was shown when right clicking anywhere on
the screen because of global cursor tracking being enabled.
Also fix event not being passed by reference.

Fixes #7285
2021-05-19 23:14:07 +02:00
Brian Gianforcaro
83fc591cea Kernel: Generate page fault events from the kernel profiler
Hook the kernel page fault handler and capture page fault events when
the fault has a current thread attached in TLS. We capture the eip and
ebp so we can unwind the stack and locate which pieces of code are
generating the most page faults.

Co-authored-by: Gunnar Beutner <gbeutner@serenityos.org>
2021-05-19 22:51:42 +02:00
Gunnar Beutner
6ac1ca5a9a Profiler: Remove ability to filter Kernel::Scheduler::yield() frames
Hiding those frames doesn't really make sense. They're a major
contributor to a process' spent CPU time and show up in a lot of
profiles. That however is because those processes really do spend
quite a bit of time in the scheduler by doing lots of context
switches, like WindowServer when responding to IPC calls.

Instead of hiding these for aesthetic reasons we should instead
improve the scheduler.
2021-05-19 22:51:42 +02:00
Gunnar Beutner
277f333b2b Kernel: Add support for profiling kmalloc()/kfree() 2021-05-19 22:51:42 +02:00
Gunnar Beutner
572bbf28cc Kernel+LibC: Add support for filtering profiling events
This adds the -t command-line argument for the profile tool. Using this
argument you can filter which event types you want in your profile.
2021-05-19 22:51:42 +02:00
Gunnar Beutner
8b2ace0326 Kernel: Track performance events for context switches 2021-05-19 22:51:42 +02:00
Ali Mohammad Pur
c94440860e LibCrypto: Use the new return-from-Variant::visit() mechanism
And simplify the code _even further_!
2021-05-19 22:45:34 +02:00
Maciej Zygmanowski
4aaf8df865 Browser: Do not use AK::Format for search engine formatting
It is too complex because it supports many options that are not
used by the search engine. It just makes format validation more
complicated.

Additionaly, now it's possible to have { } characters in search
engine URL (although they are not valid URL characters) :)
2021-05-19 20:51:51 +01:00
Maciej Zygmanowski
78bc6c09ba Browser: Add support for custom search engines 2021-05-19 20:51:51 +01:00
Ali Mohammad Pur
fdfa5c0bc7 Shell: Avoid moving AK::Function instances while inside them 2021-05-19 21:36:57 +02:00
Gunnar Beutner
d954c11f66 Everywhere: Add missing includes for <AK/OwnPtr.h>
Previously <AK/Function.h> also included <AK/OwnPtr.h>. That's about to
change though. This patch fixes a few build problems that will occur
when that change happens.
2021-05-19 21:36:57 +02:00
Justin
45a1a7e1e6 LibC: Add functions for the new statvfs syscalls
This commit adds the statvfs() and fstatvfs() functions into LibC.
2021-05-19 21:33:29 +02:00
Erik Biederstadt
585e7890cd 3DFileViewer: Move Demos/GLTeapot to Applications/3DFileViewer
Also changes the category to `Graphics`
2021-05-19 19:34:12 +01:00
Erik Biederstadt
132ecfc47b GLTeapot: Adds a help menu to the GLTeapot demo
Having a help menu maintains better consistency with the other GUI apps
 on the system.
2021-05-19 19:34:12 +01:00
Erik Biederstadt
d9dc42fab5 GLTeapot: Adds additional error checking when loading files
- If the 3D file contains no vertices then an error is raised
- If the file is not an OBJ file then an error is raised
2021-05-19 19:34:12 +01:00
Erik Biederstadt
01a5ffdae0 GLTeapot: Add the ability to open 3D files
This change makes it possible for the GLTeapot demo to open any OBJ
file.
2021-05-19 19:34:12 +01:00
Brendan Coles
076cd58817 LibWeb: Support X-Content-Type-Options to opt out of MIME type sniffing 2021-05-19 18:10:43 +01:00
DexesTTP
ed1800547e LibTLS: Enable the RSA_WITH_AES_256_GCM_SHA384 cipher
This is more of an example commit of how to add new ciphers to TLS.
2021-05-19 09:18:45 +02:00
DexesTTP
68f6796e72 LibTLS: Use RSA key exchange based on the cipher
After this, we aren't hardcoding RSA in everything we do anymore!
2021-05-19 09:18:45 +02:00
DexesTTP
9bb823a6ab LibTLS: Generate cipher variants based on the cipher
This is better than using the AEAD flag :^)
2021-05-19 09:18:45 +02:00
DexesTTP
2e9a4bb95c LibTLS: Replace cipher selection with a variant 2021-05-19 09:18:45 +02:00
DexesTTP
851e254e8f LibTLS: Rework method names and arrangement in cpp files
This commit only moves and renames methods. The code hasn't changed.
2021-05-19 09:18:45 +02:00
DexesTTP
6d190b299e LibTLS: Define cipher suite parameters and components in a macro
Instead of sprinkling the definition of the ciper suites all over the
TLS implementation, let's regroup it all once and for all in a single
place, and then add our new implementations there.
2021-05-19 09:18:45 +02:00
DexesTTP
17a1f51579 LibTLS: Move the asn certificate parser to Certificate.cpp 2021-05-19 09:18:45 +02:00
DexesTTP
45d55ecacc LibTLS: Move the cipher list to the CipherSuite.h header 2021-05-19 09:18:45 +02:00
DexesTTP
3d27550ab7 LibCrypto: Make GCM movable 2021-05-19 09:18:45 +02:00
DexesTTP
f11f629731 LibCrypto: Use AK::Variant in HashManager 2021-05-19 09:18:45 +02:00
DexesTTP
73f585ceb4 LibCrypto: Use AK::Variant in MultiHashDigestVariant 2021-05-19 09:18:45 +02:00
DexesTTP
2c1916dd8d LibCrypto: Add the SHA-384 hash algorithm
This is a truncated version of SHA-512, so it was fairly trivial.
2021-05-19 09:18:45 +02:00