Commit graph

6944 commits

Author SHA1 Message Date
Linus Groh 173630c5ef js: Implement pretty-printing of Temporal.Duration objects 2021-07-16 01:07:01 +01:00
Linus Groh 8daf35e1b1 LibJS: Implement Temporal.Duration.prototype.valueOf() 2021-07-16 01:07:01 +01:00
Linus Groh a06b034a9a LibJS: Implement Temporal.Duration.prototype.blank 2021-07-16 01:07:01 +01:00
Linus Groh 3713164fa3 LibJS: Implement Temporal.Duration.prototype.sign 2021-07-16 01:07:01 +01:00
Linus Groh be5254dcac LibJS: Implement Temporal.Duration.prototype.nanoseconds 2021-07-16 01:07:01 +01:00
Linus Groh 04e2d215a1 LibJS: Implement Temporal.Duration.prototype.microseconds 2021-07-16 01:07:01 +01:00
Linus Groh db22f86055 LibJS: Implement Temporal.Duration.prototype.milliseconds 2021-07-16 01:07:01 +01:00
Linus Groh b81331a110 LibJS: Implement Temporal.Duration.prototype.seconds 2021-07-16 01:07:01 +01:00
Linus Groh dbdbfbeebc LibJS: Implement Temporal.Duration.prototype.minutes 2021-07-16 01:07:01 +01:00
Linus Groh 067c2346ed LibJS: Implement Temporal.Duration.prototype.hours 2021-07-16 01:07:01 +01:00
Linus Groh 2015640168 LibJS: Implement Temporal.Duration.prototype.days 2021-07-16 01:07:01 +01:00
Linus Groh 23d0c3494f LibJS: Implement Temporal.Duration.prototype.weeks 2021-07-16 01:07:01 +01:00
Linus Groh 8011409428 LibJS: Implement Temporal.Duration.prototype.months 2021-07-16 01:07:01 +01:00
Linus Groh 300a22f9b9 LibJS: Implement Temporal.Duration.prototype.years 2021-07-16 01:07:01 +01:00
Linus Groh 23766f28db LibJS: Implement Temporal.Duration.prototype[@@toStringTag] 2021-07-16 01:07:01 +01:00
Linus Groh 7921d8ba91 LibJS: Start implementing Temporal.Duration
This patch adds the Duration object itself, its constructor and
prototype (currently empty), and three required abstract operations.
2021-07-16 01:07:01 +01:00
Ali Mohammad Pur 71234b3716 Utilities: Make the js REPL autocomplete correctly handle new Ident
Previously, `new` was being recognised as an identifier, which was
preventing this from working.
2021-07-16 02:36:53 +04:30
Gunnar Beutner d83c672926 LibC: Don't include AK headers in system headers
AK/Platform.h might not be available when building the toolchain.
2021-07-15 23:51:59 +02:00
Jamie Mansfield 0150ae4bbd Solitaire: Reduce overdraw when drawing initial cards 2021-07-15 21:47:36 +02:00
Jamie Mansfield 882b4dc848 Spider: Reduce overdraw when playing 2021-07-15 20:11:22 +02:00
Jamie Mansfield 0f9873475b Spider: Reduce overdraw when drawing initial cards 2021-07-15 20:11:22 +02:00
Jamie Mansfield c0bc884295 Spider: Automatically reveal top cards
This matches basically all other Spider implementations I've played,
and makes playing much easier :)

I have left click-to-reveal in place, but mostly incase there is a
condition I've forgotten about.
2021-07-15 19:52:14 +02:00
Tom 1021aba226 LibGUI: Dither pattern should be independent from clipping rectangle
The dither pattern needs to be determined relative to the bitmap
itself, not the clipping rectangle.

