Backed out 2 changesets (bug 1879680) for causing spidermonkey failures on dumpValue...
[gecko.git] / widget / ScrollbarDrawingWin.h
blobadc79035c2c3c788b890d3e7a39ffc1e158b5d6b
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_ScrollbarDrawingWin_h
7 #define mozilla_widget_ScrollbarDrawingWin_h
9 #include "nsITheme.h"
10 #include "nsNativeTheme.h"
11 #include "ScrollbarDrawing.h"
13 namespace mozilla::widget {
15 class ScrollbarDrawingWin : public ScrollbarDrawing {
16 protected:
17 explicit ScrollbarDrawingWin(Kind aKind) : ScrollbarDrawing(aKind) {}
19 public:
20 ScrollbarDrawingWin() : ScrollbarDrawingWin(Kind::Win10) {}
22 virtual ~ScrollbarDrawingWin() = default;
24 LayoutDeviceIntSize GetMinimumWidgetSize(nsPresContext*,
25 StyleAppearance aAppearance,
26 nsIFrame* aFrame) override;
28 Maybe<nsITheme::Transparency> GetScrollbarPartTransparency(
29 nsIFrame* aFrame, StyleAppearance aAppearance) override;
31 template <typename PaintBackendData>
32 bool DoPaintScrollbarThumb(PaintBackendData&, const LayoutDeviceRect&,
33 ScrollbarKind, nsIFrame*, const ComputedStyle&,
34 const ElementState& aElementState,
35 const DocumentState& aDocumentState, const Colors&,
36 const DPIRatio&);
37 bool PaintScrollbarThumb(DrawTarget&, const LayoutDeviceRect&, ScrollbarKind,
38 nsIFrame*, const ComputedStyle&,
39 const ElementState& aElementState,
40 const DocumentState& aDocumentState, const Colors&,
41 const DPIRatio&) override;
42 bool PaintScrollbarThumb(WebRenderBackendData&, const LayoutDeviceRect&,
43 ScrollbarKind, nsIFrame*, const ComputedStyle&,
44 const ElementState& aElementState,
45 const DocumentState& aDocumentState, const Colors&,
46 const DPIRatio&) override;
48 void RecomputeScrollbarParams() override;
51 static constexpr uint32_t kDefaultWinScrollbarSize = 17;
53 } // namespace mozilla::widget
55 #endif