Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

WebKit export of https://bugs.webkit.org/show_bug.cgi?id=284060 #49535

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
<!DOCTYPE html>
<html>
<head>
<link rel="author" title="Sammy Gill" href="mailto:sammy.gill@apple.com">
<link rel="help" href="https://drafts.csswg.org/css-rhythm/#block-step-size">
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<script src="/resources/check-layout-th.js"></script>
<meta name="assert" content="Checks getComputedStyle for block level replaced margins affected by block-step-size and height of their containers">
<style>
.container {
display: inline flow-root;
width: 100px;
}
.block-step {
display: block;
block-step-size: 100px;
visibility: hidden;
}

iframe {
border: 0;
}

</style>
</head>
<body onload="checkLayout('.test')">

<div class="container test" data-expected-height="100">
<img class="block-step test" src="../../support/60x60-green.png" data-expected-margin-top="20" data-expected-margin-bottom="20"></img>
</div>

<div class="container test" data-expected-height="100">
<canvas width="20" height="20" class="block-step test" data-expected-margin-top="40" data-expected-margin-bottom="40"></canvas>
</div>

<div class="container test" data-expected-height="100">
<svg class="block-step test" viewBox="0 0 100 50" data-expected-margin-top="25" data-expected-margin-bottom="25"></svg>
</div>

<div class="container test" data-expected-height="100">
<embed type="text/xml" width="20" height="20" class="block-step test" data-expected-margin-top="40" data-expected-margin-bottom="40"></embed>
</div>
<div class="container test" data-expected-height="100">
<iframe src="" width="20" height="20" class="block-step test" data-expected-margin-top="40" data-expected-margin-bottom="40"></iframe>
</div>

<div class="container test" data-expected-height="100">
<object width="20" height="20" class="block-step test" data-expected-margin-top="40" data-expected-margin-bottom="40"></object>
</div>

<div class="container test" data-expected-height="100">
<video width="20" height="20" class="block-step test" data-expected-margin-top="40" data-expected-margin-bottom="40"></video>
</div>

</body>
</html>
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
<!DOCTYPE html>
<html>
<head>
<link rel="author" title="Sammy Gill" href="mailto:sammy.gill@apple.com">
<link rel="help" href="https://drafts.csswg.org/css-rhythm/#block-step-size">
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<script src="/resources/check-layout-th.js"></script>
<meta name="assert" content="Check inline level replaced elements are not affected by block-step-size via getComputedStyle">
<style>
.container {
display: inline flow-root;
width: 100px;
font-size: 0px;
}
.block-step {
block-step-size: 100px;
visibility: hidden;
}

iframe {
border: 0;
}

</style>
</head>
<body onload="checkLayout('.test')">

<div class="container test" data-expected-height="60">
<img class="block-step test" src="../../support/60x60-green.png" data-expected-margin-top="0" data-expected-margin-bottom="0"></img>
</div>

<div class="container test" data-expected-height="20">
<canvas width="20" height="20" class="block-step test" data-expected-margin-top="0" data-expected-margin-bottom="0"></canvas>
</div>

<div class="container test" data-expected-height="20">
<svg class="block-step test" viewBox="0 0 100 20" data-expected-margin-top="0" data-expected-margin-bottom="0"></svg>
</div>

<div class="container test" data-expected-height="20">
<embed type="text/xml" width="20" height="20" class="block-step test" data-expected-margin-top="0" data-expected-margin-bottom="0"></embed>
</div>
<div class="container test" data-expected-height="20">
<iframe src="" width="20" height="20" class="block-step test" data-expected-margin-top="0" data-expected-margin-bottom="0"></iframe>
</div>

<div class="container test" data-expected-height="20">
<object width="20" height="20" class="block-step test" data-expected-margin-top="0" data-expected-margin-bottom="0"></object>
</div>

<div class="container test" data-expected-height="20">
<video width="20" height="20" class="block-step test" data-expected-margin-top="0" data-expected-margin-bottom="0"></video>
</div>

