-
Notifications
You must be signed in to change notification settings - Fork 3.2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Make truly-empty textframes return true for IsEmpty even when WhiteSp…
…aceIsSignificant, unless they're editable or in an <input> element. Differential Revision: https://phabricator.services.mozilla.com/D128009 bugzilla-url: https://bugzilla.mozilla.org/show_bug.cgi?id=1731120 gecko-commit: 49f06640fdee2aa53ce8d9f0bc5959f95f376e88 gecko-reviewers: emilio
- Loading branch information
1 parent
18473e6
commit edc29aa
Showing
2 changed files
with
111 additions
and
0 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,46 @@ | ||
<!DOCTYPE html> | ||
<html lang=en> | ||
<meta charset="utf-8"> | ||
<title>CSS Inline reference</title> | ||
<link rel="author" title="Jonathan Kew" href="mailto:jkew@mozilla.com"> | ||
<style> | ||
.green { color: green; } | ||
.red { color: red; } | ||
.ref { | ||
display: inline-block; | ||
} | ||
div div { | ||
width: 50px; | ||
height: 0px; | ||
border: 20px solid green; | ||
margin: 10px; | ||
} | ||
</style> | ||
<p>Test passes if the <span class=green>green</span> boxes have <span class=red>no red</span> in the middle.</p> | ||
|
||
<div class=ref> | ||
<div></div> | ||
<div></div> | ||
<div></div> | ||
<div></div> | ||
<div></div> | ||
<div></div> | ||
</div> | ||
|
||
<div class=ref> | ||
<div></div> | ||
<div></div> | ||
<div></div> | ||
<div></div> | ||
<div></div> | ||
<div></div> | ||
</div> | ||
|
||
<div class=ref> | ||
<div></div> | ||
<div></div> | ||
<div></div> | ||
<div></div> | ||
<div></div> | ||
<div></div> | ||
</div> |
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,65 @@ | ||
<!DOCTYPE html> | ||
<html lang=en> | ||
<meta charset="utf-8"> | ||
<title>CSS Inline test: empty text node</title> | ||
<link rel="author" title="Jonathan Kew" href="mailto:jkew@mozilla.com"> | ||
<link rel="help" title="2.1. Layout of Line Boxes" href="https://drafts.csswg.org/css-inline/#line-boxes"> | ||
<link rel="match" href="empty-text-node-001-ref.html"> | ||
<meta name="assert" content="Empty text node in a line box is treated as zero height."> | ||
<style> | ||
.green { color: green; } | ||
.red { color: red; } | ||
.testContent, .testBefore, .testAfter { | ||
display: inline-block; | ||
} | ||
div div { | ||
width: 50px; | ||
line-height: 30px; | ||
border: 20px solid green; | ||
background-color: red; | ||
margin: 10px; | ||
} | ||
.testBefore div::before { | ||
content: ""; | ||
} | ||
.testAfter div::after { | ||
content: ""; | ||
} | ||
.normal { white-space: normal; } | ||
.nowrap { white-space: nowrap; } | ||
.pre { white-space: pre; } | ||
.prewrap { white-space: pre-wrap; } | ||
.preline { white-space: pre-line; } | ||
.breakspaces { white-space: break-spaces; } | ||
</style> | ||
<p>Test passes if the <span class=green>green</span> boxes have <span class=red>no red</span> in the middle.</p> | ||
|
||
<div class=testContent> | ||
<div class=normal></div> | ||
<div class=nowrap></div> | ||
<div class=pre></div> | ||
<div class=prewrap></div> | ||
<div class=preline></div> | ||
<div class=breakspaces></div> | ||
<script> | ||
[...document.querySelectorAll(".testContent div")].forEach((node, i) => node.appendChild(document.createTextNode(""))); | ||
</script> | ||
</div> | ||
|
||
<div class=testBefore> | ||
<div class=normal></div> | ||
<div class=nowrap></div> | ||
<div class=pre></div> | ||
<div class=prewrap></div> | ||
<div class=preline></div> | ||
<div class=breakspaces></div> | ||
</div> | ||
|
||
<div class=testAfter> | ||
<div class=normal></div> | ||
<div class=nowrap></div> | ||
<div class=pre></div> | ||
<div class=prewrap></div> | ||
<div class=preline></div> | ||
<div class=breakspaces></div> | ||
</div> |