Changeset 84649 in webkit


Ignore:
Timestamp:
Apr 22, 2011 11:13:24 AM (13 years ago)
Author:
mitz@apple.com
Message:

Exclude scrollbars from the dirty rect passed to the document
https://bugs.webkit.org/show_bug.cgi?id=59206

Reviewed by Sam Weinig.

No test added because functionality is unchanged.

  • platform/ScrollView.cpp:

(WebCore::ScrollView::paint): Compute a clip rectangle (analogous to the frame of the clip view
in an NSScrollView) by subtracting non-overlay scrollbars, and intersect the document dirty rect
with it. If the result is empty, avoid calling paintContents().

Location:
trunk/Source/WebCore
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebCore/ChangeLog

    r84646 r84649  
     12011-04-22  Dan Bernstein  <mitz@apple.com>
     2
     3        Reviewed by Sam Weinig.
     4
     5        Exclude scrollbars from the dirty rect passed to the document
     6        https://bugs.webkit.org/show_bug.cgi?id=59206
     7
     8        No test added because functionality is unchanged.
     9
     10        * platform/ScrollView.cpp:
     11        (WebCore::ScrollView::paint): Compute a clip rectangle (analogous to the frame of the clip view
     12        in an NSScrollView) by subtracting non-overlay scrollbars, and intersect the document dirty rect
     13        with it. If the result is empty, avoid calling paintContents().
     14
    1152011-04-22  Jer Noble  <jer.noble@apple.com>
    216
  • trunk/Source/WebCore/platform/ScrollView.cpp

    r84505 r84649  
    989989    // If we encounter any overlay scrollbars as we paint, this will be set to true.
    990990    m_containsScrollableAreaWithOverlayScrollbars = false;
    991    
     991
     992    IntRect clipRect = frameRect();
     993    if (verticalScrollbar() && !verticalScrollbar()->isOverlayScrollbar())
     994        clipRect.setWidth(clipRect.width() - verticalScrollbar()->width());
     995    if (horizontalScrollbar() && !horizontalScrollbar()->isOverlayScrollbar())
     996        clipRect.setHeight(clipRect.height() - horizontalScrollbar()->height());
     997
    992998    IntRect documentDirtyRect = rect;
    993     documentDirtyRect.intersect(frameRect());
    994 
    995     {
     999    documentDirtyRect.intersect(clipRect);
     1000
     1001    if (!documentDirtyRect.isEmpty()) {
    9961002        GraphicsContextStateSaver stateSaver(*context);
    9971003
Note: See TracChangeset for help on using the changeset viewer.