File: scrollable-overflow-padding-inline.html

package info (click to toggle)
thunderbird 1%3A140.4.0esr-1~deb13u1
  • links: PTS, VCS
  • area: main
  • in suites: trixie-proposed-updates
  • size: 4,609,412 kB
  • sloc: cpp: 7,672,442; javascript: 5,901,613; ansic: 3,898,954; python: 1,413,343; xml: 653,997; asm: 462,286; java: 180,927; sh: 113,489; makefile: 20,460; perl: 14,288; objc: 13,059; yacc: 4,583; pascal: 3,352; lex: 1,720; ruby: 1,222; exp: 762; sql: 715; awk: 580; php: 436; lisp: 430; sed: 70; csh: 10
file content (57 lines) | stat: -rw-r--r-- 2,195 bytes parent folder | download | duplicates (10)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
<!DOCTYPE html>
<title>CSS Overflow Test: Ensure that padding inflation for inline elements are carried out as part of containing line box's bounds.</title>
<link rel="author" title="David Shin" href="mailto:dshin@mozilla.com">
<link rel="help" href="https://drafts.csswg.org/css-overflow-3/#scrollable">
<link rel="help" href="https://bugzilla.mozilla.org/show_bug.cgi?id=1934960">
<link rel="stylesheet" href="/fonts/ahem.css">
<meta name="viewport" content="width=device-width,initial-scale=1">
<style>
.scroller {
  width: 100px;
  height: 100px;
  font: 10px/1 Ahem;
  padding: 10px;
  overflow: scroll;
}
.filler {
  width: 1px;
  height: 100px;
  background: purple;
}
</style>
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<script src="/resources/check-layout-th.js"></script>
<body onload="checkLayout('.scroller')">
<!-- Block-end is padding-inflated from the last line,
even if it only consists of inline elements -->
<div class="scroller" data-expected-scroll-height="130">
  <div class="filler"></div>
  <span>X</span>
</div>
<!-- Inline element's margin should not add to scrollable overflow,
just like how it does not affect the next line's positioning -->
<div class="scroller" data-expected-scroll-height="130">
  <div class="filler"></div>
  <span style="margin-bottom: 100px;">X</span>
</div>
<!-- Line bound is padding-inflated, but not its overflow. -->
<div class="scroller" data-expected-scroll-height="120" style="line-height: 0;">
  <div class="filler"></div>
  <span>X</span>
</div>
<div class="scroller" data-expected-scroll-height="125" style="line-height: 5px;">
  <div class="filler"></div>
  <span>X</span>
</div>
<!-- Ruby element, despite being `display: ruby`, behaves as if inline -->
<div class="scroller" data-expected-scroll-height="120" style="line-height: 0;">
  <div class="filler"></div>
  <ruby>X</ruby>
</div>
<!-- Inline replaced elements still trigger padding-inflation -->
<div class="scroller" data-expected-scroll-height="280" style="line-height: 0px;">
  <div class="filler"></div>
  <img src="../css-images/support/60x60-green.png" style="margin-bottom: 100px;"></img>
</div>
</body>