Commit graph

23552 commits

Author SHA1 Message Date
Gunnar Beutner
9026dbbfd6 Documentation: Reorganize the build documentation 2021-07-10 23:24:45 +02:00
Gunnar Beutner
9780cdfb33 Meta: Automatically pick an appropriate GCC binary 2021-07-10 23:24:45 +02:00
Andreas Kling
1e5c2c6231 Spider: Improved 16x16 app icon 2021-07-10 22:03:22 +02:00
Ralf Donau
8ee3a5e09e Kernel: Logic fix in the pledge syscall
Pledge should check m_has_promises. Calling pledge("", nullptr)
does not fail on an already pledged process anymore.
2021-07-10 21:59:29 +02:00
Itamar
b5a02b180c LibCpp: Use fast_is<T> and verify_cast<T> to replace C-style casts
Thanks to @alimpfard for suggesting this :)
2021-07-10 21:58:28 +02:00
Itamar
34fc6c7e1c LibCpp: Make the fields of AST node types private
Previously almost all fields were public and were directly accessed by
the Parser and CppComprehensionEngine.

This commit makes all fields of AST node types private. They are now
accessed via getters & setters.
2021-07-10 21:58:28 +02:00
FalseHonesty
d60bd42972 LibVideo/VP9: Implement MV reading & rectify MV storage issues
With this patch we are finally done with section 6.4.X of the spec :^)
The only parsing left to be done is 6.5.X, motion vector prediction.

Additionally, this patch fixes how MVs were being stored in the parser.
Originally, due to the spec naming two very different values very
similarly, these properties had totally wrong data types, but this has
now been rectified.
2021-07-10 21:28:56 +02:00
FalseHonesty
27fdf8361c LibVideo/VP9: Finish implementing block decoding (6.4.4)
Though technically block decoding calls into some other incomplete
methods, so it isn't functionally complete yet. However, we are
very close to being done with the 6.4.X sections :)
2021-07-10 21:28:56 +02:00
FalseHonesty
074fbd1b06 LibVideo/VP9: Implement parsing Token and MoreCoefs trees
These elements were being used in the new tokens implementation, so
support for them in the TreeParser has been added.

Additionally, this uncovered a bug where the nonzero contexts were
being cleared with the wrong size.
2021-07-10 21:28:56 +02:00
FalseHonesty
aa27ca1b16 LibVideo/VP9: Implement token parsing (6.4.24-6.4.26)
Note that this now requires a couple new syntax types to be parsed
in the TreeParser, so a follow-up commit will implement that behavior.
2021-07-10 21:28:56 +02:00
FalseHonesty
d79c9c262f LibVideo/VP9: Implement sections 6.1.2 and 8.4.1-8.4.4
These section implement the behavior to refresh the probability
tables after parsing a frame.
2021-07-10 21:28:56 +02:00
FalseHonesty
cf6b3d0ce9 LibVideo/VP9: Begin reference frame update process (8.10)
This was required for correctly parsing more than one frame's
height/width data properly. Additionally, start handling failure
a little more gracefully. Since we don't fully parse a tile before
starting to parse the next tile, we will now no longer make it past
the first tile mark, meaning we should not handle that scenario well.
2021-07-10 21:28:56 +02:00
FalseHonesty
514559f074 LibVideo/VP9: Rename Decoder -> Parser & create an actual Decoder class
The class that was previously named Decoder handled section 6.X.X of
the spec, which actually deals with parsing out the syntax of the data,
not the actual decoding logic which is specified in section 8.X.X.
The new Decoder class will be in charge of owning and running the
Parser, as well as implementing all of the decoding behavior.
2021-07-10 21:28:56 +02:00
FalseHonesty
66628053d4 LibVideo/VP9: Start parsing residuals (6.4.21-6.4.23)
Additionally, this uncovered a couple bugs with existing code,
so those have been fixed. Currently, parsing a whole video does
fail because we are now using a new calculation for frame width,
but it hasn't been fully implemented yet.
2021-07-10 21:28:56 +02:00
FalseHonesty
cbff7c386a LibVideo/VP9: Refactor how above & left contexts are stored & cleared
These make more sense as Vectors, and it makes it much easier to manage
their sizing.
2021-07-10 21:28:56 +02:00
FalseHonesty
91572a49c4 LibVideo/VP9: Specify which spec section defines certain behaviors 2021-07-10 21:28:56 +02:00
FalseHonesty
ce524214c9 LibVideo/VP9: Clean up formatting & use range-based for loops 2021-07-10 21:28:56 +02:00
FalseHonesty
559f5a087d LibVideo/VP9: Implement simple FIXMEs that use now supported data 2021-07-10 21:28:56 +02:00
FalseHonesty
e4f015ce3d LibVideo/VP9: Implement more TreeParser probability calculations
Now TreeParser has mostly complete probability calculation
implementations for all currently used syntax elements. Some of these
calculation methods aren't actually finished because they use data
we have yet to parse in the Decoder, but they're close to finished.
2021-07-10 21:28:56 +02:00
FalseHonesty
f85f557a1f LibVideo/VP9: Implement syntax element counting for supported elements
With the progress made in the Decoder thus far, we have the ability
to support most of the syntax element counters in the tree parser.

