Before this could give the `must be followed by in` error before the
undeclared private identifier error. Fixing the `in` error would not
have resolved the other error so this order makes the errors more
actionable.
If we don't check that a private identifier is valid this can break the
assumption that we have a private environment when evaluation the
private identifier. Also an unknown private identifier this should
be a SyntaxError.
This is only visible with something like `Object.getOwnPropertyNames` on
the global object. All other declaration instantiations put the
functions on an environment making the order invisible.
Note that spec order is not quite tree order as in non-strict mode
functions which get hoisted out of blocks appear before top level
functions.
Co-authored-by: Hendiadyoin1 <leon.a@serenityos.org>
Before putting `throw 1;` in a test file did not fail the file, and it
ignored the rest of the file. Now we check the resulting completion from
run and fail if that is an error.
The way in which dialogs should be handled is configurable by the driver
capabilities object, which we don't support yet. So this implements just
the default mode to dismiss the dialog and return an error if there is
one open.
In the OOPWV, this means we need to refer to the dialog after it has
been open, so we now hold a pointer to whatever dialog is open.
This will be needed for WebDriver, which will require constructing and
controlling dialogs manually. Currently, InputBox will only set its text
value when the OK button is pressed. This changes InputBox to update its
text when done(ExecResult::OK) is invoked in any way.
This also makes the text_value() method public, allows for setting the
text value, and allows for moving-in the initial text value.
Currently, the WebContent process is completely blocked while waiting
for a response to a dialog request. This patch allows the IPC event loop
to continue executing while only blocking the HTML event loop.
This will allow other processes like WebDriver to continue to operate on
the WebContent process while a dialog is open.
The window prototypes alert, confirm, and prompt must "pause" execution
until a response is received from the user. This test page is meant to
ensure that a timeout queued before a prompt is not executed until after
that prompt is closed.
We now layout foreign objects as if they form a nested block formatting
context. This probably isn't the most correct way to do this, but it's
a start.
This fixes an error when using auto-fit with grid-gap, as previously
were not taking into account the fact that more columns had been added
to the grid yet the occupation grid had not grown.
Previously were incorrectly initializing the grid gap tracks as were
using the GridSize float constructor, which creates a flexible length.
What is actually wanted is a fixed-size track of a certain size,
indicated in pixels.
This patch optimizes the drawing of aa-lines by rotating the drawn
rectangle to the direction where the line points. That enables us to
draw non-straight lines with the proper width.
If a aa-line is drawn that is infact a straigt line we now dont plot
those lines with multipe rectangles across the line - insted we draw
straight lines in one go with just one rectangle of proper size.
Stroking of lines has been enhanced to take care of the edges between
two lines with drawing the stroke till the intersections of two
connected lines.
This patch changes the initialization of the fill_color of an SVGContext
to transparent instead of black to not draw a black filling if the
elements fill_color is defined as "none".
Since handling overflow: hidden in PaintableBox::before_children_paint
while following paint traversal order can't result in correctly computed
clip rectangle for elements that create their own stacking context
(because before_children_paint is called only for parent but overflow:
hidden can be set somewhere deeper but not in direct ancestor), here
introduced new function PaintableBox::clip_rect() that computes clip
rectangle by looking into containing block.
should_clip_overflow flag that disables clip for absolutely positioned
elements in before_children_paint and after_children_paint is removed
because after changing clip rectangle to be computed from not parent
but containing block it is not needed anymore (absolutely positioned
item is clipped if it's containing block has hidden overflow)
This implementation is some-what complete, with the most common missing
/broken feature being opening pages in new tabs using the "_blank"
target.
This is currently broken due to 2 reasons:
- We currently always claim the Window does not have transient
activation, as we do not track the transient activation timestamp
yet. This means that all such window.open calls are detected as
pop-ups, and as such they are blocked. This can be easily bypassed
by unchecking the 'Block Pop-ups' checkbox in the debug menu.
- There is currently no mechanism for the WebContent process to
request a new tab to be created by the Browser process, and as
such the call to BrowsingContext::choose_a_browsing_context does not
actually open another tab.