Fixes #8780
2021-07-15 19:46:42 +02:00
Dhruv Maroo 30af999431
Utilities: Allow filenames containing '=' in dd (#8766) 2021-07-15 18:36:46 +04:30
Karol Kosek e46a4181fa Help: Add context menu 2021-07-15 14:42:48 +02:00
Gavin Downard bd4e88ae3d PixelPaint: Fix crash when copying empty selection
Previously, trying to copy when there is no selection would crash,
trying to call mmap with a size of 0. Now it just leaves the clipboard
as it is.
2021-07-15 13:25:39 +02:00
Gunnar Beutner 56cbd00e94 SpiceAgent: Add Clipboard as a build dependency
SpiceAgent depends on header files built as part of the Clipboard
target.
2021-07-15 11:51:16 +02:00
M4x1m3 39e622c400 Utilities: Add groupdel 2021-07-15 11:16:58 +02:00
M4x1m3 21cb531be1 Utilities: Add groupadd 2021-07-15 11:16:58 +02:00
M4x1m3 927f6ea221 LibC: Add putgrent 2021-07-15 11:16:58 +02:00
Timothy 2eb93f2628 LibCore+LibIMAP: Move Promise to LibCore
This makes Promise available without having to link LibIMAP.
2021-07-15 11:11:14 +02:00
Matthew Hall 3b5b7c5e65 VimEditingEngine: Add support for repeats of J 2021-07-15 10:10:07 +02:00
Matthew Hall 2653ad36ee VimEditingEngine: Add support for repeats of p and P 2021-07-15 10:10:07 +02:00
Matthew Hall 7b7548ce9d VimEditingEngine: Allow repeats for dd, yy and x 2021-07-15 10:10:07 +02:00
Matthew Hall c1e2710a0d VimEditingEngine: Add P command to put before cursor 2021-07-15 10:10:07 +02:00
Matthew Hall 180e2469af VimEditingEngine: Add J command to join two lines 2021-07-15 10:10:07 +02:00
Matthew Hall a7e7f62d08 VimEditingEngine: Operate on real lines rather than wrapped ones
In the normal editing engine keys like Home, End etc work on visual
lines, but vim operates on real ones. Eg if you have a really long line
and wrapping is on then in normal editing Home would take you to the
beginning of the wrapped line, but 'I' would put you insert mode at the
beginning of the real line in vim.
2021-07-15 10:10:07 +02:00
Max Wipfli 2404ad6897 LibWeb: Fix assertion failure when tokenizing JS regex literals
This fixes parsing the following regular expression: /</g;

It also adds a simple script element to the HTMLTokenizer regression
test, which also contains that specific regex.
2021-07-15 01:47:22 +02:00
Linus Groh c82c652ee4 js: Implement pretty-printing of Temporal.Calendar objects 2021-07-14 23:50:03 +01:00
Linus Groh bb86d535a9 js: Tweak pretty-printing of Temporal.{Instant,TimeZone} objects
No need for the key/value style here, just put it right after the type.
2021-07-14 23:50:03 +01:00
Linus Groh 466c5bc96d LibJS: Implement Temporal.Calendar.prototype.id 2021-07-14 23:50:03 +01:00
Linus Groh 3ee169d8e7 LibJS: Implement Temporal.Calendar.prototype.toJSON() 2021-07-14 23:50:03 +01:00
Linus Groh 83bbbbe567 LibJS: Implement Temporal.Calendar.prototype.toString() 2021-07-14 23:50:03 +01:00
Linus Groh e01c6adab4 LibJS: Implement Temporal.Calendar.prototype[@@toStringTag] 2021-07-14 23:50:03 +01:00
Linus Groh a2f1d79765 LibJS: Start implementing Temporal.Calendar
Just like the previous Temporal.{Instant,TimeZone} commits, this patch
adds the Calendar object itself, its constructor and prototype
(currently empty), and two required abstract operations.
2021-07-14 23:50:03 +01:00
Linus Groh 48b66c7a68 LibJS: Put Temporal.Instant.prototype member definitions in spec order 2021-07-14 23:50:03 +01:00
Linus Groh 6c8f0fbb35 LibJS: Use more specific return types for some Temporal AOs
Instead of returning Object* we should be specific and return Instant*,
TimeZone* etc.
2021-07-14 23:50:03 +01:00
Max Wipfli bb2aed7d76 LibWeb: Correct behavior of Comment* states in HTMLTokenizer
Previously, this would lead to assertion failures when parsing HTML
comments. This fixes #8757.
2021-07-15 00:48:45 +02:00
Max Wipfli af0b483123 LibWeb: VERIFY an empty builder when emitting tokens in HTMLTokenizer 2021-07-15 00:48:45 +02:00
Timothy Flynn 1a3e1bff7b LibJS: Implement Atomics.isLockFree 2021-07-14 22:13:15 +01:00
Timothy Flynn 33eb830929 LibJS: Implement Atomics.compareExchange 2021-07-14 22:13:15 +01:00
Timothy Flynn 655ffce64d LibJS: Implement Atomics.exchange 2021-07-14 22:13:15 +01:00
Max Wipfli 045a6a566b LibWeb: Remove unused HTMLTokenizer::m_input member variable 2021-07-14 23:03:36 +02:00
Max Wipfli 35f32ac170 LibWeb: Change HTMLToken.h to east const style 2021-07-14 23:03:36 +02:00
Max Wipfli 125982943a LibWeb: Change HTMLTokenizer.{cpp,h} to east const style 2021-07-14 23:03:36 +02:00
Gunnar Beutner 300823c314 LibWeb: Use move() when enqueuing tokens in HTMLTokenizer
We're not using the current token anymore once it's enqueued so let's
use move() when enqueuing the tokens.
2021-07-14 23:03:36 +02:00
Gunnar Beutner c3ad8e9a52 LibWeb: Remove StringBuilder from HTMLToken::m_comment_or_character 2021-07-14 23:03:36 +02:00
Gunnar Beutner 3aa202c432 LibWeb: Remove StringBuilder from HTMLToken::m_tag 2021-07-14 23:03:36 +02:00
Gunnar Beutner 901d71148b LibWeb: Remove StringBuilders from HTMLToken::AttributeBuilder 2021-07-14 23:03:36 +02:00
Gunnar Beutner 992964aa7d LibWeb: Remove StringBuilders from HTMLToken::m_doctype 2021-07-14 23:03:36 +02:00
Gunnar Beutner 2150609590 LibWeb: Remove more unused StringBuilders in HTMLToken
These fields aren't read anywhere but I didn't feel like removing
them outright.
2021-07-14 23:03:36 +02:00
Gunnar Beutner d9e52997e2 LibWeb: Use an Optional<String> to track the last HTML start tag
Using an HTMLToken object here is unnecessary because the only
attribute we're interested in is the tag_name.
2021-07-14 23:03:36 +02:00
Timothy Flynn 6211eb0f9a LibJS: Implement Atomics.store 2021-07-14 20:44:42 +01:00
Timothy Flynn b6364ec899 LibJS: Implement Atomics.xor 2021-07-14 20:44:42 +01:00
Timothy Flynn d2f6255b91 LibJS: Implement Atomics.sub 2021-07-14 20:44:42 +01:00
Timothy Flynn f9d8e234b2 LibJS: Implement Atomics.or 2021-07-14 20:44:42 +01:00
Timothy Flynn 2d3af5c1b4 LibJS: Implement Atomics.and 2021-07-14 20:44:42 +01:00
Timothy Flynn 940875c9fd LibJS: Implement Atomics.load 2021-07-14 20:44:42 +01:00
Timothy Flynn cc3b96743a LibJS: Implement Atomics.add 2021-07-14 20:44:42 +01:00
Timothy Flynn ba2c3731e9 LibJS: Make ValidateTypeArray abstraction public
Also adds a typed_array_from helper for casting a known value to a
TypedArray.
2021-07-14 20:44:42 +01:00
Timothy Flynn 4f8f79c5ca LibJS: Add some TypedArray abstractions for querying underlying type
IsUnclampedIntegerElementType and IsBigIntElementType.
2021-07-14 20:44:42 +01:00
Timothy Flynn f4ea6b1824 LibJS: Implement TypedArray GetModifySetValueInBuffer abstract operation 2021-07-14 20:44:42 +01:00
Timothy Flynn a61723ec59 LibJS: Begin implementing Atomics
This adds the Atomics object to the global object and sets up only its
@@toStringTag property.
2021-07-14 20:44:42 +01:00
Timothy Flynn df75c35d5b LibJS: Alphabetically sort LibJS's CMakeLists.txt 2021-07-14 20:44:42 +01:00
Karol Kosek 1c30f0a154 Browser: Escape an ampersand in the menu to avoid making a shortcut 2021-07-14 18:25:36 +02:00
Karol Kosek 871c51dfd3 LibGfx: Don't underline escaped ampersand in menus
Double ampersands (&&) marking in menus is meant to provide a way
to show the ampersand, since using just one would turn it
into a modifier that sets the shortcut for the next character.

Unfortunately, while the first character had a special case to avoid
marking this set, the marking was still calculated
for the second character.

The fix is rather simple: just skip then the following character!

This issue applied only to the visual part of the Menu.
The WindowServer calculation for the shortcut character is working
properly, i.e. ignores escaped ampersands.
2021-07-14 18:25:36 +02:00
Tom c144d358ae ResourceGraph: Handle more than 4 GiB of memory 2021-07-14 18:24:55 +02:00
Timothy Flynn f7acd6aca5 LibWeb: Handle when the last selected node does not contain text
If the text-for-rendering of the last selected node is empty, the select
all implementation would end up setting the index to -1. This value is
used directly for a substring length in the copy text implementation,
thus would cause a failed assertion.
2021-07-14 17:16:39 +02:00
Timothy Flynn 22ab512f39 LibWeb: Remove now-duplicated actions from IPWV regarding text selection 2021-07-14 17:16:39 +02:00
Timothy Flynn 615a1c7210 Browser: Add context menu item for selecting all text 2021-07-14 17:16:39 +02:00
Timothy Flynn ae910e4370 LibWeb: Add OOPWV IPC for selecting all text 2021-07-14 17:16:39 +02:00
Timothy Flynn fea7e84b26 LibWeb: Move select-all implementation to BrowsingContext 2021-07-14 17:16:39 +02:00
Timothy Flynn 58cb37f986 Browser: Add context menu item for copying selected text 2021-07-14 17:16:39 +02:00
Timothy Flynn 2fda6ce159 LibWeb: Add OOPWV IPC for retrieving selected text 2021-07-14 17:16:39 +02:00
Aziz Berkay Yesilyurt d1028f8aed LibGfx: Use clear_with capacity instead of clear in PNGWriter
Same vector was cleared up and filled in continuously.
2021-07-14 13:37:18 +02:00
Aziz Berkay Yesilyurt b70f2b00a3 LibGfx: Store the size of the chunk from start in PNGWriter
Before this change PNGWriter::add_chunk used to make a copy of
PNGChunk's ByteBuffer to prepend the size of the data.
With this change, 4-byte space is saved from the beginning and written
at the end of the operation. Avoiding this copy yields significant
speed up.
2021-07-14 13:37:18 +02:00
Aziz Berkay Yesilyurt db36ddc763 LibGfx: Prevent a copy in PNGWriter by storing type data at start 2021-07-14 13:37:18 +02:00
Aziz Berkay Yesilyurt d84c4b94da LibGfx: Prevent frequent memory allocations in PNGWriter 2021-07-14 13:37:18 +02:00
Aziz Berkay Yesilyurt 97859aaff1 LibGfx: Use ByteBuffer instead of Vector<u8> in PNGWriter
This is the first step towards reducing the number of copies in
PNGWriter by switching to ByteBuffer as underlying storage.
2021-07-14 13:37:18 +02:00
Andreas Kling d78a007b5d LibWeb: Use split_view() in attribute selector matching
Using split() creates a new String object for each of the split tokens.
Use split_view() instead to avoid these unnecessary heap allocations.
2021-07-14 13:31:49 +02:00
Sam Atkins ffc81cbfad LibWeb: Use Selectors instead of a String for :not() selectors
Rather than parsing the selector every time we want to check it, we
now parse it once at the beginning.

A bonus effect of this is that we now support a selector list in
:not(), instead of just a single selector, though only when using
the new parser.
2021-07-14 13:31:00 +02:00
Sam Atkins 776b1f4548 LibWeb: Make CSS::Selector reference counted
The end goal is to make the PseudoClass::not_selector be a Selector
instead of a String that is repeatedly re-parsed. But since Selector
contains a Vector of ComplexSelectors, which each have a Vector of
SimpleSelectors, it's probably a good idea to not be passing them
around by value anyway. :^)
2021-07-14 13:31:00 +02:00
Sam Atkins 8cae79cc8d LibWeb: Add 'PseudoElement' as a CSS SimpleSelector::Type
Same reasoning again! This is the last one.

