Commit Graph

323 Commits

Author SHA1 Message Date
Andreas Kling
3bee9d3d3c LibHTML: Templatize Node::first_child_of_type<T>()
This is a lot nicer than first_child_with_tag_name(...).

The is<T>(Node) functions are obviously unoptimized at the moment,
and this is about establishing pleasant patterns right now. :^)
2019-10-06 20:47:57 +02:00
Andreas Kling
f52f2736e1 LibHTML: Add is<ElementType> and to<ElementType> helper functions
These will help us write node-type-aware template functions.
2019-10-06 20:38:26 +02:00
Andreas Kling
bedb00603c LibHTML: Add adjacent (+) and general (~) sibling combinators
This patch implements two more selector features:

- "div + p" matches the <p> sibling immediately after a <div>.
- "div ~ p" matches all <p> siblings after a <div>.
2019-10-06 19:59:07 +02:00
Andreas Kling
5a6c36dc91 LibHTML: Add Node::{next,previous}_element_sibling()
These helpers return the next/previous sibling Node that's actually an
element. This will be useful in the CSS engine since CSS doesn't care
about text nodes.
2019-10-06 19:54:50 +02:00
Andreas Kling
cad326f323 LibHTML: Implement immediate-child selectors (#foo > #bar) 2019-10-06 15:41:16 +02:00
Andreas Kling
156b35742a LibHTML: Implement matching for descendant selectors
The CSS engine now correctly matches selectors like "#foo #bar #baz".
2019-10-06 15:34:42 +02:00
Andreas Kling
b587eb2f4d LibHTML: Fall back to the system default font if we can't find a font
Instead of crashing when we don't have some font the CSS wanted,
just go with Font::default_font().
2019-10-06 14:57:49 +02:00
Andreas Kling
769f86ff9c LibHTML: Add a little bit of margin around <hr> elements 2019-10-06 14:44:18 +02:00
Conrad Pankoff
2cf5d69a67 LibHTML: Use current style's text colour for alt text on images 2019-10-06 14:33:00 +02:00
Conrad Pankoff
451730000c LibHTML: Trim image alt text to the right if necessary 2019-10-06 14:33:00 +02:00
Conrad Pankoff
b240500107 LibHTML: Support width/height attributes on images 2019-10-06 14:33:00 +02:00
Conrad Pankoff
088237a25f LibHTML: Draw image alt text as black rather than white 2019-10-06 14:33:00 +02:00
Conrad Pankoff
5f6903a714 LibHTML: Use image URL as alt text if alt is missing 2019-10-06 14:33:00 +02:00
Conrad Pankoff
1ef53be2f3 LibHTML: Load image resource when src attribute is set 2019-10-06 14:33:00 +02:00
Conrad Pankoff
ef8b754a46 LibHTML: Add function for invalidating the document layout
This allows any external actor to signal that the document layout may be
stale. This can be used when loading resources, changing the size or
placement of an element, adding/removing nodes, or really any time.
2019-10-06 14:33:00 +02:00
Andreas Kling
fabc717b39 LibHTML: Make the text-decoration inheritance quirk actually work
Things work better if you spell things correctly, oops!

This fixes an issue in Help where parts of links were missing their
underline decoration.
2019-10-06 11:48:53 +02:00
Andreas Kling
ef0613ea4c LibHTML: Unbreak parsing of standalone declarations
Oops, I forgot to update CSSParser::parse_standalone_declaration()
after making parse_property() return a property (or {} for failure.)
2019-10-06 11:43:38 +02:00
Andreas Kling
b9557bf876 LibHTML: Move font loading from LayoutText to StyleProperties
Since LayoutText inherits all of its style information from its parent
Element anyway, it makes more sense to load the font at a higher level.

And since the font depends only on the style and nothing else, this
patch moves font loading (and caching) into StyleProperties. This could
be made a lot smarter to avoid loading the same font many times, etc.
2019-10-06 11:26:34 +02:00
Andreas Kling
c8e5039418 LibHTML: LayoutInline can only be constructed with an Element
Since LayoutText no longer inherits from LayoutInline, all of the
DOM nodes with a LayoutInline are going to be Elements.
2019-10-06 11:26:34 +02:00
Andreas Kling
1b7aa00768 LibHTML: LayoutText should inherit from LayoutNode directly
There's no need for LayoutText to inherit from LayoutInline.
I had the wrong idea here: I was thinking that everything that can be
laid out inline should inherit from LayoutInline, but that's clearly
not sufficient for something like LayoutReplaced which can be laid out
in either way.
2019-10-06 11:26:31 +02:00
Andreas Kling
2a266db05b LibHTML: Parse descendant relations in CSS selectors
"div p" now generates a Selector with two components where the second
component is a type=TagName, value="p", relation=Descendant.

We still don't handle matching of these, but at least we parse them.
2019-10-06 11:07:57 +02:00
Andreas Kling
847072c2b1 LibHTML: Respect the link color set via <body link>
The default style for "a" tags now has { color: -libhtml-link; }.
We implement this vendor-specific property by querying the containing
document for the appropriate link color.

Currently we only use the basic link color, but in the future this can
be extended to remember visited links, etc.
2019-10-06 10:25:08 +02:00
Andreas Kling
83a6474d82 LibHTML: Parse link, alink and vlink in <body> and pass to Document
This patch adds HTMLBodyElement::parse_attribute() where we extract the
link colors and stash them away on Document.
2019-10-06 10:11:54 +02:00
Andreas Kling
772718b8d8 LibHTML: Add a per-attribute callback for Elements to parse attributes
Elements now have a virtual parse_attribute(name, value) callback that
gets invoked for each one of its attributes.
2019-10-06 10:09:55 +02:00
Andreas Kling
306b9dfb51 LibHTML: Various little improvements to the CSS parser
The parser now kinda recognizes immediate child selectors, !important,
and various other little things.

It's still extremely far from robust and/or correct. :^)
2019-10-06 09:28:58 +02:00
Andreas Kling
48f43a7429 LibHTML: Anonymous blocks *should* inherit some properties
Okay, I got that a bit wrong. Here's what CSS 2.1 says:

"The properties of anonymous boxes are inherited from the enclosing
non-anonymous box. Non-inherited properties have their initial value."

This patch implements a better behavior by only copying the inherited
properties from the parent style.
2019-10-05 23:47:06 +02:00
Andreas Kling
958b395418 LibHTML: Support rendering <img src> with file:// URLs
We can now show images loaded from local file:// URLs. Pretty neat :^)
2019-10-05 23:41:14 +02:00
Andreas Kling
9858e2632c LibHTML: Let's not have anonymous blocks inherit their parent's style
This was introducing a bunch of unwanted margins.
2019-10-05 23:29:01 +02:00
Andreas Kling
ee567cdc3d LibHTML: Implement basic layout for inline <img alt>
LayoutReplaced objects can now participate in inline layout.

It's very hackish, but basically LayoutReplaced will just add itself to
the last line in the containing block.

This patch gets rid of the idea that only LayoutInline subclasses can
be split into lines, by moving the split_into_lines() virtual up to
LayoutNode and overriding it in LayoutReplaced.
2019-10-05 23:29:01 +02:00
Andreas Kling
f150134de9 LibHTML: Make Node::create_layout_node() virtual
Instead of branching on the Node type, let subclasses decide how their
layout nodes get constructed.

This will allow elements to create custom layout nodes if they want.
2019-10-05 23:29:01 +02:00
Andreas Kling
09dccb3224 LibHTML: Flesh out <img> element with LayoutImage and LayoutReplaced
This patch adds parsing of <img> into HTMLImageElement objects.
It also adds LayoutImage and its parent class LayoutReplaced, which is
going to represent CSS "replaced elements."
2019-10-05 23:29:01 +02:00
Andreas Kling
56d1ae98bc LibHTML: Always fill the entire paint event rect with background
And do the filling before translating the painter.

This fixes a bug where scrolling down in the Help app would render the
bottom part of the page with a different background color.
2019-10-05 21:53:09 +02:00
Andreas Kling
a8297657ab LibHTML: Fire the HtmlView::on_title_change hook after a load finishes 2019-10-05 10:30:14 +02:00
Andreas Kling
319f0d2d18 LibHTML: Render list markers in the same color as text 2019-10-05 10:27:59 +02:00
Andreas Kling
78d65c1c64 LibHTML: Add load(URL) and reload() functions to HtmlView
You can now pass a file:/// URL to HtmlView and it will take care of
the loading logic for you. Each Document remembers the URL it was
loaded from, which allows us to also have reload().

This patch also adds a very simple function for resolving relative
URL's into absolute ones.
2019-10-05 10:17:33 +02:00
Andreas Kling
ee64d99a96 LibHTML: Make StyleResolver responsible for loading the default style
Instead of HtmlView clients having to worry about parsing and loading
the default CSS, just take care of it inside StyleResolver.

The default style is automatically inserted into the stylesheet list,
at the very start, so everyone else gets a chance to override it.
2019-10-05 09:02:29 +02:00
Andreas Kling
77218b1c2a LibHTML: Make CSS inheritance slightly less hacky
Add a simple is_inherited_property(name) lookup function and use that
to implement CSS property inheritance.

It's a bug that "text-decoration" is inherited, but we currently rely
on this in order to propagate e.g underline into linkified line boxes.
2019-10-04 22:52:49 +02:00
Andreas Kling
8fb979148d LibHTML: Add support for <font color>
This was pleasantly trivial to implement with the new support for
presentational hints. :^)
2019-10-04 21:14:59 +02:00
Andreas Kling
9808d35554 LibHTML: Add support for <body bgcolor="#rrggbb" text="#rrggbb">
This patch implements basic support for presentational hints, which are
old-school HTML attributes that affect style.

