Commit graph

33830 commits

Author SHA1 Message Date
Lady Gegga
4952da0663 Base: Add Avestan to font Katica Regular 10
10B00-10B3F https://www.unicode.org/charts/PDF/U10B00.pdf
2022-02-05 21:15:45 +00:00
Lady Gegga
fb4ed428d4 Base: Add 10CD1B-10CD1D, 10CD68 emojis to PUA codepoints
10CD1B (Angelyak), 10CD1C (Yak), 10CD1D (Yakgone), 10CD69 (Yakbane)
2022-02-05 21:15:45 +00:00
Jason
cdcf097aa8 FileManager: Add an animation for deleting files 2022-02-05 19:57:45 +00:00
Ali Mohammad Pur
e53117a9b9 Base: Add a quote to the fortunes database 2022-02-05 19:37:42 +00:00
Στέφανος
43d706a29e Meta: Fix problematic e2fsck behavior (Debian)
Under Debian `e2fsck` is found in `/sbin/` which does not match the
existing "version" the script currently uses (`/usr/sbin/e2fsck`
versus `/sbin/e2fsck`); therefore I added a simple `if` condition to
remedy the situation by verifying whether the original path exists or
not, so I can use the one Debian expects.

Special thanks goes to Tim Flynn a.k.a. `trflynn89` for his valuable
feedback.
2022-02-05 19:34:40 +00:00
Timothy Flynn
2212aa2388 LibRegex: Support non-ASCII whitespace characters when matching \s or \S
ECMA-262 defines \s as:

    Return the CharSet containing all characters corresponding to a code
    point on the right-hand side of the WhiteSpace or LineTerminator
    productions.

The LineTerminator production is simply: U+000A, U+000D, U+2028, or
U+2029. Unfortunately there isn't a Unicode property that covers just
those code points.

The WhiteSpace production is: U+0009, U+000B, U+000C, U+FEFF, or any
code point with the Space_Separator general category.

If the Unicode generators are disabled, this will fall back to ASCII
space code points.
2022-02-05 22:30:10 +03:30
Liav A
54845c4bf2 AK: Remove commented-out code from Bitmap container
Instead, add a note to explain that there's a const variant of data()
method in the parent BitmapView class.
2022-02-05 18:14:12 +00:00
Liav A
b9f9cbb12c Kernel/Interrupts: Remove stale MSIHandler class
When we implement MSI support, we can rely on the IRQHandler class for
installing IRQ handlers at the right location.
2022-02-05 18:13:02 +00:00
Sam Atkins
24c4d7a842 Utilities/run-tests: Add command-line switch to also run "skipped" tests
Among other things, this lets you run flaky tests to check if they are
still flaky. :^)

This is done in two ways: It makes should_skip_test() always return
false; and skips reading and generating the skipped-tests lists since
we won't use them.
2022-02-05 18:12:19 +00:00
Idan Horowitz
db32466499 LibWeb: Mark SelectorEngine matches-related functions as inline
The prologues and epilogues of these functions were pretty hot in a
profile of Browser, so this should help a bit.
2022-02-05 16:48:14 +01:00
Idan Horowitz
89bd4cd80d LibWeb: Cache the result of Selector::specificity()
This function was showing up as taking 30% of all runtime during a
profile of Browser. This change effectively eliminates it completely.
2022-02-05 16:48:14 +01:00
Idan Horowitz
de7b5279cb AK: Make Vector::data() ALWAYS_INLINE
This was showing up in profiles of Browser, and it really shouldn't be.
2022-02-05 16:48:14 +01:00
Timothy Flynn
3729fd06fa LibRegex: Do not return an Optional from Regex::Matcher::execute
The code path that could return an optional no longer exists as of
commit: a962ee020a
2022-02-05 19:06:50 +03:30
Timothy Flynn
27d3de1f17 LibRegex: Do not continue searching input when the sticky bit is set
This partially reverts commit a962ee020a.