While I was at it, I added the two remaining CSS2.2 pseudo-elements,
::first-line and ::first-letter. All 4 are handled in the new CSS
parser, including with the compatibility single-colon syntax. I have
not added support to the old parser.
2021-07-14 13:31:00 +02:00
Sam Atkins 4af7d41879 LibWeb: Add 'PseudoClass' as a CSS SimpleSelector::Type
Same reasoning as the previous commit.
2021-07-14 13:31:00 +02:00
Sam Atkins 96b2356cbb LibWeb: Add 'Attribute' as a CSS SimpleSelector::Type
Previously, SimpleSelectors optionally had Attribute-selector data
as well as their main type. Now, they're either one or the other,
which better matches the spec, and makes parsing and matching more
straightforward.
2021-07-14 13:31:00 +02:00
Sam Atkins dadcb46344 LibWeb: Convert CSS Dump, Selector, & SelectorEngine to east const 2021-07-14 13:31:00 +02:00
Daniel Bertalan cd55b817cf LibJS: Use AK::abs in TimeZone
This fixes a `-Wabsolute-value` warning emitted because of our use of
`abs()` on arguments of type `long long`.
2021-07-14 13:12:25 +02:00
Daniel Bertalan a88f7c99fe LibC: Use our implementation of crti.o and crtn.o
We have had these for quite a while, but we didn't compile them, and
used GCC's version instead. Clang does not come with these, so we have
to provide our own implementation.

