Permalink
Show file tree
Hide file tree
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Angled gradient backgrounds in body render vertically when body heigh…
…t is 0 https://bugs.webkit.org/show_bug.cgi?id=177232 <rdar://problem/34548230>. Patch by Zamiul Haque <zhaque@apple.com> on 2018-09-28 Reviewed by Tim Horton. Source/WebCore: Specifically, gradients displayed at an angle (ie. 45 degrees) are rendered as if they are vertical when the body tag containing the gradient has a height of 0. Other browsers do not render under these circumstances, so WebKit was modified to follow in suit. The problem was due to layout sizes for fill tiles being calculated with a minimum height of 1px. A simple change of the minimum height and width to 0px was enough to bring about the desired behavior. Tests: angled-background-repeating-gradient-rendering-vertical.html * rendering/RenderBoxModelObject.cpp: (WebCore::RenderBoxModelObject::calculateFillTileSize const): LayoutTests: Added tests to make sure that angled background gradients inside of a body tag of height 0 render as empty white screens. * angled-background-repeating-gradient-rendering-vertical.html: Added. * angled-background-repeating-gradient-rendering-vertical-expected.html: Added. Canonical link: https://commits.webkit.org/205066@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@236636 268f45cc-cd09-0410-ab3c-d52691b4dbfc
- Loading branch information
1 parent
7853534
commit 98d33c360020721a5445bb369e691665c0b302a7
Showing
5 changed files
with
57 additions
and
4 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
<!DOCTYPE html> | ||
<html> | ||
<body></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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
<!DOCTYPE html> | ||
<html> | ||
<head> | ||
<style> | ||
body { | ||
margin: 0; | ||
background: repeating-linear-gradient(45deg, white, white 100px, black 100px, black 200px); | ||
} | ||
</style> | ||
</head> | ||
<body></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
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