Changeset 21329 in webkit


Ignore:
Timestamp:
May 9, 2007 12:52:41 AM (17 years ago)
Author:
bdash
Message:

2007-05-09 Mitz Pettel <mitz@webkit.org>

Reviewed by Dave Hyatt.

  • page/FrameView.cpp: (WebCore::FrameViewPrivate::FrameViewPrivate): Moved initialization of m_slowRepaintObjectCount here. (WebCore::FrameViewPrivate::reset): Do not reset the slow repaint object count here. (WebCore::FrameView::useSlowRepaints): (WebCore::FrameView::addSlowRepaintObject): (WebCore::FrameView::removeSlowRepaintObject): Added an assertion that the object count is positive.
  • rendering/RenderObject.cpp: (WebCore::RenderObject::setStyle): Corrected a mix up between old and new style, which caused the object count to be decremented when it was supposed to be incremented and vice versa.
Location:
trunk/WebCore
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/WebCore/ChangeLog

    r21328 r21329  
     12007-05-09  Mitz Pettel  <mitz@webkit.org>
     2
     3        Reviewed by Dave Hyatt.
     4
     5        - fix http://bugs.webkit.org/show_bug.cgi?id=13037
     6          REGRESSION: Copy-on-scroll not reset properly after back/forward navigation
     7
     8        * page/FrameView.cpp:
     9        (WebCore::FrameViewPrivate::FrameViewPrivate): Moved initialization of
     10        m_slowRepaintObjectCount here.
     11        (WebCore::FrameViewPrivate::reset): Do not reset the slow repaint object
     12        count here.
     13        (WebCore::FrameView::useSlowRepaints):
     14        (WebCore::FrameView::addSlowRepaintObject):
     15        (WebCore::FrameView::removeSlowRepaintObject): Added an assertion that the
     16        object count is positive.
     17        * rendering/RenderObject.cpp:
     18        (WebCore::RenderObject::setStyle): Corrected a mix up between old and new
     19        style, which caused the object count to be decremented when it was supposed
     20        to be incremented and vice versa.
     21
    1222007-05-09  Peter Müller <pm@one.com>
    223
  • trunk/WebCore/page/FrameView.cpp

    r21183 r21329  
    5555public:
    5656    FrameViewPrivate(FrameView* view)
    57         : layoutTimer(view, &FrameView::layoutTimerFired)
     57        : m_slowRepaintObjectCount(0)
     58        , layoutTimer(view, &FrameView::layoutTimerFired)
    5859        , m_mediaType("screen")
    5960        , m_enqueueEvents(0)
     
    7071    {
    7172        useSlowRepaints = false;
    72         slowRepaintObjectCount = 0;
    7373        borderX = 30;
    7474        borderY = 30;
     
    8888    ScrollbarMode hmode;
    8989    bool useSlowRepaints;
    90     unsigned slowRepaintObjectCount;
     90    unsigned m_slowRepaintObjectCount;
    9191
    9292    int borderX, borderY;
     
    550550bool FrameView::useSlowRepaints() const
    551551{
    552     return d->useSlowRepaints || d->slowRepaintObjectCount > 0;
     552    return d->useSlowRepaints || d->m_slowRepaintObjectCount > 0;
    553553}
    554554
     
    561561void FrameView::addSlowRepaintObject()
    562562{
    563     if (d->slowRepaintObjectCount == 0)
     563    if (!d->m_slowRepaintObjectCount)
    564564        setStaticBackground(true);
    565     d->slowRepaintObjectCount++;
     565    d->m_slowRepaintObjectCount++;
    566566}
    567567
    568568void FrameView::removeSlowRepaintObject()
    569569{
    570     d->slowRepaintObjectCount--;
    571     if (d->slowRepaintObjectCount == 0)
     570    ASSERT(d->m_slowRepaintObjectCount > 0);
     571    d->m_slowRepaintObjectCount--;
     572    if (!d->m_slowRepaintObjectCount)
    572573        setStaticBackground(d->useSlowRepaints);
    573574}
  • trunk/WebCore/rendering/RenderObject.cpp

    r21216 r21329  
    22562256        // FIXME: A better solution would be to only invalidate the fixed regions when scrolling.  It's overkill to
    22572257        // prevent the entire view from blitting on a scroll.
    2258         bool oldStyleSlowScroll = style && (style->position() == FixedPosition || style->hasFixedBackgroundImage());
    2259         bool newStyleSlowScroll = m_style && (m_style->position() == FixedPosition || m_style->hasFixedBackgroundImage());
     2258        bool newStyleSlowScroll = style && (style->position() == FixedPosition || style->hasFixedBackgroundImage());
     2259        bool oldStyleSlowScroll = m_style && (m_style->position() == FixedPosition || m_style->hasFixedBackgroundImage());
    22602260        if (oldStyleSlowScroll != newStyleSlowScroll) {
    22612261            if (oldStyleSlowScroll)
Note: See TracChangeset for help on using the changeset viewer.