You add support for a presentational hint attribute by overriding
Element::apply_presentational_hints(StyleProperties&) and setting all
of the corresponding CSS properties as appropriate.

To make the background color fill the entire document, not just the
bounds of the <body> element's LayoutNode, we special-case it in the
HtmlView::paint_event() code for now. I'm not entirely sure what the
nicest solution would be, but I'm sure we'll discover it eventually.
2019-10-04 21:05:52 +02:00
Andreas Kling
a7ca719c4e LibHTML: Rename LayoutNode::style_properties() to LayoutNode::style() 2019-10-04 15:56:36 +02:00
Andreas Kling
9c0e9a1a20 LibHTML: Rename ComputedStyle to BoxModelMetrics
There was nothing left in ComputedStyle except the box model metrics,
so this patch gives it a more representative name.

Note that style information is fetched directly from StyleProperties,
which is basically the CSS property name/value pairs that apply to
an element.
2019-10-04 15:50:50 +02:00
Andreas Kling
7bc9310170 LibHTML: Add a Frame class and use it for document layout width
Each HtmlView now has a main_frame(), which represents the main frame
of the web page. Frame inherits from TreeNode<Frame>, which will allow
us to someday implement a Frame tree (to support the <frame> element.)
2019-10-04 15:50:04 +02:00
Andreas Kling
b1758ae2b3 LibHTML: Remove unused FontStyle enum 2019-10-04 15:49:43 +02:00
Andreas Kling
4e35bbffdd LibHTML: LayoutText should always use parent's style properties
This patch makes StyleProperties heap-allocated and ref-counted so that
a LayoutNode can be without one. The ref-counting also allows anonymous
blocks to share style with their parent block.