Our implementation follows what `musl` and `FreeBSD` do, so this should
work fine, even if documentation can hardly be found for them.
2021-07-14 13:12:25 +02:00
Daniel Bertalan 11a945a499 LibWeb: Add missing typeinfo include
This code worked with GCC because libstdc++ pulls in `type_info`'s
definition through the `cxxabi` header included by `AK/Demangle.h`.

In contrast, `libc++` only forward-declares it, so this code failed to
compile with it.
2021-07-14 13:12:25 +02:00
Daniel Bertalan bb26cea291 WindowServer: Don't use GNU-style designator
Clang throws a fit when it encounters this code, since we already have
the standardized designated initializer syntax in C++20, which we should
use.
2021-07-14 13:12:25 +02:00
jakubiakdev 4a396dc7e8 Base+LibGUI: Add icon to the Rename action 2021-07-14 13:05:01 +02:00
x-yl c8b13bd053 SpiceAgent: Support copying and pasting images 2021-07-14 12:33:07 +02:00
x-yl d4bb6a1a1e SpiceAgent: Add a new spice agent service :^)
A SPICE agent communicates with the host OS to provide nifty features
like clipboard sharing :^)

This patch implements only plain-text clipboard sharing.

See: github.com/freedesktop/spice-protocol/blob/master/spice/vd_agent.h
2021-07-14 12:33:07 +02:00
Timothy 3cc0283eac LibCore: Convert File to east-const style 2021-07-14 14:35:16 +04:30
Timothy 068802d58d LibCore: Add File method to determine absolute path
This will generate absolute paths lexically rather than through a call
to realpath. The motivation for this is to generate absolute paths for
non-existent files in unveil calls, as realpath will not work if the
file does not exist.
2021-07-14 14:35:16 +04:30
Timothy 3ae64c7c3d LibCore: Add File method to determine current working directory 2021-07-14 14:35:16 +04:30
TheFightingCatfish a3400798f8 Utilities: Add an implementation of 'comm'
Add an implementation of 'comm' -- compare files line by line
2021-07-14 14:13:25 +04:30
JJ Roberts-White 74f1f2b5e2 Piano: Add Play/Pause, Forward and Back buttons
Piano now has a toolbar allowing the playback to be paused,
or to be stepped forward or back a note.
2021-07-14 12:07:43 +04:30
Hendiadyoin1 54c005754a UserpaceEmulator: Handle possibly unaligned IO
We also should add some UB warnings for that in the future
2021-07-14 11:26:34 +04:30
Hendiadyoin1 b98e741237 Tests: Change test-filtering mechanism
We have a new config argument to add space separated exclude regex'
This is separate from "NotTestsPattern", because these are still Tests,
although they are not supposed to be run by the runner

This also adds the test for a working UserspaceEmulator to the tests run
2021-07-14 11:26:34 +04:30
brapru 5b6d2644bc LibCore: Generate new passwd file by checking pw_name
LibCore::Account::generate_passwd_file should follow
generate_shadow_file by conditionally checking for the username.
Previously, usermod's set_uid changes would not reflect in the updated
passwd file as m_uid had already been changed to the updated value.
2021-07-14 08:06:30 +02:00
brapru 9b5a1b5036 Utilities: Implement usermod command
Previously there was no way to modify existing user accounts.
2021-07-14 08:06:30 +02:00
brapru 6ef6bd1ccb LibCore: Add setters for all user account properties 2021-07-14 08:06:30 +02:00
ForLoveOfCats 60713c5fcf KeyboardPreferenceLoader: Use correct default Num Lock config value 2021-07-13 23:25:07 +02:00
LuK1337 62c5a5351c LibGUI: Handle KeyDown when checking for Key_Escape in Dialog too
This makes 'escaping' the dialogs seem bit faster :^)
It also follows what RunWindow and probably others do.
2021-07-13 23:23:49 +02:00
Gunnar Beutner 2fc002f778 DynamicLoader: Add RELA support for self-relocations
GCC doesn't seem to rely on those to work, but Clang does.
2021-07-13 23:20:36 +02:00
Itamar 42eb06f045 LibCpp: Don't store entire ASTNode vector in each parser state
We previously stored the entire ASTNode vector in each parser state,
and this vector was copied whenever a state was loaded or saved.

We don't actually need to store the whole nodes list in each state
because a new state can only add new nodes to this list, and won't
mutate existing nodes.

It would suffice to only hold a vector of the nodes that were created
while parsing in the current state to keep a reference to them.

This reduces the time it takes on my machine for the c++ language
server to handle a file that #includes <LibGUI/Widget.h> from ~4sec to
~0.7sec.
2021-07-13 23:20:09 +02:00
Itamar eb6a15d52b LibCpp: Only store error messages for the main parser state
There's no need to store parser error messages for states with
depth > 0, as they will eventually be popped from the states stack and
their error messages will never be displayed to the user.

Profiling shows that this change reduces the % of backtraces that
contain the store_state & load_state functions from ~95% to ~70%.

