Commit graph

18399 commits

Author SHA1 Message Date
Liav A
543c29377b Kernel/PCI: Don't expose virtual addresses on the kernel log 2021-04-06 22:25:28 +02:00
tuqqu
7bd0384fa6 LibJS: Support mapFn argument of Array.from 2021-04-06 22:25:05 +02:00
thankyouverycool
bb9cd13a56 FontEditor: Convert to GML and add new edit commands to GlyphEditor
Adds cut, copy, paste and delete to GlyphEditor. Font preview has
moved to a separate resizable ToolWindow. Font metadata can now be
hidden. FontEditor and glyph widgets can now be re-initialized
instead of resetting window's main widget after loading new fonts.
2021-04-06 22:24:05 +02:00
thankyouverycool
d115b29a5b FontEditor: Inherit GlyphMapWidget from ScrollableWidget
This makes it easier to work in FontEditor at low resolution.
Previously glyph map resized itself and the parent window to
accomodate fonts, which isn't ideal. Users typically control
window size/position after launch; widgets have to make do.
2021-04-06 22:24:05 +02:00
thankyouverycool
e8c1288e2c LibGUI: Add autosize to CheckBox 2021-04-06 22:24:05 +02:00
thankyouverycool
8afe013069 LibGUI:: Let open/save specify starting directory in FilePicker 2021-04-06 22:24:05 +02:00
thankyouverycool
3ba86e3156 Base: Add icons for a few apps and filetypes
Adds new java, pdf, open-folder filetype icons. Upgrades chess,
snake, sound player and keyboards. Fixes file manager alignment.
2021-04-06 21:58:55 +02:00
Itamar
9e2e36724d LibCpp: Add TemplatizedName
This type represents templatized names, and replaces our previous use
of 'TemplatizedType' and 'TemplatizedFunctionCall'.

Also, we now parse function calls as secondary expressions.
2021-04-06 21:51:58 +02:00
Itamar
510b5073de LanguageServers/Cpp: Refactor logic of find declaration 2021-04-06 21:51:58 +02:00
Itamar
e16036b9cc LibCpp: Introduce DummyASTNode
This allows us to use pase_* methods inside match_* methods,
without adding any actual AST nodes to the m_nodes list.
2021-04-06 21:51:58 +02:00
Itamar
aa717e6a62 LibCpp: Parse C-Style parse expressions 2021-04-06 21:51:58 +02:00
Itamar
ec2c54ee2e LibCpp: Parse "arrow" operator 2021-04-06 21:51:58 +02:00
Itamar
44833f1621 LibCpp: Parse braced initialization list 2021-04-06 21:51:58 +02:00
Itamar
d482b3fd60 LibCpp: Parse empty for loops 2021-04-06 21:51:58 +02:00
Itamar
fc503b1368 LibCpp: Parse sizeof() expression 2021-04-06 21:51:58 +02:00
Itamar
8bcf5daf3f LibCpp: Handle 'struct' prefix before a type 2021-04-06 21:51:58 +02:00
Itamar
575d6a8ee1 LibCpp: Parse Bitwise & Logical Or & And operators 2021-04-06 21:51:58 +02:00
Itamar
8962581c9c LibCpp: Parse C++ cast expressions
parse static_cast, reinterpret_cast, dynamic_cast & const_cast
2021-04-06 21:51:58 +02:00
Itamar
646aaa111b LibCpp: Support parsing templatized function calls 2021-04-06 21:51:58 +02:00
Itamar
fe4122bbae LibCpp: Support parsing '!=" operator 2021-04-06 21:51:58 +02:00
Itamar
68e9a05472 LibCpp: Parse character literals 2021-04-06 21:51:58 +02:00
Itamar
3295609aea LibCpp: Add AST::Name
A Name node is basically an identifier with an optional scope,
e.g Core::File.
2021-04-06 21:51:58 +02:00
Itamar
29b6915db9 LibCpp: Parse templatized types
We can now parse things like Vector<int>
2021-04-06 21:51:58 +02:00
Itamar
9954a1837f LibCpp: Parse nullptr literal 2021-04-06 21:51:58 +02:00
Itamar
cbb49f26d9 LibCpp: Support parsing binary "==" Operator 2021-04-06 21:51:58 +02:00
Itamar
1f9f6ea9d6 LibCpp: Support parsing function qualifiers 2021-04-06 21:51:58 +02:00
Itamar
ee35fc0da3 LibCpp: Support parsing empty return statements 2021-04-06 21:51:58 +02:00
Itamar
0babb39cae LibCpp: Parse variable declarations in global scope 2021-04-06 21:51:58 +02:00
Itamar
9545c156b5 LibGUI: Fix typo in AutocompleteBox::show 2021-04-06 21:51:58 +02:00
Itamar
68f420ed42 LibCpp: Fix null dereference in IfStatement::declarations() 2021-04-06 21:51:58 +02:00
Itamar
9288dfced8 LanguageServers/Cpp: Don't include declarations bellow the current line 2021-04-06 21:51:58 +02:00
Luke
b82a00d657 LibWeb: Use the new "ensure_pre_insertion_validity" in the HTML document parser
Previously we didn't check if we could insert the element in the
adjusted insertion location's parent.

Also makes the return type NonnullRefPtr, as that's what element is.
2021-04-06 21:42:00 +02:00
Luke
5beacf08a2 LibWeb: Make the node mutation algorithms more spec compliant
The mutation algorithms now more closely follow the spec and
fixes some assertion failures in tests such as Acid3 and Dromaeo.

