chromium/third_party/blink/renderer/core/scroll/scrollbar.cc

/*
 * Copyright (C) 2004, 2006, 2008 Apple Inc. All rights reserved.
 *
 * Redistribution and use in source and binary forms, with or without
 * modification, are permitted provided that the following conditions
 * are met:
 * 1. Redistributions of source code must retain the above copyright
 *    notice, this list of conditions and the following disclaimer.
 * 2. Redistributions in binary form must reproduce the above copyright
 *    notice, this list of conditions and the following disclaimer in the
 *    documentation and/or other materials provided with the distribution.
 *
 * THIS SOFTWARE IS PROVIDED BY APPLE COMPUTER, INC. ``AS IS'' AND ANY
 * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
 * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL APPLE COMPUTER, INC. OR
 * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
 * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
 * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
 * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
 * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 */

#include "third_party/blink/renderer/core/scroll/scrollbar.h"

#include <algorithm>

#include "base/feature_list.h"
#include "third_party/blink/public/common/features.h"
#include "third_party/blink/public/common/input/web_gesture_event.h"
#include "third_party/blink/public/common/input/web_mouse_event.h"
#include "third_party/blink/public/common/input/web_pointer_event.h"
#include "third_party/blink/public/common/input/web_pointer_properties.h"
#include "third_party/blink/renderer/core/dom/element.h"
#include "third_party/blink/renderer/core/frame/local_frame.h"
#include "third_party/blink/renderer/core/layout/layout_box.h"
#include "third_party/blink/renderer/core/scroll/scroll_animator_base.h"
#include "third_party/blink/renderer/core/scroll/scrollable_area.h"
#include "third_party/blink/renderer/core/scroll/scrollbar_theme.h"
#include "third_party/blink/renderer/platform/runtime_enabled_features.h"
#include "third_party/blink/renderer/platform/text/text_direction.h"
#include "ui/base/ui_base_features.h"
#include "ui/gfx/geometry/point_conversions.h"
#include "ui/gfx/geometry/rect_f.h"

namespace blink {
bool ButtonInteractsWithScrollbar(const WebPointerProperties::Button button) {}

Scrollbar* Scrollbar::CreateForTesting(ScrollableArea* scrollable_area,
                                       ScrollbarOrientation orientation,
                                       ScrollbarTheme* theme) {}

Scrollbar::Scrollbar(ScrollableArea* scrollable_area,
                     ScrollbarOrientation orientation,
                     const LayoutObject* style_source,
                     ScrollbarTheme* theme)
    :{}

Scrollbar::~Scrollbar() = default;

void Scrollbar::Trace(Visitor* visitor) const {}

void Scrollbar::SetFrameRect(const gfx::Rect& frame_rect) {}

bool Scrollbar::HasTickmarks() const {}

Vector<gfx::Rect> Scrollbar::GetTickmarks() const {}

bool Scrollbar::IsScrollableAreaActive() const {}

bool Scrollbar::IsLeftSideVerticalScrollbar() const {}

int Scrollbar::Maximum() const {}

void Scrollbar::OffsetDidChange(mojom::blink::ScrollType scroll_type) {}

void Scrollbar::DisconnectFromScrollableArea() {}

void Scrollbar::SetProportion(int visible_size, int total_size) {}

void Scrollbar::AutoscrollTimerFired(TimerBase*) {}

bool Scrollbar::ThumbWillBeUnderMouse() const {}

void Scrollbar::AutoscrollPressedPart(base::TimeDelta delay) {}

void Scrollbar::StartTimerIfNeeded(base::TimeDelta delay) {}

void Scrollbar::StopTimerIfNeeded() {}

ScrollDirectionPhysical Scrollbar::PressedPartScrollDirectionPhysical() {}

ui::ScrollGranularity Scrollbar::PressedPartScrollGranularity() {}

void Scrollbar::MoveThumb(int pos, bool dragging_document) {}

void Scrollbar::SetHoveredPart(ScrollbarPart part) {}

void Scrollbar::SetPressedPart(ScrollbarPart part, WebInputEvent::Type type) {}

bool Scrollbar::HandlePointerEvent(const WebPointerEvent& event) {}

bool Scrollbar::HandleGestureTapOrPress(const WebGestureEvent& evt) {}

bool Scrollbar::HandleTapGesture() {}

void Scrollbar::MouseMoved(const WebMouseEvent& evt) {}

void Scrollbar::MouseEntered() {}

void Scrollbar::MouseExited() {}

void Scrollbar::MouseUp(const WebMouseEvent& mouse_event) {}

void Scrollbar::MouseDown(const WebMouseEvent& evt) {}

void Scrollbar::InjectScrollGestureForPressedPart(
    WebInputEvent::Type gesture_type) {}

// Injects a GestureScrollUpdate event to change the scroll offset based on
// the passed in parameter. This parameter is the target offset for the axis
// which described by |orientation_|.
void Scrollbar::InjectGestureScrollUpdateForThumbMove(
    float single_axis_target_offset) {}

void Scrollbar::InjectScrollGesture(WebInputEvent::Type gesture_type,
                                    ScrollOffset delta,
                                    ui::ScrollGranularity granularity) {}

bool Scrollbar::DeltaWillScroll(ScrollOffset delta) const {}

void Scrollbar::SetScrollbarsHiddenFromExternalAnimator(bool hidden) {}

void Scrollbar::SetEnabled(bool e) {}

int Scrollbar::ScrollbarThickness() const {}

bool Scrollbar::IsSolidColor() const {}

bool Scrollbar::IsOverlayScrollbar() const {}

bool Scrollbar::IsFluentOverlayScrollbarMinimalMode() const {}

bool Scrollbar::UsesNinePatchTrackAndCanSkipRepaint(
    const gfx::Rect& new_frame_rect) const {}

bool Scrollbar::ShouldParticipateInHitTesting() {}

bool Scrollbar::IsWindowActive() const {}

gfx::Point Scrollbar::ConvertFromRootFrame(
    const gfx::Point& point_in_root_frame) const {}

gfx::Rect Scrollbar::ConvertToContainingEmbeddedContentView(
    const gfx::Rect& local_rect) const {}

gfx::Point Scrollbar::ConvertFromContainingEmbeddedContentView(
    const gfx::Point& parent_point) const {}

float Scrollbar::ScrollableAreaCurrentPos() const {}

float Scrollbar::ScrollableAreaTargetPos() const {}

void Scrollbar::SetNeedsPaintInvalidation(ScrollbarPart invalid_parts) {}

CompositorElementId Scrollbar::GetElementId() const {}

float Scrollbar::ScaleFromDIP() const {}

float Scrollbar::EffectiveZoom() const {}

bool Scrollbar::ContainerIsRightToLeft() const {}

bool Scrollbar::ContainerIsFormControl() const {}

EScrollbarWidth Scrollbar::CSSScrollbarWidth() const {}

std::optional<blink::Color> Scrollbar::ScrollbarThumbColor() const {}

std::optional<blink::Color> Scrollbar::ScrollbarTrackColor() const {}

bool Scrollbar::IsOpaque() const {}

mojom::blink::ColorScheme Scrollbar::UsedColorScheme() const {}

LayoutBox* Scrollbar::GetLayoutBox() const {}

bool Scrollbar::IsScrollCornerVisible() const {}

bool Scrollbar::ShouldPaint() const {}

bool Scrollbar::LastKnownMousePositionInFrameRect() const {}

const ui::ColorProvider* Scrollbar::GetColorProvider(
    mojom::blink::ColorScheme color_scheme) const {}

bool Scrollbar::InForcedColorsMode() const {}

}  // namespace blink