1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-31 10:48:11 +00:00
serenity/Userland/Libraries/LibWeb
Andreas Kling d965a9552f LibWeb: Start implementing the CSS cascade
The 'C' in "CSS" is for Cascade, so let's actually implement the cascade
in LibWeb. :^)

StyleResolver::resolve_style() now begins by collecting all the matching
CSS rules for the given DOM::Element. Rules are then processed in the
spec's cascade order (instead of in the order we encounter them.)

With this, "!important" is now honored on CSS properties.

After performing the cascade, we do another pass of what the spec calls
"defaulting" where we resolve "inherit" and "initial" values.
I've left a FIXME about supporting correct "initial" values for every
property, since we're currently lacking some coverage there.

Note that this mechanism now resolves every known CSS property. This is
*not* space-efficient and we'll eventually need to come up with some
strategies to reduce memory usage around this. However, this will do
fine until we have more of the engine working correctly. :^)
2021-09-21 12:49:28 +02:00
..
Bindings LibWeb: Implement basic support for MessageChannel and MessagePort 2021-09-19 22:34:44 +02:00
Cookie Everywhere: Make use of container version of all_of 2021-08-03 10:46:43 +02:00
CSS LibWeb: Start implementing the CSS cascade 2021-09-21 12:49:28 +02:00
DOM LibWeb: Make DOM::Element::resolve_custom_property() const 2021-09-21 12:33:15 +02:00
DOMParsing LibWeb: Make the innerHTML setter spec compliant 2021-09-14 02:09:18 +02:00
DumpLayoutTree LibWeb+WebContent: Port DumpLayoutTree to OutOfProcessWebView 2021-09-08 11:07:14 +02:00
HighResolutionTime LibWeb: Rename DOM::Window::document() => associated_document() 2021-09-09 21:25:10 +02:00
HTML Libraries: Use AK::Variant default initialization where appropriate 2021-09-21 04:22:52 +04:30
Layout LibWeb: Enable bilinear blending for bitmaps 2021-09-20 22:18:20 +02:00
Loader LibWeb: Avoid introducing a reference cycle in ResourceLoader::load() 2021-09-19 21:10:23 +04:30
NavigationTiming Everything: Move to SPDX license identifiers in all files. 2021-04-22 11:22:27 +02:00
Page LibWeb: Add the Web::URL namespace and move URLEncoder to it 2021-09-13 01:43:10 +02:00
Painting LibWeb: Move border-painting code out of Box 2021-09-19 22:53:35 +02:00
RequestIdleCallback LibWeb: Add the IdleDeadline interface from the RequestIdleCallback spec 2021-09-17 13:20:18 +02:00
Scripts Libraries: Move to Userland/Libraries/ 2021-01-12 12:17:46 +01:00
SVG LibWeb: Add a bare-bones SVG <g> element 2021-09-18 01:39:59 +02:00
Tests LibWeb: Add support HTMLScriptElement.supports 2021-09-03 23:11:58 +02:00
UIEvents AK: Rename adopt() to adopt_ref() 2021-04-23 16:46:57 +02:00
URL LibWeb: Add the URL::{protocol, pathname, search, hash} attributes 2021-09-14 00:14:45 +02:00
WebAssembly LibWeb: Use ErrorType::NotAnObjectOfType instead of NotA 2021-09-12 00:16:39 +02:00
XHR LibWeb: Implement XMLHttpRequest.getAllResponseHeaders() 2021-09-19 22:34:44 +02:00
CMakeLists.txt LibWeb: Move background painting from Box to its own file 2021-09-19 22:53:35 +02:00
DOMTreeModel.cpp LibWeb: Implement DOMTreeModel::index_for_node() 2021-09-02 22:16:41 +02:00
DOMTreeModel.h LibWeb: Implement DOMTreeModel::index_for_node() 2021-09-02 22:16:41 +02:00
Dump.cpp LibWeb: Include the "important" flag in CSS dumps 2021-09-21 12:33:15 +02:00
Dump.h LibWeb: Convert CSS Dump, Selector, & SelectorEngine to east const 2021-07-14 13:31:00 +02:00
FontCache.cpp Everything: Move to SPDX license identifiers in all files. 2021-04-22 11:22:27 +02:00
FontCache.h Everything: Move to SPDX license identifiers in all files. 2021-04-22 11:22:27 +02:00
Forward.h LibWeb: Implement basic support for MessageChannel and MessagePort 2021-09-19 22:34:44 +02:00
InProcessWebView.cpp LibWeb: Add the Web::URL namespace and move URLEncoder to it 2021-09-13 01:43:10 +02:00
InProcessWebView.h LibWeb: Add the Web::URL namespace and move URLEncoder to it 2021-09-13 01:43:10 +02:00
Namespace.cpp Everything: Move to SPDX license identifiers in all files. 2021-04-22 11:22:27 +02:00
Namespace.h Everything: Move to SPDX license identifiers in all files. 2021-04-22 11:22:27 +02:00
Origin.h Everything: Move to SPDX license identifiers in all files. 2021-04-22 11:22:27 +02:00
OutOfProcessWebView.cpp LibWeb: Don't request WebContent repaint while we have repaints pending 2021-09-17 14:54:51 +02:00
OutOfProcessWebView.h LibWeb: Don't request WebContent repaint while we have repaints pending 2021-09-17 14:54:51 +02:00
QualifiedName.h LibWeb: Use HTML-uppercased qualified name for the Element node name 2021-05-04 23:24:03 +01:00
StylePropertiesModel.cpp Everywhere: Use my shiny new serenityos.org email :^) 2021-09-03 12:22:36 +02:00
StylePropertiesModel.h Everywhere: Use my shiny new serenityos.org email :^) 2021-09-03 12:22:36 +02:00
TreeNode.h LibWeb: Use default instead of an empty constructor/destructor 2021-09-16 17:17:13 +02:00
WebContentClient.cpp LibWeb: Add the Web::URL namespace and move URLEncoder to it 2021-09-13 01:43:10 +02:00
WebContentClient.h LibWeb: Add the Web::URL namespace and move URLEncoder to it 2021-09-13 01:43:10 +02:00
WebViewHooks.h LibWeb: Add the Web::URL namespace and move URLEncoder to it 2021-09-13 01:43:10 +02:00