LayoutText never needs a StyleProperties, since text always inherits
style from its parent element. This is handled by style_properties().
2019-10-04 12:12:39 +02:00
Andreas Kling
d68c1effcb LibHTML: Remove unused LayoutInline::layout()
Inline layout now happens in the containing block, specifically in
LayoutBlock::layout_inline_children().
2019-10-03 17:36:06 +02:00
Andreas Kling
f908a2718a LibHTML: Make "white-space: pre" kinda work
This is not ideal, as refusing to break lines will easily overflow the
containing block, and we have no way of dealing with overflow yet.
But as long as you provide enough width, it does look nice. :^)
2019-10-03 16:57:17 +02:00
Andreas Kling
c51366b22c LibHTML: Prettify ColorStyleValue::to_string() a little bit
I don't know why I made this say "COLOR: #rrggbbaa" when it can also
just say "#rrggbbaa" :^)
2019-10-03 16:12:45 +02:00
Andreas Kling
84ec286060 LibHTML: Forgot to account for -1 glyph spacing in text layout
Font::width(string) will subtract one Font::glyph_spacing() from the
result, since we don't put any spacing after the last glyph.

This was messing up text layout here, since we assumed each glyph
width also included the glyph spacing.
2019-10-03 16:07:20 +02:00
Andreas Kling
4a88caf8e7 LibHTML: Don't add whitespace line box fragments at start of line
Collapse whitespace at the start of a line so we don't end up with
" foo bar" :^)
2019-10-03 15:55:18 +02:00
Andreas Kling
279e1dbfc5 LibHTML: Tweak "text-decoration: underline" look in LayoutText
Also remove some debug spam.
2019-10-03 15:35:39 +02:00
Andreas Kling
1d65cf367f LibHTML: Rewrite inline and text layout
Inline layout is now done by LayoutBlock. Blocks with inline children
will split them into line boxes during layout.

