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.
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 <firstname.lastname@example.org> 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
Showing 5 changed files with 57 additions and 4 deletions.