Additionally, it will now crash when trying to count unsupported
elements.
2021-07-10 21:28:56 +02:00
Tom
83b512789c WindowServer: Flush display buffer when flashing
If the device requires a flush and we modify the front buffer, we need
to flush those changes to the front buffer. This makes the flashing
work using the VirtIOGPU.

Also fix a minor bug where we flushed the front buffer instead of
the back buffer after flipping, which caused the VirtIOGPU to not work
as expected when using the SDL backend and disabling buffer flipping.
2021-07-10 21:24:52 +02:00
Tom
02651f8dc6 Kernel: Make VirtIO GPU buffer flipping more spec compliant
The spec requires a flush after setting the new buffer resource id,
which is required by QEMUs SDL backend but not the GTK backend. This
brings us in line with the spec and makes it work for the SDL backend.
2021-07-10 21:24:52 +02:00
Marcus Nilsson
e718de454e PixelPaint: Check modifier on mousemove in LineTool
Previously m_constrain_angle could end up not being reset if the
keyup-event was lost, for example when opening a dialog. Instead check
the modifiers in on_mousemove().
2021-07-10 21:23:36 +02:00
Karol Kosek
5836710e8f SpaceAnalyzer: Show folder total size 2021-07-10 21:23:11 +02:00
Linus Groh
674f3d0347 LibJS: Pad abs(year) < 1000 with zeros in Date.prototype.toString() 2021-07-10 19:51:07 +01:00
Linus Groh
a647f0abf6 LibJS: Make parse_simplified_iso8601() use Optional<int> instead of -1
...for the non-success state. This fixes a crash when parsing dates with
the year -1, as we would assert successful parsing ("year != -1").
Mixing Optional and -1 seems worse and more complicated than just using
Optional for all the values, so I did that instead.
2021-07-10 19:51:07 +01:00
Linus Groh
39cdffd78d LibJS: Make Date.now() return a floor()'d milliseconds value
It is defined as follows:

    21.4.3.1 Date.now ( )
    https://tc39.es/ecma262/#sec-date.now

    The now function returns the time value designating the UTC date and
    time of the occurrence of the call to now.

"Time value" is defined as:

    21.4.1.1 Time Values and Time Range
    https://tc39.es/ecma262/#sec-time-values-and-time-range

    An ECMAScript time value is a Number, either a finite integral
    Number representing an instant in time to millisecond precision or
    NaN representing no specific instant.

By flooring the value we match the behavior in the Temporal proposal's
Temporal.ZonedDateTime.prototype.epochMilliseconds getter:

    4. Let ms be RoundTowardsZero(ℝ(ns) / 10^6).

With that being defined as:

    13.30 RoundTowardsZero ( x )
    https://tc39.es/proposal-temporal/#sec-temporal-roundtowardszero

    1. Return the mathematical value that is the same sign as x and
    whose magnitude is floor(abs(x)).

