summaryrefslogtreecommitdiff
path: root/Tests/LibWeb
diff options
context:
space:
mode:
authorAndreas Kling <kling@serenityos.org>2023-04-02 08:48:29 +0200
committerAndreas Kling <kling@serenityos.org>2023-04-02 15:00:06 +0200
commit8bb0be7d4fc4bbb8af91dccd690ba1bf38064e53 (patch)
treea2c5d34ddbd8bdc289eae597576eecffa39c6e6b /Tests/LibWeb
parent620a34a4637654c2c7b518fddb087451aecb58f4 (diff)
downloadserenity-8bb0be7d4fc4bbb8af91dccd690ba1bf38064e53.zip
LibWeb: Don't apply presentational hints to associated pseudo elements
CSS properties generated by presentational hints in content attributes should not leak into pseudo elements.
Diffstat (limited to 'Tests/LibWeb')
-rw-r--r--Tests/LibWeb/Layout/expected/css-pseudo-element-should-not-be-affected-by-presentational-hints.txt13
-rw-r--r--Tests/LibWeb/Layout/input/css-pseudo-element-should-not-be-affected-by-presentational-hints.html11
2 files changed, 24 insertions, 0 deletions
diff --git a/Tests/LibWeb/Layout/expected/css-pseudo-element-should-not-be-affected-by-presentational-hints.txt b/Tests/LibWeb/Layout/expected/css-pseudo-element-should-not-be-affected-by-presentational-hints.txt
new file mode 100644
index 0000000000..2e7686b39c
--- /dev/null
+++ b/Tests/LibWeb/Layout/expected/css-pseudo-element-should-not-be-affected-by-presentational-hints.txt
@@ -0,0 +1,13 @@
+Viewport <#document> at (0,0) content-size 800x600 children: not-inline
+ BlockContainer <html> at (1,1) content-size 798x47.835937 children: not-inline
+ BlockContainer <body> at (10,10) content-size 780x29.835937 children: not-inline
+ TableWrapper <(anonymous)> at (10,10) content-size 104x29.835937 children: not-inline
+ TableBox <table> at (11,11) content-size 104x27.835937 children: not-inline
+ TableRowGroupBox <tbody> at (11,11) content-size 104x27.835937 children: not-inline
+ TableRowBox <tr> at (11,11) content-size 104x27.835937 children: not-inline
+ TableCellBox <td> at (13,13) content-size 100x23.835937 children: not-inline
+ BlockContainer <(anonymous)> at (14,14) content-size 98x21.835937 children: inline
+ line 0 width: 0, height: 21.835937, bottom: 21.835937, baseline: 16.914062
+ frag 0 from TextNode start: 0, length: 0, rect: [14,14 0x21.835937]
+ ""
+ TextNode <#text>
diff --git a/Tests/LibWeb/Layout/input/css-pseudo-element-should-not-be-affected-by-presentational-hints.html b/Tests/LibWeb/Layout/input/css-pseudo-element-should-not-be-affected-by-presentational-hints.html
new file mode 100644
index 0000000000..ba7142ee07
--- /dev/null
+++ b/Tests/LibWeb/Layout/input/css-pseudo-element-should-not-be-affected-by-presentational-hints.html
@@ -0,0 +1,11 @@
+<!DOCTYPE html><html><head><style>
+* {
+ border: 1px solid black;
+ font: 20px SerenitySans;
+}
+td::before {
+ display: block;
+ content: "";
+ border: 1px solid red;
+}
+</style><head><body><table><tr><td width="100" height="100"> \ No newline at end of file