summaryrefslogtreecommitdiff
path: root/Libraries/LibHTML
AgeCommit message (Collapse)Author
2019-09-29LibHTML: Implement basic support for background-colorAndreas Kling
2019-09-29LibHTML: Add a simple <style> element for inline CSSAndreas Kling
2019-09-29LibHTML: Add inserted_into() and removed_from() TreeNode callbacksAndreas Kling
These will be called when a Node or LayoutNode is inserted or removed from a tree. They get the parent node as an argument.
2019-09-29LibHTML: Make <div> elements display: blockAndreas Kling
2019-09-29LibHTML: Fix broken parsing of ID and class selectorsAndreas Kling
We were forgetting to consume the '#' and '.' characters.
2019-09-29LibHTML: Non-element (Text) Nodes should get style from their parentAndreas Kling
Text nodes don't have style of their own, so just inherit all the style from the parent element.
2019-09-29LibHTML: Add a way to get a Document's titleAndreas Kling
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.
2019-09-29LibHTML: Add Node::text_content()Andreas Kling
This returns a String built from all of a Node's text descendants, including itself.
2019-09-29LibHTML: Add HTMLHeadingElement for <h1> through <h6>Andreas Kling
2019-09-29LibHTML: Implement basic HTMLElement.title supportAndreas Kling
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.
2019-09-29LibHTML: Detect link clicksAndreas Kling
Clicking on a link in an HtmlView will now call on_link_click(String) if present, allowing you to implement basic hypertext navigation. :^)
2019-09-29LibHTML: Detect hovering over linksAndreas Kling
HtmlView now calls Node::enclosing_link_element() to find the nearest ancestor <a> element. This patch also adds HTMLElement and HTMLAnchorElement.
2019-09-29LibHTML: Have Document track its hovered NodeAndreas Kling
This gets set from HtmlView::mousemove_event() at the moment.
2019-09-29LibHTML: Add LayoutNode::document() for easy accessAndreas Kling
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&.
2019-09-29LibHTML: Make sure every DOM Node belongs to a DocumentAndreas Kling
2019-09-29LibHTML: Make hit testing work for LayoutTextAndreas Kling
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.)
2019-09-28LibHTML: Implement naive hit testingAndreas Kling
We don't have proper line boxes yet, so we can't easily hit test inline text.
2019-09-28LibHTML: Add virtual Node::tag_name()Andreas Kling
This is analogous to the DOM's Node.tagName and makes it easy to ask "hey, what kinda thing is this Node?"
2019-09-28LibHTML: Make <a> tags blue and underline by defaultAndreas Kling
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.
2019-09-28LibHTML: Implement basic support for "text-decoration: underline"Andreas Kling
2019-09-28LibHTML: Respect the CSS "color" property for textAndreas Kling
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.
2019-09-28LibHTML: Make h1 and h2 tags use Pebbleton Bold by default :^)Andreas Kling
2019-09-28Userland+LibHTML: Add the html commandSergey Bugaev
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.
2019-09-28LibHTML: Introduce the HtmlView widgetSergey Bugaev
This is a GWidget that can display contents of an HTML document. It replaces the Frame class.
2019-09-28LibHTML: Tweak the default CSS styleSergey Bugaev
2019-09-28LibHTML: Parse HTML escape sequencesSergey Bugaev
2019-09-28LibHTML: Hide debugging output unless HTML_DEBUG is definedSergey Bugaev
2019-09-28LibHTML: Implement renderingSergey Bugaev
2019-09-28LibHTML: Implement LayoutTextSergey Bugaev
2019-09-28LibHTML: Implement LayoutInline::layout()Sergey Bugaev
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.
2019-09-28LibHTML: Fix LayoutDocument height computationSergey Bugaev
2019-09-28LibHTML: Fix LayoutBlock vertical position & height computationsSergey Bugaev
2019-09-28LibHTML: Add Document::normalize()Sergey Bugaev
This method wraps the document tree in <html> and <body> elements if needed.
2019-09-28LibHTML: Move layout tree building to NodeSergey Bugaev
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.
2019-09-28LibHTML: Implement basic style inheritanceSergey Bugaev
2019-09-28LibHTML: Add ComputedStyle::full_margin()Sergey Bugaev
This is an utility to easily get the full margin size (the sum of margin proper, border and padding) of an element in pixels.
2019-09-28LibHTML: Get rid of ComputedStyle::offset()Sergey Bugaev
This is redundant since we already have LayoutNode::rect().
2019-09-28LibHTML: Fix moving inline elements to unrelated block elementsSergey Bugaev
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.
2019-09-28LibHTML: Add StyleProperties::string_or_fallback()Sergey Bugaev
This is an utility to go with the existing length_or_fallback().
2019-09-28LibHTML: Get rid of the style treeSergey Bugaev
We now create a layout tree directly from the DOM tree. This way we don't actually lose text nodes ^)
2019-09-28LibHTML: Add install.shSergey Bugaev
2019-09-21LibCore: Convert CFile to ObjectPtrAndreas Kling
2019-09-06AK: Rename <AK/AKString.h> to <AK/String.h>Andreas Kling
This was a workaround to be able to build on case-insensitive file systems where it might get confused about <string.h> vs <String.h>. Let's just not support building that way, so String.h can have an objectively nicer name. :^)
2019-08-18LibHTML: Implement basic block height computationAndreas Kling
..and add vertical box properties to the layout tree dumps.
2019-08-18LibHTML: Finish the block width calculationAndreas Kling
Also add horizontal box values to the layout tree dump.
2019-08-18LibHTML: Fix host build and turn on ccacheAndreas Kling
2019-08-01LibHTML: Make some use of Vector::empend().Andreas Kling
2019-07-26LibHTML: A tiny bit of work towards block layout.Andreas Kling
2019-07-24LibHTML: Fetch the box edge values needed for block width computation.Andreas Kling
2019-07-24LibHTML: Fix host build.Andreas Kling