diff options
author | Martin Robinson <mrobinson@igalia.com> | 2024-06-18 18:19:00 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-06-18 16:19:00 +0000 |
commit | 70982dfa5aaf176a46308aa4075128e8edd53da2 (patch) | |
tree | 63c1f618112c64af97eb8b22253638772140523b /tests | |
parent | 63889b732f59a0cfe1271c9340aca4d4c565575b (diff) | |
download | servo-70982dfa5aaf176a46308aa4075128e8edd53da2.tar.gz servo-70982dfa5aaf176a46308aa4075128e8edd53da2.zip |
layout: Allocate inline box start space on segment (#32486)
Instead of allocating the inline padding and border space on the line,
allocate it on the segment -- which where the inline box start goes.
Co-authored-by: Rakhi Sharma <atbrakhi@igalia.com>
Diffstat (limited to 'tests')
4 files changed, 104 insertions, 0 deletions
diff --git a/tests/wpt/meta/MANIFEST.json b/tests/wpt/meta/MANIFEST.json index f1145817671..0625de8d1de 100644 --- a/tests/wpt/meta/MANIFEST.json +++ b/tests/wpt/meta/MANIFEST.json @@ -79166,6 +79166,32 @@ {} ] ], + "inline-box-border-line-break.html": [ + "6688d5e3ada2483288fc5f23c42a915d44a6300b", + [ + null, + [ + [ + "/css/CSS2/normal-flow/inline-box-border-line-break-ref.html", + "==" + ] + ], + {} + ] + ], + "inline-box-padding-line-break.html": [ + "70d518f411efb383debce5cd06cf604569217aee", + [ + null, + [ + [ + "/css/CSS2/normal-flow/inline-box-border-line-break-ref.html", + "==" + ] + ], + {} + ] + ], "inline-non-replaced-height-002.xht": [ "e3568f555d516824c3ccdb2a92cb925fadebf311", [ @@ -378853,6 +378879,10 @@ "22204233d95d1deb05ca71ae04a885434db1d3ac", [] ], + "inline-box-border-line-break-ref.html": [ + "6b66951fcc76b42253fb1486563a029bb845b9b2", + [] + ], "inline-non-replaced-height-002-ref.xht": [ "0cc109939200d47938bf06729b150ce54d8dcb55", [] diff --git a/tests/wpt/tests/css/CSS2/normal-flow/inline-box-border-line-break-ref.html b/tests/wpt/tests/css/CSS2/normal-flow/inline-box-border-line-break-ref.html new file mode 100644 index 00000000000..6b66951fcc7 --- /dev/null +++ b/tests/wpt/tests/css/CSS2/normal-flow/inline-box-border-line-break-ref.html @@ -0,0 +1,22 @@ +<!DOCTYPE html> +<html lang="en"> + <link + rel="help" + href="https://drafts.csswg.org/css2/#inline-formatting" + /> + <link rel="help" href="https://github.com/servo/servo/pull/32486" /> + <link rel="author" href="mrobinson@igalia.com" /> + <link rel="author" href="atbrakhi@igalia.com" /> + <link rel="stylesheet" type="text/css" href="/fonts/ahem.css" /> + <body> + + <div style="width: 80px; outline: solid 1px black; font: 20px/1 Ahem;"> + xx + <div style="display: inline-block; padding-left: 50px;">x</div> + xx + </div> + + </body> +</html> + + diff --git a/tests/wpt/tests/css/CSS2/normal-flow/inline-box-border-line-break.html b/tests/wpt/tests/css/CSS2/normal-flow/inline-box-border-line-break.html new file mode 100644 index 00000000000..6688d5e3ada --- /dev/null +++ b/tests/wpt/tests/css/CSS2/normal-flow/inline-box-border-line-break.html @@ -0,0 +1,26 @@ +<!DOCTYPE html> +<html lang="en"> + <link + rel="help" + href="https://drafts.csswg.org/css2/#inline-formatting" + /> + <link rel="help" href="https://github.com/servo/servo/pull/32486" /> + <link rel="author" href="mrobinson@igalia.com" /> + <link rel="author" href="atbrakhi@igalia.com" /> + <link rel="stylesheet" type="text/css" href="/fonts/ahem.css" /> + <meta name="assert" content="Inline borders should cause content that follows to wrap." /> + <link rel="match" href="inline-box-border-line-break-ref.html" /> + <body> + + <div style="width: 80px; outline: solid 1px black; font: 20px/1 Ahem;"> + xx + <!- The left border on this span should trigger a line break before the + final xx. --> + <span style="border-left: 50px solid transparent">x</span> + xx + </div> + + </body> +</html> + + diff --git a/tests/wpt/tests/css/CSS2/normal-flow/inline-box-padding-line-break.html b/tests/wpt/tests/css/CSS2/normal-flow/inline-box-padding-line-break.html new file mode 100644 index 00000000000..70d518f411e --- /dev/null +++ b/tests/wpt/tests/css/CSS2/normal-flow/inline-box-padding-line-break.html @@ -0,0 +1,26 @@ +<!DOCTYPE html> +<html lang="en"> + <link + rel="help" + href="https://drafts.csswg.org/css2/#inline-formatting" + /> + <link rel="help" href="https://github.com/servo/servo/pull/32486" /> + <link rel="author" href="mrobinson@igalia.com" /> + <link rel="author" href="atbrakhi@igalia.com" /> + <link rel="stylesheet" type="text/css" href="/fonts/ahem.css" /> + <meta name="assert" content="Inline padding should cause content that follows to wrap." /> + <link rel="match" href="inline-box-border-line-break-ref.html" /> + <body> + + <div style="width: 80px; outline: solid 1px black; font: 20px/1 Ahem;"> + xx + <!- The left padding on this span should trigger a line break before the + final xx. --> + <span style="padding-left: 50px;">x</span> + xx + </div> + + </body> +</html> + + |