Changeset 13982 in webkit


Ignore:
Timestamp:
Apr 19, 2006 7:51:48 PM (18 years ago)
Author:
thatcher
Message:

Reviewed by Haytt.

  • manual-tests/repaint-resized-overflow.html: Added.
  • rendering/RenderLayer.cpp: (WebCore::RenderLayer::RenderLayer): (WebCore::RenderLayer::computeRepaintRects): Set the m_repaintOverflowOnResize flag to true if our object itself needs layout or if we're an overflow and have a normal child that needs layout, in which case if we end up resizing it will be because of the child, and that child might have not repainted itself correctly during its own layout. (WebCore::RenderLayer::updateLayerPositions): Do a full repaint if m_repaintOverflowOnResize is set and we resized but didn't move.
  • rendering/RenderLayer.h:
Location:
trunk/WebCore
Files:
1 added
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/WebCore/ChangeLog

    r13981 r13982  
     12006-04-19  Mitz Pettel  <opendarwin.org@mitzpettel.com>
     2
     3        Reviewed by Haytt.
     4
     5        - fix http://bugzilla.opendarwin.org/show_bug.cgi?id=6770
     6          REGRESSION: Incomplete repaint when block with clipping grows
     7
     8        * manual-tests/repaint-resized-overflow.html: Added.
     9        * rendering/RenderLayer.cpp:
     10        (WebCore::RenderLayer::RenderLayer):
     11        (WebCore::RenderLayer::computeRepaintRects): Set the m_repaintOverflowOnResize
     12        flag to true if our object itself needs layout or if we're an overflow
     13        and have a normal child that needs layout, in which case if we end up
     14        resizing it will be because of the child, and that child might have not repainted
     15        itself correctly during its own layout.
     16        (WebCore::RenderLayer::updateLayerPositions): Do a full repaint if
     17        m_repaintOverflowOnResize is set and we resized but didn't move.
     18        * rendering/RenderLayer.h:
     19
    1202006-04-19  Mitz Pettel  <opendarwin.org@mitzpettel.com>
    221
  • trunk/WebCore/rendering/RenderLayer.cpp

    r13859 r13982  
    139139m_usedTransparency(false),
    140140m_inOverflowRelayout(false),
     141m_repaintOverflowOnResize(false),
    141142m_marquee(0)
    142143{
     
    162163    // FIXME: Child object could override visibility.
    163164    if (m_object->style()->visibility() == VISIBLE) {
     165        m_repaintOverflowOnResize = m_object->selfNeedsLayout() || m_object->hasOverflowClip() && m_object->normalChildNeedsLayout();
    164166        m_object->getAbsoluteRepaintRectIncludingFloats(m_repaintRect, m_fullRepaintRect);
    165167        m_object->absolutePosition(m_repaintX, m_repaintY);
     
    191193    // FIXME: Child object could override visibility.
    192194    if (checkForRepaint && (m_object->style()->visibility() == VISIBLE)) {
    193         int x, y;
    194         m_object->absolutePosition(x, y);
    195         if (x == m_repaintX && y == m_repaintY)
    196             m_object->repaintAfterLayoutIfNeeded(m_repaintRect, m_fullRepaintRect);
    197         else {
    198             RenderCanvas *c = m_object->canvas();
    199             if (c && !c->printingMode()) {
    200                 c->repaintViewRectangle(m_fullRepaintRect);
    201                 IntRect newRect, newFullRect;
     195        RenderCanvas *c = m_object->canvas();
     196        if (c && !c->printingMode()) {
     197            int x, y;
     198            m_object->absolutePosition(x, y);
     199            IntRect newRect, newFullRect;
     200            bool didMove = x != m_repaintX || y != m_repaintY;
     201            if (!didMove && !m_repaintOverflowOnResize)
     202                m_object->repaintAfterLayoutIfNeeded(m_repaintRect, m_fullRepaintRect);
     203            else {
    202204                m_object->getAbsoluteRepaintRectIncludingFloats(newRect, newFullRect);
    203                 if (newRect != m_repaintRect)
     205                if (didMove || newRect != m_repaintRect) {
     206                    c->repaintViewRectangle(m_fullRepaintRect);
    204207                    c->repaintViewRectangle(newFullRect);
     208                }
    205209            }
    206210        }
  • trunk/WebCore/rendering/RenderLayer.h

    r13838 r13982  
    398398                                 // blend).
    399399    bool m_inOverflowRelayout : 1;
     400    bool m_repaintOverflowOnResize : 1;
    400401
    401402    Marquee* m_marquee; // Used by layers with overflow:marquee
Note: See TracChangeset for help on using the changeset viewer.