Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(165)

Unified Diff: third_party/WebKit/Source/core/layout/LayoutBox.cpp

Issue 1929413002: Don't include contents visual overflow into paint invalidation rect (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: third_party/WebKit/Source/core/layout/LayoutBox.cpp
diff --git a/third_party/WebKit/Source/core/layout/LayoutBox.cpp b/third_party/WebKit/Source/core/layout/LayoutBox.cpp
index fd658ee88f2d7ee6a3e5ef4cd4dca1f38e2dfaac..1c53e242afe9626ce12102110c7ebfb19724f557 100644
--- a/third_party/WebKit/Source/core/layout/LayoutBox.cpp
+++ b/third_party/WebKit/Source/core/layout/LayoutBox.cpp
@@ -1981,14 +1981,10 @@ bool LayoutBox::needsForcedBreakBefore(EBreak previousBreakAfterValue) const
LayoutRect LayoutBox::localOverflowRectForPaintInvalidation() const
{
- if (style()->visibility() != VISIBLE) {
- PaintLayer* layer = enclosingLayer();
- layer->updateDescendantDependentFlags();
- if (layer->subtreeIsInvisible())
- return LayoutRect();
- }
+ if (style()->visibility() != VISIBLE)
+ return LayoutRect();
- return visualOverflowRect();
+ return selfVisualOverflowRect();
}
void LayoutBox::inflateVisualRectForReflectionAndFilterUnderContainer(LayoutRect& rect, const LayoutObject& container, const LayoutBoxModelObject* ancestorToStopAt) const
@@ -4448,8 +4444,7 @@ LayoutRect LayoutBox::visualOverflowRect() const
return borderBoxRect();
if (hasOverflowClip())
return m_overflow->selfVisualOverflowRect();
- // TODO(wangxianzhu): We should use normal unionRect() which ignores empty rects.
- return unionRectEvenIfEmpty(m_overflow->selfVisualOverflowRect(), m_overflow->contentsVisualOverflowRect());
+ return unionRect(m_overflow->selfVisualOverflowRect(), m_overflow->contentsVisualOverflowRect());
}
LayoutUnit LayoutBox::offsetLeft() const

Powered by Google App Engine
This is Rietveld 408576698