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

Side by Side 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 unified diff | Download patch
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2012 Google Inc. All rights reserved. 2 * Copyright (C) 2012 Google Inc. All rights reserved.
3 * Copyright (C) 2013 Apple Inc. All rights reserved. 3 * Copyright (C) 2013 Apple Inc. All rights reserved.
4 * 4 *
5 * Redistribution and use in source and binary forms, with or without 5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions 6 * modification, are permitted provided that the following conditions
7 * are met: 7 * are met:
8 * 8 *
9 * 1. Redistributions of source code must retain the above copyright 9 * 1. Redistributions of source code must retain the above copyright
10 * notice, this list of conditions and the following disclaimer. 10 * notice, this list of conditions and the following disclaimer.
(...skipping 119 matching lines...) Expand 10 before | Expand all | Expand 10 after
130 #include "platform/InstanceCounters.h" 130 #include "platform/InstanceCounters.h"
131 #include "platform/Language.h" 131 #include "platform/Language.h"
132 #include "platform/LayoutLocale.h" 132 #include "platform/LayoutLocale.h"
133 #include "platform/RuntimeEnabledFeatures.h" 133 #include "platform/RuntimeEnabledFeatures.h"
134 #include "platform/geometry/IntRect.h" 134 #include "platform/geometry/IntRect.h"
135 #include "platform/geometry/LayoutRect.h" 135 #include "platform/geometry/LayoutRect.h"
136 #include "platform/graphics/GraphicsLayer.h" 136 #include "platform/graphics/GraphicsLayer.h"
137 #include "platform/heap/Handle.h" 137 #include "platform/heap/Handle.h"
138 #include "platform/network/ResourceLoadPriority.h" 138 #include "platform/network/ResourceLoadPriority.h"
139 #include "platform/scroll/ProgrammaticScrollAnimator.h" 139 #include "platform/scroll/ProgrammaticScrollAnimator.h"
140 #include "platform/scroll/ScrollbarTheme.h"
140 #include "platform/testing/URLTestHelpers.h" 141 #include "platform/testing/URLTestHelpers.h"
141 #include "platform/tracing/TraceEvent.h" 142 #include "platform/tracing/TraceEvent.h"
142 #include "platform/weborigin/SchemeRegistry.h" 143 #include "platform/weborigin/SchemeRegistry.h"
143 #include "public/platform/Platform.h" 144 #include "public/platform/Platform.h"
144 #include "public/platform/WebConnectionType.h" 145 #include "public/platform/WebConnectionType.h"
145 #include "public/platform/WebGraphicsContext3DProvider.h" 146 #include "public/platform/WebGraphicsContext3DProvider.h"
146 #include "public/platform/WebLayer.h" 147 #include "public/platform/WebLayer.h"
147 #include "public/platform/modules/remoteplayback/WebRemotePlaybackAvailability.h " 148 #include "public/platform/modules/remoteplayback/WebRemotePlaybackAvailability.h "
148 #include "wtf/InstanceCounter.h" 149 #include "wtf/InstanceCounter.h"
149 #include "wtf/Optional.h" 150 #include "wtf/Optional.h"
(...skipping 2871 matching lines...) Expand 10 before | Expand all | Expand 10 after
3021 return ClientRectList::create(rects); 3022 return ClientRectList::create(rects);
3022 } 3023 }
3023 3024
3024 void Internals::setCapsLockState(bool enabled) { 3025 void Internals::setCapsLockState(bool enabled) {
3025 KeyboardEventManager::setCurrentCapsLockState( 3026 KeyboardEventManager::setCurrentCapsLockState(
3026 enabled ? OverrideCapsLockState::On : OverrideCapsLockState::Off); 3027 enabled ? OverrideCapsLockState::On : OverrideCapsLockState::Off);
3027 } 3028 }
3028 3029
3029 bool Internals::setScrollbarVisibilityInScrollableArea(Node* node, 3030 bool Internals::setScrollbarVisibilityInScrollableArea(Node* node,
3030 bool visible) { 3031 bool visible) {
3031 if (ScrollableArea* scrollableArea = scrollableAreaForNode(node)) 3032 if (ScrollableArea* scrollableArea = scrollableAreaForNode(node)) {
3032 return scrollableArea->scrollAnimator().setScrollbarsVisibleForTesting( 3033 scrollableArea->setScrollbarsHidden(!visible);
3033 visible); 3034 scrollableArea->scrollAnimator().setScrollbarsVisibleForTesting(visible);
3035 return ScrollbarTheme::theme().usesOverlayScrollbars();
3036 }
3034 return false; 3037 return false;
3035 } 3038 }
3036 3039
3037 double Internals::monotonicTimeToZeroBasedDocumentTime( 3040 double Internals::monotonicTimeToZeroBasedDocumentTime(
3038 double platformTime, 3041 double platformTime,
3039 ExceptionState& exceptionState) { 3042 ExceptionState& exceptionState) {
3040 Document* document = contextDocument(); 3043 Document* document = contextDocument();
3041 if (!document) { 3044 if (!document) {
3042 exceptionState.throwDOMException(InvalidAccessError, 3045 exceptionState.throwDOMException(InvalidAccessError,
3043 "No context document is available."); 3046 "No context document is available.");
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after
3079 return ClientRect::create(); 3082 return ClientRect::create();
3080 3083
3081 return ClientRect::create(FloatRect(node->layoutObject()->visualRect())); 3084 return ClientRect::create(FloatRect(node->layoutObject()->visualRect()));
3082 } 3085 }
3083 3086
3084 void Internals::crash() { 3087 void Internals::crash() {
3085 CHECK(false) << "Intentional crash"; 3088 CHECK(false) << "Intentional crash";
3086 } 3089 }
3087 3090
3088 } // namespace blink 3091 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698