Bug 1887677: Correctly compute inClass predicate when validating unbound private...
[gecko.git] / widget / ThemeCocoa.cpp
bloba41d41409b064f8727d7887820b8b62cf17bceaf
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 {
13 NS_IMETHODIMP
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
21 // OS window server.
22 return NS_OK;
23 default:
24 break;
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
39 // OS window server.
40 return true;
41 default:
42 break;
44 return Theme::CreateWebRenderCommandsForWidget(
45 aBuilder, aResources, aSc, aManager, aFrame, aAppearance, aRect);
48 } // namespace mozilla::widget