When the sticky bit is set, the global bit should basically be ignored
except by external callers who want their own special behavior. For
example, RegExp.prototype [ @@match ] will use the global flag to
accumulate consecutive matches. But on the first failure, the regex
loop should break.
2022-02-05 19:06:50 +03:30
Ali Mohammad Pur
222e580fa8 Shell: Use strncmp() instead of string.compare() for name completions
The "at most n bytes" behaviour of strncmp is required for this logic to
work, this was overlooked in 5b64abe when converting Strings to
StringViews, which lead to broken autocomplete.
2022-02-05 16:59:12 +03:30
davidot
14d1601a76 LibJS: Remove the VERIFY_NOT_REACHED in link_and_eval_module
Since the spec does not fully define the entry points of modules what
this means is kind of unclear. But it does work in most cases and can
be useful. We do print out a warning just to clarify why there could be
strange things.
2022-02-05 11:52:51 +01:00
davidot
d46be7e7f2 LibJS: Visit internal values in PromiseValueList 2022-02-05 11:52:51 +01:00
davidot
212c8dad5e LibJS: Keep handles on internal function while creating a class
It seems the stack search does not find all functions because they are
kept in variants and other structs. This meant some function could be
cleaned up while we were evaluating a class meaning it would fail/crash
when attempting to run the functions.
2022-02-05 11:52:51 +01:00
davidot
5749d85534 LibJS: Keep handles on promise functions while resolving a module 2022-02-05 11:52:51 +01:00
davidot
8da6c01d8f LibJS: Remove the JS_TRACK_ZOMBIE_CELLS option
This feature had bitrotted somewhat and would trigger errors because
PrimitiveStrings were "destroyed" but because of this mode they were not
removed from the string cache. Even fixing that case running test-js
with the options still failed in more places.
2022-02-05 11:52:51 +01:00
Mahmoud Mandour
794d79e315 LibSQL: Implement DESCRIBE TABLE tests 2022-02-05 00:35:03 +01:00
Mahmoud Mandour
f6233913ad LibSQL: Implement a DESCRIBE TABLE statement
This statement (for now) outputs the name and types of the different
attributes in a table. It's not standard SQL but all DBMSs that I know
of implement a sort of statement for such functionality.

Since the output of DESCRIBE TABLE is just a relation, an internal
schema, `master` was created and a table definition for DESCRIBE into
it. The table definition and the master schema are not accessible by the
user.
2022-02-05 00:35:03 +01:00
Mahmoud Mandour
cd4dba87fa LibSQL: Avoid signed arithmetic in IntegerImpl::compare 2022-02-05 00:35:03 +01:00
Ali Mohammad Pur
a962ee020a LibJS+LibRegex: Don't repeat regex match in regexp_exec()
LibRegex already implements this loop in a more performant way, so all
LibJS has to do here is to return things in the right shape, and not
loop over the input string.
Previously this was a quadratic operation on string length, which lead
to crazy execution times on failing regexps - now it's nice and fast :^)

Note that a Regex test has to be updated to remove the stateful flag as
it repeats matching on multiple strings.
2022-02-05 00:09:32 +01:00
Ali Mohammad Pur
2b028f6faa LibRegex+LibJS: Avoid searching for more than one match in JS RegExps
All of JS's regular expression APIs only want a single match, so avoid
trying to produce more (which will be discarded anyway).
2022-02-05 00:09:32 +01:00
Tom
4c506f91fe Kernel: Disable BootFramebufferConsole when drivers create a new one
When GraphicsManagement initializes the drivers we can disable the
bootloader framebuffer console. Right now we don't yet fully destroy
the no longer needed console as it may be in use by another CPU.
2022-02-04 21:34:12 +01:00
Tom
24f2f3ba4e Kernel: Set up an initial boot framebuffer console
Instead of seeing a black screen until GraphicsManagement was fully
initialized, this allows us to see the console output much earlier.
So, if the bootloader provided us with a framebuffer, set up a console
as early as possible.
2022-02-04 21:34:12 +01:00
Tom
eb446725d5 Kernel: Separate GenericFramebufferConsole implementation
The GenericFramebufferConsoleImpl class implements the logic without
taking into account any other details such as synchronization. The
GenericFramebufferConsole class then is a simple wrapper around
GenericFramebufferConsoleImpl that takes care of synchronization.

This allows us to re-use this implementation with e.g. different
synchronization schemes.
2022-02-04 21:34:12 +01:00
Maciej
99e3e42fa5 Keymap Applet: Spawn KeyboardSettings when clicking 2022-02-04 21:30:31 +01:00
Linus Groh
e087cd574e LibJS: Rename variables to 'calendarLike' in a couple of places
This is an editorial change in the Temporal spec.

See: https://github.com/tc39/proposal-temporal/commit/9af2d35
2022-02-04 20:00:34 +00:00
Linus Groh
c48f695b90 LibJS: Remove '-000000' check from ParseTemporalYearMonthString
This is an editorial change in the Temporal spec.

See: https://github.com/tc39/proposal-temporal/commit/3be4b5d
2022-02-04 20:00:34 +00:00
Linus Groh
28ac5a1333 LibJS: Update fallibility of ParseISODateTime in spec comments
This is an editorial change in the Temporal spec.

See: https://github.com/tc39/proposal-temporal/commit/bc79069
2022-02-04 20:00:34 +00:00
Maciej
6df246091b LibCoredump: Add stack frame entry even if there is no object info
We know the object name and are able to include it. Function name and
source position are still unknown and will just be displayed as "??? ()"
2022-02-04 20:03:47 +01:00
Maciej
394227b2f9 LibCoredump: Fix use-after-free in Backtrace::object_info_for_region()
The first line was creating a StringView object with region name. Then,
if the path didn't start with '/', it had assigned a String made from a
temporary LexicalPath join result.