</body>
</html>
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
<!DOCTYPE html>
<html>
<head>
<link rel="author" title="Sammy Gill" href="mailto:sammy.gill@apple.com">
<link rel="help" href="https://drafts.csswg.org/css-rhythm/#block-step-size">
<link rel="match" href="../../reference/ref-filled-green-100px-square-only.html">
<meta name="assert" content="Block level canvas is affected by block-step-size">
<style>
.container {
display: flow-root;
width: 100px;
background-color: green;
}
.block-step {
display: block;
block-step-size: 100px;
}
</style>
</head>
<body>
<p>Test passes if there is a filled green square.</p>
<div class="container">
<canvas width="20" height="20" class="block-step"></canvas>
</div>
</body>
</html>
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
<!DOCTYPE html>
<html>
<head>
<link rel="author" title="Sammy Gill" href="mailto:sammy.gill@apple.com">
<link rel="help" href="https://drafts.csswg.org/css-rhythm/#block-step-size">
<link rel="match" href="../../reference/ref-filled-green-100px-square-only.html">
<meta name="assert" content="Block level embed is affected by block-step-size">
<style>
.container {
display: flow-root;
width: 100px;
background-color: green;
}
.block-step {
display: block;
block-step-size: 100px;
}
</style>
</head>
<body>
<p>Test passes if there is a filled green square.</p>
<div class="container">
<embed type="text/xml" width="20" height="20" class="block-step"></embed>
</div>
</body>
</html>
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
<!DOCTYPE html>
<html>
<head>
<link rel="author" title="Sammy Gill" href="mailto:sammy.gill@apple.com">
<link rel="help" href="https://drafts.csswg.org/css-rhythm/#block-step-size">
<link rel="match" href="../../reference/ref-filled-green-100px-square-only.html">
<meta name="assert" content="Block level iframe is affected by block-step-size">
<style>
.container {
display: flow-root;
width: 100px;
background-color: green;
}
.block-step {
display: block;
block-step-size: 100px;
visibility: hidden;
}
</style>
</head>
<body>
<p>Test passes if there is a filled green square.</p>
<div class="container">
<iframe src="" width="20" height="20" class="block-step"></iframe>
</div>
</body>
</html>
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
<!DOCTYPE html>
<html>
<head>
<link rel="author" title="Sammy Gill" href="mailto:sammy.gill@apple.com">
<link rel="help" href="https://drafts.csswg.org/css-rhythm/#block-step-size">
<link rel="match" href="../../reference/ref-filled-green-100px-square-only.html">
<meta name="assert" content="Block level img is affected by block-step-size">
<style>
.container {
display: flow-root;
width: 100px;
background-color: green;
}
.block-step {
block-step-size: 100px;
display: block;
}
</style>
</head>
<body>
<p>Test passes if there is a filled green square.</p>
<div class="container">
<img class="block-step" src="../../support/60x60-green.png"></img>
</div>
</body>
</html>
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
<!DOCTYPE html>
<html>
<head>
<link rel="author" title="Sammy Gill" href="mailto:sammy.gill@apple.com">
<link rel="help" href="https://drafts.csswg.org/css-rhythm/#block-step-size">
<link rel="match" href="../../reference/ref-filled-green-100px-square-only.html">
<meta name="assert" content="Block level object is affected by block-step-size">
<style>
.container {
display: flow-root;
width: 100px;
background-color: green;
}
.block-step {
display: block;
block-step-size: 100px;
}
</style>
</head>
<body>
<p>Test passes if there is a filled green square.</p>
<div class="container">
<object width="20" height="20" class="block-step"></object>
</div>
</body>
</html>
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
<!DOCTYPE html>
<html>
<head>
<link rel="author" title="Sammy Gill" href="mailto:sammy.gill@apple.com">
<link rel="help" href="https://drafts.csswg.org/css-rhythm/#block-step-size">
<link rel="match" href="../../reference/ref-filled-green-100px-square-only.html">
<meta name="assert" content="Block level SVG is affected by block-step-size">
<style>
.container {
display: flow-root;
background-color: green;
width: 100px;
}
.block-step {
display: block;
block-step-size: 100px;
}
</style>
</head>
<body>
<p>Test passes if there is a filled green square.</p>
<div class="container">
<svg class="block-step" viewBox="0 0 100 50"></svg>
</div>
</body>
</html>
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
<!DOCTYPE html>
<html>
<head>
<link rel="author" title="Sammy Gill" href="mailto:sammy.gill@apple.com">
<link rel="help" href="https://drafts.csswg.org/css-rhythm/#block-step-size">
<link rel="match" href="../../reference/ref-filled-green-100px-square-only.html">
<meta name="assert" content="Block level video is affected by block-step-size">
<style>
.container {
display: flow-root;
width: 100px;
background-color: green;
}
.block-step {
display: block;
block-step-size: 100px;
}
</style>
</head>
<body>
<p>Test passes if there is a filled green square.</p>
<div class="container">
<video width="20" height="20" class="block-step"></video>
</div>
</body>
</html>