Changeset 106866 in webkit
- Timestamp:
- Feb 6, 2012, 4:00:37 PM (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/subpixellayout/Source/WebCore/rendering/RenderFrameSet.cpp
r104741 r106866 83 83 void RenderFrameSet::paintColumnBorder(const PaintInfo& paintInfo, const LayoutRect& borderRect) 84 84 { 85 if (!paintInfo.rect.intersects(pixelSnappedIntRect(borderRect)))86 return;87 88 // FIXME: We should do something clever when borders from distinct framesets meet at a join.89 90 // Fill first.91 GraphicsContext* context = paintInfo.context;92 ColorSpace colorSpace = style()->colorSpace();93 context->fillRect(borderRect, frameSet()->hasBorderColor() ? style()->visitedDependentColor(CSSPropertyBorderLeftColor) : borderFillColor(), colorSpace);94 95 // Now stroke the edges but only if we have enough room to paint both edges with a little96 // bit of the fill color showing through.97 if (borderRect.width() >= 3) {98 context->fillRect(IntRect(roundedIntPoint(borderRect.location()), IntSize(1, height())), borderStartEdgeColor(), colorSpace);99 context->fillRect(IntRect(IntPoint(borderRect.maxX() - 1, borderRect.y()), IntSize(1, height())), borderEndEdgeColor(), colorSpace);100 }101 }102 103 void RenderFrameSet::paintRowBorder(const PaintInfo& paintInfo, const LayoutRect& borderRect)104 {105 85 IntRect snappedBorderRect = pixelSnappedIntRect(borderRect); 106 86 if (!paintInfo.rect.intersects(snappedBorderRect)) 107 87 return; 108 88 109 89 // FIXME: We should do something clever when borders from distinct framesets meet at a join. 110 90 … … 113 93 ColorSpace colorSpace = style()->colorSpace(); 114 94 context->fillRect(snappedBorderRect, frameSet()->hasBorderColor() ? style()->visitedDependentColor(CSSPropertyBorderLeftColor) : borderFillColor(), colorSpace); 115 95 116 96 // Now stroke the edges but only if we have enough room to paint both edges with a little 117 97 // bit of the fill color showing through. 118 if (borderRect.height() >= 3) { 119 context->fillRect(IntRect(roundedIntPoint(borderRect.location()), IntSize(width(), 1)), borderStartEdgeColor(), colorSpace); 120 context->fillRect(IntRect(IntPoint(borderRect.x(), borderRect.maxY() - 1), IntSize(width(), 1)), borderEndEdgeColor(), colorSpace); 98 if (snappedBorderRect.width() >= 3) { 99 context->fillRect(IntRect(snappedBorderRect.location(), IntSize(1, snappedBorderRect.height())), borderStartEdgeColor(), colorSpace); 100 context->fillRect(IntRect(IntPoint(snappedBorderRect.maxX() - 1, snappedBorderRect.y()), IntSize(1, snappedBorderRect.height())), borderEndEdgeColor(), colorSpace); 101 } 102 } 103 104 void RenderFrameSet::paintRowBorder(const PaintInfo& paintInfo, const LayoutRect& borderRect) 105 { 106 IntRect snappedBorderRect = pixelSnappedIntRect(borderRect); 107 if (!paintInfo.rect.intersects(snappedBorderRect)) 108 return; 109 110 // FIXME: We should do something clever when borders from distinct framesets meet at a join. 111 112 // Fill first. 113 GraphicsContext* context = paintInfo.context; 114 ColorSpace colorSpace = style()->colorSpace(); 115 context->fillRect(snappedBorderRect, frameSet()->hasBorderColor() ? style()->visitedDependentColor(CSSPropertyBorderLeftColor) : borderFillColor(), colorSpace); 116 117 // Now stroke the edges but only if we have enough room to paint both edges with a little 118 // bit of the fill color showing through. 119 if (snappedBorderRect.height() >= 3) { 120 context->fillRect(IntRect(snappedBorderRect.location(), IntSize(width(), 1)), borderStartEdgeColor(), colorSpace); 121 context->fillRect(IntRect(IntPoint(snappedBorderRect.x(), snappedBorderRect.maxY() - 1), IntSize(snappedBorderRect.width(), 1)), borderEndEdgeColor(), colorSpace); 121 122 } 122 123 }
Note:
See TracChangeset
for help on using the changeset viewer.