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

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

Issue 2505253002: Set scrollbar enabled state for overflow:auto. (Closed)
Patch Set: Fix test expectation 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
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 88711260d5bea2d9fc0e4c43a1a5fdd2fbc13586..51cfc57ab6a896545d4ea5b9ec14136a3ff77154 100644
--- a/third_party/WebKit/Source/core/paint/PaintLayerScrollableArea.cpp
+++ b/third_party/WebKit/Source/core/paint/PaintLayerScrollableArea.cpp
@@ -657,16 +657,13 @@ void PaintLayerScrollableArea::updateScrollDimensions() {
}
void PaintLayerScrollableArea::updateScrollbarEnabledState() {
- bool forceDisabled = ScrollbarTheme::theme().disableInvisibleScrollbars() &&
- 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);
- }
+ bool forceDisable = ScrollbarTheme::theme().disableInvisibleScrollbars() &&
+ scrollbarsHidden();
+
+ if (horizontalScrollbar())
+ horizontalScrollbar()->setEnabled(hasHorizontalOverflow() && !forceDisable);
+ if (verticalScrollbar())
+ verticalScrollbar()->setEnabled(hasVerticalOverflow() && !forceDisable);
}
void PaintLayerScrollableArea::setScrollOffsetUnconditionally(

Powered by Google App Engine
This is Rietveld 408576698