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 |