Bug 1776056 - Switch to the tab an animation is running and make sure the animation...
[gecko.git] / widget / ScrollbarDrawingAndroid.h
blob926aa76a80b3ec85965e4c59b0cb552f7160c64f
1 /* -*- Mode: C++; tab-width: 40; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
2 /* This Source Code Form is subject to the terms of the Mozilla Public
3 * License, v. 2.0. If a copy of the MPL was not distributed with this
4 * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
6 #ifndef mozilla_widget_ScrollbarDrawingAndroid_h
7 #define mozilla_widget_ScrollbarDrawingAndroid_h
9 #include "nsITheme.h"
10 #include "ScrollbarDrawing.h"
12 namespace mozilla::widget {
14 class ScrollbarDrawingAndroid final : public ScrollbarDrawing {
15 public:
16 ScrollbarDrawingAndroid() : ScrollbarDrawing(Kind::Android) {}
17 virtual ~ScrollbarDrawingAndroid() = default;
19 LayoutDeviceIntSize GetMinimumWidgetSize(nsPresContext*,
20 StyleAppearance aAppearance,
21 nsIFrame* aFrame) override;
23 ScrollbarSizes GetScrollbarSizes(nsPresContext*, StyleScrollbarWidth,
24 Overlay) override;
26 template <typename PaintBackendData>
27 void DoPaintScrollbarThumb(PaintBackendData&, const LayoutDeviceRect& aRect,
28 ScrollbarKind, nsIFrame* aFrame,
29 const ComputedStyle& aStyle,
30 const ElementState& aElementState,
31 const DocumentState& aDocumentState, const Colors&,
32 const DPIRatio&);
33 bool PaintScrollbarThumb(DrawTarget&, const LayoutDeviceRect& aRect,
34 ScrollbarKind, nsIFrame* aFrame,
35 const ComputedStyle& aStyle,
36 const ElementState& aElementState,
37 const DocumentState& aDocumentState, const Colors&,
38 const DPIRatio&) override;
39 bool PaintScrollbarThumb(WebRenderBackendData&, const LayoutDeviceRect& aRect,
40 ScrollbarKind, nsIFrame* aFrame,
41 const ComputedStyle& aStyle,
42 const ElementState& aElementState,
43 const DocumentState& aDocumentState, const Colors&,
44 const DPIRatio&) override;
46 void RecomputeScrollbarParams() override;
48 bool ShouldDrawScrollbarButtons() override { return false; }
51 } // namespace mozilla::widget
53 #endif