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

Unified Diff: Source/core/frame/FrameView.cpp

Issue 328023002: Layout overflow from transforms should update frame scrollbars (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: rebase & revise Created 6 years, 6 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: Source/core/frame/FrameView.cpp
diff --git a/Source/core/frame/FrameView.cpp b/Source/core/frame/FrameView.cpp
index 060b1587d439f485b2557b0e3d6b4e93227b9769..884f4a828b16ad0db50479be94e6bc016dedda21 100644
--- a/Source/core/frame/FrameView.cpp
+++ b/Source/core/frame/FrameView.cpp
@@ -638,8 +638,25 @@ void FrameView::recalcOverflowAfterStyleChange()
renderView->recalcOverflowAfterStyleChange();
- // FIXME: We should adjust frame scrollbar here, but that will make many
- // tests flake in debug build.
+ if (needsLayout())
+ return;
+
+ InUpdateScrollbarsScope inUpdateScrollbarsScope(this);
+
+ bool shouldHaveHorizontalScrollbar = false;
+ bool shouldHaveVerticalScrollbar = false;
+ computeScrollbarExistence(shouldHaveHorizontalScrollbar, shouldHaveVerticalScrollbar);
+
+ bool hasHorizontalScrollbar = horizontalScrollbar();
+ bool hasVerticalScrollbar = verticalScrollbar();
+ if (hasHorizontalScrollbar != shouldHaveHorizontalScrollbar
+ || hasVerticalScrollbar != shouldHaveVerticalScrollbar) {
+ setNeedsLayout();
+ return;
+ }
+
+ adjustViewSize();
+ updateScrollbarGeometry();
}
bool FrameView::usesCompositedScrolling() const
« no previous file with comments | « LayoutTests/fast/transforms/transform-update-frame-overflow-expected.html ('k') | Source/platform/scroll/ScrollView.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698