Empirically this change reduces the time it takes on my machine for the
c++ language server to handle a file that #includes <LibGUI/Widget.h>
from ~14sec to ~4sec.
2021-07-13 23:20:09 +02:00
Gunnar Beutner 2c41e89d08 LibDebug: Implement symbolication for x86_64 2021-07-13 23:19:33 +02:00
Gunnar Beutner 567fa4b2f0 LibDebug: Fix spelling mistake 2021-07-13 23:19:33 +02:00
Gunnar Beutner 4cf24c6ba2 Userland: Prefer using ARCH() over __LP64__ 2021-07-13 23:19:33 +02:00
Karol Kosek 5c89305fc6 LibGUI: Don't clear textbox on save mode in FilePicker
This fixes a rather frustrating issue during saving a file,
when clicking on a folder (to change the path of saved file)
caused the filename to disappear from the text box.
2021-07-13 21:16:44 +02:00
Idan Horowitz 804d592303 LibJS: Add missing has_constructor override to Generator Functions 2021-07-13 20:40:57 +02:00
Luke e9eae9d880 LibWeb: Add extracting character encoding from a meta content attribute
Some Gmail emails contain this.
2021-07-13 20:23:44 +02:00
Linus Groh 552185066e LibC: Use C-style void cast in assert() 2021-07-13 19:02:20 +01:00
Karol Kosek d34ef6d997 FileManager: Add Rename action to context and application menu
Prior to this change, the only way to rename a file was to press F2
on keyboard.
2021-07-13 17:54:37 +02:00
Karol Kosek 886e011608 LibGUI: Add Rename action 2021-07-13 17:54:37 +02:00
kleines Filmröllchen f634949d26 LibAudio: Use new Vector formatter 2021-07-13 17:40:07 +02:00
Gunnar Beutner 5f3773b715 LibC: Increase minimum alignment for malloc() to 16 bytes
This is required to make SSE instructions work when building with
Clang. Apparently Clang uses SSE instructions where GCC didn't so
we didn't previously run into this problem.
2021-07-13 17:31:22 +02:00
luk1337 334499a3f4
du: Don't fail immediately when directory can't be read (#8719) 2021-07-13 17:30:38 +02:00
luk1337 0b48e12dd7
FileManager: Convert properties window UI to GML (#8705) 2021-07-13 12:57:10 +02:00
TheFightingCatfish 72e661b542 Shell: Add unalias builtin
Add shell unalias builtin to remove aliases
2021-07-13 11:57:11 +04:30
Ariel Don 5140994c69 LibGUI: Select radio buttons with keyboard 2021-07-13 07:11:47 +02:00
Ali Mohammad Pur 9cdea2d521 LibRegex: Consider EOF in the middle of a range an error 2021-07-13 07:04:06 +02:00
Ali Mohammad Pur 1b2728f1ed LibRegex: Don't attempt to insert invalid bytecode in {B,E}RE 2021-07-13 07:04:06 +02:00
Ali Mohammad Pur 6e35b94034 LibRegex: Implement lookaround in ERE 2021-07-13 07:04:06 +02:00
Ali Mohammad Pur 5f4e1338a1 LibRegex: Allow empty character classes in {B,E}RE 2021-07-13 07:04:06 +02:00
Ali Mohammad Pur 189922f442 LibRegex: Disallow excessively large repetition counts in {B,E}RE 2021-07-13 07:04:06 +02:00
Ali Mohammad Pur f9fed0b167 LibRegex+LibC: Make re_nsub available to the user
To comply with Dr.POSIX, this field has to be user-accessible.
2021-07-13 07:04:06 +02:00
LuK1337 8922049507 DisplaySettings: Reload current settings when apply dialog is dismissed
Fixes: #8673
2021-07-12 23:35:34 +02:00
Linus Groh 15d5c62915 LibC: Replace use of do/while in assert() with the ternary operator
It's a single expression, no do/while needed. This makes assert() work
with the comma operator (assert(foo), assert(bar), assert(baz)).
Found because exactly this is being used somewhere in the guts of LLVM.
2021-07-12 22:33:28 +01:00
Karol Kosek 0c7a319e6b LibAudio: Set variable type for decoding fixed subframes in FLAC
This fixes an crash caused by using the type from
FlacSubframeHeader::order (unsigned 8-bit), which after overflowing
the integer, converting it back to u32, and decrementing by one
resulted in accessing an array waaay out of bounds.
2021-07-12 23:32:50 +02:00
Idan Horowitz 84b028bd71 LibJS: Add Temporal.Instant.prototype.round()
As well as the required Abstract Operations.
2021-07-12 19:05:17 +01:00
Idan Horowitz 75d1ffea00 LibCrypto: Add the >= operator to UnsignedBigInteger 2021-07-12 19:05:17 +01:00
Idan Horowitz 01c731aa59 LibJS: Add the GetOptionsObject & GetOption Temporal AbstractOperations
These are used by any Temporal method that accepts an options object.
2021-07-12 19:05:17 +01:00
Idan Horowitz 2382f67e0b LibJS: Add Temporal.Instant.prototype.equals() 2021-07-12 19:05:17 +01:00
Idan Horowitz 84403ab423 LibJS: Add Temporal.Instant.from() 2021-07-12 19:05:17 +01:00
Idan Horowitz 33cf6274e8 LibJS: Add Temporal.Instant.compare() 2021-07-12 19:05:17 +01:00
Idan Horowitz b816037739 LibJS: Add the ToTemporalInstant Abstract Operation & its requirements
This is Abstract Operation is required for the majority of
InstantConstructor's and InstantPrototype's methods.

The implementation is not entirely complete, (specifically 2 of the
underlying required abstract operations, ParseTemporalTimeZoneString
and ParseISODateTime are missing the required lexing, and as such are
TODO()-ed) but the majority of it is done.
2021-07-12 19:05:17 +01:00
Idan Horowitz 141c46feda AK: Add a DateTimeLexer
This is an AK::GenericLexer that exposes helper methods for parsing
date and time related literals (years, months, days, hours, minutes,
seconds, fractional seconds & more)
2021-07-12 19:05:17 +01:00
Karol Kosek b2daaca5ee HackStudio: Activate window only on file drop 2021-07-12 20:02:15 +02:00
Karol Kosek d7f0472b25 SoundPlayer: Activate window only on file drop 2021-07-12 20:02:15 +02:00
Karol Kosek e7fbd48ed9 ImageViewer: Activate window only on file drop 2021-07-12 20:02:15 +02:00
Karol Kosek 7f418a5c6a HexEditor: Accept file drops 2021-07-12 19:50:58 +02:00
Ariel Don 4eba921d48 ls: Add option to list subdirectories recursively
List subdirectories encountered using -R or --recursive flags with ls.
2021-07-12 19:15:19 +04:30
Ariel Don 3289b6a887 LibCore: Implement File::is_link()
It was already possible to check if a path was a directory or a device.
Now, it is possible to check if a path is a link in a similar manner.
2021-07-12 19:15:19 +04:30
Andrew Kaster 2af591267c LibWasm: Adjust signed integer operations to avoid UB
Perform signed integer shifts, addition, subtraction, and rotations
using their corresponding unsigned type. Additionally, mod the right
hand side of shifts and rotations by the bit width of the integer per
the spec. This seems strange, but the spec is clear on the desired
wrapping behavior of arithmetic operations.
2021-07-12 18:42:45 +04:30
Ali Mohammad Pur d74eca78aa LibWasm: Skip initializing active empty data sections 2021-07-12 18:42:45 +04:30
Ali Mohammad Pur 65355c388b LibWasm: Use AK::StackInfo to track stack size
This way, we can make sure that it doesn't overflow when ASAN is
enabled.
2021-07-12 18:42:45 +04:30
Andrew Kaster f7c7954314 LibCore: Tolerate misaligned addresses in struct hostent
macOS's C library is not a good neighbor and doesn't ensure that
the entry in struct hostent's h_addr_list are aligned properly for
a char const*. In Socket::connect, use ByteReader instead of a c-style
cast to work around this possible misalignment.
2021-07-12 18:42:45 +04:30
Brandon van Houten 19d34414bc Utilities: Make less accept 'page up' and 'page down' keys 2021-07-12 16:10:01 +02:00
Karol Kosek f99507bf02 LibGUI: Ignore drop events by default
Before this change, parent widgets such as Buttons or Labels
were stealing drop events their parents.

I noticed it during drag-n-dropping files into visualization widgets
in Sound Player (which takes practically the entire application size
and gave impression that drop events weren't supported in the app
at all).
2021-07-12 15:59:33 +02:00
LuK1337 d940f7ba4f LibGUI: Use wrapped text rect for paint invalidation
This fixes an issue where after anything past first line would not get
invalidated after unhovering an icon.
2021-07-12 15:59:16 +02:00
Gunnar Beutner cbdc7f9e41 UserspaceEmulator: Fix stack for new processes
Fixes #8646.
2021-07-12 12:27:13 +02:00
Andrew Kaster f26d4e1d90 IPCCompiler: Use GENERATE_DEBUG from AK/Debug instead of custom defines
The IPCCompiler was using GENERATE_DEBUG_CODE, which was missing from
AK/Debug.h.in, and plain old DEBUG. Let's just use the one that
was already in the debug header, but unused.
2021-07-12 12:26:52 +02:00
Andrew Kaster 6ba87a6b5e LibC: Use correct macro to disable assert()
The C standard doesn't say anything about DEBUG, just NDEBUG :^)
2021-07-12 12:26:52 +02:00
Karol Kosek 67e3daa679 Breakout: Only paint areas that needs to be updated 2021-07-12 12:26:15 +02:00
Andreas Kling 2e3df52862 Revert "LibThreading: Fix BackgroundAction result use-after-free"
This reverts commit b2e6088bff.

This was a speculative fix that ended up not fixing the issue.
2021-07-12 11:29:37 +02:00
LuK1337 ac78f1e812 TaskbarWindow: Redraw start button when default font changes 2021-07-12 11:08:09 +02:00
LuK1337 8992271c5c LibGUI: Redraw widgets when default font changes 2021-07-12 11:08:09 +02:00
LuK1337 b40d771512 LibGUI: Add FontsChanged event and deliver it to windows and widgets 2021-07-12 11:08:09 +02:00
Maurice Hieronymus dfc33cd412 HackStudio: Disable debug specific context entries
Context menu entries like evaluate expression and
move execution to line action should only be enabled
when a debug session is running. Otherwise they should
be disabled.
2021-07-12 00:47:04 +02:00
Maurice Hieronymus 488d0722bd HackStudio: Disable run button while debugging
This commit disables the run button while we
are in debug mode. Otherwise the stop button
gets disabled when we run the program while
we are in debug mode. This would prevent us
from exiting the debug mode.
2021-07-12 00:47:04 +02:00
Sam Atkins 86994336a7 LibWeb: Correct parsing invalid list of declarations
We were only discarding at most one token when a declaration is
invalid, when we should discard all until we see a ; or EOF.
2021-07-11 23:19:56 +02:00
Sam Atkins c249fbd17c LibWeb: Correct escape handling in CSS Tokenizer
Calling is_valid_escape_sequence() with no arguments hides what it
is operating on, so I have removed that, so that you must explicitly
tell it what you are testing.

The call from consume_a_token() was using the wrong tokens, so it
returned false incorrectly. This was resulting in corrupted output
when faced with this code from Acid2. (Abbreviated)

```css
.parser { error: \}; }
.parser { }
```
2021-07-11 23:19:56 +02:00
Sam Atkins e381ca258f LibWeb: Add more logging to CSS parser 2021-07-11 23:19:56 +02:00
Sam Atkins 9cfbc07c24 LibWeb: Implement CSS::Parse::parse_nth_child_pattern()
This is a modified copy of the code from Selector.cpp, to work on a
TokenStream instead of a String.
2021-07-11 23:19:56 +02:00
Sam Atkins cf333574ac LibWeb: Convert StyleFunctionRule.m_values to ComponentValues
The input is ComponentValues, and the output is too, so storing as
a String in the middle was inefficient and unnecessary.
2021-07-11 23:19:56 +02:00
Sam Atkins fabc09a593 LibWeb: Increase clarity with CSS token debug logging
Had to adjust some places that were using Token.to_string() for
non-debug-logging purposes. Changed its name to to_debug_string()
to make the usage clearer.
2021-07-11 23:19:56 +02:00
Sam Atkins e5ac5e1fab LibWeb: Fix CSS attribute and ID selector parsing
There were several crashes here from out-of-bounds memory access.
2021-07-11 23:19:56 +02:00
Sam Atkins 78d191554a LibWeb: Remove non-compliant whitespace stripping in CSS Parser 2021-07-11 23:19:56 +02:00
Sam Atkins 7e4f75c78c LibWeb: Fix whitespace handling in CSS selectors
Whitespace marks the end of a compound-selector, no matter where
it occurs. `check_for_eof_or_whitespace()` reconsumes the whitespace
token for convenience.
2021-07-11 23:19:56 +02:00
Sam Atkins 57f6d86996 LibWeb: Implement remaining CSS parse_as...() entry points 2021-07-11 23:19:56 +02:00
Sam Atkins 65fe3895e6 LibWeb: Enabling @import in new CSS parser 2021-07-11 23:19:56 +02:00
Sam Atkins 6b6bf4a0aa LibWeb: Implement CSS::parse_css_value()
A lot of this is not spec-compliant and copied from the old parser.
In future PRs, we can revise it.
2021-07-11 23:19:56 +02:00
Sam Atkins c91c00f587 LibWeb: Remove unnecessary CSS:: namespace from CSS Parser code
It's feeling unwieldy having it everywhere.
2021-07-11 23:19:56 +02:00
Sam Atkins 28e8bb9b1d LibWeb: Convert style declarations and at rules into CSSRules 2021-07-11 23:19:56 +02:00
Sam Atkins 2c84379846 LibWeb: Add accessors to CSS::DeclarationOrAtRule 2021-07-11 23:19:56 +02:00
Sam Atkins 6d14791c40 LibWeb: Use TokenStream in CSS Parser
Each method can either be called with a TokenStream, or with no
arguments to replicate the previous behaviour.
2021-07-11 23:19:56 +02:00
Sam Atkins b7116711bf LibWeb: Add TokenStream class to CSS Parser
The entry points for CSS parsing in the spec are defined as accepting
any of a stream of Tokens, or a stream of ComponentValues, or a String.
TokenStream is an attempt to reduce the duplication of code for that.
2021-07-11 23:19:56 +02:00
Sam Atkins 6c03123b2d LibWeb: Give CSS Token and StyleComponentValueRule matching is() funcs
The end goal here is to make the two classes mostly interchangeable, as
the CSS spec requires that the various parser algorithms can take a
stream of either class, and we want to have that functionality without
needing to duplicate all of the code.
2021-07-11 23:19:56 +02:00
Sam Atkins 9c14504bbb LibWeb: Rename CSS::Token::TokenType -> Type 2021-07-11 23:19:56 +02:00
Sam Atkins 8671d79ba4 LibWeb: Add direct StyleComponentValueRule constructors
Rather than passing a ComponentType, and then manually modifying the
data fields, we now create them initialized.

The constructor that takes a Token is intentionally left implicit,
so that we can automatically convert when using the TokenStream later.
2021-07-11 23:19:56 +02:00
Sam Atkins 82d12b170a LibWeb: Merge CSS Parser's QualifiedStyleRule and AtStyleRule
AtStyleRule being a subclass of QualifiedStyleRule was causing
problems when trying to distinguish between them. Combining them
and then distinguishing between them with a Type enum makes that
check simpler, and is in line with how similar checks are done
elsewhere in the parser.
2021-07-11 23:19:56 +02:00
Sam Atkins a6085e19ae LibWeb: Implement CSS selector parsing entry points
They're still using the same parsing code, so there's a lot of room
for improvement, but it's good for now.
2021-07-11 23:19:56 +02:00
Sam Atkins 004ae453d1 LibWeb: Add context to new CSS parser, and deprecate the old one
The new one is the same as the old one, just in the new Parser's
source files. This isn't the most elegant solution but it seemed
like the best option. And it's all temporary, after all.
2021-07-11 23:19:56 +02:00
Sam Atkins 390cc30a97 LibWeb: Bring CSS::Parser::parse_as_comma_separated_list...() to spec
Previous implementation was returning everything in a single Vector,
when what we really want is a Vector of Vectors, one for each comma-
separated part of the list.
2021-07-11 23:19:56 +02:00
Sam Atkins 985ed47a38 LibWeb: Use EOF code point instead of Optional in CSS Tokenizer
Optional seems like a good idea, but in many places we were not
checking if it had a value, which was causing crashes when the
Tokenizer was given malformed input. Using an EOF value along with
is_eof() makes things a lot simpler.
2021-07-11 23:19:56 +02:00
Sam Atkins caff7fff94 LibWeb: Convert CSS::Parser methods to return desired types
This is very much stubbed out for now. Most notably is
Parser::convert_rule() where most of the conversion will happen
from the parser's internal rule classes to CSSRule and its children.
2021-07-11 23:19:56 +02:00
Sam Atkins f9ffa34622 LibWeb: Remove broken CSS:Parser::is_combinator()
A single DELIM token is only one character long, so the check for
a "||" DELIM didn't work. We now just do the check inline.
2021-07-11 23:19:56 +02:00
Sam Atkins 9115c23bd5 LibWeb: Fix greedy CSS Tokenizer whitespace parsing
Whitespace parsing was too greedy, consuming the first non-
whitespace character after it.
2021-07-11 23:19:56 +02:00
Sam Atkins 06fc099310 LibWeb: Fix Off-by-one error in CSS::Parser::next_token() 2021-07-11 23:19:56 +02:00
Sam Atkins 06cd418770 LibWeb: Convert QualifiedStyleRule to a RefPtr type in new Parser 2021-07-11 23:19:56 +02:00
Sam Atkins f690259a42 LibWeb: Add new CSS attribute match types to new parser 2021-07-11 23:19:56 +02:00
Sam Atkins 7fefe34797 LibWeb: Add remaining CSS AttributeMatchTypes
This adds:
- ContainsString     [att*=val]
- StartsWithSegment  [att|=val]
- StartsWithString   [att^=val]
- EndsWithString     [att$=val]

Renamed AttributeMatchType::Contains to ::ContainsWord for clarity.
2021-07-11 23:19:56 +02:00
Sam Atkins 29d78bba4b LibWeb: Use StyleComponentValueRules for StyleBlockRule's values
Noticed while doing this that attribute selectors have two different
ways of saying "starts with", and so AttributeMatchType::StartsWith
needs a better name. But I'll change that when I add the missing
types.

These class names are a mouthful to fit in a commit message. :^)
2021-07-11 23:19:56 +02:00
Sam Atkins 89bfde29dc LibWeb: Convert some CSS parser *Rule classes to using pointers
Previously these were all passed around by value, but some of them
(StyleComponentValueRule and StyleBlockRule) want to include each
other as fields, so this had to change.
2021-07-11 23:19:56 +02:00
Sam Atkins a558916e1f LibWeb: Make CSS selector parsing use StyleComponentValueRules
Also added some pseudo-classes that were handled in the deprecated
parser:
- :disabled
- :enabled
- :checked
- :nth-child
- :nth-last-child
- :not
2021-07-11 23:19:56 +02:00
Sam Atkins f7c79de0c5 LibWeb: Add convenience methods to CSS::Parser::Token
Some of these will be removed later, when we move to using is()
exclusively.
2021-07-11 23:19:56 +02:00
Sam Atkins d6b4022b58 LibWeb: Make CSS::QualifiedStyleRule's prelude StyleComponentValueRule 2021-07-11 23:19:56 +02:00
Linus Groh 54e1180f61 LibJS: Uncomment Number.isInteger() tests that now pass :^) 2021-07-11 22:03:04 +01:00
Linus Groh 1856400547 LibJS: Uncomment Object.{freeze,seal}() tests that now pass :^) 2021-07-11 21:58:14 +01:00
Ali Mohammad Pur dfb7e716f7 LibJS: Use expected() instead of syntax_error("Expected ...") 2021-07-11 21:41:54 +01:00
Ali Mohammad Pur 049e210cfa LibJS: Rework Identifier parsing to match the spec more closely 2021-07-11 21:41:54 +01:00
Ali Mohammad Pur 77a5144264 LibJS: Add support for binding patterns in catch clauses
`try { ... } catch({a=foo}) {}` is valid, and now we parse and evaluate
it correctly :^)
2021-07-11 21:41:54 +01:00
Ali Mohammad Pur 1a9518ebe3 LibJS: Implement parsing and evaluation for AssignmentPatterns
e.g. `[...foo] = bar` can now be evaluated :^)
2021-07-11 21:41:54 +01:00
Ali Mohammad Pur 7fc6cd6b20 LibJS: Allow 'name = value' in object literals as the spec does
Currently, these are _always_ a syntax error, future commits will make
it valid in certain contexts.
2021-07-11 21:41:54 +01:00
Ali Mohammad Pur 7dae25eceb LibJS: Fix computed property ending token in binding pattern parsing
The syntax is supposed to be '[expression]', not '[expression['.
2021-07-11 21:41:54 +01:00
Ali Mohammad Pur b5b84029ab LibJS: Treat default parameter values as being in function context
e.g. `new.target` should be permitted in
`function foo(x = new.target) {}`.
2021-07-11 21:41:54 +01:00
Jelle Raaijmakers 0f35912bd7 TableView: Do not select input on keydown
In the Spreadsheet app, selecting a cell and typing something (like
"1") would create an empty editing delegate, set "1" as its value and
immediately select the entire contents of the text box. If your goal
was to type "123", that "1" was selected and will be replaced by "23".