A LayoutBlock can have zero or more LineBox objects. Each LineBox
represents one visual line.

A LineBox can have any number of LineBoxFragment children. A fragment
is an offset+length into a specific LayoutNode.

To paint a LayoutBlock with inline children, we walk its line boxes,
and walk their fragments, painting each fragment at a time by calling
LineBoxFragment::render(), which in turn calls the LayoutNode via
LayoutText::render_fragment(). Hit testing works similarly.

This is very incomplete and has many bugs, but should make it easier
for us to move forward with this code.
2019-10-03 15:20:13 +02:00
Andreas Kling
5966fcff31 LibHTML: Reduce debug spam from mouse events 2019-10-03 14:52:36 +02:00
Andreas Kling
9290117b77 LibHTML: Let's put debug output on the debugger stream 2019-10-03 10:25:34 +02:00
Andreas Kling
786494b62d LibHTML: Adjust mouse event positions before using them for hit testing
This fixes the issue where you couldn't click on links at the bottom of
scrollable documents. :^)
2019-10-03 09:17:27 +02:00
Andreas Kling
8f842375a2 LibHTML: Implement the <hr> element
This also meant I had to implement basic support for the border-styles
"inset" and "outset". If it's neither of those, we default to "solid".
2019-10-01 20:50:11 +02:00
Andreas Kling
53fae2af4f LibHTML: Implement basic border rendering
We currently assume the border-style is solid, and simply draw a box
around the padded LayoutNode rect. :^)
2019-10-01 20:31:56 +02:00
Andreas Kling
7573e3c46d LibHTML: Include padding when rendering background colors 2019-10-01 20:25:31 +02:00
Andreas Kling
86b7dd6d5d LibHTML: Tweak default CSS to bring it a bit closer to HTML4 2019-10-01 20:16:42 +02:00
Andreas Kling
4bfd4dc6c7 AK: Remove empty files JsonArray.cpp and JsonObject.cpp 2019-10-01 11:24:54 +02:00
Andreas Kling
a5e5a3fab7 LibHTML: Implement basic support for inline style attributes
You can now style elements with inline styles:

    <div style="color: #ff0000">This is red!</div>

Pretty neat :^)
2019-09-30 20:25:33 +02:00
Andreas Kling
b2a0d20580 LibHTML: Refactor the CSS parser into a class
Also added a parser function for standalone style declarations.
2019-09-30 20:24:38 +02:00
Andreas Kling
8d797fc62e LibHTML: Fix incorrect CSS object model
A StyleRule has a StyleDeclaration which has many StyleProperty. :^)
2019-09-30 20:06:17 +02:00
Andreas Kling
c9bab8b870 LibHTML: Reduce debug spam in HtmlView mouse event handlers 2019-09-29 18:10:39 +02:00
Andreas Kling
37a37accd4 LibHTML: Implement basic support for background-color 2019-09-29 18:05:37 +02:00
Andreas Kling
a4fccc02ec LibHTML: Add a simple <style> element for inline CSS 2019-09-29 17:45:42 +02:00
Andreas Kling
7912592f89 LibHTML: Add inserted_into() and removed_from() TreeNode callbacks
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-29 17:40:39 +02:00
Andreas Kling
402c6de5c9 LibHTML: Make <div> elements display: block 2019-09-29 17:26:52 +02:00
Andreas Kling
830e18e486 LibHTML: Fix broken parsing of ID and class selectors
We were forgetting to consume the '#' and '.' characters.
2019-09-29 17:26:05 +02:00
Andreas Kling
ed39e0f6f7 LibHTML: Non-element (Text) Nodes should get style from their parent
Text nodes don't have style of their own, so just inherit all the style
from the parent element.
2019-09-29 17:22:44 +02:00
Andreas Kling
b94c7665a9 LibHTML: Add a way to get a Document's title
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-29 16:24:57 +02:00
Andreas Kling
0c6af2d5b4 LibHTML: Add Node::text_content()
This returns a String built from all of a Node's text descendants,
including itself.
2019-09-29 16:23:09 +02:00
Andreas Kling
5b942b519c LibHTML: Add HTMLHeadingElement for <h1> through <h6> 2019-09-29 12:26:15 +02:00
Andreas Kling
f38b0f667e LibHTML: Implement basic HTMLElement.title support
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-29 12:26:13 +02:00
Andreas Kling
92aae72025 LibHTML: Detect link clicks
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-29 12:04:02 +02:00
Andreas Kling
b477aff843 LibHTML: Detect hovering over links
HtmlView now calls Node::enclosing_link_element() to find the nearest
ancestor <a> element.

