Commit 684f55e0 authored by Jeremy Roman's avatar Jeremy Roman Committed by Commit Bot

Replace remaining uses of WebScrollbar::Orientation with ScrollbarOrientation.

Bug: 841751
Change-Id: I965b442ef21d0f199574d8d4ff04fc03af7158b9
Reviewed-on: https://chromium-review.googlesource.com/1054248Reviewed-by: default avatarPhilip Rogers <pdr@chromium.org>
Reviewed-by: default avatarDavid Bokan <bokan@chromium.org>
Commit-Queue: Jeremy Roman <jbroman@chromium.org>
Cr-Commit-Position: refs/heads/master@{#558104}
parent 087971c6
...@@ -30,7 +30,6 @@ namespace blink { ...@@ -30,7 +30,6 @@ namespace blink {
// TODO(jbroman): Clean up these, which are used elsewhere. // TODO(jbroman): Clean up these, which are used elsewhere.
class WebScrollbar { class WebScrollbar {
public: public:
enum Orientation { kHorizontal, kVertical };
enum class ScrollingMode { kAuto, kAlwaysOff, kAlwaysOn, kLast = kAlwaysOn }; enum class ScrollingMode { kAuto, kAlwaysOff, kAlwaysOn, kLast = kAlwaysOn };
}; };
......
...@@ -36,7 +36,6 @@ ...@@ -36,7 +36,6 @@
#include "cc/layers/scrollbar_layer_interface.h" #include "cc/layers/scrollbar_layer_interface.h"
#include "third_party/blink/public/platform/task_type.h" #include "third_party/blink/public/platform/task_type.h"
#include "third_party/blink/public/platform/web_layer.h" #include "third_party/blink/public/platform/web_layer.h"
#include "third_party/blink/public/platform/web_scrollbar.h"
#include "third_party/blink/renderer/core/frame/local_frame.h" #include "third_party/blink/renderer/core/frame/local_frame.h"
#include "third_party/blink/renderer/core/frame/local_frame_client.h" #include "third_party/blink/renderer/core/frame/local_frame_client.h"
#include "third_party/blink/renderer/core/frame/local_frame_view.h" #include "third_party/blink/renderer/core/frame/local_frame_view.h"
...@@ -425,8 +424,8 @@ void VisualViewport::InitializeScrollbars() { ...@@ -425,8 +424,8 @@ void VisualViewport::InitializeScrollbars() {
inner_viewport_container_layer_->AddChild( inner_viewport_container_layer_->AddChild(
overlay_scrollbar_vertical_.get()); overlay_scrollbar_vertical_.get());
SetupScrollbar(WebScrollbar::kHorizontal); SetupScrollbar(kHorizontalScrollbar);
SetupScrollbar(WebScrollbar::kVertical); SetupScrollbar(kVerticalScrollbar);
} else { } else {
overlay_scrollbar_horizontal_->RemoveFromParent(); overlay_scrollbar_horizontal_->RemoveFromParent();
overlay_scrollbar_vertical_->RemoveFromParent(); overlay_scrollbar_vertical_->RemoveFromParent();
...@@ -440,8 +439,8 @@ void VisualViewport::InitializeScrollbars() { ...@@ -440,8 +439,8 @@ void VisualViewport::InitializeScrollbars() {
frame->View()->VisualViewportScrollbarsChanged(); frame->View()->VisualViewportScrollbarsChanged();
} }
void VisualViewport::SetupScrollbar(WebScrollbar::Orientation orientation) { void VisualViewport::SetupScrollbar(ScrollbarOrientation orientation) {
bool is_horizontal = orientation == WebScrollbar::kHorizontal; bool is_horizontal = orientation == kHorizontalScrollbar;
GraphicsLayer* scrollbar_graphics_layer = GraphicsLayer* scrollbar_graphics_layer =
is_horizontal ? overlay_scrollbar_horizontal_.get() is_horizontal ? overlay_scrollbar_horizontal_.get()
: overlay_scrollbar_vertical_.get(); : overlay_scrollbar_vertical_.get();
...@@ -463,10 +462,8 @@ void VisualViewport::SetupScrollbar(WebScrollbar::Orientation orientation) { ...@@ -463,10 +462,8 @@ void VisualViewport::SetupScrollbar(WebScrollbar::Orientation orientation) {
if (!scrollbar_layer_group) { if (!scrollbar_layer_group) {
ScrollingCoordinator* coordinator = GetPage().GetScrollingCoordinator(); ScrollingCoordinator* coordinator = GetPage().GetScrollingCoordinator();
DCHECK(coordinator); DCHECK(coordinator);
ScrollbarOrientation webcore_orientation =
is_horizontal ? kHorizontalScrollbar : kVerticalScrollbar;
scrollbar_layer_group = coordinator->CreateSolidColorScrollbarLayer( scrollbar_layer_group = coordinator->CreateSolidColorScrollbarLayer(
webcore_orientation, thumb_thickness, scrollbar_margin, false); orientation, thumb_thickness, scrollbar_margin, false);
// The compositor will control the scrollbar's visibility. Set to invisible // The compositor will control the scrollbar's visibility. Set to invisible
// by default so scrollbars don't show up in layout tests. // by default so scrollbars don't show up in layout tests.
......
...@@ -34,7 +34,6 @@ ...@@ -34,7 +34,6 @@
#include <memory> #include <memory>
#include "base/single_thread_task_runner.h" #include "base/single_thread_task_runner.h"
#include "third_party/blink/public/platform/web_scrollbar.h"
#include "third_party/blink/public/platform/web_size.h" #include "third_party/blink/public/platform/web_size.h"
#include "third_party/blink/renderer/core/core_export.h" #include "third_party/blink/renderer/core/core_export.h"
#include "third_party/blink/renderer/core/dom/events/event.h" #include "third_party/blink/renderer/core/dom/events/event.h"
...@@ -44,6 +43,7 @@ ...@@ -44,6 +43,7 @@
#include "third_party/blink/renderer/platform/geometry/int_size.h" #include "third_party/blink/renderer/platform/geometry/int_size.h"
#include "third_party/blink/renderer/platform/graphics/compositor_element_id.h" #include "third_party/blink/renderer/platform/graphics/compositor_element_id.h"
#include "third_party/blink/renderer/platform/graphics/graphics_layer_client.h" #include "third_party/blink/renderer/platform/graphics/graphics_layer_client.h"
#include "third_party/blink/renderer/platform/scroll/scroll_types.h"
#include "third_party/blink/renderer/platform/scroll/scrollable_area.h" #include "third_party/blink/renderer/platform/scroll/scrollable_area.h"
namespace blink { namespace blink {
...@@ -266,7 +266,7 @@ class CORE_EXPORT VisualViewport final ...@@ -266,7 +266,7 @@ class CORE_EXPORT VisualViewport final
const IntRect&) const override; const IntRect&) const override;
String DebugName(const GraphicsLayer*) const override; String DebugName(const GraphicsLayer*) const override;
void SetupScrollbar(WebScrollbar::Orientation); void SetupScrollbar(ScrollbarOrientation);
void NotifyRootFrameViewport() const; void NotifyRootFrameViewport() const;
......
...@@ -642,9 +642,6 @@ STATIC_ASSERT_ENUM(WebScrollbar::ScrollingMode::kAlwaysOff, ...@@ -642,9 +642,6 @@ STATIC_ASSERT_ENUM(WebScrollbar::ScrollingMode::kAlwaysOff,
kScrollbarAlwaysOff); kScrollbarAlwaysOff);
STATIC_ASSERT_ENUM(WebScrollbar::ScrollingMode::kAlwaysOn, kScrollbarAlwaysOn); STATIC_ASSERT_ENUM(WebScrollbar::ScrollingMode::kAlwaysOn, kScrollbarAlwaysOn);
STATIC_ASSERT_ENUM(WebScrollbar::kHorizontal, kHorizontalScrollbar);
STATIC_ASSERT_ENUM(WebScrollbar::kVertical, kVerticalScrollbar);
STATIC_ASSERT_ENUM(kWebScrollbarOverlayColorThemeDark, STATIC_ASSERT_ENUM(kWebScrollbarOverlayColorThemeDark,
kScrollbarOverlayColorThemeDark); kScrollbarOverlayColorThemeDark);
STATIC_ASSERT_ENUM(kWebScrollbarOverlayColorThemeLight, STATIC_ASSERT_ENUM(kWebScrollbarOverlayColorThemeLight,
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment