Previously, callers were passing the size in bytes, but the method
expected bits. This caused a crash in LibCrypto when verifying the key
size later on.
Also make the naming of local variables and parameters a little more
clear between the different AES algorithms :^)
It's actually possible for there to be no adjusted current node, when
the stack of open elements is empty. This was covered by one of the WPT
parsing tests.
We currently only use these methods with AK JSON objects, but they're
actually spec'd for JS objects, as the WebDriver spec sort of assumes
we are sending encoded JS objects over the wire.
When we fully implement JSON deserialization for executing scripts, we
will need to invoke these AOs with JS objects.
This is a bit unfortunate, but if a function provided to this struct is
overloaded, the C++ compiler cannot distinguish which overload should be
assigned to the Function object. This is explained in detail here:
https://stackoverflow.com/a/30394755
C-style function pointers do work, however, and are fine here because
we only ever assign global free functions to these members.
Instead of maintaining a list of script execution result types, which we
then map to WebDriver error types, just return the WebDriver error that
is specified by the spec. Then perform the JSON clone algorithm from the
caller in WebDriverConnection, again as specified by the spec. To do so,
this moves the JSON clone algorithm to its own file. This will also be
the future home of the JSON deserialize algorithm, which will need some
of the internal AOs implemented there.
DOMTokenList and FileList do not have the 'length' own property - their
prototypes have this property instead. So we must go through [[Get]] to
retrieve this property, which will consider the prototype.
This is an ad-hoc change to account for the fact that we may run
arbitrary code while waiting for the tasks in this function to complete.
Same exact idea as ac48222ed7, once again.
If we reach the end of the token stream when "ignoring and moving on
to the next token" in the "in body" state, we should just not move
on to the next token, since there isn't one.
Covered by various WPT HTML parsing tests that will be imported in
a subsequent commit.
Use the `writing-mode` property to determine what values should be used
for computing each element's rect on the screen. If it is a vertical
mode, swap the inline and block, lengths and offsets.
This only lays out whole inline formatting contexts vertically, and does
not currently support mixing the two orientations in a single context.
This patch separates the notion of x, y, width, and height, from
inline_offset, block_offset, inline_length, and block_length.
These can then be used to compute the final screen positions,
in respect of the desired layout direction. This is the terminology
used in https://drafts.csswg.org/css-writing-modes/#text-flow
This makes it possible to use this layout algorithm to flow
text in any direction. For example, vertically.
This save() call did not have matching restore(). For mask application
it's display list builder responsibility to emit save() and restore()
so mask is applied only to relevant portion.
Progress on https://www.jetbrains.com/
The `[[GetOwnProperty]]` internal method invocation in
`OrdinarySetWithOwnDescriptor` was being invocated again with the same
parameters in the `[[DefineOwnProperty]]` internal method that is also
later called in `OrdinarySetWithOwnDescriptor`.
The `PlatformObject.[[DefineOwnProperty]]` has similair logic.
This change adds an optional parameter to the `[[DefineOwnProperty]]`
internal method so the results of the previous `[[GetOwnProperty]]`
internal method invocation can be re-used.
We have to handle user prompts during the exection of most WebDriver
endpoints. Of the ~50 endpoints which call this AO, ~20 are currently
currently async and handled here.
There are approximately 1000 WPT subtests that rely on the handling of
user prompts being completely asynchronous. It will take a bit of elbow
grease to make all of our WebDriver endpoints comply with this. So for
now, we will deprecate the currently synchronous implementation, and a
future patch will implement an asynchronous version that already-async
endpoints can use.
Some WebDriver hooks will need to inform the client that execution has
completed, but without any knowledge of what endpoint was running. Since
there can only ever be a single WebDriver endpoint executing at once, we
can replace the completion callbacks with a single callback.
If a dialog is opened while a script is executing, we must give control
back to the WebDriver client. The script must also continue executing
though, so once it completes, we ignore its result.