This changes the behavior of TableView to not select the editing
delegate's contents if its creation was a result of a keydown event.
2021-07-11 22:07:57 +02:00
Karol Kosek 9d36369c58 SoundPlayer: Show the context menu right under the cursor
The context menu used the mouse position by window,
which resulted in a pop-up menu in the upper left corner of the screen.
2021-07-11 21:15:56 +02:00
Andrew Kaster 2ca1193d9a Userland+Tests: Convert test_io to be LibTest based
Add a few extra tests as well, to make sure we don't have any future
TmpFs regressions.
2021-07-11 19:42:00 +02:00
Andrew Kaster 4cc75501d7 Utilities+Tests: Convert test_efault to be LibTest based
This test exposed a kernel panic in is_user_range calculations, so let's
convert it to be a LibTest test so we can prevent regressions in mmap,
the page allocator, and the memory manager.
2021-07-11 19:42:00 +02:00
Hendiadyoin1 a8d86cc533 DynamicLoader+LibC: Make _start a naked function 2021-07-11 17:07:20 +02:00
Adam Hodgen 47bfd366a8 LibWeb: Fix syntax for Table test
The parser fixes this by inserting the <tr> tags, but for this test it's
better to have perfect syntax - we're not testing the parser here.
2021-07-11 14:14:01 +02:00
Adam Hodgen 3e46e8fea8 LibWeb: Fix HTMLTable Element attributes
`Element::tag_name` return an uppercase version of the tag name. However
the `Web::HTML::TagNames` values are all lowercase.

