Age | Commit message (Collapse) | Author |
|
This makes it a lot easier to see which layout node is which DOM node.
|
|
Now, exceptions can be thrown with
interpreter.throw_exception<T>(ErrorType:TYPE, "format", "args",
"here").
|
|
If something is already e.g a length or a color value, we don't need
to try to expand it by stringifying and looking at the parts.
|
|
This gives us a yellow forehead on ACID2! :^)
|
|
|
|
We now sort the matched rules by the specificity of the first selector
in them. This is not perfect, since a rule can have multiple selectors,
but it is a nice chin-related progression on ACID2. :^)
|
|
This code is pretty rough, but it's something that will also improve
with the eventual new CSS parser.
|
|
This makes us at least parse selectors like [foo=bar\ baz] correctly.
The current solution here is quite hackish but the real fix will come
when we implement a spec-compliant CSS parser.
|
|
|
|
|
|
This fits nicer with FloatRect,FloatPoint,FloatSize and gives a much
better visual clue about what type of metric is being used.
|
|
The box tree and line boxes now all store a relative offset from their
containing block, instead of an absolute (document-relative) position.
This removes a huge pain point from the layout system which was having
to adjust offsets recursively when something moved. It also makes some
layout logic significantly simpler.
Every box can still find its absolute position by walking its chain
of containing blocks and accumulating the translation from the root.
This is currently what we do both for rendering and hit testing.
|
|
There was a logic mistake in the entity parser that chose the shorter
matching entity instead of the longer. Fix this and make the entity
lists constexpr while we're here.
|
|
|
|
- for_each_child_of_type<T>
- previous_sibling_of_type<T>
|
|
Favicon updates now get plumbed from FrameLoader to the PageClient.
|
|
Frame can just call through the PageClient instead of using hooks.
|
|
|
|
Once the Interpreter has no global object attached to it, we have to
provide it everywhere.
|
|
* A PageView is a view onto a Page object.
* A Page always has a main Frame (root of Frame tree.)
* Page has a PageClient. PageView is a PageClient.
The goal here is to allow building another kind of view onto
a Page while keeping the rest of LibWeb intact.
|
|
Objects should get the GlobalObject from themselves instead. However,
it's not yet available during construction so this only switches code
that happens after construction.
To support multiple global objects, Interpreter needs to stop holding
on to "the" global object and let each object graph own their global.
|
|
|
|
Instead of "iframe", we can now say HTML::TagNames::iframe and avoid
a FlyString lookup.
|
|
We'll need a place to implement the various presentational attributes
for table parts, and more stuff.
|
|
If we don't find a matching entity, return an empty Optional.
|
|
|
|
The main frame doesn't have a host element, so we can't go trying to
offset things by the host element's layout rect.
|
|
This patch introduces support for more than just "absolute px" units in
our Length class. It now also supports "em" and "rem", which are units
relative to the font-size of the current layout node and the <html>
element's layout node respectively.
|
|
Now that PageView actually respects the invalidation rect provided by
the layout system, it turns out we were invalidating too little.
Unfortunately, this is not really fixable until the initial containing
block starts having the right size (same as viewport), but that will
require a bunch of work to make overflow work again. So it's a FIXME
for now, and we'll return to this.
|
|
When a paint invalidation occurs inside a subframe, it bubbles up to
Frame::set_needs_display(). From there, we call PageView if this is
the main frame, or otherwise invalidate the subframe host element.
|
|
|
|
We now only delegate to the Web::PageView embedded when clicking links
in the main frame. Links in subframes are handled internally.
|
|
We now handle mouse events by recursing into subframes. This makes
links, tooltips, etc, work inside <iframe> content.
|
|
|
|
We don't support incremental relayout of subtrees (only single nodes)
but let's not crash the browser just because this happens. We can keep
the browser up and just complain in the debug log instead.
|
|
When you ask a subframe for its PageView, you'll now always get the
main frame's PageView. Subframes don't have a PageView of their own.
|
|
|
|
While we're parsing a new document, we don't have a Frame to grab at.
We now use the Node::document_did_attach_to_frame() notification hook
to delay subframe construction.
With this, subframes now always have a valid reference to their
enclosing main frame.
|
|
Some DOM nodes will want to do stuff when we attach/detach from a Frame
and this seems like a simple enough way to let them know.
|
|
If we can't figure out how to make a Document for the main resource
in a Frame, just show an error page.
|
|
Also, if the request URL is a data: URL, use the MIME type from the URL
itself if available. This makes it possible to load arbitrary MIME type
data: URLs in the browser :^)
|
|
|
|
We now use the new resource-based loader for the main resource in each
Frame. This gives us access to caching and sharing. :^)
|
|
Returning it by reference can lead to unpleasant situations if we use
this getter when the document may go away. Better to make the getter
return a copy than have to think about this everywhere.
|
|
|
|
Each Frame now has a FrameLoader which will be responsible for handling
loading inside that frame.
|
|
This was accidentally being set to JS::Attribute::Enumerable
instead of 0.
|
|
Also fixes RAWTEXTLessThanSign having a separate emit and reconsume.
|
|
This patch introduces a bunch of things:
- Subframes (Web::Frame::create_subframe())
- HTMLIFrameElement (loads and owns the hosted Web::Frame)
- LayoutFrame (layout and rendering of the hosted frame)
There's still a huge number of things missing, like scrolling, overflow
handling, event handling, scripting, etc. But we can make a little
iframe in a document and it actually renders another document there.
I think that's pretty cool! :^)
|
|
|