Ignore:
Timestamp:
May 25, 2016, 4:01:51 PM (10 years ago)
Author:
Alan Bujtas
Message:

Setting overflow:hidden does not always repaint clipped content.
https://bugs.webkit.org/show_bug.cgi?id=116994
rdar://problem/26476697

Issue repaint for both layout and visual overflow rects when the container starts
clipping overflow content.

Reviewed by David Hyatt.

Source/WebCore:

Test: fast/repaint/overflow-hidden-repaint.html

  • rendering/RenderBox.cpp:

(WebCore::RenderBox::updateFromStyle):

LayoutTests:

  • fast/repaint/overflow-hidden-repaint-expected.html: Added.
  • fast/repaint/overflow-hidden-repaint.html: Added.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebCore/rendering/RenderBox.cpp

    r201205 r201407  
    517517            }
    518518        }
    519        
    520519        // Check for overflow clip.
    521520        // It's sufficient to just check one direction, since it's illegal to have visible on only one overflow value.
    522521        if (boxHasOverflowClip) {
    523             if (!s_hadOverflowClip)
    524                 // Erase the overflow
    525                 repaint();
     522            if (!s_hadOverflowClip && hasRenderOverflow()) {
     523                // Erase the overflow.
     524                // Overflow changes have to result in immediate repaints of the entire layout overflow area because
     525                // repaints issued by removal of descendants get clipped using the updated style when they shouldn't.
     526                repaintRectangle(visualOverflowRect());
     527                repaintRectangle(layoutOverflowRect());
     528            }
    526529            setHasOverflowClip();
    527530        }
    528531    }
    529 
    530532    setHasTransformRelatedProperty(styleToUse.hasTransformRelatedProperty());
    531533    setHasReflection(styleToUse.boxReflect());
Note: See TracChangeset for help on using the changeset viewer.