зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1891354
- Drive-by nsNativeThemeCocoa clean-ups. r=mac-reviewers,bradwerth
Remove redundant arg names and virtual keywords. Collapse switch clauses. Differential Revision: https://phabricator.services.mozilla.com/D207388
This commit is contained in:
Родитель
4e98892442
Коммит
9d3a3d6b34
|
@ -262,47 +262,42 @@ class nsNativeThemeCocoa : public mozilla::widget::ThemeCocoa {
|
||||||
NS_DECL_ISUPPORTS_INHERITED
|
NS_DECL_ISUPPORTS_INHERITED
|
||||||
|
|
||||||
// The nsITheme interface.
|
// The nsITheme interface.
|
||||||
NS_IMETHOD DrawWidgetBackground(gfxContext* aContext, nsIFrame* aFrame,
|
NS_IMETHOD DrawWidgetBackground(gfxContext* aContext, nsIFrame*,
|
||||||
StyleAppearance aAppearance,
|
StyleAppearance, const nsRect& aRect,
|
||||||
const nsRect& aRect, const nsRect& aDirtyRect,
|
const nsRect& aDirtyRect,
|
||||||
DrawOverflow) override;
|
DrawOverflow) override;
|
||||||
bool CreateWebRenderCommandsForWidget(
|
bool CreateWebRenderCommandsForWidget(
|
||||||
mozilla::wr::DisplayListBuilder& aBuilder,
|
mozilla::wr::DisplayListBuilder& aBuilder,
|
||||||
mozilla::wr::IpcResourceUpdateQueue& aResources,
|
mozilla::wr::IpcResourceUpdateQueue& aResources,
|
||||||
const mozilla::layers::StackingContextHelper& aSc,
|
const mozilla::layers::StackingContextHelper& aSc,
|
||||||
mozilla::layers::RenderRootStateManager* aManager, nsIFrame* aFrame,
|
mozilla::layers::RenderRootStateManager* aManager, nsIFrame*,
|
||||||
StyleAppearance aAppearance, const nsRect& aRect) override;
|
StyleAppearance, const nsRect& aRect) override;
|
||||||
[[nodiscard]] LayoutDeviceIntMargin GetWidgetBorder(
|
[[nodiscard]] LayoutDeviceIntMargin GetWidgetBorder(nsDeviceContext* aContext,
|
||||||
nsDeviceContext* aContext, nsIFrame* aFrame,
|
nsIFrame*,
|
||||||
StyleAppearance aAppearance) override;
|
StyleAppearance) override;
|
||||||
|
|
||||||
bool GetWidgetPadding(nsDeviceContext* aContext, nsIFrame* aFrame,
|
bool GetWidgetPadding(nsDeviceContext* aContext, nsIFrame*, StyleAppearance,
|
||||||
StyleAppearance aAppearance,
|
|
||||||
LayoutDeviceIntMargin* aResult) override;
|
LayoutDeviceIntMargin* aResult) override;
|
||||||
|
|
||||||
virtual bool GetWidgetOverflow(nsDeviceContext* aContext, nsIFrame* aFrame,
|
bool GetWidgetOverflow(nsDeviceContext* aContext, nsIFrame*, StyleAppearance,
|
||||||
StyleAppearance aAppearance,
|
nsRect* aOverflowRect) override;
|
||||||
nsRect* aOverflowRect) override;
|
|
||||||
|
|
||||||
LayoutDeviceIntSize GetMinimumWidgetSize(nsPresContext*, nsIFrame*,
|
LayoutDeviceIntSize GetMinimumWidgetSize(nsPresContext*, nsIFrame*,
|
||||||
StyleAppearance) override;
|
StyleAppearance) override;
|
||||||
NS_IMETHOD WidgetStateChanged(nsIFrame* aFrame, StyleAppearance aAppearance,
|
NS_IMETHOD WidgetStateChanged(nsIFrame*, StyleAppearance, nsAtom* aAttribute,
|
||||||
nsAtom* aAttribute, bool* aShouldRepaint,
|
bool* aShouldRepaint,
|
||||||
const nsAttrValue* aOldValue) override;
|
const nsAttrValue* aOldValue) override;
|
||||||
NS_IMETHOD ThemeChanged() override;
|
NS_IMETHOD ThemeChanged() override;
|
||||||
bool ThemeSupportsWidget(nsPresContext* aPresContext, nsIFrame* aFrame,
|
bool ThemeSupportsWidget(nsPresContext* aPresContext, nsIFrame*,
|
||||||
StyleAppearance aAppearance) override;
|
StyleAppearance) override;
|
||||||
bool WidgetIsContainer(StyleAppearance aAppearance) override;
|
bool WidgetIsContainer(StyleAppearance) override;
|
||||||
bool ThemeDrawsFocusForWidget(nsIFrame*, StyleAppearance) override;
|
bool ThemeDrawsFocusForWidget(nsIFrame*, StyleAppearance) override;
|
||||||
bool ThemeNeedsComboboxDropmarker() override;
|
bool ThemeNeedsComboboxDropmarker() override;
|
||||||
virtual bool WidgetAppearanceDependsOnWindowFocus(
|
bool WidgetAppearanceDependsOnWindowFocus(StyleAppearance) override;
|
||||||
StyleAppearance aAppearance) override;
|
ThemeGeometryType ThemeGeometryTypeForWidget(nsIFrame*,
|
||||||
virtual ThemeGeometryType ThemeGeometryTypeForWidget(
|
StyleAppearance) override;
|
||||||
nsIFrame* aFrame, StyleAppearance aAppearance) override;
|
Transparency GetWidgetTransparency(nsIFrame*, StyleAppearance) override;
|
||||||
virtual Transparency GetWidgetTransparency(
|
mozilla::Maybe<WidgetInfo> ComputeWidgetInfo(nsIFrame*, StyleAppearance,
|
||||||
nsIFrame* aFrame, StyleAppearance aAppearance) override;
|
|
||||||
mozilla::Maybe<WidgetInfo> ComputeWidgetInfo(nsIFrame* aFrame,
|
|
||||||
StyleAppearance aAppearance,
|
|
||||||
const nsRect& aRect);
|
const nsRect& aRect);
|
||||||
void DrawProgress(CGContextRef context, const HIRect& inBoxRect,
|
void DrawProgress(CGContextRef context, const HIRect& inBoxRect,
|
||||||
const ProgressParams& aParams);
|
const ProgressParams& aParams);
|
||||||
|
@ -310,24 +305,20 @@ class nsNativeThemeCocoa : public mozilla::widget::ThemeCocoa {
|
||||||
protected:
|
protected:
|
||||||
virtual ~nsNativeThemeCocoa();
|
virtual ~nsNativeThemeCocoa();
|
||||||
|
|
||||||
LayoutDeviceIntMargin DirectionAwareMargin(
|
LayoutDeviceIntMargin DirectionAwareMargin(const LayoutDeviceIntMargin&,
|
||||||
const LayoutDeviceIntMargin& aMargin, nsIFrame* aFrame);
|
nsIFrame*);
|
||||||
nsIFrame* SeparatorResponsibility(nsIFrame* aBefore, nsIFrame* aAfter);
|
nsIFrame* SeparatorResponsibility(nsIFrame* aBefore, nsIFrame* aAfter);
|
||||||
ControlParams ComputeControlParams(nsIFrame* aFrame,
|
ControlParams ComputeControlParams(nsIFrame*, mozilla::dom::ElementState);
|
||||||
mozilla::dom::ElementState aEventState);
|
SegmentParams ComputeSegmentParams(nsIFrame*, mozilla::dom::ElementState,
|
||||||
SegmentParams ComputeSegmentParams(nsIFrame* aFrame,
|
SegmentType);
|
||||||
mozilla::dom::ElementState aEventState,
|
TextFieldParams ComputeTextFieldParams(nsIFrame*, mozilla::dom::ElementState);
|
||||||
SegmentType aSegmentType);
|
ProgressParams ComputeProgressParams(nsIFrame*, mozilla::dom::ElementState,
|
||||||
TextFieldParams ComputeTextFieldParams(
|
|
||||||
nsIFrame* aFrame, mozilla::dom::ElementState aEventState);
|
|
||||||
ProgressParams ComputeProgressParams(nsIFrame* aFrame,
|
|
||||||
mozilla::dom::ElementState aEventState,
|
|
||||||
bool aIsHorizontal);
|
bool aIsHorizontal);
|
||||||
MeterParams ComputeMeterParams(nsIFrame* aFrame);
|
MeterParams ComputeMeterParams(nsIFrame*);
|
||||||
TreeHeaderCellParams ComputeTreeHeaderCellParams(
|
TreeHeaderCellParams ComputeTreeHeaderCellParams(nsIFrame*,
|
||||||
nsIFrame* aFrame, mozilla::dom::ElementState aEventState);
|
mozilla::dom::ElementState);
|
||||||
mozilla::Maybe<ScaleParams> ComputeHTMLScaleParams(
|
mozilla::Maybe<ScaleParams> ComputeHTMLScaleParams(
|
||||||
nsIFrame* aFrame, mozilla::dom::ElementState aEventState);
|
nsIFrame*, mozilla::dom::ElementState);
|
||||||
|
|
||||||
// HITheme drawing routines
|
// HITheme drawing routines
|
||||||
void DrawMeter(CGContextRef context, const HIRect& inBoxRect,
|
void DrawMeter(CGContextRef context, const HIRect& inBoxRect,
|
||||||
|
|
|
@ -2159,8 +2159,6 @@ Maybe<nsNativeThemeCocoa::WidgetInfo> nsNativeThemeCocoa::ComputeWidgetInfo(
|
||||||
|
|
||||||
switch (aAppearance) {
|
switch (aAppearance) {
|
||||||
case StyleAppearance::Menupopup:
|
case StyleAppearance::Menupopup:
|
||||||
return Nothing();
|
|
||||||
|
|
||||||
case StyleAppearance::Tooltip:
|
case StyleAppearance::Tooltip:
|
||||||
return Nothing();
|
return Nothing();
|
||||||
|
|
||||||
|
|
Загрузка…
Ссылка в новой задаче