Esempio n. 1
0
bool RenderThemeBal::paintTextField(RenderObject* o, const RenderObject::PaintInfo& i, const IntRect& r)
{
    i.context->save();
    i.context->setStrokeStyle(SolidStroke);
    i.context->setStrokeColor(Color::black);
    PassRefPtr<RenderStyle> style = RenderStyle::create();
    addIntrinsicMargins(style.get());

    EBorderStyle v = INSET;
    style->setBorderTopStyle(v);
    style->setBorderLeftStyle(v);
    style->setBorderBottomStyle(v);
    style->setBorderRightStyle(v);
    int borderWidth = 1;
    style->setBorderTopWidth(borderWidth);
    style->setBorderLeftWidth(borderWidth);
    style->setBorderBottomWidth(borderWidth);
    style->setBorderRightWidth(borderWidth);
    toRenderBox(o)->paintFillLayerExtended(i,
                                           o->style()->backgroundColor(), o->style()->backgroundLayers(),
                                           r.y(), toRenderBox(o)->height(), r.x(), r.y(), toRenderBox(o)->width(), toRenderBox(o)->height());
    toRenderBox(o)->paintBorder(i.context,
                                r.x(), r.y(), r.width(), r.height(),
                                style.get(), true, true);

    i.context->restore();
    return false;
}
Esempio n. 2
0
bool RenderThemeBal::paintCheckbox(RenderObject* o, const RenderObject::PaintInfo& i, const IntRect& r)
{
    i.context->save();
    i.context->setStrokeStyle(SolidStroke);
    i.context->setStrokeColor(Color::black);
    PassRefPtr<RenderStyle> style = RenderStyle::create();
    addIntrinsicMargins(style.get());

    EBorderStyle v = INSET;
    style->setBorderTopStyle(v);
    style->setBorderLeftStyle(v);
    style->setBorderBottomStyle(v);
    style->setBorderRightStyle(v);
    int borderWidth = 1;
    style->setBorderTopWidth(borderWidth);
    style->setBorderLeftWidth(borderWidth);
    style->setBorderBottomWidth(borderWidth);
    style->setBorderRightWidth(borderWidth);
    toRenderBox(o)->paintFillLayerExtended(i,
                                           o->style()->backgroundColor(), o->style()->backgroundLayers(),
                                           r.y(), toRenderBox(o)->height(), r.x(), r.y(), toRenderBox(o)->width(), toRenderBox(o)->height());
    toRenderBox(o)->paintBorder(i.context,
                                r.x(), r.y(), r.width(), r.height(),
                                style.get(), true, true);

    if( o->node()->active() ) {
        IntRect r2(r);
        r2.inflate(-2);
        i.context->setFillColor(WebCore::Color(0xc0,0xc0,0xc0));
        i.context->drawRect(r2);
        v = GROOVE;
        style->setBorderTopStyle(v);
        style->setBorderLeftStyle(v);
        style->setBorderBottomStyle(v);
        style->setBorderRightStyle(v);
        int borderWidth = 1;
        style->setBorderTopWidth(borderWidth);
        style->setBorderLeftWidth(borderWidth);
        style->setBorderBottomWidth(borderWidth);
        style->setBorderRightWidth(borderWidth);
        toRenderBox(o)->paintFillLayerExtended(i,
                                               o->style()->backgroundColor(), o->style()->backgroundLayers(),
                                               r.y(), toRenderBox(o)->height(), r.x(), r.y(), toRenderBox(o)->width(), toRenderBox(o)->height());
        toRenderBox(o)->paintBorder(i.context,
                                    r.x(), r.y(), r.width(), r.height(),
                                    style.get(), true, true);
    }
    InputElement *input = toInputElement(static_cast<Element*>(o->node()));
    if(input && input->isChecked()) {
        i.context->setStrokeColor(Color::black);
        i.context->setStrokeStyle(SolidStroke);
        IntRect r2(r);
        r2.inflate(-borderWidth-2);
        i.context->drawLine(IntPoint(r2.x(),r2.y()), IntPoint(r2.x()+r2.width(),r2.y()+r2.height()));
        i.context->drawLine(IntPoint(r2.x()+r2.width(),r2.y()), IntPoint(r2.x(),r2.y()+r2.height()));
    }
    i.context->restore();
    return false;
}
void RenderThemeAndroid::adjustListboxStyle(CSSStyleSelector*, RenderStyle* style, Element*) const
{
    style->setPaddingRight(Length(RenderSkinCombo::extraWidth(), Fixed));
    style->setMaxHeight(Length(style->fontSize() + listboxPadding, Fixed));
    // Make webkit draw invisible, since it will simply draw the first element
    style->setColor(Color::transparent);
    addIntrinsicMargins(style);
}
Esempio n. 4
0
void RenderThemeAndroid::adjustMenuListStyle(CSSStyleSelector*, RenderStyle* style, Element*) const
{
    adjustMenuListStyleCommon(style);
    addIntrinsicMargins(style);
}
Esempio n. 5
0
void RenderThemeAndroid::adjustSearchFieldStyle(CSSStyleSelector*, RenderStyle* style, Element*) const
{
    addIntrinsicMargins(style);
}
Esempio n. 6
0
void RenderThemeAndroid::adjustTextAreaStyle(CSSStyleSelector*, RenderStyle* style, WebCore::Element*) const
{
    addIntrinsicMargins(style);
}
Esempio n. 7
0
void RenderThemeBal::adjustButtonStyle(CSSStyleSelector* selector, RenderStyle* style, WebCore::Element* e) const
{
    addIntrinsicMargins(style);
}
void RenderThemeAndroid::adjustListboxStyle(CSSStyleSelector*, RenderStyle* style, Element*) const
{
    style->setPaddingRight(Length(RenderSkinCombo::extraWidth(), Fixed));
    style->setMaxHeight(Length(style->fontSize() + LISTBOX_PADDING, Fixed));
    addIntrinsicMargins(style);
}
void RenderThemeSymbian::adjustTextFieldStyle(CSSStyleSelector*, RenderStyle* style, Element*) const
{
    addIntrinsicMargins(style);
}
void RenderThemeSymbian::adjustButtonStyle(CSSStyleSelector* selector, RenderStyle* style, Element* e) const
{
    addIntrinsicMargins(style);
}
Esempio n. 11
0
void RenderThemeAndroid::adjustMenuListStyle(CSSStyleSelector* selector, RenderStyle* style, Element* e) const
{
    style->setPaddingRight(Length(RenderSkinCombo::extraWidth(), Fixed));
    addIntrinsicMargins(style);
}