Changeset 79129 in webkit
- Timestamp:
- Feb 19, 2011 12:28:47 PM (13 years ago)
- Location:
- trunk
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/LayoutTests/ChangeLog
r79125 r79129 1 2011-02-19 Zan Dobersek <zandobersek@gmail.com> 2 3 Reviewed by Martin Robinson. 4 5 [cairo][canvas] Drawing from/into float rectangles with width or height in range 0 to 1 fails 6 https://bugs.webkit.org/show_bug.cgi?id=54491 7 8 Enable another passing test after fixing float values rounding. 9 10 * platform/gtk/Skipped: 11 1 12 2011-02-19 Alejandro G. Castro <alex@igalia.com> 2 13 -
trunk/LayoutTests/platform/gtk/Skipped
r79125 r79129 1020 1020 # These tests are failing for us, but not for Mac. This likely 1021 1021 # indicates platform specific problems. 1022 canvas/philip/tests/2d.drawImage.floatsource.html1023 1022 canvas/philip/tests/2d.drawImage.self.2.html 1024 1023 canvas/philip/tests/2d.path.arc.selfintersect.1.html -
trunk/Source/WebCore/ChangeLog
r79128 r79129 1 2011-02-19 Zan Dobersek <zandobersek@gmail.com> 2 3 Reviewed by Martin Robinson. 4 5 [cairo][canvas] Drawing from/into float rectangles with width or height in range 0 to 1 fails 6 https://bugs.webkit.org/show_bug.cgi?id=54491 7 8 When width or height in float rectangle are in range (0, 0.5) or (-0.5, 0) 9 and would round to 0, alter the behaviour to ensure that width or height are 10 at least 1 pixel in size in these cases. 11 12 * platform/graphics/cairo/GraphicsContextCairo.cpp: 13 (WebCore::GraphicsContext::roundToDevicePixels): 14 1 15 2011-02-19 Dan Bernstein <mitz@apple.com> 2 16 -
trunk/Source/WebCore/platform/graphics/cairo/GraphicsContextCairo.cpp
r78846 r79129 39 39 #include "CairoUtilities.h" 40 40 #include "ContextShadow.h" 41 #include "FloatConversion.h" 41 42 #include "FloatRect.h" 42 43 #include "Font.h" … … 757 758 y = round(y); 758 759 cairo_device_to_user(cr, &x, &y); 759 result.setX(static_cast<float>(x)); 760 result.setY(static_cast<float>(y)); 761 x = frect.width(); 762 y = frect.height(); 763 cairo_user_to_device_distance(cr, &x, &y); 764 x = round(x); 765 y = round(y); 766 cairo_device_to_user_distance(cr, &x, &y); 767 result.setWidth(static_cast<float>(x)); 768 result.setHeight(static_cast<float>(y)); 760 result.setX(narrowPrecisionToFloat(x)); 761 result.setY(narrowPrecisionToFloat(y)); 762 763 // We must ensure width and height are at least 1 (or -1) when 764 // we're given float values in the range between 0 and 1 (or -1 and 0). 765 double width = frect.width(); 766 double height = frect.height(); 767 cairo_user_to_device_distance(cr, &width, &height); 768 if (width > -1 && width < 0) 769 width = -1; 770 else if (width > 0 && width < 1) 771 width = 1; 772 else 773 width = round(width); 774 if (height > -1 && width < 0) 775 height = -1; 776 else if (height > 0 && height < 1) 777 height = 1; 778 else 779 height = round(height); 780 cairo_device_to_user_distance(cr, &width, &height); 781 result.setWidth(narrowPrecisionToFloat(width)); 782 result.setHeight(narrowPrecisionToFloat(height)); 783 769 784 return result; 770 785 }
Note: See TracChangeset
for help on using the changeset viewer.