Beispiel #1
0
void RenderSlider::layout()
{
    // FIXME: Find a way to cascade appearance.
    // http://webkit.org/b/62535
    RenderBox* thumbBox = sliderThumbElement()->renderBox();
    if (thumbBox && thumbBox->isSliderThumb())
        static_cast<RenderSliderThumb*>(thumbBox)->updateAppearance(style());

    RenderFlexibleBox::layout();
}
void RenderSlider::layout()
{
    StackStats::LayoutCheckPoint layoutCheckPoint;

    // FIXME: Find a way to cascade appearance. http://webkit.org/b/62535
    RenderBox* thumbBox = element().sliderThumbElement()->renderBox();
    if (thumbBox && thumbBox->isSliderThumb())
        static_cast<RenderSliderThumb*>(thumbBox)->updateAppearance(&style());

    RenderFlexibleBox::layout();
}
Beispiel #3
0
void RenderSlider::layout()
{
    // FIXME: Find a way to cascade appearance.
    // http://webkit.org/b/62535
    RenderBox* thumbBox = sliderThumbElementOf(node())->renderBox();
    if (thumbBox && thumbBox->isSliderThumb())
        static_cast<RenderSliderThumb*>(thumbBox)->updateAppearance(style());
    if (RenderObject* limiterRenderer = trackLimiterElementOf(node())->renderer()) {
        if (limiterRenderer->isSliderThumb())
          static_cast<RenderSliderThumb*>(limiterRenderer)->updateAppearance(style());
    }

    RenderBlock::layout();

    if (!thumbBox)
        return;
    LayoutUnit heightDiff = thumbBox->height() - contentHeight();
    if (heightDiff > 0)
        thumbBox->setY(thumbBox->y() - (heightDiff / 2));
}