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

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: need to more explicitly prevent scrollbar update 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..5464ce7b1f5e959cbb3979c7382223adc3b14310 100644
--- a/Source/core/frame/FrameView.cpp
+++ b/Source/core/frame/FrameView.cpp
@@ -638,8 +638,24 @@ 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);
ojan 2014/06/11 03:04:53 Why do you need this here?
trchen 2014/06/11 05:04:13 Without this, adjustViewSize() on line #657 will c
ojan 2014/06/11 05:44:48 Ah. That makes sense. I tried tracing the code to
+
+ bool hasHorizontalScrollbar = horizontalScrollbar();
+ bool hasVerticalScrollbar = verticalScrollbar();
+ bool shouldHaveHorizontalScrollbar = false;
+ bool shouldHaveVerticalScrollbar = false;
+ computeScrollbarExistence(shouldHaveHorizontalScrollbar, shouldHaveVerticalScrollbar);
+
+ if (hasHorizontalScrollbar != shouldHaveHorizontalScrollbar || hasVerticalScrollbar != shouldHaveVerticalScrollbar) {
ojan 2014/06/11 03:04:53 Nit: Can you do the following? if (horizontalScrol
trchen 2014/06/11 05:04:13 Can't compare between pointer and bool. Will do th
ojan 2014/06/11 05:44:48 Ugh. Actually, the local variable bools seems clea
trchen 2014/06/11 06:01:23 Ah, that sounds even better. Will do.
+ setNeedsLayout();
ojan 2014/06/11 03:07:24 Should this not also call the following? setHa
trchen 2014/06/11 05:04:13 adjustViewSize() will be called in post-layout pha
+ return;
+ }
+
+ adjustViewSize();
+ updateScrollbarGeometry();
}
bool FrameView::usesCompositedScrolling() const

Powered by Google App Engine
This is Rietveld 408576698