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 #include "ThemeCocoa.h"
7 #include "gfxPlatform.h"
8 #include "mozilla/LookAndFeel.h"
9 #include "mozilla/ServoStyleConsts.h"
11 namespace mozilla::widget
{
14 ThemeCocoa::DrawWidgetBackground(gfxContext
* aContext
, nsIFrame
* aFrame
,
15 StyleAppearance aAppearance
,
16 const nsRect
& aRect
, const nsRect
& aDirtyRect
,
17 DrawOverflow aDrawOverflow
) {
18 switch (aAppearance
) {
19 case StyleAppearance::Tooltip
:
20 // Cocoa tooltip background and border are already drawn by the
26 return Theme::DrawWidgetBackground(aContext
, aFrame
, aAppearance
, aRect
,
27 aDirtyRect
, aDrawOverflow
);
30 bool ThemeCocoa::CreateWebRenderCommandsForWidget(
31 mozilla::wr::DisplayListBuilder
& aBuilder
,
32 mozilla::wr::IpcResourceUpdateQueue
& aResources
,
33 const mozilla::layers::StackingContextHelper
& aSc
,
34 mozilla::layers::RenderRootStateManager
* aManager
, nsIFrame
* aFrame
,
35 StyleAppearance aAppearance
, const nsRect
& aRect
) {
36 switch (aAppearance
) {
37 case StyleAppearance::Tooltip
:
38 // Cocoa tooltip background and border are already drawn by the
44 return Theme::CreateWebRenderCommandsForWidget(
45 aBuilder
, aResources
, aSc
, aManager
, aFrame
, aAppearance
, aRect
);
48 } // namespace mozilla::widget