Age | Commit message (Collapse) | Author |
|
This reverts commit f102b563
The reverted to behavior is not correct for example with a double proxy
But this change lead to problems with DOMNodes
|
|
If we define a property with just a setter/getter (not both) we must:
- take the previous getter/setter if defined on the actual object
- overwrite the other to nullptr if it is from a prototype
|
|
Before this it would always go through the native setter thus
modifying the array but now you can set length to anything
|
|
|
|
|
|
Fixes regressed with 0f9038b732a6e0f5830e5e95c0b2a1c78efea415.
|
|
This patch adds support for the NumericLiteralSeparator concept from
the ECMAScript grammar.
|
|
|
|
|
|
|
|
|
|
ArrayIteratorPrototype::next seems to implement CreateArrayIterator,
which is an issue for a separate PR.
|
|
In the spec, object environments have a [[BindingObject]], so let's
call it the same thing in our implementation.
|
|
We already store the GlobalObject& in a base class, so no need to also
store it in the subclass. :^)
|
|
Also make use of OrdinaryCreateFromConstructor() instead of setting
the prototype manually.
This fixes 2 function tests in test262. :^)
|
|
Negative numeric properties are not a thing (and we even VERIFY()'d this
in the constructor). It still allows using types with a negative range
for now as we have various places using int for example (without
actually needing the negative range, but that's a different story).
u32 is the internal type of `m_number` already, so this now allows us to
leverage the full u32 range for numeric properties.
|
|
Requires a bunch of find-and-replace updates across LibJS, but
constructing a PropertyName from a nullptr Symbol* should not be
possible - let's enforce this at the compiler level instead of using
VERIFY() (and already dereference Symbol pointers at the call site).
|
|
This is for the [[Environment]] slot so let's have a matching name. :^)
|
|
This is not a behavioral change in itself, just prep work for future
spec-compliance changes.
|
|
We were setting the wrong [[FunctionObject]] on the environment when
going through ProxyObject and BoundFunction.
|
|
This matches what the spec calls them.
|
|
|
|
|
|
|
|
This commit adds a loader for the FLAC audio codec, the Free Lossless
Audio codec by the Xiph.Org foundation. LibAudio will automatically
read and parse FLAC files, so users do not need to adjust.
This implementation is bare-bones and needs to be improved upon.
There are many bugs, verbatim subframes and any kind of seeking is
not supported. However, stereo files exported by libavcodec on
highest compression setting seem to work well.
|
|
Previously, ResampleHelper was fixed on handling double's, which makes
it unsuitable for the upcoming FLAC loader that needs to resample
integers. For this reason, ResampleHelper is templated to support
theoretically any type of sample, though only the necessary i32 and
double are templated right now.
The ResampleHelper implementations are moved from WavLoader.cpp to
Buffer.cpp.
This also improves some imports in the WavLoader files.
|
|
Previously, error_string() returned char* which is bad Serenity style
and caused issues when other error handling methods were tried. As both
WavLoader and (future) FLAC loader store a String internally for the
error message, it makes sense to return a String reference instead.
|
|
The signed 32-bit PCM sample format is required for the FLAC standard.
|
|
As a file is able to seek(), InputFileStreams can delegate the seek()
easily. This allows for seeking to specific locations in the file.
|
|
|
|
- get -> get_value (GetValue in the spec)
- put -> put_value (PutValue in the spec)
Also add spec links. :^)
|
|
Our Reference class now has the same fields as the spec:
- Base (a non-nullish value, an environment record, or `unresolvable`)
- Referenced Name (the name of the binding)
- Strict (whether the reference originated in strict mode code)
- ThisValue (if non-empty, the reference represents a `super` keyword)
The main difference from before is that we now resolve the environment
record that a reference interacts with. Previously we simply resolved
to either "local variable" or "global variable".
The associated abstract operations are still largely non-conforming,
since we don't yet implement proper variable bindings. But this patch
should at least fix a handful of test262 cases. :^)
There's one minor regression: some TypeError message strings get
a little worse due to doing a RequireObjectCoercible earlier in the
evaluation of MemberExpression.
|
|
|
|
|
|
This function maps to the ResolveBinding operation from the spec,
so let's rename it to match.
|
|
Adds support for the :active pseudo-class for hyperlinks (<a> tags
only).
Also, since it was very similar to :focus and an element having a
focused state was already implemented, I went ahead and implemented
that pseudo-class too, although I cannot come up with a working
example to validate it.
|
|
|
|
Also do the same for Action::alternate_shortcut().
|
|
This constructor allows you to omit the modifier keys.
Instead of doing "{ 0, Key_F5 }" you can now just do "Key_F5"
|
|
This adds the actual functionality to Window and Application.
|
|
This patch adds the alternate_shortcut member to LibGUI::Action, which
enables one Action to have two keyboard shortcuts.
Note that the string used in menus and tooltips only shows the main
shortcut, which is the same behaviour as in Firefox and Chrome.
|
|
|
|
Instead of doing a VERIFY(is<T>(x)) and *then* casting it to T, we can
just do the cast right away with verify_cast<T>. :^)
|
|
At the moment these environments are always the same as the lexical
ones, so this didn't cause any trouble. Once we start separating them
we have to make sure both environments are protected.
|
|
This makes it much clearer what this cast actually does: it will
VERIFY that the thing we're casting is a T (using is<T>()).
|
|
This matches what ECMAScript calls it. Also make it a JS::Function*
instead of a generic Value, since it will always either be a function
object or null.
|
|
This struct represents what the ECMAScript specification calls an
"execution context" so let's use the same terminology. :^)
|
|
Otherwise we would end up inserting empty cells into the wrapped lines.
Fixes #8227.
|
|
|
|
Since strings don't have a constexpr constructor, these won't have any
effect anyways. Furthermore, this is explicitly disallowed by the
standard, and makes Clang tools freak out.
|