Commit graph

33974 commits

Author SHA1 Message Date
Lady Gegga
ab63b9fc01 Base: Add Mathematical Operators to font Katica Regular 10
2200, 2210, 2240, 2242, 2243, 2245, 2248, 224A, 224B, 224C,
224D, 2264, 2265, 2266, 2267, 2268, 2269, 226A, 226B, 226C,
22BE, 22C0, 22C1, 22C2, 22C3, 22C6, 22C7, 22CB, 22CC, 22CD
https://www.unicode.org/charts/PDF/U2200.pdf
2022-02-08 10:48:30 +00:00
Lady Gegga
b2db0712ad Base: Add Letterlike Symbols to font Katica Regular 10
2102, 2103, 2115, 2116, 2117, 211D, 2120, 2121, 2124, 212B,
2133, 2141, 2142, 2143, 2144, 214B, 214D
https://www.unicode.org/charts/PDF/U2100.pdf
2022-02-08 10:48:30 +00:00
Lady Gegga
0edba54b7b Base: Add Combining Diacritical Marks to Katica Regular 10
0300, 0301, 0303, 0304, 0305, 0312, 0313, 0314, 0325, 0326,
032A, 0332, 0333, 0334, 0335, 0336, 0337, 0338, 033A, 033F,
0340, 0341, 0342, 0346, 0347, 0363, 0364, 0365, 0366, 0367,
0368, 0369, 036A, 036B, 036C, 036D, 036E, 036F
https://www.unicode.org/charts/PDF/U0300.pdf
2022-02-08 10:48:30 +00:00
Lady Gegga
fb7fadc38f Base: Add Spacing Modifier Letters to font Katica Regular 10
02B0, 02B1, 02B2, 02B3, 02B4, 02E2
https://www.unicode.org/charts/PDF/U02B0.pdf
2022-02-08 10:48:30 +00:00
Lady Gegga
943357e311 Base: Adjust 00A9 and 00AE in font Katica Regular 10
These glyphs are now closer to the Unicode charts.
https://www.unicode.org/charts/PDF/U0080.pdf
2022-02-08 10:48:30 +00:00
Lady Gegga
7ad8e4874a Base: Add General Punctuation to font Csilla Regular 10
2010, 2013, 2014 https://www.unicode.org/charts/PDF/U2000.pdf
2022-02-08 10:48:30 +00:00
davidot
1c4c251be3 LibJS+Everywhere: Remove all VM::clear_exception() calls
Since VM::exception() no longer exists this is now useless. All of these
calls to clear_exception were just to clear the VM state after some
(potentially) failed evaluation and did not use the exception itself.
2022-02-08 09:12:42 +00:00
davidot
9264f9d24e LibJS+Everywhere: Remove VM::exception() and most related functions
This commit removes all exception related code:
Remove VM::exception(), VM::throw_exception() etc. Any leftover
throw_exception calls are moved to throw_completion.
The one method left is clear_exception() which is now a no-op. Most of
these calls are just to clear whatever exception might have been thrown
when handling a Completion. So to have a cleaner commit this will be
removed in a next commit.

It also removes the actual Exception and TemporaryClearException classes
since these are no longer used.

In any spot where the exception was actually used an attempt was made to
preserve that behavior. However since it is no longer tracked by the VM
we cannot access exceptions which were thrown in previous calls.
There are two such cases which might have different behavior:
- In Web::DOM::Document::interpreter() the on_call_stack_emptied hook
  used to print any uncaught exception but this is now no longer
  possible as the VM does not store uncaught exceptions.
- In js the code used to be interruptable by throwing an exception on
  the VM. This is no longer possible but was already somewhat fragile
  before as you could happen to throw an exception just before a VERIFY.