This change fixes that using `Element::local_name`, which returns a
lowercase value.
2021-07-11 14:14:01 +02:00
LuK1337 99013ac3d5 LibTTF: Port width calculation changes from BitmapFont 2021-07-11 14:12:59 +02:00
LuK1337 c0f9adabd6 LibGfx: Try to get TTF font when query is not in name->font map
This change allows us to select TTF fonts in display settings again :^)
2021-07-11 14:12:47 +02:00
Timothy c03353e7ca TextEditor: Show an error message when opening a file failed 2021-07-11 14:11:53 +02:00
Gunnar Beutner 71840c1bf4 TextEditor: Open files with ReadOnly when we're just reading them 2021-07-11 14:11:53 +02:00
Gunnar Beutner c343e9a4fd TextEditor: Avoid calling realpath()
We can't use realpath() at that point because we've already called
unveil(nullptr, nullptr).
2021-07-11 14:11:53 +02:00
Karol Kosek a90c484d4b Pong: Only paint areas that needs to be updated 2021-07-11 14:11:26 +02:00
Adam Hodgen a3638639a1 TextEditor: Show an error dialog when failing to open/save a file 2021-07-11 09:46:50 +02:00
Adam Hodgen 643ecfee73 FileSystemAccessServer: Return user_picked_value even on error
If a user picks a file which can't be opened for some reason, we should
still return the value, so client applications can report the error
along with the chosen filepath.
2021-07-11 09:46:50 +02:00
Timothy Flynn dd65f52331 FlappyBug: Only paint areas which need to be painted
Drawing the entire PNG background is rather expensive. Instead, only
draw the rects that are updating.
2021-07-10 23:28:20 +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