The main thing that is missing right now is passing exceptions to the
bindings layer. This is because of issue #6075. I spent a while trying
to work it out and got so frustrated I just left it as a FIXME. Besides
that, the algorithms bail at the appropriate points.

This also makes the adopting steps in the document more spec compliant
as it's needed by the insertion algorithm. While I was at it, I added
the adoptNode IDL binding.

This adds a bunch of ancestor/descendant checks to TreeNode as well.
I moved the "remove_all_children" function to Node as it needs to use
the full remove algorithm instead of simply removing it from
the child list.
2021-04-06 21:42:00 +02:00
Luke
5b5d7857e3 LibWeb: Support the "ImplementedAs" IDL attribute on functions 2021-04-06 21:42:00 +02:00
Luke
e56c56128b LibWeb: Add non-inclusive variants of subtree traversal 2021-04-06 21:42:00 +02:00
Luke
ca71ac484b LibWeb: Rename "for_each_in_subtree(_of_type)" to "for_each_in_inclusive_subtree(_of_type)"
This is because it includes the initial node that the function was
called on, which makes it "inclusive" as according to the spec.

This is important as there are non-inclusive variants, particularly
used in the node mutation algorithms.
2021-04-06 21:42:00 +02:00
Luke
f482628fe5 LibWeb: Strip out the mutation event logic from TreeNode
This will instead be done by Node, as they need to occur at precise
steps of the mutation algorithms. Additionally, some of the events
may need to be run multiple times. For example, the removal steps
is run for all the shadow-including descendants of the node that
just got removed.
2021-04-06 21:42:00 +02:00
Luke
be47a94876 LibWeb: Only prepare scripts on insertion if they're not parser inserted
Also updates the "inserted_into" function as per the previous commit.

Changes the FIXME, as according to the spec there is no notification
system to be notified of things such as the node becoming connected.

Instead, "becomes connected" means when the insertion steps are run,
the element is now connected when it previously wasn't.

https://html.spec.whatwg.org/multipage/infrastructure.html#becomes-connected

This is done in this PR because the insertion steps are run when the
start tag is inserted. This made it try to prepare the script too early
for inline scripts.

The order of operations in the HTML document parser ensures that
the parser document is set before the insertion steps are run.
2021-04-06 21:42:00 +02:00
Luke
e3d01c5e10 LibWeb: Make the node mutation event functions spec compliant
This particularly affects the insertion steps and the removed steps.

The insertion steps no longer take into the parent that the node
was inserted to, as per the spec. Due to this, I have renamed the
function from "inserted_into" to simply "inserted". None of the
users of the insertion steps was using it anyway.

The removed steps now take a pointer to the old parent instead of
a reference. This is because it is optional according to the spec
and old parent is null when running the removal steps for the
descendants of a node that just got removed.

This commit does not affect HTMLScriptElement as there is a bit
more to that, which is better suited for a separate commit.

Also adds in the adopted steps as they will be used later.
2021-04-06 21:42:00 +02:00
Luke
9e338a2be2 LibWeb: Add ProcessingInstruction node
Not particuarly useful right now, but is used in
ensure_pre_insertion_validity.

I'm not totally sure on the constructor arguments.
2021-04-06 21:42:00 +02:00
Andreas Kling
c28a3a385b LibGUI: Tweak order of common location buttons in FilePicker
Let's put the root directory up top so the buttons are in order of
directory specificity.
2021-04-06 21:07:04 +02:00
Andreas Kling
33d9b592cd LibGUI: Make FilePicker's common location buttons checkable
We now use the checked state of these buttons to indicate that you are
in that specific folder. The checked state is updated automagically
no matter how you navigate the file system. :^)
2021-04-06 21:07:04 +02:00
Andreas Kling
25de655d43 LibGUI: Add shortcuts to common locations in GUI::FilePicker
This patch adds a handy set of buttons on the left hand side that can
take you to common locations such as:

- Your home directory
- Your desktop directory
- The root directory
2021-04-06 21:07:04 +02:00
Jean-Baptiste Boric
346e0f4dac Kernel: Don't crash if unable to map ramdisk inside kernel address space 2021-04-06 18:17:16 +02:00
Jean-Baptiste Boric
436ca2491d Kernel: Fix KUBSAN crash with RamdiskDevice 2021-04-06 18:17:16 +02:00
Andreas Kling
a7ad0f14bf Minesweeper: Fix UI layout and focus behavior
Click-to-focus was visually annoying. Switch to tab-to-focus.
2021-04-06 17:55:47 +02:00
Andreas Kling
ec1a72b759 FileManager: Set the default menu item in desktop context menus
This makes the "Run TextEditor" action show up in bold text as expected
when opening the context menu for TextEditor on the desktop. :^)
2021-04-06 17:55:47 +02:00
Andreas Kling
7b9754d976 SystemMonitor: Highlight kernel processes a bit better in SystemMonitor
Kernel processes are now displayed with a gear icon and a "(*)" suffix
in the process list.
2021-04-06 17:55:47 +02:00
Andreas Kling
ee2a1f5af7 Kernel+LibCore: Note whether a process is kernel mode in /proc/all 2021-04-06 17:55:47 +02:00
Arthur Mendes
0fd50f0283
Ports: Add flatbuffers library (#6050)
The flatbuffers library is a serialization library, created by Google
for game development and performance-critical applications.
It aims to be fast and efficient.

This commit creates a port of it to SerenityOS.

The flatbuffers build process generates three things: some header files,
a library (libflatbuffers) and a schema compiler (flatc).

There are tests, but they are not compiled, because it runs the
flatbuffers schema compiler, one of the things we are cross-compiling.
The compiler will not run because the target is different from the host
2021-04-06 17:54:28 +02:00