2022-02-08 09:12:42 +00:00
davidot
4ef1e8f226 Spreadsheet: No longer use vm.exception() to signal exception state
Instead, use the completions which are returned directly. This means we
no longer have to worry about the global VM state when running code.
2022-02-08 09:12:42 +00:00
davidot
e160f508a8 LibJS: Add a traceback to Error
Since we have the traceback we now also generate the stack string on
demand instead of immediately on construction.
2022-02-08 09:12:42 +00:00
davidot
f324d91106 LibJS: Convert FinalizationRegistry::cleanup to ThrowCompletionOr 2022-02-08 09:12:42 +00:00
davidot
dcc284705b LibJS: Always pop the execution context if we pushed one for bytecode 2022-02-08 09:12:42 +00:00
davidot
8108fc7f9c LibJS: Convert Instruction::execute in bytecode to ThrowCompletionOr
This allows us to use TRY in these functions :^).
2022-02-08 09:12:42 +00:00
davidot
de90d54be0 LibJS: Convert ArrayBuffer construction to ThrowCompletionOr
This also allows us to create TypedArrays with an existing buffer thus
clearing up an additional FIXME in TextEncoder.
2022-02-08 09:12:42 +00:00
davidot
4136cbdb09 LibJS: Convert ScopeNode declaration functions to ThrowCompletionOr
This removes a number of vm.exception() checks which are now caught
directly by TRY. Make use of these checks in
{Global, Eval}DeclarationInstantiation and while we're here add spec
comments.
2022-02-08 09:12:42 +00:00
Andreas Kling
cc7a117f0f LibJS: Add missing include to ShadowRealm.h 2022-02-07 22:39:57 +01:00
Sam Atkins
6df0b8e889 LibWeb: Parse display: inline-flex
This was already handled in the CSS machinery, we just never parsed it.
2022-02-07 21:55:12 +01:00
Sam Atkins
48c6cf92e3 LibWeb: Add pointer-events: all
This is basically the same as `auto` in the spec, so let's just treat
them as identical for now. Gets rid of some Discord CSS parser
spam. :^)
2022-02-07 21:55:12 +01:00
Sam Atkins
8aaab19e6b LibWeb: Allow percentages for border-radius :^)
During the LengthPercentage split, I converted the individual-corner
`border-foo-bar-radius` properties to LengthPercentage but forgot
`border-radius` itself! Oops. Discord's CSS was doing `border-radius:
50%` a lot, so this cuts down on CSS parser spam.
2022-02-07 21:55:12 +01:00
Ali Mohammad Pur
3bf828e0f9 RequestServer: Reenable socket notifications unconditionally
There's a possible window where the notifications are disabled, and any
request coming at that time will never get any data if it relies on
socket notifications.
2022-02-07 21:52:23 +01:00
Andreas Kling
673e6f3a32 LibJS: Add missing include to ExecutionContext.h 2022-02-07 21:48:57 +01:00
Andreas Kling
54d10d8dda LibJS: Add missing include to Handle.h 2022-02-07 21:05:30 +01:00
Andreas Kling
7ad4702cbf LibJS: Unbreak build with JS_MODULE_DEBUG
Thanks to David for noticing this! :^)
2022-02-07 19:59:21 +01:00
Julian Offenhäuser
11375b35e8 Base: Add some latin ligatures to Csilla and Katica fonts
This patch adds ligatures for latin ff(FB00), fi(FB01), fl(FB02),
ſt(FB05) and st(FB06) to Csilla and Katica font variants.
2022-02-07 18:52:52 +00:00
Andreas Kling
aeb72fe9d0 LibJS: Reduce header dependency graph in Realm.h 2022-02-07 19:16:46 +01:00
Andreas Kling
6ddbe8f953 LibJS: Add [[HostDefined]] internal slot to Script objects
In C++, this is a raw pointer to a Script::HostDefined.
2022-02-07 19:16:46 +01:00
Andreas Kling
77a1ef06a4 LibJS: Add [[HostDefined]] internal slot to Realm objects
In C++, this is an OwnPtr<Realm::HostDefined>.
2022-02-07 19:16:45 +01:00
Andreas Kling
85cf80507f LibJS: Make ScriptOrModule use WeakPtr instead of raw pointers 2022-02-07 19:16:45 +01:00
kleines Filmröllchen
6ee597369d Meta+Userland: Run the GML formatter on CI and pre-commit
Now that the GML formatter is both perserving comments and also mostly
agrees to the existing GML style, it can be used to auto-format all the
GML files in the system. This commit does not only contain the scripts
for running the formatting on CI and the pre-commit hook, but also
initially formats all the existing GML files so that the hook is
successfull.
2022-02-07 18:39:50 +01:00
kleines Filmröllchen
32de6dde4c Playground: Remove the GML formatting warning
As we no longer remove comments when formatting GML, this gets rid of
the warning presented to the user when there are comments in the GML.
2022-02-07 18:39:50 +01:00
kleines Filmröllchen
41ef4f11dc LibGUI: Move GML parsing and formatting to new AST
This commit introduces a couple of connected changes that are hard to
untangle, unfortunately:
- Parse GML into the AST instead of JSON
- Change the load_from_json API on Widget to load_from_gml_ast
- Remove this same API from Core::Object as it isn't used outside of
  LibGUI and was a workaround for the object registration detection;
  by verifying the objects we're getting and casting we can remove this
  constraint.
- Format GML by calling the formating APIs on the AST itself; remove
  GMLFormatter.cpp as it's not needed anymore.

After this change, GML formatting already respects comments :^)
2022-02-07 18:39:50 +01:00
kleines Filmröllchen
1806b297b6 LibGUI: Add a custom GML AST
This Abstract Syntax Tree is specifically designed to represent GML and
also includes comments. It will be used in the next commit to replace
JSON in the GML system.
2022-02-07 18:39:50 +01:00
kleines Filmröllchen
8b39074078 Userland: Undefine FOR_EACH_TOKEN_TYPE everywhere
This was causing some macro redefinition errors after the headers ended
up in the same file through some includes. The simple fix is to undefine
the macro after use.
2022-02-07 18:39:50 +01:00
kleines Filmröllchen
4931c88b13 LibGUI: Remove GML prefix in favor of proper namespace
Prefixes are very much a C thing which we don't need in C++. This commit
moves all GML-related classes in LibGUI into the GUI::GML namespace, a
change somewhat overdue.
2022-02-07 18:39:50 +01:00
thankyouverycool
89201b682b LibGfx: Return proper ColorRole for GutterBorders 2022-02-07 15:05:22 +00:00
thankyouverycool
6f37351142 LibGUI: Simplify DisplayOnly painting for TextEditor 2022-02-07 15:05:22 +00:00
thankyouverycool
2c1a417513 LibGUI: Fix typo in TextEditor::paint_event 2022-02-07 15:05:22 +00:00
thankyouverycool
f35a6c13ab LibGUI+TextEditor: Highlight the entire current line
And fix Line Highlighting's duplicate alt-menu shortcut.

Previously only text on the cursor's line was highlighted. This makes
discerning cursor focus on empty lines easier.
2022-02-07 15:05:22 +00:00
thankyouverycool
b2df863b55 LibGUI: Adjust TextEditor's clipping rect for text
And simplify its construction.

The first visual line was being over-clipped vertically by an amount
equal to the frame's thickness. Selections and icons in TextBoxes and
the first line of Editors now display correctly.
2022-02-07 15:05:22 +00:00
thankyouverycool
2424858c32 LibGUI: Register gutter and ruler GML properties for TextEditor 2022-02-07 15:05:22 +00:00
Linus Groh
acb91d7869 LibJS: Add spec comments to the NativeError constructor 2022-02-07 14:44:42 +00:00
Linus Groh
6a9eeb2c5c LibJS: Add spec comments to the Error constructor 2022-02-07 14:41:37 +00:00
Linus Groh
a75ab15f15 LibJS: Add spec comments to Error.prototype.toString() 2022-02-07 14:35:29 +00:00
Linus Groh
e106d5ecf4 LibJS: Let Error prototypes inherit from PrototypeObject 2022-02-07 14:32:39 +00:00
Hendiadyoin1
89c82abf1f LibJS: Implement non standard error.stack attribute
All other browser already support this feature.
There is a Stage 1 proposal to standardize this, but it does not seem
to be active.
2022-02-07 14:17:57 +00:00
Andreas Kling
8c3942d90c LibWeb: Rename "result" => "evaluation_status" in ClassicScript::run()
This matches the variable name used in the spec.
2022-02-07 14:58:18 +01:00
Andreas Kling
a286b1a6af LibWeb: Remove outdated FIXME from ClassicScript::run()
Interpreter::run() *does* now return a Completion. :^)
2022-02-07 14:58:18 +01:00
Luke Wilde
11eedc309a LibWeb: Implement ErrorEvent
This will be used by the new EventTarget to check if it needs to do
special error event handling. Currently it isn't used for anything
else.
2022-02-07 14:58:18 +01:00
Jorropo
dc42ca37bd LibJS: Fix JSON.stringify with stale surrogate codepoints
This fix this test262 test:
built-ins/JSON/stringify/value-string-escape-unicode.js
2022-02-07 13:53:36 +00:00
electrikmilk
5aa803f7f2 Base: Use GML file type icon 2022-02-07 14:39:29 +01:00