Example #1
0
void RenderFrameSet::paintRowBorder(const PaintInfo& paintInfo, const IntRect& borderRect)
{
    if (!paintInfo.rect.intersects(borderRect))
        return;

    // FIXME: We should do something clever when borders from distinct framesets meet at a join.
    
    // Fill first.
    GraphicsContext* context = paintInfo.context;
    context->fillRect(borderRect, frameSet()->hasBorderColor() ? style()->borderLeftColor() : borderFillColor());

    // 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) {
        context->fillRect(IntRect(borderRect.topLeft(), IntSize(width(), 1)), borderStartEdgeColor());
        context->fillRect(IntRect(borderRect.bottomLeft(), IntSize(width(), 1)), borderEndEdgeColor());
    }
}
Example #2
0
void RenderFrameSet::readyWRATHWidgetColumnBorder(PaintedWidgetsOfWRATHHandle& handle,
						  const PaintInfoOfWRATH& paintInfo, const IntRect& borderRect)
{
    if (!paintInfo.rect.intersects(borderRect))
        return;
    
    RenderFrameSet_ReadyWRATHWidgetColumnBorder *d(RenderFrameSet_ReadyWRATHWidgetColumnBorder::object(this, handle));
    ContextOfWRATH::AutoPushNode autoPushRoot(paintInfo.wrath_context, d->m_root_node);

    if (d->m_edge_stroke_begin.widget())
	d->m_edge_stroke_begin.widget()->visible(false);
    if (d->m_edge_stroke_end.widget())
	d->m_edge_stroke_end.widget()->visible(false);

    // FIXME: We should do something clever when borders from distinct framesets meet at a join.
    
    // Fill first.

    Color color = (frameSet()->hasBorderColor() ? style()->visitedDependentColor(CSSPropertyBorderLeftColor) : borderFillColor());
    d->m_fill.update(paintInfo.wrath_context, borderRect, color, CompositeSourceOver);
    
    // 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) {
        d->m_edge_stroke_begin.update(paintInfo.wrath_context, 
                                      IntRect(borderRect.location(), IntSize(1, height())),
                                      borderStartEdgeColor(), CompositeSourceOver);

	d->m_edge_stroke_end.update(paintInfo.wrath_context, 
                                    IntRect(IntPoint(borderRect.maxX() - 1, borderRect.y()), IntSize(1, height())),
                                    borderEndEdgeColor(), CompositeSourceOver);

	if(d->m_edge_stroke_begin.widget()) {
	  d->m_edge_stroke_begin.widget()->visible(true);
	}
	if(d->m_edge_stroke_end.widget()) {
	  d->m_edge_stroke_end.widget()->visible(true);
	}
    }
}
Example #3
0
void RenderFrameSet::paintColumnBorder(const PaintInfo& paintInfo, const IntRect& borderRect)
{
    if (!paintInfo.rect.intersects(borderRect))
        return;
        
    // FIXME: We should do something clever when borders from distinct framesets meet at a join.
    
    // Fill first.
    GraphicsContext* context = paintInfo.context;
    ColorSpace colorSpace = style().colorSpace();
    context->fillRect(borderRect, frameSetElement().hasBorderColor() ? style().visitedDependentColor(CSSPropertyBorderLeftColor) : borderFillColor(), colorSpace);
    
    // 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->fillRect(IntRect(borderRect.location(), IntSize(1, height())), borderStartEdgeColor(), colorSpace);
        context->fillRect(IntRect(IntPoint(borderRect.maxX() - 1, borderRect.y()), IntSize(1, height())), borderEndEdgeColor(), colorSpace);
    }
}
void FrameSetPainter::paintRowBorder(const PaintInfo& paintInfo, const IntRect& borderRect)
{
    // FIXME: We should do something clever when borders from distinct framesets meet at a join.

    // Fill first.
    GraphicsContext* context = paintInfo.context;
    context->fillRect(borderRect, m_layoutFrameSet.frameSet()->hasBorderColor() ? m_layoutFrameSet.resolveColor(CSSPropertyBorderLeftColor) : borderFillColor());

    // 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) {
        context->fillRect(IntRect(borderRect.location(), IntSize(m_layoutFrameSet.size().width(), 1)), borderStartEdgeColor());
        context->fillRect(IntRect(IntPoint(borderRect.x(), borderRect.maxY() - 1), IntSize(m_layoutFrameSet.size().width(), 1)), borderEndEdgeColor());
    }
}