Changeset 60911 in webkit
- Timestamp:
- Jun 9, 2010 2:02:47 PM (14 years ago)
- Location:
- trunk
- Files:
-
- 6 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/LayoutTests/ChangeLog
r60902 r60911 1 2010-06-09 Enrico Ros <eros@codeaurora.org> 2 3 Reviewed by Ariya Hidayat. 4 5 Fixed zero-sized gradients on canvas. 6 https://bugs.webkit.org/show_bug.cgi?id=40340 7 8 * platform/mac/Skipped: Unskip the test that is passing now. 9 * platform/qt/Skipped: Unskip the test that is passing now. 10 1 11 2010-06-09 Kenneth Russell <kbr@google.com> 2 12 -
trunk/LayoutTests/platform/mac/Skipped
r60822 r60911 213 213 canvas/philip/tests/2d.fillStyle.parse.rgb-clamp-5.html 214 214 canvas/philip/tests/2d.fillStyle.parse.system.html 215 canvas/philip/tests/2d.gradient.interpolate.zerosize.html216 215 canvas/philip/tests/2d.gradient.radial.cone.front.html 217 216 canvas/philip/tests/2d.gradient.radial.cone.top.html -
trunk/LayoutTests/platform/qt/Skipped
r60890 r60911 5286 5286 canvas/philip/tests/2d.fillStyle.parse.system.html 5287 5287 canvas/philip/tests/2d.gradient.interpolate.colouralpha.html 5288 canvas/philip/tests/2d.gradient.interpolate.zerosize.html5289 5288 canvas/philip/tests/2d.gradient.radial.cone.behind.html 5290 5289 canvas/philip/tests/2d.gradient.radial.cone.beside.html -
trunk/WebCore/ChangeLog
r60909 r60911 1 2010-06-09 Enrico Ros <eros@codeaurora.org> 2 3 Reviewed by Ariya Hidayat. 4 5 Fix drawing zero-sized gradients on Canvas. 6 https://bugs.webkit.org/show_bug.cgi?id=40340 7 8 HTML5 draft says that nothing must be painted if the gradient start 9 point equals the stop point. 10 11 This commit fixes the following canvas test: 12 http://philip.html5.org/tests/canvas/suite/tests/2d.gradient.interpolate.zerosize.html 13 14 * html/canvas/CanvasRenderingContext2D.cpp: 15 (WebCore::CanvasRenderingContext2D::fillRect): skip zero-sized linear gradients 16 * platform/graphics/Gradient.h: 17 (WebCore::Gradient::isRadial): made public 18 (WebCore::Gradient::isZeroSize): true if start == stop 19 1 20 2010-06-09 Leandro Pereira <leandro@profusion.mobi> 2 21 -
trunk/WebCore/html/canvas/CanvasRenderingContext2D.cpp
r60731 r60911 754 754 return; 755 755 756 // from the HTML5 Canvas spec: 757 // If x0 = x1 and y0 = y1, then the linear gradient must paint nothing 758 Gradient* gradient = c->fillGradient(); 759 if (gradient && gradient->isZeroSize() && !gradient->isRadial()) 760 return; 761 756 762 FloatRect rect(x, y, width, height); 757 763 willDraw(rect); -
trunk/WebCore/platform/graphics/Gradient.h
r58212 r60911 89 89 void getColor(float value, float* r, float* g, float* b, float* a) const; 90 90 91 bool isRadial() const { return m_radial; } 92 bool isZeroSize() const { return m_p0.x() == m_p1.x() && m_p0.y() == m_p1.y(); } 93 91 94 #if OS(WINCE) && !PLATFORM(QT) 92 95 const FloatPoint& p0() const { return m_p0; } … … 94 97 float r0() const { return m_r0; } 95 98 float r1() const { return m_r1; } 96 bool isRadial() const { return m_radial; }97 99 const Vector<ColorStop>& getStops() const; 98 100 #else
Note: See TracChangeset
for help on using the changeset viewer.