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

Unified Diff: third_party/WebKit/Source/core/testing/Internals.cpp

Issue 2509843004: Disable overlay scrollbars to hide them on non-Mac. (Closed)
Patch Set: Renamed to shouldDisableInvisibleScrollbars 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/testing/Internals.cpp
diff --git a/third_party/WebKit/Source/core/testing/Internals.cpp b/third_party/WebKit/Source/core/testing/Internals.cpp
index 24d8a94437352889285efe8323a9a9f02d7df551..7a98145fd3d3cbda7665c517c36f27556b823832 100644
--- a/third_party/WebKit/Source/core/testing/Internals.cpp
+++ b/third_party/WebKit/Source/core/testing/Internals.cpp
@@ -137,6 +137,7 @@
#include "platform/heap/Handle.h"
#include "platform/network/ResourceLoadPriority.h"
#include "platform/scroll/ProgrammaticScrollAnimator.h"
+#include "platform/scroll/ScrollbarTheme.h"
#include "platform/testing/URLTestHelpers.h"
#include "platform/tracing/TraceEvent.h"
#include "platform/weborigin/SchemeRegistry.h"
@@ -3028,9 +3029,11 @@ void Internals::setCapsLockState(bool enabled) {
bool Internals::setScrollbarVisibilityInScrollableArea(Node* node,
bool visible) {
- if (ScrollableArea* scrollableArea = scrollableAreaForNode(node))
- return scrollableArea->scrollAnimator().setScrollbarsVisibleForTesting(
- visible);
+ if (ScrollableArea* scrollableArea = scrollableAreaForNode(node)) {
+ scrollableArea->setScrollbarsHidden(!visible);
+ scrollableArea->scrollAnimator().setScrollbarsVisibleForTesting(visible);
+ return ScrollbarTheme::theme().usesOverlayScrollbars();
+ }
return false;
}

Powered by Google App Engine
This is Rietveld 408576698