This is makes the last of the currently 15 Temporal tests in test262
work, which compares Temporal.now.instant() with Date.now() :^)
2021-07-10 19:51:07 +01:00
Ali Mohammad Pur
a5bc366d9a expr: Make Match expressions comply with POSIX
They should print the contents of capture group 1, if it exists.
2021-07-10 23:14:08 +04:30
Ali Mohammad Pur
11a8476cf4 LibRegex: Use the parser state capture group count in BRE
Otherwise the users won't know how many capture groups are in the
parsed regular expression.
2021-07-10 23:14:08 +04:30
Ali Mohammad Pur
1c584e9d80 LibRegex: Correctly parse BRE bracket expressions
Commonly, bracket expressions are in fact, enclosed in brackets.
2021-07-10 22:58:24 +04:30
Nico Weber
1c69c686e3 chres: Make screen an optional parameter
Most people have only one screen.
2021-07-10 18:51:14 +01:00
Nico Weber
8cf348c14c chres: Unbreak scale factor setting after aa15bf81e4 2021-07-10 18:51:14 +01:00
Aziz Berkay Yesilyurt
9b0ff229e3 Utilities: Use alpha channel instead of opacity in shot
The way overlay was drawn is not the correct way to achieve window
transparency in selection mode. With this change, shot window becomes
truely transparent.
2021-07-10 21:22:25 +04:30
Andreas Kling
b368560800 LibGUI: Only repaint the affected indices on AbstractView item hover
Previously, moving the cursor over items in an item view would cause it
to repaint itself completely. Now we only repaint the two affected
items (the old hovered item and the new hovered item.)
2021-07-10 18:30:46 +02:00
Andreas Kling
df96380121 LibGUI: Tighten paint invalidation rects in item views :^)
AbstractView now has a paint_invalidation_rect(index) function that
subclasses can override to provide a tighter invalidation rect for
an index.
2021-07-10 18:30:46 +02:00
Andreas Kling
148e72bfa0 LibGUI: Add AbstractView::editing_rect() to allow custom editing rects
This allows view classes to customize the editing rect for an index.
2021-07-10 18:30:46 +02:00
Timothy Flynn
6c67de8186 LibJS: Implement RegExp.prototype.hasIndices proposal
https://tc39.es/proposal-regexp-match-indices/
2021-07-10 16:49:35 +01:00
Timothy Flynn
d1e06b00e3 LibJS: Parse the RegExp.prototype.hasIndices flag 2021-07-10 16:49:35 +01:00
Timothy Flynn
e801cc7afd LibJS: Remove ECMAScriptFlags value from JS_ENUMERATE_REGEXP_FLAGS
All regex flags supported by LibJS currently correspond to a LibRegex
option, but this is not the case for the RegExp.prototype.hasIndices
proposal, which is handled entirely in RegExpBuiltinExec. Remove the
flag mapping to prepare for this. This incurs a bit of an optimization
loss in the flag getters, as we now do a substring search, but we can
revisit the getter implementation if it becomes an issue.
2021-07-10 16:49:35 +01:00
Timothy Flynn
6cd966c1e1 LibJS: Implement RegExp.prototype.source according to the spec
RegExp.prototype.source must check if "this" object is the
RegExp.prototype object before raising a TypeError.
2021-07-10 16:49:35 +01:00
Timothy Flynn
2f6eec1322 LibJS: Implement RegExp.prototype.<flag name> according to the spec
The flag getters (e.g. RegExp.prototype.unicode) must specially handle
when "this" object is the RegExp.prototype object.
2021-07-10 16:49:35 +01:00
Idan Horowitz
75541c48b5 LibJS: Add Temporal.Instant.prototype.valueOf 2021-07-10 15:39:47 +01:00
Idan Horowitz
ac8e76be23 LibJS: Add a couple of missing specification links to Temporal.Instant 2021-07-10 15:39:47 +01:00
Andreas Kling
42fab36f02 FontEditor: Tweak offensive padding :^) 2021-07-10 16:13:44 +02:00
Andreas Kling
234d53a324 Terminal: Put debug spam in unimplemented_control_code() behind a flag 2021-07-10 16:13:34 +02:00
Timothy
3c3e5ffe2f TextEditor: Remove unused includes 2021-07-10 15:33:46 +02:00
Timothy
73226a2861 LibGUI: Convert TextEditor to east-const style 2021-07-10 15:33:46 +02:00
Timothy
a3c8005546 TextEditor: Convert to east-const style 2021-07-10 15:33:46 +02:00
Timothy
73ae5200a9 TextEditor+LibGUI: Use unveil and FileSystemAccessServer
Making use of the new FileSystemAccessServer we are able to use
unveil without restricting our ability to open and save files.
A file argument will be unveiled automatically however all other files
require user action via the FileSystemAccessServer to gain access.
2021-07-10 15:33:46 +02:00
Timothy
41ce2debda FileSystemAccessServer: Add service for accessing veiled files nicely
Adds new service FileSystemAccessServer which allows programs to
request a file descriptor for any file on the file system.

The user can be prompted to choose the path with a FilePicker, or the
path can be provided by the application which will show a MessageBox
showing the pid and name of the calling process and allows the user to
approve or deny the request.
2021-07-10 15:33:46 +02:00