-
-
Notifications
You must be signed in to change notification settings - Fork 2.9k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
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>
- Loading branch information
Showing
5 changed files
with
116 additions
and
12 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
22 changes: 22 additions & 0 deletions
22
tests/wpt/tests/css/CSS2/normal-flow/inline-box-border-line-break-ref.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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> | ||
|
||
|
26 changes: 26 additions & 0 deletions
26
tests/wpt/tests/css/CSS2/normal-flow/inline-box-border-line-break.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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> | ||
|
||
|
26 changes: 26 additions & 0 deletions
26
tests/wpt/tests/css/CSS2/normal-flow/inline-box-padding-line-break.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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> | ||
|
||
|