Commit 6dad696c authored by hyatt's avatar hyatt

Use fillRect instead of drawLine, since drawLine has some odd behavior...

        Use fillRect instead of drawLine, since drawLine has some odd behavior (it's only used for borders).

        Reviewed by aroben

        * platform/graphics/IntRect.h:
        * rendering/RenderFrameSet.cpp:
        (WebCore::RenderFrameSet::paintColumnBorder):
        (WebCore::RenderFrameSet::paintRowBorder):



git-svn-id: http://svn.webkit.org/repository/webkit/trunk@20289 268f45cc-cd09-0410-ab3c-d52691b4dbfc
parent 99324a12
2007-03-18 David Hyatt <hyatt@apple.com>
Use fillRect instead of drawLine, since drawLine has some odd behavior (it's only used for borders).
Reviewed by aroben
* platform/graphics/IntRect.h:
* rendering/RenderFrameSet.cpp:
(WebCore::RenderFrameSet::paintColumnBorder):
(WebCore::RenderFrameSet::paintRowBorder):
2007-03-18 David Hyatt <hyatt@apple.com>
Change the frameborder color to be light gray for framesets.
......
......@@ -80,6 +80,8 @@ public:
void setWidth(int width) { m_size.setWidth(width); }
void setHeight(int height) { m_size.setHeight(height); }
// Be careful with these functions. The point is considered to be to the right and below. These are not
// substitutes for right() and bottom().
IntPoint topLeft() const { return m_location; }
IntPoint topRight() const { return IntPoint(right() - 1, y()); }
IntPoint bottomLeft() const { return IntPoint(x(), bottom() - 1); }
......
......@@ -95,11 +95,8 @@ void RenderFrameSet::paintColumnBorder(const PaintInfo& paintInfo, const IntRect
// Now stroke the edges but only if we have enough room to paint both edges with a little
// bit of the fill color showing through.
if (borderRect.width() >= 3) {
context->setStrokeThickness(1.0f);
context->setStrokeColor(borderStartEdgeColor());
context->drawLine(borderRect.topLeft(), borderRect.bottomLeft());
context->setStrokeColor(borderEndEdgeColor());
context->drawLine(borderRect.topRight(), borderRect.bottomRight());
context->fillRect(IntRect(borderRect.topLeft(), IntSize(1, height())), borderStartEdgeColor());
context->fillRect(IntRect(borderRect.topRight(), IntSize(1, height())), borderEndEdgeColor());
}
}
......@@ -117,13 +114,8 @@ void RenderFrameSet::paintRowBorder(const PaintInfo& paintInfo, const IntRect& b
// Now stroke the edges but only if we have enough room to paint both edges with a little
// bit of the fill color showing through.
if (borderRect.height() >= 3) {
Color startEdge(170, 170, 170);
Color endEdge(Color::black);
context->setStrokeThickness(1.0f);
context->setStrokeColor(borderStartEdgeColor());
context->drawLine(borderRect.topLeft(), borderRect.topRight());
context->setStrokeColor(borderEndEdgeColor());
context->drawLine(borderRect.bottomLeft(), borderRect.bottomRight());
context->fillRect(IntRect(borderRect.topLeft(), IntSize(width(), 1)), borderStartEdgeColor());
context->fillRect(IntRect(borderRect.bottomLeft(), IntSize(width(), 1)), borderEndEdgeColor());
}
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment