forked from web-platform-tests/wpt
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add printing WPT test for fixedpos and variable page size.
Fixed-positioned elements are positioned within the initial containing block, which, for pagination, is defined as the page area size of the first page. Even if the first page isn't large enough for the fixed-positioned element, subsequent pages may be large enough. This test passes in Blink. Change-Id: I49fdc8d735a126ff928e6098c733e9fe053f80fe Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5499460 Reviewed-by: Ian Kilpatrick <[email protected]> Commit-Queue: Morten Stenshorne <[email protected]> Cr-Commit-Position: refs/heads/main@{#1294362}
- Loading branch information
1 parent
873ff0c
commit 9753aaa
Showing
2 changed files
with
53 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,28 @@ | ||
<!DOCTYPE html> | ||
<link rel="author" title="Morten Stenshorne" href="mailto:[email protected]"> | ||
<style> | ||
@page { | ||
size: 400px; | ||
margin: 0; | ||
} | ||
@page large { | ||
size: 500px 400px; | ||
} | ||
body { | ||
margin: 0; | ||
} | ||
</style> | ||
This page should <em>not</em> have a blue box. | ||
<div style="page:large;"> | ||
<div style="float:right; margin-top:300px; width:100px; height:100px; background:blue;"></div> | ||
<div style="width:400px;"> | ||
This page should have a blue box in the bottom right corner. | ||
</div> | ||
<div style="break-before:page;"> | ||
<div style="float:right; margin-top:300px; width:100px; height:100px; background:blue;"></div> | ||
<div style="width:400px;"> | ||
This page should have a blue box in the bottom right corner. | ||
</div> | ||
</div> | ||
</div> | ||
This page should <em>not</em> have a blue box. |
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,25 @@ | ||
<!DOCTYPE html> | ||
<link rel="author" title="Morten Stenshorne" href="mailto:[email protected]"> | ||
<link rel="help" href="https://drafts.csswg.org/css-position-3/#valdef-position-fixed"> | ||
<link rel="match" href="fixedpos-010-print-ref.html"> | ||
<style> | ||
@page { | ||
size: 400px; | ||
margin: 0; | ||
} | ||
@page large { | ||
size: 500px 400px; | ||
} | ||
body { | ||
margin: 0; | ||
} | ||
</style> | ||
<div style="position:fixed; right:-100px; bottom:0; width:100px; height:100px; background:blue;"></div> | ||
This page should <em>not</em> have a blue box. | ||
<div style="page:large; width:400px;"> | ||
This page should have a blue box in the bottom right corner. | ||
<div style="break-before:page;"> | ||
This page should have a blue box in the bottom right corner. | ||
</div> | ||
</div> | ||
This page should <em>not</em> have a blue box. |