-
Notifications
You must be signed in to change notification settings - Fork 361
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
#303 - Correction for problem background coverage when using collapse…
…d table borders. We were using a generic border bounds function to determine the clipping area for background painting. This did not take into account collapsed borders. We now use the collapsed border bounds, when available. Includes tests for collapsed and separated table cell borders.
- Loading branch information
Showing
6 changed files
with
92 additions
and
1 deletion.
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
Binary file added
BIN
+1.04 KB
openhtmltopdf-examples/src/main/resources/visualtest/expected/table-cell-borders-2.pdf
Binary file not shown.
Binary file added
BIN
+1.54 KB
openhtmltopdf-examples/src/main/resources/visualtest/expected/table-cell-borders.pdf
Binary file not shown.
34 changes: 34 additions & 0 deletions
34
openhtmltopdf-examples/src/main/resources/visualtest/html/table-cell-borders-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,34 @@ | ||
<html> | ||
<head> | ||
<style> | ||
@page { | ||
size: 250px 50px; | ||
margin: 0; | ||
} | ||
body { | ||
margin: 0; | ||
} | ||
td { | ||
min-width: 100px; | ||
padding: 0; | ||
background-color: blue; | ||
min-height: 20px; | ||
} | ||
.left { | ||
border-right: 10px solid pink; | ||
} | ||
.right { | ||
border-left: 10px solid orange; | ||
} | ||
</style> | ||
</head> | ||
<body> | ||
<div style="background-color: red;"> | ||
<table style=""> | ||
<tr> | ||
<td class="left"></td><td class="right"></td> | ||
</tr> | ||
</table> | ||
</div> | ||
</body> | ||
</html> |
38 changes: 38 additions & 0 deletions
38
openhtmltopdf-examples/src/main/resources/visualtest/html/table-cell-borders.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,38 @@ | ||
<html> | ||
<head> | ||
<style> | ||
@page { | ||
size: 250px 50px; | ||
margin: 0; | ||
} | ||
body { | ||
margin: 0; | ||
} | ||
td { | ||
min-width: 100px; | ||
padding: 0; | ||
background-color: blue; | ||
min-height: 20px; | ||
} | ||
.left { | ||
border-right: 10px solid pink; | ||
} | ||
.right { | ||
border-left: 10px solid orange; | ||
} | ||
</style> | ||
</head> | ||
<body> | ||
<!-- Measuring stick --> | ||
<div style="display: inline-block; width: 100px; background-color: green; min-height: 20px; margin: 0; padding: 0;"></div><div style="display: inline-block; width: 10px; background-color: black; min-height: 20px; margin: 0; padding: 0;"></div><div style="display: inline-block; width: 100px; background-color: gray; min-height: 20px; margin: 0; padding: 0;"></div> | ||
<br/> | ||
|
||
<div style="background-color: red;"> | ||
<table style="border-collapse: collapse;"> | ||
<tr> | ||
<td class="left"></td><td class="right"></td> | ||
</tr> | ||
</table> | ||
</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