-
Notifications
You must be signed in to change notification settings - Fork 364
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
#396 - Don't use an Area when there is border radii present
because creating such an Area is very very slow. This is a quick fix - we should really never use an Area but this breaks many tests with square borders by a pixel for some reason. With visual regression test for broder radius CSS.
- Loading branch information
Showing
5 changed files
with
61 additions
and
3 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
Binary file added
BIN
+4.77 KB
openhtmltopdf-examples/src/main/resources/visualtest/expected/border-radius.pdf
Binary file not shown.
44 changes: 44 additions & 0 deletions
44
openhtmltopdf-examples/src/main/resources/visualtest/html/border-radius.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,44 @@ | ||
<html> | ||
<head> | ||
<style> | ||
@page { | ||
size: 200px 300px; | ||
margin: 0; | ||
padding: 0; | ||
} | ||
body { | ||
padding: 0; | ||
margin: 0; | ||
} | ||
div { | ||
margin: 10px; | ||
width: 150px; | ||
height: 40px; | ||
background-color: blue; | ||
} | ||
.one { | ||
/* no border */ | ||
border-radius: 10px; | ||
} | ||
.two { | ||
/* with-border */ | ||
border-radius: 8px; | ||
border: 2px solid red; | ||
} | ||
.three { | ||
/* multiple value syntax */ | ||
border-radius: 20px 5px; | ||
} | ||
.four { | ||
/* individual corner */ | ||
border-top-left-radius: 20px 10px; | ||
} | ||
</style> | ||
</head> | ||
<body> | ||
<div class="one"></div> | ||
<div class="two"></div> | ||
<div class="three"></div> | ||
<div class="four"></div> | ||
</body> | ||
</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