Index: third_party/WebKit/Source/core/frame/FrameView.cpp |
diff --git a/third_party/WebKit/Source/core/frame/FrameView.cpp b/third_party/WebKit/Source/core/frame/FrameView.cpp |
index 1edc270122be422811e0b4743c3bb9ecc75c7a5a..b36bd9b41cf92b20df3288b51af7f259710a50c8 100644 |
--- a/third_party/WebKit/Source/core/frame/FrameView.cpp |
+++ b/third_party/WebKit/Source/core/frame/FrameView.cpp |
@@ -3338,6 +3338,10 @@ void FrameView::addChild(Widget* child) |
void FrameView::setHasHorizontalScrollbar(bool hasBar) |
{ |
+ DCHECK(m_frame->settings()); |
+ if (m_frame->settings()->hideScrollbars()) |
+ hasBar = false; |
+ |
if (hasBar == !!m_horizontalScrollbar) |
return; |
@@ -3362,6 +3366,10 @@ void FrameView::setHasHorizontalScrollbar(bool hasBar) |
void FrameView::setHasVerticalScrollbar(bool hasBar) |
{ |
+ DCHECK(m_frame->settings()); |
+ if (m_frame->settings()->hideScrollbars()) |
+ hasBar = false; |
+ |
if (hasBar == !!m_verticalScrollbar) |
return; |
@@ -3399,12 +3407,6 @@ void FrameView::setScrollbarModes(ScrollbarMode horizontalMode, ScrollbarMode ve |
verticalMode = ScrollbarAlwaysOff; |
} |
- DCHECK(m_frame->settings()); |
- if (m_frame->settings()->hideScrollbars()) { |
- horizontalMode = ScrollbarAlwaysOff; |
- verticalMode = ScrollbarAlwaysOff; |
- } |
- |
if (horizontalMode != horizontalScrollbarMode() && !m_horizontalScrollbarLock) { |
m_horizontalScrollbarMode = horizontalMode; |
needsUpdate = true; |