This patch also adds HTMLElement and HTMLAnchorElement.
2019-09-29 11:59:38 +02:00
Andreas Kling
88de955073 LibHTML: Have Document track its hovered Node
This gets set from HtmlView::mousemove_event() at the moment.
2019-09-29 11:50:35 +02:00
Andreas Kling
754e6e0f67 LibHTML: Add LayoutNode::document() for easy access
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-29 11:43:33 +02:00
Andreas Kling
1b8509a0c9 LibHTML: Make sure every DOM Node belongs to a Document 2019-09-29 11:43:07 +02:00
Andreas Kling
13860e4dd8 LibHTML: Make hit testing work for LayoutText
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-29 11:32:00 +02:00
Andreas Kling
3de4b99dc3 LibHTML: Implement naive hit testing
We don't have proper line boxes yet, so we can't easily hit test
inline text.
2019-09-28 23:04:59 +02:00
Andreas Kling
fb4702dd49 LibHTML: Add virtual Node::tag_name()
This is analogous to the DOM's Node.tagName and makes it easy to ask
"hey, what kinda thing is this Node?"
2019-09-28 22:59:16 +02:00
Andreas Kling
a768724270 LibHTML: Make <a> tags blue and underline by default
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-28 22:57:46 +02:00
Andreas Kling
8271ad40a5 LibHTML: Implement basic support for "text-decoration: underline" 2019-09-28 22:57:46 +02:00
Andreas Kling
62cbaa74f3 LibHTML: Respect the CSS "color" property for text
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-28 22:57:46 +02:00
Andreas Kling
83f643d43c LibHTML: Make h1 and h2 tags use Pebbleton Bold by default :^) 2019-09-28 19:14:36 +02:00
Sergey Bugaev
6ec625d6f3 Userland+LibHTML: Add the html command
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-28 18:29:42 +02:00
Sergey Bugaev
b9493ba783 LibHTML: Introduce the HtmlView widget
This is a GWidget that can display contents of an HTML document.
It replaces the Frame class.
2019-09-28 18:29:42 +02:00
Sergey Bugaev
8a2beaf52b LibHTML: Tweak the default CSS style 2019-09-28 18:29:42 +02:00
Sergey Bugaev
db8a1a6aba LibHTML: Parse HTML escape sequences 2019-09-28 18:29:42 +02:00
Sergey Bugaev
6491493e26 LibHTML: Hide debugging output unless HTML_DEBUG is defined 2019-09-28 18:29:42 +02:00
Sergey Bugaev
235dee8c42 LibHTML: Implement rendering 2019-09-28 18:29:42 +02:00
Sergey Bugaev
93003bfda1 LibHTML: Implement LayoutText 2019-09-28 18:29:42 +02:00
Sergey Bugaev
9f8d776c70 LibHTML: Implement LayoutInline::layout()
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-28 18:29:42 +02:00
Sergey Bugaev
03cca4510a LibHTML: Fix LayoutDocument height computation 2019-09-28 18:29:42 +02:00
Sergey Bugaev
fa876320eb LibHTML: Fix LayoutBlock vertical position & height computations 2019-09-28 18:29:42 +02:00
Sergey Bugaev
c1ef63379c LibHTML: Add Document::normalize()
This method wraps the document tree in <html> and <body> elements if needed.
2019-09-28 18:29:42 +02:00
Sergey Bugaev
599edba7a3 LibHTML: Move layout tree building to Node
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-28 18:29:42 +02:00
Sergey Bugaev
841ae44392 LibHTML: Implement basic style inheritance 2019-09-28 18:29:42 +02:00
Sergey Bugaev
3be897a3d5 LibHTML: Add ComputedStyle::full_margin()
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-28 18:29:42 +02:00
Sergey Bugaev
a42f4c078e LibHTML: Get rid of ComputedStyle::offset()
This is redundant since we already have LayoutNode::rect().
2019-09-28 18:29:42 +02:00
Sergey Bugaev
756bdb2a42 LibHTML: Fix moving inline elements to unrelated block elements
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-28 18:29:42 +02:00
Sergey Bugaev
08c751d130 LibHTML: Add StyleProperties::string_or_fallback()
This is an utility to go with the existing length_or_fallback().
2019-09-28 18:29:42 +02:00
Sergey Bugaev
fd0aa5dd43 LibHTML: Get rid of the style tree
We now create a layout tree directly from the DOM tree.
This way we don't actually lose text nodes ^)
2019-09-28 18:29:42 +02:00
Sergey Bugaev
a9ebd676e5 LibHTML: Add install.sh 2019-09-28 18:29:42 +02:00
Andreas Kling
8d550c174e LibCore: Convert CFile to ObjectPtr 2019-09-21 20:50:06 +02:00
Andreas Kling
73fdbba59c AK: Rename <AK/AKString.h> to <AK/String.h>
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-09-06 15:36:54 +02:00
Andreas Kling
fc43cf929d LibHTML: Implement basic block height computation
..and add vertical box properties to the layout tree dumps.
2019-08-18 08:39:52 +02:00
Andreas Kling
70eca3b500 LibHTML: Finish the block width calculation
Also add horizontal box values to the layout tree dump.
2019-08-18 08:39:52 +02:00
Andreas Kling
587ddc5126 LibHTML: Fix host build and turn on ccache 2019-08-18 08:39:52 +02:00
Andreas Kling
38c80d5e6d LibHTML: Make some use of Vector::empend(). 2019-08-01 16:50:15 +02:00
Andreas Kling
e423bb4901 LibHTML: A tiny bit of work towards block layout. 2019-07-26 08:05:14 +02:00
Andreas Kling
f88c5860df LibHTML: Fetch the box edge values needed for block width computation. 2019-07-24 07:34:07 +02:00
Andreas Kling
af23b38418 LibHTML: Fix host build. 2019-07-24 07:27:07 +02:00
Andreas Kling
c7ea94697e Libraries: Remove unused "install" targets.
We've been using a per-directory "install.sh" for some time, so let's get
rid of the old way of doing things.
2019-07-21 21:28:48 +02:00
Andreas Kling
1c0669f010 LibDraw: Introduce (formerly known as SharedGraphics.)
Instead of LibGUI and WindowServer building their own copies of the drawing
and graphics code, let's it in a separate LibDraw library.

