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

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

Issue 949303002: Fix invalidation during painting of scrollbars (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: NeedsRebaseline Created 5 years, 10 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
« no previous file with comments | « Source/core/layout/LayoutBox.h ('k') | Source/core/layout/LayoutFlexibleBox.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/layout/LayoutBox.cpp
diff --git a/Source/core/layout/LayoutBox.cpp b/Source/core/layout/LayoutBox.cpp
index 6c96e11737005747c74fae729231500dbf8e7f9b..557df15b0fdb5c4ab1172ef3068c57b7a1085342 100644
--- a/Source/core/layout/LayoutBox.cpp
+++ b/Source/core/layout/LayoutBox.cpp
@@ -600,6 +600,19 @@ LayoutUnit LayoutBox::constrainContentBoxLogicalHeightByMinMax(LayoutUnit logica
return std::max(logicalHeight, computeContentLogicalHeight(styleToUse.logicalMinHeight(), intrinsicContentHeight));
}
+void LayoutBox::setLocationAndUpdateOverflowControlsIfNeeded(const LayoutPoint& location)
+{
+ if (LayerScrollableArea* scrollableArea = this->scrollableArea()) {
+ IntSize oldPixelSnappedBorderRectSize = pixelSnappedBorderBoxRect().size();
+ setLocation(location);
+ if (pixelSnappedBorderBoxRect().size() != oldPixelSnappedBorderRectSize)
+ scrollableArea->updateAfterLayout();
+ return;
+ }
+
+ setLocation(location);
+}
+
IntRect LayoutBox::absoluteContentBox() const
{
// This is wrong with transforms and flipped writing modes.
@@ -1719,7 +1732,7 @@ void LayoutBox::positionLineBox(InlineBox* box)
} else if (isReplaced()) {
// FIXME: the call to roundedLayoutPoint() below is temporary and should be removed once
// the transition to LayoutUnit-based types is complete (crbug.com/321237)
- setLocation(box->topLeft().roundedLayoutPoint());
+ setLocationAndUpdateOverflowControlsIfNeeded(box->topLeft().roundedLayoutPoint());
setInlineBoxWrapper(box);
}
}
« no previous file with comments | « Source/core/layout/LayoutBox.h ('k') | Source/core/layout/LayoutFlexibleBox.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698