Index: third_party/WebKit/Source/core/paint/PaintLayerScrollableArea.cpp |
diff --git a/third_party/WebKit/Source/core/paint/PaintLayerScrollableArea.cpp b/third_party/WebKit/Source/core/paint/PaintLayerScrollableArea.cpp |
index 9ced75cbdf05708c2e71e5bdb9db1eb12d60eab1..39afec388f4d7474c38c75129680c3a7ad0b2719 100644 |
--- a/third_party/WebKit/Source/core/paint/PaintLayerScrollableArea.cpp |
+++ b/third_party/WebKit/Source/core/paint/PaintLayerScrollableArea.cpp |
@@ -659,17 +659,14 @@ void PaintLayerScrollableArea::updateScrollDimensions() { |
} |
void PaintLayerScrollableArea::updateScrollbarEnabledState() { |
- bool forceDisabled = |
+ bool forceDisable = |
ScrollbarTheme::theme().shouldDisableInvisibleScrollbars() && |
scrollbarsHidden(); |
- // overflow:scroll should just enable/disable. |
- if (box().style()->overflowX() == OverflowScroll && horizontalScrollbar()) { |
- horizontalScrollbar()->setEnabled(hasHorizontalOverflow() && |
- !forceDisabled); |
- } |
- if (box().style()->overflowY() == OverflowScroll && verticalScrollbar()) { |
- verticalScrollbar()->setEnabled(hasVerticalOverflow() && !forceDisabled); |
- } |
+ |
+ if (horizontalScrollbar()) |
+ horizontalScrollbar()->setEnabled(hasHorizontalOverflow() && !forceDisable); |
+ if (verticalScrollbar()) |
+ verticalScrollbar()->setEnabled(hasVerticalOverflow() && !forceDisable); |
} |
void PaintLayerScrollableArea::setScrollOffsetUnconditionally( |