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

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: revised 2 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 c5f50c2f3f809096887acda647c2a68df2be0738..cc0b9ff1fb43c70a62de567e4b3f84ad73d6bf75 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

Powered by Google App Engine
This is Rietveld 408576698