Age | Commit message (Collapse) | Author |
|
|
|
|
|
These will be called when a Node or LayoutNode is inserted or removed
from a tree. They get the parent node as an argument.
|
|
|
|
We were forgetting to consume the '#' and '.' characters.
|
|
Text nodes don't have style of their own, so just inherit all the style
from the parent element.
|
|
You can now query Document::title() to get a String containing whatever
is inside the document's <title> tag.
In support of this, this patch adds the <html>, <head> and <title>
elements.
|
|
This returns a String built from all of a Node's text descendants,
including itself.
|
|
|
|
We now show a tooltip for the hovered node's enclosing HTML element's
title attribute, if one is present.
This patch also adds HTMLHeadingElement. The tags h1-h6 will now create
the right kind of objects.
|
|
Clicking on a link in an HtmlView will now call on_link_click(String)
if present, allowing you to implement basic hypertext navigation. :^)
|
|
HtmlView now calls Node::enclosing_link_element() to find the nearest
ancestor <a> element.
This patch also adds HTMLElement and HTMLAnchorElement.
|
|
This gets set from HtmlView::mousemove_event() at the moment.
|
|
Every LayoutNode indirectly belongs to some Document. For anonymous
LayoutNodes, we simply traverse the parent chain until we find someone
with a Node from which we can get a Document&.
|
|
|
|
LayoutText can't simply rely on its LayoutNode::rect() for hit testing.
Instead, we have to iterate over the individual runs and see if we're
hitting any of them.
Also, LayoutNode::hit_test() now always recurses into children, since
we can't trust the rect() to tell the truth (inline rects are wrong.)
|
|
- Implemented support for more PNG formats including 16-bit per channel
and 8-bit indexed with palette.
- Made the library a little more resistant to crashes by returning
false for known but unsupported formats.
|
|
We don't have proper line boxes yet, so we can't easily hit test
inline text.
|
|
This is analogous to the DOM's Node.tagName and makes it easy to ask
"hey, what kinda thing is this Node?"
|
|
In the future, this should only apply to "a:link", but since we don't
have pseudo-classes yet, all "a" tags will do for now.
|
|
|
|
Also remove the color values from the ComputedStyle object and get them
via StyleProperties instead.
At the moment, we only handle colors that Color::from_string() parses.
|
|
This allows you to escape function\_names\_like\_this() :^)
|
|
|
|
This is a simple command that can be used to display HTML from a given
file, or from the standard input, in an HtmlView. It replaces the `tho`
(test HTML output) command.
|
|
This is a GWidget that can display contents of an HTML document.
It replaces the Frame class.
|
|
|
|
|
|
|
|
|
|
|
|
This currently uses a gross hack where it subtracts 11px from the
previous sibling bottom to calculate its top. This should be fixed
by switching to a proper two-phase line layouting model, were we
first distribute inline elements into lines and figure out their
horizontal positions and heights; then compute the needed line
heights and position inline elements there vertically.
|
|
|
|
|
|
This method wraps the document tree in <html> and <body> elements if needed.
|
|
This also fixes another bug with inline wrappers. Namely,
we should only add inline wrappers if a block node has
both non-block (inline or text) and block children.
|
|
|
|
This is an utility to easily get the full margin size
(the sum of margin proper, border and padding) of an
element in pixels.
|
|
This is redundant since we already have LayoutNode::rect().
|
|
LayoutBlock::inline_wrapper() is supposed to return an inline wrapper,
a special anonymous block element intended to wrap inline children of
a block element that also has block children. Add a check for whether
the existing block child element is anonymous (refers to a DOM node),
and if it's not create a new anonymous wrapper.
|
|
This is an utility to go with the existing length_or_fallback().
|
|
We now create a layout tree directly from the DOM tree.
This way we don't actually lose text nodes ^)
|
|
|
|
|
|
|
|
|
|
- system(nullptr) returns non-zero to indicate the presence of a shell
- Failure to fork() returns -1
- Failure to exec() in the child returns 127
|
|
|
|
|
|
This allows userspace programs to get and set (superuser-only) the IPv4
address of a network adapter. :^)
|