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

Unified Diff: Source/core/rendering/RenderLayerScrollableArea.cpp

Issue 250773002: Reland "Recompute overflow after transform changes" (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@build_hack
Patch Set: again... Created 6 years, 8 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/rendering/RenderLayerScrollableArea.h ('k') | Source/core/rendering/RenderObject.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/rendering/RenderLayerScrollableArea.cpp
diff --git a/Source/core/rendering/RenderLayerScrollableArea.cpp b/Source/core/rendering/RenderLayerScrollableArea.cpp
index d341b15c297482c8479e09e707bee5f24d4a2da6..d31a2aed74c5a4ff911402d8b5318888397ca617 100644
--- a/Source/core/rendering/RenderLayerScrollableArea.cpp
+++ b/Source/core/rendering/RenderLayerScrollableArea.cpp
@@ -771,6 +771,26 @@ void RenderLayerScrollableArea::updateAfterCompositingChange()
layer()->updateScrollingStateAfterCompositingChange();
}
+void RenderLayerScrollableArea::updateAfterOverflowRecalc()
+{
+ computeScrollDimensions();
+ if (Scrollbar* horizontalScrollbar = this->horizontalScrollbar()) {
+ int clientWidth = m_box.pixelSnappedClientWidth();
+ horizontalScrollbar->setProportion(clientWidth, overflowRect().width());
+ }
+ if (Scrollbar* verticalScrollbar = this->verticalScrollbar()) {
+ int clientHeight = m_box.pixelSnappedClientHeight();
+ verticalScrollbar->setProportion(clientHeight, overflowRect().height());
+ }
+
+ bool hasHorizontalOverflow = this->hasHorizontalOverflow();
+ bool hasVerticalOverflow = this->hasVerticalOverflow();
+ bool autoHorizontalScrollBarChanged = m_box.hasAutoHorizontalScrollbar() && (hasHorizontalScrollbar() != hasHorizontalOverflow);
+ bool autoVerticalScrollBarChanged = m_box.hasAutoVerticalScrollbar() && (hasVerticalScrollbar() != hasVerticalOverflow);
+ if (autoHorizontalScrollBarChanged || autoVerticalScrollBarChanged)
+ m_box.setNeedsLayout();
+}
+
IntSize RenderLayerScrollableArea::clampScrollOffset(const IntSize& scrollOffset) const
{
int maxX = scrollWidth() - m_box.pixelSnappedClientWidth();
« no previous file with comments | « Source/core/rendering/RenderLayerScrollableArea.h ('k') | Source/core/rendering/RenderObject.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698