1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-25 09:45:08 +00:00
Commit graph

4 commits

Author SHA1 Message Date
Andreas Kling
7eef69ad4b LibHTML: Refactor to go from DOM -> styled tree -> layout tree.
Frame::layout() drives everything now, it takes the DOM contained in the
frame and puts it through the tree transformations.
2019-06-29 21:42:07 +02:00
Andreas Kling
ffcbe8f0de LibHTML: Start building the style tree.
Walk the DOM and construct a parallel style tree that points back to the DOM
and has the relevant CSS property values hanging off of them.

The values are picked based on naive selector matching. There's no cascade
or specificity taken into account yet.
2019-06-28 21:25:44 +02:00
Andreas Kling
e971f5604c LibHTML: Implement some very simple selector matching.
We walk the entire DOM and check all selectors against all elements. Only
id, class and tag name are checked right now. There's no ancestor stack
or compound selectors. All in good time :^)
2019-06-27 20:40:21 +02:00
Andreas Kling
2b4eea5a50 LibHTML: Start fleshing out a StyleResolver class.
This will be responsible for matching selectors and creating LayoutStyle
objects for the document and its elements.
2019-06-27 17:47:59 +02:00