Previously we didn't check if we could insert the element in the
adjusted insertion location's parent.
Also makes the return type NonnullRefPtr, as that's what element is.
The mutation algorithms now more closely follow the spec and
fixes some assertion failures in tests such as Acid3 and Dromaeo.
The main thing that is missing right now is passing exceptions to the
bindings layer. This is because of issue #6075. I spent a while trying
to work it out and got so frustrated I just left it as a FIXME. Besides
that, the algorithms bail at the appropriate points.
This also makes the adopting steps in the document more spec compliant
as it's needed by the insertion algorithm. While I was at it, I added
the adoptNode IDL binding.
This adds a bunch of ancestor/descendant checks to TreeNode as well.
I moved the "remove_all_children" function to Node as it needs to use
the full remove algorithm instead of simply removing it from
the child list.
This is because it includes the initial node that the function was
called on, which makes it "inclusive" as according to the spec.
This is important as there are non-inclusive variants, particularly
used in the node mutation algorithms.
This will instead be done by Node, as they need to occur at precise
steps of the mutation algorithms. Additionally, some of the events
may need to be run multiple times. For example, the removal steps
is run for all the shadow-including descendants of the node that
just got removed.
Also updates the "inserted_into" function as per the previous commit.
Changes the FIXME, as according to the spec there is no notification
system to be notified of things such as the node becoming connected.
Instead, "becomes connected" means when the insertion steps are run,
the element is now connected when it previously wasn't.
https://html.spec.whatwg.org/multipage/infrastructure.html#becomes-connected
This is done in this PR because the insertion steps are run when the
start tag is inserted. This made it try to prepare the script too early
for inline scripts.
The order of operations in the HTML document parser ensures that
the parser document is set before the insertion steps are run.
This particularly affects the insertion steps and the removed steps.
The insertion steps no longer take into the parent that the node
was inserted to, as per the spec. Due to this, I have renamed the
function from "inserted_into" to simply "inserted". None of the
users of the insertion steps was using it anyway.
The removed steps now take a pointer to the old parent instead of
a reference. This is because it is optional according to the spec
and old parent is null when running the removal steps for the
descendants of a node that just got removed.
This commit does not affect HTMLScriptElement as there is a bit
more to that, which is better suited for a separate commit.
Also adds in the adopted steps as they will be used later.
We now use the checked state of these buttons to indicate that you are
in that specific folder. The checked state is updated automagically
no matter how you navigate the file system. :^)
This patch adds a handy set of buttons on the left hand side that can
take you to common locations such as:
- Your home directory
- Your desktop directory
- The root directory
The flatbuffers library is a serialization library, created by Google
for game development and performance-critical applications.
It aims to be fast and efficient.
This commit creates a port of it to SerenityOS.
The flatbuffers build process generates three things: some header files,
a library (libflatbuffers) and a schema compiler (flatc).
There are tests, but they are not compiled, because it runs the
flatbuffers schema compiler, one of the things we are cross-compiling.
The compiler will not run because the target is different from the host
Attempts are spaced out with exponential backoff, cut at 10 minutes per
attempt.
Also avoid trying to acquire an IP on interfaces that aren't up.
Fixes#6126.
Fixes#6125.