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

Unified Diff: third_party/WebKit/Source/core/paint/PaintLayerScrollableArea.cpp

Issue 2505253002: Set scrollbar enabled state for overflow:auto. (Closed)
Patch Set: Rebase Created 4 years, 1 month 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
« no previous file with comments | « third_party/WebKit/LayoutTests/scrollbars/auto-scrollbar-fades-out-expected.html ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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(
« no previous file with comments | « third_party/WebKit/LayoutTests/scrollbars/auto-scrollbar-fades-out-expected.html ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698