-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[layout] Stretch semi-replaced elements when OOF in inline direction.
As per: w3c/csswg-drafts#6789 Removes the tests which were previously testing the shrink-to-fit behaviour, and adds new tests for the stretch behaviour (on more elements). Bug: 1274898 Change-Id: I5c40a4b88fe06d7ef79113a66ef3976375d026eb Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3272378 Commit-Queue: Ian Kilpatrick <[email protected]> Reviewed-by: Morten Stenshorne <[email protected]> Cr-Commit-Position: refs/heads/main@{#946530} NOKEYCHECK=True GitOrigin-RevId: da65a23485a8a1abedd0fff0f390238fdd56258b
- Loading branch information
1 parent
b56b313
commit 3f6e59a
Showing
14 changed files
with
203 additions
and
315 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
10 changes: 0 additions & 10 deletions
10
blink/web_tests/external/wpt/css/css-position/position-absolute-center-005.html
This file was deleted.
Oops, something went wrong.
23 changes: 23 additions & 0 deletions
23
...sts/external/wpt/css/css-position/position-absolute-semi-replaced-stretch-button-ref.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,23 @@ | ||
<!DOCTYPE html> | ||
<style> | ||
.cb { | ||
position: relative; | ||
border: 3px solid black; | ||
height: 100px; | ||
width: 150px; | ||
display: inline-block; | ||
vertical-align: top; | ||
margin: 5px; | ||
} | ||
.abs { | ||
margin: 0; | ||
position: absolute; | ||
box-sizing: border-box; | ||
top: 3px; | ||
left: 3px; | ||
outline: 2px solid lime; | ||
width: calc(100% - 6px); | ||
height: calc(100% - 6px); | ||
} | ||
</style> | ||
<div class="cb"><button class="abs">button</button></div> |
28 changes: 28 additions & 0 deletions
28
...b_tests/external/wpt/css/css-position/position-absolute-semi-replaced-stretch-button.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,28 @@ | ||
<!DOCTYPE html> | ||
<link rel="help" href="https://github.com/w3c/csswg-drafts/issues/6789"> | ||
<link rel="match" href="position-absolute-semi-replaced-stretch-button-ref.html"> | ||
<title>Semi-replaced elements should stretch with an auto main size, and explicit insets in that direction.</title> | ||
<style> | ||
.cb { | ||
position: relative; | ||
border: 3px solid black; | ||
height: 100px; | ||
width: 150px; | ||
display: inline-block; | ||
vertical-align: top; | ||
margin: 5px; | ||
} | ||
.abs { | ||
margin: 0; | ||
position: absolute; | ||
box-sizing: border-box; | ||
top: 3px; | ||
right: 3px; | ||
bottom: 3px; | ||
left: 3px; | ||
outline: 2px solid lime; | ||
width: auto; | ||
height: auto; | ||
} | ||
</style> | ||
<div class="cb"><button class="abs">button</button></div> |
34 changes: 34 additions & 0 deletions
34
...ests/external/wpt/css/css-position/position-absolute-semi-replaced-stretch-input-ref.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,34 @@ | ||
<!DOCTYPE html> | ||
<style> | ||
.cb { | ||
position: relative; | ||
border: 3px solid black; | ||
height: 100px; | ||
width: 150px; | ||
display: inline-block; | ||
vertical-align: top; | ||
margin: 5px; | ||
} | ||
.wide { | ||
width: 350px; | ||
} | ||
.abs { | ||
margin: 0; | ||
position: absolute; | ||
box-sizing: border-box; | ||
top: 3px; | ||
left: 3px; | ||
outline: 2px solid lime; | ||
width: calc(100% - 6px); | ||
height: calc(100% - 6px); | ||
} | ||
</style> | ||
<div class="cb"><input type="button" class="abs" value="input-btn"></div> | ||
<div class="cb"><input type="submit" class="abs"></div> | ||
<div class="cb"><input type="reset" class="abs"></div> | ||
<div class="cb"><input type="color" class="abs"></div> | ||
<div class="cb wide"><input type="text" class="abs" value="text"></div> | ||
<div class="cb wide"><input type="password" class="abs" value="pass"></div> | ||
<div class="cb wide"><input type="date" class="abs" value="text"></div> | ||
<div class="cb wide"><input type="file" class="abs"></div> | ||
<div class="cb wide"><input type="range" class="abs"></div> |
42 changes: 42 additions & 0 deletions
42
...eb_tests/external/wpt/css/css-position/position-absolute-semi-replaced-stretch-input.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,42 @@ | ||
<!DOCTYPE html> | ||
<link rel="help" href="https://github.com/w3c/csswg-drafts/issues/6789"> | ||
<link rel="match" href="position-absolute-semi-replaced-stretch-input-ref.html"> | ||
<title>Semi-replaced elements should stretch with an auto main size, and explicit insets in that direction.</title> | ||
<style> | ||
.cb { | ||
position: relative; | ||
border: 3px solid black; | ||
height: 100px; | ||
width: 150px; | ||
display: inline-block; | ||
vertical-align: top; | ||
margin: 5px; | ||
} | ||
.wide { | ||
/* Some of the form controls are wider than others | ||
and need a wider CB in order to see if they're | ||
stretching or shrinking. */ | ||
width: 350px; | ||
} | ||
.abs { | ||
margin: 0; | ||
position: absolute; | ||
box-sizing: border-box; | ||
top: 3px; | ||
right: 3px; | ||
bottom: 3px; | ||
left: 3px; | ||
outline: 2px solid lime; | ||
width: auto; | ||
height: auto; | ||
} | ||
</style> | ||
<div class="cb"><input type="button" class="abs" value="input-btn"></div> | ||
<div class="cb"><input type="submit" class="abs"></div> | ||
<div class="cb"><input type="reset" class="abs"></div> | ||
<div class="cb"><input type="color" class="abs"></div> | ||
<div class="cb wide"><input type="text" class="abs" value="text"></div> | ||
<div class="cb wide"><input type="password" class="abs" value="pass"></div> | ||
<div class="cb wide"><input type="date" class="abs" value="text"></div> | ||
<div class="cb wide"><input type="file" class="abs"></div> | ||
<div class="cb wide"><input type="range" class="abs"></div> |
32 changes: 32 additions & 0 deletions
32
...ests/external/wpt/css/css-position/position-absolute-semi-replaced-stretch-other-ref.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,32 @@ | ||
<!DOCTYPE html> | ||
<style> | ||
.cb { | ||
position: relative; | ||
border: 3px solid black; | ||
height: 100px; | ||
width: 150px; | ||
display: inline-block; | ||
vertical-align: top; | ||
margin: 5px; | ||
} | ||
.wide { | ||
width: 350px; | ||
} | ||
.abs { | ||
margin: 0; | ||
position: absolute; | ||
box-sizing: border-box; | ||
top: 3px; | ||
left: 3px; | ||
outline: 2px solid lime; | ||
width: calc(100% - 6px); | ||
height: calc(100% - 6px); | ||
} | ||
</style> | ||
<div class="cb"><select class="abs"><option>select</option></select></div> | ||
<div class="cb"><output class="abs">output</output></div> | ||
<div class="cb"><label class="abs">label</output></div> | ||
<div class="cb"><fieldset class="abs">fieldset</fieldset></div> | ||
<div class="cb wide"><textarea class="abs">textarea</textarea></div> | ||
<div class="cb wide"><progress value="0.4" class="abs"></div> | ||
<div class="cb wide"><meter value="0.4" class="abs"></div> |
40 changes: 40 additions & 0 deletions
40
...eb_tests/external/wpt/css/css-position/position-absolute-semi-replaced-stretch-other.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,40 @@ | ||
<!DOCTYPE html> | ||
<link rel="help" href="https://github.com/w3c/csswg-drafts/issues/6789"> | ||
<link rel="match" href="position-absolute-semi-replaced-stretch-other-ref.html"> | ||
<title>Semi-replaced elements should stretch with an auto main size, and explicit insets in that direction.</title> | ||
<style> | ||
.cb { | ||
position: relative; | ||
border: 3px solid black; | ||
height: 100px; | ||
width: 150px; | ||
display: inline-block; | ||
vertical-align: top; | ||
margin: 5px; | ||
} | ||
.wide { | ||
/* Some of the form controls are wider than others | ||
and need a wider CB in order to see if they're | ||
stretching or shrinking. */ | ||
width: 350px; | ||
} | ||
.abs { | ||
margin: 0; | ||
position: absolute; | ||
box-sizing: border-box; | ||
top: 3px; | ||
right: 3px; | ||
bottom: 3px; | ||
left: 3px; | ||
outline: 2px solid lime; | ||
width: auto; | ||
height: auto; | ||
} | ||
</style> | ||
<div class="cb"><select class="abs"><option>select</option></select></div> | ||
<div class="cb"><output class="abs">output</output></div> | ||
<div class="cb"><label class="abs">label</output></div> | ||
<div class="cb"><fieldset class="abs">fieldset</fieldset></div> | ||
<div class="cb wide"><textarea class="abs">textarea</textarea></div> | ||
<div class="cb wide"><progress value="0.4" class="abs"></div> | ||
<div class="cb wide"><meter value="0.4" class="abs"></div> |
31 changes: 0 additions & 31 deletions
31
blink/web_tests/external/wpt/html/rendering/widgets/button-layout/abspos.html
This file was deleted.
Oops, something went wrong.
68 changes: 0 additions & 68 deletions
68
...eplaced/absolute-position-auto-width-and-left-and-right-and-intrinsic-width-expected.html
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.