Changeset 37377

Show
Ignore:
Timestamp:
10/07/08 09:30:40 (7 weeks ago)
Author:
vestbo@webkit.org
Message:

2008-10-07 Tor Arne Vestbø <tavestbo@trolltech.com>

Reviewed by Simon.

Don't attempt to paint when updating control tints

We don't have a valid PlatformGraphicsContext so schedule
the dirty scrollbar/scrollview area for repaint instead.

Location:
trunk/WebCore
Files:
2 modified

Legend:

Unmodified
Added
Removed
  • trunk/WebCore/ChangeLog

    r37374 r37377  
     12008-10-07  Tor Arne VestbÞ  <tavestbo@trolltech.com> 
     2 
     3        Reviewed by Simon. 
     4 
     5        Don't attempt to paint when updating control tints 
     6 
     7        We don't have a valid PlatformGraphicsContext so schedule 
     8        the dirty scrollbar/scrollview area for repaint instead. 
     9 
     10        * platform/qt/ScrollbarThemeQt.cpp: 
     11        (WebCore::ScrollbarThemeQt::paint): 
     12        (WebCore::ScrollbarThemeQt::paintScrollCorner): 
     13 
    1142008-10-07  Holger Hans Peter Freyther  <zecke@selfish.org> 
    215 
  • trunk/WebCore/platform/qt/ScrollbarThemeQt.cpp

    r37168 r37377  
    3232#include "PlatformMouseEvent.h" 
    3333#include "Scrollbar.h" 
     34#include "ScrollView.h" 
    3435 
    3536#include <QApplication> 
     
    126127bool ScrollbarThemeQt::paint(Scrollbar* scrollbar, GraphicsContext* graphicsContext, const IntRect& damageRect) 
    127128{ 
     129    if (graphicsContext->updatingControlTints()) { 
     130       scrollbar->invalidateRect(damageRect); 
     131       return false; 
     132    } 
     133 
    128134    QStyleOptionSlider* opt = styleOptionSlider(scrollbar); 
    129135    QRect clip = opt->rect.intersected(damageRect); 
     
    211217} 
    212218 
    213 void ScrollbarThemeQt::paintScrollCorner(ScrollView*, GraphicsContext* context, const IntRect& rect) 
    214 { 
     219void ScrollbarThemeQt::paintScrollCorner(ScrollView* scrollView, GraphicsContext* context, const IntRect& rect) 
     220{ 
     221    if (context->updatingControlTints()) { 
     222       scrollView->invalidateRect(rect); 
     223       return; 
     224    } 
     225 
    215226#if QT_VERSION < 0x040500 
    216227    context->fillRect(rect, QApplication::palette().color(QPalette::Normal, QPalette::Window));