Bug 1747171 don't hold mutex while spinning nested event loop r=jesup
[gecko.git] / widget / ScrollbarDrawingAndroid.h
blob6be491d758f80673b1b5642a90ed81fcb68e9c76
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() = default;
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 bool aHorizontal, nsIFrame* aFrame,
29 const ComputedStyle& aStyle,
30 const EventStates& aElementState,
31 const EventStates& aDocumentState, const Colors&,
32 const DPIRatio&);
33 bool PaintScrollbarThumb(DrawTarget&, const LayoutDeviceRect& aRect,
34 bool aHorizontal, nsIFrame* aFrame,
35 const ComputedStyle& aStyle,
36 const EventStates& aElementState,
37 const EventStates& aDocumentState, const Colors&,
38 const DPIRatio&) override;
39 bool PaintScrollbarThumb(WebRenderBackendData&, const LayoutDeviceRect& aRect,
40 bool aHorizontal, nsIFrame* aFrame,
41 const ComputedStyle& aStyle,
42 const EventStates& aElementState,
43 const EventStates& aDocumentState, const Colors&,
44 const DPIRatio&) override;
46 void RecomputeScrollbarParams() override;
48 bool ShouldDrawScrollbarButtons() override { return false; }
51 } // namespace mozilla::widget
53 #endif