Changeset 40869 in webkit
- Timestamp:
- Feb 11, 2009 2:00:55 PM (15 years ago)
- Location:
- trunk/WebCore
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/WebCore/ChangeLog
r40868 r40869 1 2009-02-11 Scott Violet <sky@google.com> 2 3 Reviewed by Eric Seidel. 4 5 https://bugs.webkit.org/show_bug.cgi?id=23882 6 GraphicsContextSkia draws round rects as solid rects 7 8 Fixes two bugs in Skia's GraphicsContext::fillRoundedRect: 9 . fillRoundedRect had an extra call to fillRect, resulting in always 10 drawing a solid rectangle. 11 . if the total radius along a given axis is greater than the size of 12 the axis to draw, a solid rect should be drawn. 13 14 The layout tests LayoutTests/fast/css/shadow-multiple.html and 15 LayoutTests/fast/box-shadow/basic-shadows.html cover this. 16 17 * platform/graphics/skia/GraphicsContextSkia.cpp: 18 (WebCore::GraphicsContext::fillRoundedRect): 19 1 20 2009-02-11 Julien Chaffraix <jchaffraix@webkit.org> 2 21 -
trunk/WebCore/platform/graphics/skia/GraphicsContextSkia.cpp
r40809 r40869 778 778 ClipRectToCanvas(*platformContext()->canvas(), r, &r); 779 779 780 if (topLeft.width() + topRight.width() > rect.width() 781 || bottomLeft.width() + bottomRight.width() > rect.width() 782 || topLeft.height() + bottomLeft.height() > rect.height() 783 || topRight.height() + bottomRight.height() > rect.height()) { 784 // Not all the radii fit, return a rect. This matches the behavior of 785 // Path::createRoundedRectangle. Without this we attempt to draw a round 786 // shadow for a square box. 787 fillRect(rect, color); 788 return; 789 } 790 780 791 SkPath path; 781 792 addCornerArc(&path, r, topRight, 270); … … 787 798 platformContext()->setupPaintForFilling(&paint); 788 799 platformContext()->canvas()->drawPath(path, paint); 789 return fillRect(rect, color);790 800 } 791 801
Note: See TracChangeset
for help on using the changeset viewer.