void ScrollableArea::invalidateScrollbar(Scrollbar* scrollbar, const IntRect& rect) { if (scrollbar == horizontalScrollbar()) { if (GraphicsLayer* graphicsLayer = layerForHorizontalScrollbar()) { graphicsLayer->setNeedsDisplay(); graphicsLayer->setContentsNeedsDisplay(); return; } invalidateScrollbarRect(scrollbar, rect); return; } if (scrollbar == verticalScrollbar()) { if (GraphicsLayer* graphicsLayer = layerForVerticalScrollbar()) { graphicsLayer->setNeedsDisplay(); graphicsLayer->setContentsNeedsDisplay(); return; } invalidateScrollbarRect(scrollbar, rect); return; } // Otherwise the scrollbar is just created and has not been set as either // horizontalScrollbar() or verticalScrollbar(). }
void ScrollableArea::invalidateScrollbar(Scrollbar* scrollbar, const IntRect& rect) { if (scrollbar == horizontalScrollbar()) { if (GraphicsLayer* graphicsLayer = layerForHorizontalScrollbar()) { graphicsLayer->setNeedsDisplay(); graphicsLayer->setContentsNeedsDisplay(); return; } } else if (scrollbar == verticalScrollbar()) { if (GraphicsLayer* graphicsLayer = layerForVerticalScrollbar()) { graphicsLayer->setNeedsDisplay(); graphicsLayer->setContentsNeedsDisplay(); return; } } invalidateScrollbarRect(scrollbar, rect); }
void ScrollableArea::invalidateScrollbar(Scrollbar* scrollbar, const IntRect& rect) { #if USE(ACCELERATED_COMPOSITING) if (scrollbar == horizontalScrollbar()) { if (GraphicsLayer* graphicsLayer = layerForHorizontalScrollbar()) { graphicsLayer->setNeedsDisplay(); return; } } else if (scrollbar == verticalScrollbar()) { if (GraphicsLayer* graphicsLayer = layerForVerticalScrollbar()) { graphicsLayer->setNeedsDisplay(); return; } } #endif invalidateScrollbarRect(scrollbar, rect); }