forked from servo/servo
-
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.
Fix
stretch
sizes on replaced abspos (servo#34430)
We were sizing absolutely positioned replaced elements within their actual containing block instead of the inset-modified containing block. Then the `stretch` keyword would result in a wrong size. Signed-off-by: Oriol Brufau <[email protected]>
- Loading branch information
1 parent
54761b4
commit 5201c84
Showing
5 changed files
with
189 additions
and
120 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
2 changes: 0 additions & 2 deletions
2
tests/wpt/meta/css/css-sizing/stretch/positioned-replaced-1.html.ini
This file was deleted.
Oops, something went wrong.
18 changes: 18 additions & 0 deletions
18
tests/wpt/tests/css/css-sizing/stretch/positioned-replaced-2.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,18 @@ | ||
<!DOCTYPE html> | ||
<link rel="author" title="Oriol Brufau" href="mailto:[email protected]"> | ||
<link rel="match" href="../../reference/ref-filled-green-100px-square-only.html"> | ||
<link rel="help" href="https://github.com/servo/servo/pull/34430"> | ||
<p>Test passes if there is a filled green square.</p> | ||
<style> | ||
canvas { | ||
position: absolute; | ||
background: green; | ||
width: stretch; | ||
height: stretch; | ||
top: 50px; | ||
left: 50px; | ||
} | ||
</style> | ||
<div style="display: flow-root; position: relative; width: 150px; height: 150px; margin-top: -50px; margin-left: -50px;"> | ||
<canvas width="50" height="25"></canvas> | ||
</div> |
17 changes: 17 additions & 0 deletions
17
tests/wpt/tests/css/css-sizing/stretch/positioned-replaced-3.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,17 @@ | ||
<!DOCTYPE html> | ||
<link rel="author" title="Oriol Brufau" href="mailto:[email protected]"> | ||
<link rel="match" href="../../reference/ref-filled-green-100px-square-only.html"> | ||
<link rel="help" href="https://github.com/servo/servo/pull/34430"> | ||
<p>Test passes if there is a filled green square.</p> | ||
<style> | ||
canvas { | ||
position: absolute; | ||
background: green; | ||
width: stretch; | ||
height: stretch; | ||
inset: 50px; | ||
} | ||
</style> | ||
<div style="display: flow-root; position: relative; width: 200px; height: 200px; margin-top: -50px; margin-left: -50px;"> | ||
<canvas width="50" height="25"></canvas> | ||
</div> |