From 1d065aa51bf10ac99d4f41cd380678ffa384209d Mon Sep 17 00:00:00 2001 From: Andreas Kling Date: Tue, 6 Apr 2021 13:06:25 +0200 Subject: [PATCH] LibWeb: Support the :last-of-type CSS selector :^) --- Base/res/html/misc/last-of-type.html | 12 ++++++++++++ Base/res/html/misc/welcome.html | 1 + .../LibWeb/CSS/Parser/DeprecatedCSSParser.cpp | 2 ++ Userland/Libraries/LibWeb/CSS/Selector.h | 1 + Userland/Libraries/LibWeb/CSS/SelectorEngine.cpp | 6 ++++++ Userland/Libraries/LibWeb/Dump.cpp | 3 +++ 6 files changed, 25 insertions(+) create mode 100644 Base/res/html/misc/last-of-type.html diff --git a/Base/res/html/misc/last-of-type.html b/Base/res/html/misc/last-of-type.html new file mode 100644 index 00000000000..0d08ce80cf8 --- /dev/null +++ b/Base/res/html/misc/last-of-type.html @@ -0,0 +1,12 @@ + +
+
This `div` is first.
+
This nested `span` is last!
+
This nested `em` is first, but this nested `em` is last!
+ This `b` qualifies! +
This is the final `div`!
+
diff --git a/Base/res/html/misc/welcome.html b/Base/res/html/misc/welcome.html index bf826530c42..da883339fe1 100644 --- a/Base/res/html/misc/welcome.html +++ b/Base/res/html/misc/welcome.html @@ -38,6 +38,7 @@ span#loadtime {

This page loaded in ms

Some small test pages: