Age | Commit message (Collapse) | Author |
|
At the very least, we need to respect `<br style="display: none">`
|
|
|
|
This fixes the issue where an `<img>` set to its native size would
sometimes still appear blurry, because it had a fractional position,
causing `enclosing_int_rect()` to expand by 1px.
|
|
|
|
This is slower, but looks a lot nicer. :^)
|
|
|
|
Instead of firing up a network request and synchronously blocking for it
to finish via a nested event loop, we now start an asynchronous request
when encountering <script src>.
Once the script load finishes (or fails), it gets executed at one of the
synchronization points in the HTML parser.
This solves some long-standing issues with random unexpected events
getting dispatched in the middle of parsing.
|
|
|
|
This doesn't follow the exact spec steps but instead simply makes a
nested Core::EventLoop and spins it while a periodic timer tests the
goal condition.
|
|
|
|
This patch adds a basic initial implementation of these API's.
Since LibWeb currently doesn't support workers, this implementation of
messaging doesn't bother with serializing and deserializing messages.
|
|
This is the task source used by MessagePort.postMessage().
|
|
This functionality is now inherited from EventTarget, so we can simply
remove the whole thing in WebSocket. :^)
|
|
This logic was kept in the GlobalEventHandlers mixing for sharing
between Document and HTMLElement, but there are other interfaces who
need to support `onfoo` attribute event listeners as well.
|
|
|
|
This represents what the spec calls the "idle-task task source".
|
|
This was showing up as hot in profiles, as the HTML parser calls it
quite a lot.
|
|
|
|
Follow the spec more closely when encountering an invalid start or end
tag during foreign content parsing.
|
|
Let's only log HTML::ClassicScript parse times for now. Otherwise things
will get excessively noisy in test-js and the test262 runner.
|
|
These are really supposed to be a list of SyntaxError objects, but for
now we simply return all the Parser::Error objects we got from Parser.
|
|
The previous implementation was about a half implementation and was
tied to Element::innerHTML. This separates it and puts it into
HTMLDocumentParser, as this is in the parsing section of the spec.
This provides a near finished HTML fragment serialisation algorithm,
bar namespaces in attributes and the `is` value.
|
|
This namespace will be used for all interfaces defined in the URL
specification, like URL and URLSearchParams.
This has the unfortunate side-effect of requiring us to use the fully
qualified AK::URL name whenever we want to refer to the AK class, so
this commit also fixes all such references.
|
|
When waiting for a page to load, it's nice to see which scripts run,
and how long they take to finish.
|
|
We need both a GlobalObject and Realm now, but can get the former from
the latter (once initialized).
This also fixes JS execution in LibWeb, as we failed to set the Realm of
the newly created Interpreter in this function.
|
|
The spec wants Script Records to have a Realm, not a GlobalObject.
|
|
Sometimes it's useful to turn off the SOP for testing purposes.
Let's make that easy by having a Debug menu item for it. :^)
|
|
The spec allows us to optionally return from these for any reason.
Our reason is that we don't have all the infrastructure in place yet to
implement them.
|
|
It's a lot easier to debug JavaScript problems if you can see which file
the errors are in. :^)
|
|
Any browsing context that doesn't have a parent browsing context is now
considered a top-level browsing context. This matches the HTML spec.
This means we no longer keep a pointer to the top-level context, since
we can simply walk the parent chain until we find the topmost ancestor.
|
|
Before this patch, HTMLScriptElement would cache the full script source
text in a String member, and parse that just-in-time via Document's
run_javascript() helpers.
We now follow the spec more closely and turn the incoming source text
into a ClassicScript object ("the script's script" in the spec.)
|
|
These correspond to "create a classic script" and "run a classic script"
from the HTML specification. :^)
|
|
|
|
|
|
This better matches the spec nomenclature.
|
|
This patch adds HTML::Script and HTML::ClassicScript (subclass of the
former.)
|
|
Match the spec nomenclature.
|
|
This better matches the spec nomenclature. Note that we don't yet
*retrieve* the active document according to spec.
|
|
Call HTML::EventLoop::spin_until() from the HTML parser when deciding
whether we can run a script yet.
Note that spin_until() actually doesn't do any work yet.
|
|
|
|
|
|
Since we can't simply give HTML::EventLoop control of the whole program,
we have to integrate with Core::EventLoop.
We do this by having a single-shot 0ms Core::Timer that we start when
a task is added to the queue, and restart after processing the queue and
there are still tasks in the queue.
|
|
This will be required for event loop processing.
|
|
There are three types of event loop: window, worker and worklet.
For now, we only have window event loops.
|
|
|
|
|
|
|
|
|
|
This patch attaches a HTML::EventLoop to the main thread JS::VM used
for JavaScript bindings in the web engine.
The goal here is to model the various task scheduling mechanisms of the
HTML specification.
|
|
This is not a functional change, it merely reorders operations so that
we match spec language better.
|