-
-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
LibWeb: Draw floating replaced elements more correctly
Previously floating replaced elements were drawn incorrectly and also twice.
- Loading branch information
1 parent
0cfe90b
commit e00a14b
Showing
3 changed files
with
73 additions
and
2 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
27 changes: 27 additions & 0 deletions
27
Tests/LibWeb/Ref/expected/render-order-floating-replaced-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,27 @@ | ||
<!DOCTYPE html> | ||
<html> | ||
<head> | ||
<style> | ||
.row > div { | ||
height: 64px; | ||
float: left; | ||
} | ||
|
||
.row { clear: both; } | ||
.row > :nth-child(1) { width: 32px; } | ||
.row > :nth-child(2) { width: 64px; } | ||
.red { background-color: red; } | ||
.green { background-color: green; } | ||
</style> | ||
</head> | ||
<body> | ||
<div class="row"> | ||
<div class="red"></div> | ||
<div class="green"></div> | ||
</div> | ||
<div class="row"> | ||
<div class="green"></div> | ||
<div class="red"></div> | ||
</div> | ||
</body> | ||
</html> |
31 changes: 31 additions & 0 deletions
31
Tests/LibWeb/Ref/input/render-order-floating-replaced.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,31 @@ | ||
<!DOCTYPE html> | ||
<html> | ||
<head> | ||
<link rel="match" href="../expected/render-order-floating-replaced-ref.html" /> | ||
<style> | ||
.square { | ||
width: 64px; | ||
height: 64px; | ||
float: left; | ||
} | ||
|
||
div.square { | ||
background: green; | ||
display: inline-block; | ||
} | ||
|
||
.row { clear: both; } | ||
.row > :nth-child(2) { margin-left: -32px; } | ||
</style> | ||
</head> | ||
<body> | ||
<div class="row"> | ||
<img class="square" src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAIAAACQd1PeAAAADElEQVQI12P4z8AAAAMBAQAY3Y2wAAAAAElFTkSuQmCC" /> | ||
<div class="square"></div> | ||
</div> | ||
<div class="row"> | ||
<div class="square"></div> | ||
<img class="square" src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAIAAACQd1PeAAAADElEQVQI12P4z8AAAAMBAQAY3Y2wAAAAAElFTkSuQmCC" /> | ||
</div> | ||
</body> | ||
</html> |