diff options
author | Andreas Kling <kling@serenityos.org> | 2023-04-02 08:35:03 +0200 |
---|---|---|
committer | Andreas Kling <kling@serenityos.org> | 2023-04-02 15:00:06 +0200 |
commit | 620a34a4637654c2c7b518fddb087451aecb58f4 (patch) | |
tree | 258a71ddfbd9d992ee191366beea834b8ac34855 /Tests/LibWeb | |
parent | eed956b473e86b88da146b9f7356d4064736f626 (diff) | |
download | serenity-620a34a4637654c2c7b518fddb087451aecb58f4.zip |
LibWeb: Don't apply element inline style to associated pseudo elements
An element's inline style, if present, should not leak into any pseudo
elements generated by that element.
Diffstat (limited to 'Tests/LibWeb')
2 files changed, 24 insertions, 0 deletions
diff --git a/Tests/LibWeb/Layout/expected/css-pseudo-element-should-not-be-affected-by-inline-style.txt b/Tests/LibWeb/Layout/expected/css-pseudo-element-should-not-be-affected-by-inline-style.txt new file mode 100644 index 0000000000..4aa2d67800 --- /dev/null +++ b/Tests/LibWeb/Layout/expected/css-pseudo-element-should-not-be-affected-by-inline-style.txt @@ -0,0 +1,11 @@ +Viewport <#document> at (0,0) content-size 800x600 children: not-inline + BlockContainer <html> at (1,1) content-size 798x120 children: not-inline + BlockContainer <body> at (10,10) content-size 780x102 children: not-inline + BlockContainer <div.outer> at (11,11) content-size 100x100 children: not-inline + BlockContainer <(anonymous)> at (12,12) content-size 50x50 children: inline + line 0 width: 0, height: 21.835937, bottom: 21.835937, baseline: 16.914062 + frag 0 from TextNode start: 0, length: 0, rect: [12,12 0x21.835937] + "" + TextNode <#text> + BlockContainer <div.inner> at (12,64) content-size 98x0 children: inline + TextNode <#text> diff --git a/Tests/LibWeb/Layout/input/css-pseudo-element-should-not-be-affected-by-inline-style.html b/Tests/LibWeb/Layout/input/css-pseudo-element-should-not-be-affected-by-inline-style.html new file mode 100644 index 0000000000..53776c903d --- /dev/null +++ b/Tests/LibWeb/Layout/input/css-pseudo-element-should-not-be-affected-by-inline-style.html @@ -0,0 +1,13 @@ +<!DOCTYPE html><html><head><style> +* { + border: 1px solid black; + font: 20px SerenitySans; +} +.outer::before { + display: block; + content: ""; + width: 50px; + height: 50px; + border: 1px solid red; +} +</style><head><body><div class="outer" style="height: 100px; width: 100px;"><div class="inner"> |