This fixes the bug that only main executable's frames were displayed.
2022-02-04 20:03:47 +01:00
Jagger De Leo
d5183cb7ac PixelPaint: Use Escape to clear rectangular selections
Now while dragging a new rectangular selection you can cancel it by
hitting Escape. Existing selections are cleared by Escape as well if the
RectangularSelectTool is active.
2022-02-04 16:11:48 +01:00
Jagger De Leo
a96b15d2bc PixelPaint: Remove conflicting action hotkey
The new CommandPalette feature conflicts with PixelPaint's Clear
Selection action keyboard shortcut (Ctrl + Shift + A).

Fixes: #12222
2022-02-04 16:11:48 +01:00
Timothy Flynn
30a143c79e LibJS: Explicitly handle invalid Date objects in UTC time setters
This is a normative change in the ECMA-262 spec:
https://github.com/tc39/ecma262/commit/ca53334

Note that this also fixes a few errors where we errantly converted the
stored time value to local time.
2022-02-04 13:47:50 +00:00
Timothy Flynn
fd7d0a31d9 LibJS: Explicitly handle invalid Date objects in local time setters
This is a normative change in the ECMA-262 spec:
https://github.com/tc39/ecma262/commit/ca53334
2022-02-04 13:47:50 +00:00
Sam Atkins
cbdbe0c5a2 LibWeb: Implement CalculatedStyleValue::to_string() 2022-02-04 13:52:02 +01:00
Sam Atkins
714832e705 LibWeb: Distinguish between Integer and Number calc() values 2022-02-04 13:52:02 +01:00
Sam Atkins
e4251f3327 LibWeb: Allow calc() in opacity
This is mostly a test to make sure that resolving calc() to a number or
percentage works correctly. I don't love how this ended up.
2022-02-04 13:52:02 +01:00
Sam Atkins
8bd1854406 LibWeb+Base: Enable calc() for font-weight property :^)
Modified the test-page because FontDatabase looks for exact font-weight
matches, so requesting weight 800 in a font that only has 700, causes
it to return the default font instead. So, we ask for 700 here.

The actual fix is to improve our font-matching but I am trying not to
get distracted today. :^)
2022-02-04 13:52:02 +01:00
Sam Atkins
2407a03fd9 LibWeb: Add resolving calc() to a number/integer/percentage
None of these require any outside metrics, which is nice! I believe the
Values-4 spec would have us simplify them down into a single value at
parse time, but that's a yak for another day.
2022-02-04 13:52:02 +01:00
Sam Atkins
e111e8e44e LibWeb: Type-check calc() in in property_accepts_value()
This means only CalculatedStyleValues that would return the desired type
will be accepted.
2022-02-04 13:52:02 +01:00
Sam Atkins
b54cd17c1e LibWeb: Allow percentage tokens again when parsing calc()
I unintentionally broke this in my LengthPercentage PR, but it was not
convenient to fix until now.
2022-02-04 13:52:02 +01:00
Sam Atkins
ce0de4b2b4 LibWeb: Allow LengthPercentage to hold a calculated value
Most of the time, we cannot resolve a `calc()` expression until we go to
use it. Since any `<length-percentage>` can legally be a `calc
()`, let's store it in `LengthPercentage` rather than make every single
user care about this distinction.
2022-02-04 13:52:02 +01:00
Sam Atkins
f0fb84dfcb LibWeb: Refactor calc() resolution logic using CalculationResult
The previous static functions are now methods of their respective
CalcFoo structs, but the logic has not changed, only that they work
with CalculationResults instead of converting everything to floats.
2022-02-04 13:52:02 +01:00
Sam Atkins
35f64af3a4 LibWeb: Implement CalculationResult type for calc() results
calc() sub-expressions can return a variety of different types, which
then can be combined using the basic arithmetic operators. This class
should make that easier to deal with, instead of having to handle all
the possible combinations at each call site. :^)

We take the Layout::Node as a pointer not a reference, since later we'll
need to call these functions when resolving to `<number>` or `<integer>`
which don't use those, and we don't want to force users to pass them in
unnecessarily.
2022-02-04 13:52:02 +01:00
Sam Atkins
b69f6097de LibWeb: Resolve type of calc() expressions at parse-time
See https://www.w3.org/TR/css-values-3/#calc-type-checking

If the sub-expressions' types are incompatible, we discard the calc() as
invalid.

Had to do some minor rearranging/renaming of the Calc structs to make
the `resolve_foo_type()` templates work too.
2022-02-04 13:52:02 +01:00
Sam Atkins
b818d952d1 LibWeb: Combine the two sets of calc() operator enums 2022-02-04 13:52:02 +01:00