Changeset 172797 in webkit
- Timestamp:
- Aug 20, 2014 7:44:56 AM (10 years ago)
- Location:
- trunk
- Files:
-
- 32 added
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/LayoutTests/ChangeLog
r172796 r172797 1 2014-08-20 Zalan Bujtas <zalan@apple.com> 2 3 Dashed/dotted borders do not paint. 4 https://bugs.webkit.org/show_bug.cgi?id=135898 5 6 Reviewed by Simon Fraser. 7 8 *-at-all files test that we always paint borders. 9 The other set of files test that borders are painted properly. They take 10 advantage of the fact that borders with radius use a different painting code path. 11 12 * TestExpectations: 13 * fast/borders/border-painting-dashed-at-all-expected.html: Added. 14 * fast/borders/border-painting-dashed-at-all.html: Added. 15 * fast/borders/border-painting-dashed-expected.html: Added. 16 * fast/borders/border-painting-dashed.html: Added. 17 * fast/borders/border-painting-dotted-at-all-expected.html: Added. 18 * fast/borders/border-painting-dotted-at-all.html: Added. 19 * fast/borders/border-painting-dotted-expected.html: Added. 20 * fast/borders/border-painting-dotted.html: Added. 21 * fast/borders/border-painting-double-at-all-expected.html: Added. 22 * fast/borders/border-painting-double-at-all.html: Added. 23 * fast/borders/border-painting-double-expected.html: Added. 24 * fast/borders/border-painting-double.html: Added. 25 * fast/borders/border-painting-groove-at-all-expected.html: Added. 26 * fast/borders/border-painting-groove-at-all.html: Added. 27 * fast/borders/border-painting-inset-at-all-expected.html: Added. 28 * fast/borders/border-painting-inset-at-all.html: Added. 29 * fast/borders/border-painting-inset-expected.html: Added. 30 * fast/borders/border-painting-inset.html: Added. 31 * fast/borders/border-painting-outset-at-all-expected.html: Added. 32 * fast/borders/border-painting-outset-at-all.html: Added. 33 * fast/borders/border-painting-outset-expected.html: Added. 34 * fast/borders/border-painting-outset.html: Added. 35 * fast/borders/border-painting-ridge-at-all-expected.html: Added. 36 * fast/borders/border-painting-ridge-at-all.html: Added. 37 * fast/borders/border-painting-solid-at-all-expected.html: Added. 38 * fast/borders/border-painting-solid-at-all.html: Added. 39 * fast/borders/border-painting-solid-expected.html: Added. 40 * fast/borders/border-painting-solid.html: Added. 41 * fast/borders/hidpi-border-painting-groove-expected.html: Added. 42 * fast/borders/hidpi-border-painting-groove.html: Added. 43 * fast/borders/hidpi-border-painting-ridge-expected.html: Added. 44 * fast/borders/hidpi-border-painting-ridge.html: Added. 45 1 46 2014-08-19 Jinwoo Song <jinwoo7.song@samsung.com> 2 47 -
trunk/LayoutTests/TestExpectations
r172757 r172797 165 165 webkit.org/b/135927 css3/shapes/spec-examples/shape-outside-018.html [ ImageOnlyFailure ] 166 166 webkit.org/b/135927 css3/shapes/spec-examples/shape-outside-019.html [ ImageOnlyFailure ] 167 168 # border painting diff (Path vs. drawLine) 169 webkit.org/b/136078 fast/borders/border-painting-dashed.html [ ImageOnlyFailure ] 170 webkit.org/b/136078 fast/borders/border-painting-dotted.html [ ImageOnlyFailure ] 171 webkit.org/b/136078 fast/borders/border-painting-double.html [ ImageOnlyFailure ] -
trunk/Source/WebCore/ChangeLog
r172796 r172797 1 2014-08-20 Zalan Bujtas <zalan@apple.com> 2 3 Dashed/dotted borders do not paint. 4 https://bugs.webkit.org/show_bug.cgi?id=135898 5 6 Reviewed by Simon Fraser. 7 8 Remove the empty line checks for drawLines. There's no need to protect the graphics 9 context from empty lines. 10 11 Tests: fast/borders/border-painting-dashed-at-all.html 12 fast/borders/border-painting-dashed.html 13 fast/borders/border-painting-dotted-at-all.html 14 fast/borders/border-painting-dotted.html 15 fast/borders/border-painting-double-at-all.html 16 fast/borders/border-painting-double.html 17 fast/borders/border-painting-groove-at-all.html 18 fast/borders/border-painting-inset-at-all.html 19 fast/borders/border-painting-inset.html 20 fast/borders/border-painting-outset-at-all.html 21 fast/borders/border-painting-outset.html 22 fast/borders/border-painting-ridge-at-all.html 23 fast/borders/border-painting-solid-at-all.html 24 fast/borders/border-painting-solid.html 25 fast/borders/hidpi-border-painting-groove.html 26 fast/borders/hidpi-border-painting-ridge.html 27 28 * rendering/RenderObject.cpp: 29 (WebCore::RenderObject::drawLineForBoxSide): 30 (WebCore::drawBorderLineRect): Deleted. 31 (WebCore::drawBorderLine): Deleted. 32 1 33 2014-08-19 Jinwoo Song <jinwoo7.song@samsung.com> 2 34 -
trunk/Source/WebCore/rendering/RenderObject.cpp
r172730 r172797 738 738 } 739 739 740 static void drawBorderLineRect(GraphicsContext& graphicsContext, const LayoutRect& rect, float deviceScaleFactor)741 {742 FloatRect pixelSnappedRect = pixelSnappedForPainting(rect, deviceScaleFactor);743 if (pixelSnappedRect.isEmpty())744 return;745 graphicsContext.drawRect(pixelSnappedRect);746 }747 748 static void drawBorderLine(GraphicsContext& graphicsContext, const LayoutPoint& point1, const LayoutPoint& point2, float deviceScaleFactor)749 {750 FloatPoint p1 = roundedForPainting(point1, deviceScaleFactor);751 FloatPoint p2 = roundedForPainting(point2, deviceScaleFactor);752 if (p1.x() == p2.x() || p1.y() == p2.y())753 return;754 graphicsContext.drawLine(point1, point2);755 }756 757 740 void RenderObject::drawLineForBoxSide(GraphicsContext* graphicsContext, float x1, float y1, float x2, float y2, 758 741 BoxSide side, Color color, EBorderStyle borderStyle, float adjacentWidth1, float adjacentWidth2, bool antialias) const … … 798 781 case BSBottom: 799 782 case BSTop: 800 drawBorderLine(*graphicsContext, LayoutPoint(x1, adjustedY), LayoutPoint(x2, adjustedY), deviceScaleFactor);783 graphicsContext->drawLine(FloatPoint(x1, adjustedY), FloatPoint(x2, adjustedY)); 801 784 break; 802 785 case BSRight: 803 786 case BSLeft: 804 drawBorderLine(*graphicsContext, LayoutPoint(adjustedX, y1), LayoutPoint(adjustedX, y2), deviceScaleFactor);787 graphicsContext->drawLine(FloatPoint(adjustedX, y1), FloatPoint(adjustedX, y2)); 805 788 break; 806 789 } … … 825 808 case BSTop: 826 809 case BSBottom: 827 drawBorderLineRect(*graphicsContext, LayoutRect(x1, y1, length, thirdOfThickness), deviceScaleFactor);828 drawBorderLineRect(*graphicsContext, LayoutRect(x1, y2 - thirdOfThickness, length, thirdOfThickness), deviceScaleFactor);810 graphicsContext->drawRect(pixelSnappedForPainting(x1, y1, length, thirdOfThickness, deviceScaleFactor)); 811 graphicsContext->drawRect(pixelSnappedForPainting(x1, y2 - thirdOfThickness, length, thirdOfThickness, deviceScaleFactor)); 829 812 break; 830 813 case BSLeft: 831 814 case BSRight: 832 drawBorderLineRect(*graphicsContext, LayoutRect(x1, y1, thirdOfThickness, length), deviceScaleFactor);833 drawBorderLineRect(*graphicsContext, LayoutRect(x2 - thirdOfThickness, y1, thirdOfThickness, length), deviceScaleFactor);815 graphicsContext->drawRect(pixelSnappedForPainting(x1, y1, thirdOfThickness, length, deviceScaleFactor)); 816 graphicsContext->drawRect(pixelSnappedForPainting(x2 - thirdOfThickness, y1, thirdOfThickness, length, deviceScaleFactor)); 834 817 break; 835 818 } … … 977 960 bool wasAntialiased = graphicsContext->shouldAntialias(); 978 961 graphicsContext->setShouldAntialias(antialias); 979 drawBorderLineRect(*graphicsContext, LayoutRect(x1, y1, x2 - x1, y2 - y1), deviceScaleFactor);962 graphicsContext->drawRect(pixelSnappedForPainting(x1, y1, x2 - x1, y2 - y1, deviceScaleFactor)); 980 963 graphicsContext->setShouldAntialias(wasAntialiased); 981 964 graphicsContext->setStrokeStyle(oldStrokeStyle); … … 988 971 x2 = roundToDevicePixel(x2, deviceScaleFactor); 989 972 y2 = roundToDevicePixel(y2, deviceScaleFactor); 990 if (x1 == x2 || y1 == y2) 991 return; 973 992 974 FloatPoint quad[4]; 993 975 switch (side) {
Note: See TracChangeset
for help on using the changeset viewer.