Bug 44392

Summary: [Qt] Gradient: Support inner radius larger than outer radius
Product: WebKit Reporter: Andreas Kling <kling>
Component: Layout and RenderingAssignee: QtWebKit Unassigned <webkit-qt-unassigned>
Status: RESOLVED FIXED    
Severity: Normal Keywords: HTML5, Qt, QtTriaged
Priority: P2    
Version: 528+ (Nightly build)   
Hardware: All   
OS: All   
Attachments:
Description Flags
Proposed patch
none
Proposed patch v2 ariya.hidayat: review+

Andreas Kling
Reported 2010-08-21 22:09:08 PDT
We should reverse the gradient if the inner radius is larger than the outer one. This is relevant both for CSS and the CanvasGradient API. Example pages with apparent missing support: - http://www.kaleidoscopeapp.com/ - http://graphicpeel.com/cssiosicons Fixing this will also cause us to pass the following tests: - canvas/philip/tests/2d.gradient.radial.outside2.html - canvas/philip/tests/2d.gradient.radial.outside3.html
Attachments
Proposed patch (3.60 KB, patch)
2010-08-21 22:14 PDT, Andreas Kling
no flags
Proposed patch v2 (3.68 KB, patch)
2010-08-22 00:07 PDT, Andreas Kling
ariya.hidayat: review+
Andreas Kling
Comment 1 2010-08-21 22:14:57 PDT
Created attachment 65047 [details] Proposed patch
Andreas Kling
Comment 2 2010-08-22 00:07:58 PDT
Created attachment 65049 [details] Proposed patch v2 Updated patch addressing comments from Ariya on IRC.
Ariya Hidayat
Comment 3 2010-08-22 00:15:10 PDT
Comment on attachment 65049 [details] Proposed patch v2 LGTM.re=me. Minor issue: WebCore/platform/graphics/qt/GradientQt.cpp:76 + if (m_radial && !qFuzzyCompare(outerRadius, qreal(0))) { Should be qFuzzyCompare(1 + outerRadius, qreal(1)).
Andreas Kling
Comment 4 2010-08-22 01:39:32 PDT
Note You need to log in before you can comment on or make changes to this bug.