Bug 142516

Summary: background: radial-gradient draws circle instead of ellipse.
Product: WebKit Reporter: Osamu Ohashi <oohashi>
Component: WebKitGTKAssignee: Nobody <webkit-unassigned>
Status: RESOLVED DUPLICATE    
Severity: Normal CC: ahmad.saleem792, bugs-noreply, dpino, Hironori.Fujii
Priority: P2    
Version: 528+ (Nightly build)   
Hardware: Unspecified   
OS: Unspecified   
Attachments:
Description Flags
a reproducible HTML file, result image and a patch for fixing
none
Test Case none

Description Osamu Ohashi 2015-03-09 17:11:46 PDT
Created attachment 248293 [details]
a reproducible HTML file, result image and a patch for fixing

background: radial-gradient draws circle instead of ellipse.
It always shows circle on our Linux Cairo Platform. I made a patch. Please review.

I attached a file that has a HTML file, image files and a patch file.
- test.html: reproducible HTML file
- Elliptial_Gridients_issue.png: bug (showed CIRCLE incorrectly)
- Elliptial_Gridients_expected.png: expected result that was on Chrome
- GradientCairo.patch: patch file for fixing.

diff  Source/WebCore/platform/graphics/cairo/GradientCairo.cpp.2.6.5 Source/WebCore/platform/graphics/cairo/GradientCairo.c
pp.2.6.5.fixed
58c58
<         m_gradient = cairo_pattern_create_radial(m_p0.x(), m_p0.y(), m_r0, m_p1.x(), m_p1.y(), m_r1);
---
>         m_gradient = cairo_pattern_create_radial(m_p0.x(), m_p0.y() * m_aspectRatio, m_r0, m_p1.x(), m_p1.y() * m_aspectRatio, m_r1);
82a83,86
>     if (m_radial && m_aspectRatio != 1.0) {
>          cairo_matrix_scale(&matrix, 1.0, 1.0 / m_aspectRatio);
>     }
>
Thanks, Osamu
Comment 1 Ahmad Saleem 2024-01-05 09:29:32 PST
Created attachment 469297 [details]
Test Case

I don't have access to 'Windows' or 'Linux' platform to reproduce but attaching 'testcase' directly. Additionally, I tried to search for code via searchfox.org (wubkat) but couldn't manage to find (might have been rebased or updated).
Comment 2 Diego Pino 2024-01-05 12:14:59 PST

*** This bug has been marked as a duplicate of bug 228771 ***