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
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
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
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
5b942b519c
LibHTML: Add HTMLHeadingElement for <h1> through <h6>
2019-09-29 12:26:15 +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
1b8509a0c9
LibHTML: Make sure every DOM Node belongs to a Document
2019-09-29 11:43:07 +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
Sergey Bugaev
db8a1a6aba
LibHTML: Parse HTML escape sequences
2019-09-28 18:29:42 +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
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