This avoids building the code twice, and will encourage better separation
of concerns. :^)
2019-07-18 10:18:16 +02:00
Andreas Kling
fc127eb769 LibHTML: Create anonymous blocks around inline children of blocks. 2019-07-08 17:42:23 +02:00
Andreas Kling
3c71dc4320 LibHTML: Oops, fix build.
It's another "hacking on the train and forgetting to try a full build"
episode, this time starring LibHTML.
2019-07-08 08:18:53 +02:00
Andreas Kling
8812b35c5e LibHTML: Reorganize layout tree build so that parents add their children.
This will allow us to insert anonymous blocks with ease.
2019-07-08 07:33:58 +02:00
Andreas Kling
0ccad4208f LibHTML: Move layout tree building to a separate function. 2019-07-08 07:24:15 +02:00
Andreas Kling
9526b0e13a LibHTML: Add InheritStyleValue and InitialStyleValue.
These correspond to the 'inherit' and 'initial' CSS values respectively.
2019-07-08 07:15:56 +02:00
Andreas Kling
105a97685e LibHTML: Fix host build after Libraries/ shuffle. 2019-07-08 07:14:18 +02:00
Andreas Kling
8b0953a795 Libraries: Unbreak "make install" with new directory locations. 2019-07-04 16:41:42 +02:00
Andreas Kling
04b9dc2d30 Libraries: Create top level directory for libraries.
Things were getting a little crowded in the project root, so this patch
moves the Lib*/ directories into Libraries/.
2019-07-04 16:16:50 +02:00