Skip to content
Permalink
Browse files
REGRESSION(r201040): Repainting of moving overflow:hidden objects is …
…broken.

https://bugs.webkit.org/show_bug.cgi?id=158079

Reviewed by Zalan Bujtas.

Source/WebCore:

Added new test fast/repaint/overflow-hidden-movement.html

Change checkForRepaintDuringLayout() to only be true for self-painting layers
and not for all layers.

* rendering/RenderObject.cpp:
(WebCore::RenderObject::hasSelfPaintingLayer):
(WebCore::RenderObject::checkForRepaintDuringLayout):
* rendering/RenderObject.h:
(WebCore::RenderObject::hasSelfPaintingLayer):

LayoutTests:

* fast/repaint/overflow-hidden-movement-expected.txt: Added.
* fast/repaint/overflow-hidden-movement.html: Added.



Canonical link: https://commits.webkit.org/176325@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@201529 268f45cc-cd09-0410-ab3c-d52691b4dbfc
  • Loading branch information
David Hyatt committed May 31, 2016
1 parent b4cf6b7 commit e49fe1653135fce076846d93f9cd449b83463514
@@ -1,3 +1,13 @@
2016-05-31 Dave Hyatt <hyatt@apple.com>

REGRESSION(r201040): Repainting of moving overflow:hidden objects is broken.
https://bugs.webkit.org/show_bug.cgi?id=158079

Reviewed by Zalan Bujtas.

* fast/repaint/overflow-hidden-movement-expected.txt: Added.
* fast/repaint/overflow-hidden-movement.html: Added.

2016-05-31 Eric Carlson <eric.carlson@apple.com>

[Mac] AirPlay route is sometimes reset when changing video.src
@@ -0,0 +1,7 @@
(repaint rects
(rect 8 8 300 100)
(rect 8 108 300 200)
(rect 8 108 300 200)
(rect 8 8 300 300)
)

@@ -0,0 +1,18 @@
<!DOCTYPE html>
<html>
<head></head>
<body>
<div style="height: 300px; overflow-y: hidden;" id="outerDiv">
<div style="height: 100px; width:300px; background: red; overflow:hidden" id="upperDiv"></div>
<div style="height: 200px; width:300px; background: green; overflow:hidden" id="lowerDiv"></div>
</div>
<script src="resources/text-based-repaint.js" type="text/javascript"></script>
<script>
repaintTest = function() {
document.getElementById('upperDiv').style.height = '0';
document.getElementById('lowerDiv').style.height = '300px';
};
runRepaintTest();
</script>
</body>
</html>
@@ -1,3 +1,21 @@
2016-05-31 Dave Hyatt <hyatt@apple.com>

REGRESSION(r201040): Repainting of moving overflow:hidden objects is broken.
https://bugs.webkit.org/show_bug.cgi?id=158079

Reviewed by Zalan Bujtas.

Added new test fast/repaint/overflow-hidden-movement.html

Change checkForRepaintDuringLayout() to only be true for self-painting layers
and not for all layers.

* rendering/RenderObject.cpp:
(WebCore::RenderObject::hasSelfPaintingLayer):
(WebCore::RenderObject::checkForRepaintDuringLayout):
* rendering/RenderObject.h:
(WebCore::RenderObject::hasSelfPaintingLayer):

2016-05-31 Zalan Bujtas <zalan@apple.com>

ShowRenderTree: Print location information for relative/sticky inlines.
@@ -936,9 +936,19 @@ IntRect RenderObject::pixelSnappedAbsoluteClippedOverflowRect() const
return snappedIntRect(absoluteClippedOverflowRect());
}

bool RenderObject::hasSelfPaintingLayer() const
{
if (!hasLayer())
return false;
auto* layer = downcast<RenderLayerModelObject>(*this).layer();
if (!layer)
return false;
return layer->isSelfPaintingLayer();
}

bool RenderObject::checkForRepaintDuringLayout() const
{
return !document().view()->needsFullRepaint() && !hasLayer() && everHadLayout();
return !document().view()->needsFullRepaint() && everHadLayout() && !hasSelfPaintingLayer();
}

LayoutRect RenderObject::rectWithOutlineForRepaint(const RenderLayerModelObject* repaintContainer, LayoutUnit outlineWidth) const
@@ -507,6 +507,7 @@ class RenderObject : public CachedImageClient {
VisibleInViewportState visibleInViewportState() { return m_bitfields.hasRareData() ? rareData().visibleInViewportState() : VisibilityUnknown; }

bool hasLayer() const { return m_bitfields.hasLayer(); }
bool hasSelfPaintingLayer() const;

enum BoxDecorationState {
NoBoxDecorations,

0 comments on commit e49fe16

Please sign in to comment.