Exemplo n.º 1
0
void RenderTableCell::readyWRATHWidgets(PaintedWidgetsOfWRATHHandle& handle,
                                        PaintInfoOfWRATH& paintInfo, int tx, int ty)
{
    RenderTableCell_ReadyWRATHWidgets *d(RenderTableCell_ReadyWRATHWidgets::object(this, handle));

    ContextOfWRATH::AutoPushNode autoPushRoot(paintInfo.wrath_context, d->m_root_node);

    d->m_collapsed_border.visible(false);
    d->m_block.visible(false);

    if (paintInfo.phase == PaintPhaseCollapsedTableBorders && style()->visibility() == VISIBLE) {
        if (!paintInfo.shouldPaintWithinRoot(this)) {
            return;
        }

        tx += x();
        ty += y();
        int os = 2 * maximalOutlineSize(paintInfo.phase);
        if (ty - table()->outerBorderTop() < paintInfo.rect.maxY() + os
            && ty + height() + table()->outerBorderBottom() > paintInfo.rect.y() - os) {
            d->m_collapsed_border.visible(true);
            readyWRATHWidgetCollapsedBorder(d->m_collapsed_border, paintInfo.wrath_context, tx, ty, width(), height());
        }
        return;
    } 
    

    d->m_block.visible(true);
    RenderBlock::readyWRATHWidgets(d->m_block, paintInfo, tx, ty);
    
}
Exemplo n.º 2
0
void RenderTableCell::readyWRATHWidgetBackgroundsBehindCell(PaintedWidgetsOfWRATHHandle& handle,
                                                            PaintInfoOfWRATH& paintInfo, int tx, int ty,
                                                            RenderObject* backgroundObject)
{
    RenderTableCell_ReadyWRATHWidgetBackgroundsBehindCell *d(RenderTableCell_ReadyWRATHWidgetBackgroundsBehindCell::object(this, handle));
    ContextOfWRATH::AutoPushNode autoPushRoot(paintInfo.wrath_context, d->m_root_node);

    d->m_fill_layers.visible(false);

    if (!paintInfo.shouldPaintWithinRoot(this))
        return;

    if (!backgroundObject)
        return;

    if (style()->visibility() != VISIBLE)
        return;

    RenderTable* tableElt = table();
    if (!tableElt->collapseBorders() && style()->emptyCells() == HIDE && !firstChild())
        return;

    if (backgroundObject != this) {
        tx += x();
        ty += y();
    }

    int w = width();
    int h = height();

    Color c = backgroundObject->style()->visitedDependentColor(CSSPropertyBackgroundColor);
    const FillLayer* bgLayer = backgroundObject->style()->backgroundLayers();

    if (bgLayer->hasImage() || c.isValid()) {
        // We have to clip here because the background would paint
        // on top of the borders otherwise.  This only matters for cells and rows.
        bool shouldClip = backgroundObject->hasLayer() && (backgroundObject == this || backgroundObject == parent()) && tableElt->collapseBorders();

        ContextOfWRATH::AutoPushNode autoPushClip(paintInfo.wrath_context, d->m_clip_node);
        d->m_clip_node.widget()->node()->clipping_active(false);

        if (shouldClip) {
            IntRect clipRect(tx + borderLeft(), ty + borderTop(),
                w - borderLeft() - borderRight(), h - borderTop() - borderBottom());
            ContextOfWRATH::set_clipping(d->m_clip_node, clipRect);
            d->m_clip_node.widget()->node()->clipping_active(true);
        }
        readyWRATHWidgetFillLayers(d->m_fill_layers, paintInfo, c, bgLayer, tx, ty, w, h, BackgroundBleedNone, CompositeSourceOver, backgroundObject);
        d->m_fill_layers.visible(true);
    }
}
Exemplo n.º 3
0
void RootInlineBox::readyWRATHEllipsisBox(PaintedWidgetsOfWRATHHandleT<InlineBox> &handle, 
                                          PaintInfoOfWRATH &paintInfo, int tx, int ty, int lineTop, int lineBottom) const
{
  /*
    readyWRATHEllipsisBox comes from paintEllipsisBox which 
    just calls ellipsisBox()->paint() if it should be drawn,
    it could (and likely should) be absorbed into readyWRATHWidgets
   */
  handle.visible(false);

  if (hasEllipsisBox() && paintInfo.shouldPaintWithinRoot(renderer()) && renderer()->style()->visibility() == VISIBLE
      && paintInfo.phase == PaintPhaseForeground) {
    handle.visible(true);
    ellipsisBox()->readyWRATHWidgets(handle, paintInfo, tx, ty, lineTop, lineBottom);
  }
          
}
Exemplo n.º 4
0
void RenderBox::readyWRATHWidgetBoxDecorations(PaintedWidgetsOfWRATHHandle& handle,
                                                PaintInfoOfWRATH& paintInfo, int tx, int ty)
{
    RenderBox_ReadyWidgetBoxDecorations* d;
    d=RenderBox_ReadyWidgetBoxDecorations::object(this, handle);
    WebCore::ContextOfWRATH::AutoPushNode autoPushRoot(paintInfo.wrath_context, d->m_root_node);

    

    if (!paintInfo.shouldPaintWithinRoot(this)) {
        d->m_box_decorations_with_size.visible(false);
        return;
    }
    else {
      d->m_box_decorations_with_size.visible(true);
      readyWRATHWidgetBoxDecorationsWithSize(d->m_box_decorations_with_size,
                                             paintInfo, tx, ty, width(), height());
    }
}
Exemplo n.º 5
0
void RenderTableCell::readyWRATHWidgetBoxDecorations(PaintedWidgetsOfWRATHHandle& handle,
                                                     PaintInfoOfWRATH& paintInfo, int tx, int ty)
{
    RenderTableCell_ReadyWRATHWidgetBoxDecorations *d(RenderTableCell_ReadyWRATHWidgetBoxDecorations::object(this, handle));
    ContextOfWRATH::AutoPushNode autoPushRoot(paintInfo.wrath_context, d->m_root_node);

    d->m_box_shadow.visible(false);
    d->m_backgrounds.visible(false);
    d->m_latter_box_shadow.visible(false);
    d->m_border.visible(false);

    if (!paintInfo.shouldPaintWithinRoot(this))
        return;

    RenderTable* tableElt = table();
    if (!tableElt->collapseBorders() && style()->emptyCells() == HIDE && !firstChild())
        return;

    int w = width();
    int h = height();
   
    readyWRATHWidgetBoxShadow(d->m_box_shadow, paintInfo.wrath_context, tx, ty, w, h, style(), Normal);
    d->m_box_shadow.visible(true);
    
    // Paint our cell background.
    readyWRATHWidgetBackgroundsBehindCell(d->m_backgrounds, paintInfo, tx, ty, this);
    d->m_backgrounds.visible(true);

    readyWRATHWidgetBoxShadow(d->m_latter_box_shadow, paintInfo.wrath_context, tx, ty, w, h, style(), Inset);
    d->m_latter_box_shadow.visible(true);

    if (!style()->hasBorder() || tableElt->collapseBorders())
        return;

    readyWRATHWidgetBorder(d->m_border, paintInfo.wrath_context, tx, ty, w, h, style());
    d->m_border.visible(true);
}