| 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 d24d79670ec318bbe425e2f953f40ce35ecc177f..edcba00f7e7e0af53a2d28f112856e8e16eb141b 100644
|
| --- a/third_party/WebKit/Source/core/paint/PaintLayerScrollableArea.cpp
|
| +++ b/third_party/WebKit/Source/core/paint/PaintLayerScrollableArea.cpp
|
| @@ -652,6 +652,22 @@ void PaintLayerScrollableArea::setScrollOffsetUnconditionally(
|
| scrollOffsetChanged(offset, scrollType);
|
| }
|
|
|
| +void PaintLayerScrollableArea::didChangeScrollbarsHidden() {
|
| + updateScrollbarsEnabledState();
|
| +}
|
| +
|
| +void PaintLayerScrollableArea::updateScrollbarsEnabledState() {
|
| + // overflow:scroll should just enable/disable.
|
| + if (box().style()->overflowX() == OverflowScroll && horizontalScrollbar()) {
|
| + horizontalScrollbar()->setEnabled(hasHorizontalOverflow() &&
|
| + !scrollbarsHidden());
|
| + }
|
| + if (box().style()->overflowY() == OverflowScroll && verticalScrollbar()) {
|
| + verticalScrollbar()->setEnabled(hasVerticalOverflow() &&
|
| + !scrollbarsHidden());
|
| + }
|
| +}
|
| +
|
| void PaintLayerScrollableArea::updateAfterLayout() {
|
| ASSERT(box().hasOverflowClip());
|
|
|
| @@ -738,11 +754,7 @@ void PaintLayerScrollableArea::updateAfterLayout() {
|
| // compositing/overflow/automatically-opt-into-composited-scrolling-after-style-change.html.
|
| DisableCompositingQueryAsserts disabler;
|
|
|
| - // overflow:scroll should just enable/disable.
|
| - if (box().style()->overflowX() == OverflowScroll && horizontalScrollbar())
|
| - horizontalScrollbar()->setEnabled(hasHorizontalOverflow());
|
| - if (box().style()->overflowY() == OverflowScroll && verticalScrollbar())
|
| - verticalScrollbar()->setEnabled(hasVerticalOverflow());
|
| + updateScrollbarsEnabledState();
|
|
|
| // Set up the range (and page step/line step).
|
| if (Scrollbar* horizontalScrollbar = this->horizontalScrollbar()) {
|
|
|