summaryrefslogtreecommitdiff
path: root/Libraries/LibHTML/CSS/StyleResolver.h
AgeCommit message (Collapse)Author
2019-10-08LibHTML: Use an enum for CSS property ID'sAndreas Kling
Instead of using string everywhere, have the CSS parser produce enum values, since they are a lot nicer to work with. In the future we should generate most of this code based on a list of supported CSS properties.
2019-10-07LibHTML: Rename "style_properties" to "style" everywhereAndreas Kling
2019-10-05LibHTML: Anonymous blocks *should* inherit some propertiesAndreas Kling
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-05LibHTML: Make StyleResolver responsible for loading the default styleAndreas Kling
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-04LibHTML: LayoutText should always use parent's style propertiesAndreas Kling
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-09-28LibHTML: Implement basic style inheritanceSergey Bugaev
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-07-04Libraries: Create top level directory for libraries.Andreas Kling
Things were getting a little crowded in the project root, so this patch moves the Lib*/ directories into Libraries/.