fune/accessible/base/StyleInfo.h
Emilio Cobos Álvarez 9d38cfb2a9 Bug 1832803 - Remove some magic from the bindings. r=boris
This simplifies a tiny bit our bindings in some places, and complicates
it in others, but over all I think it's better.

It requires a bit more manual code in the rust side to drop and cast the
relevant pointers (which was done implicitly before), but it's a lot
less magic than it used to be, and that's all autogenerated so consumers
don't need to care about it.

The set up is still not ideal. I don't like that we rely on destructors
running in both sides of the FFI boundary, but that's for another day.

This is the last usage of RawOffsetArc, so remove that. We now support
proper Arc<> in structs (GridTemplateAreas uses it), so I don't think
we'll need it any time soon.

Differential Revision: https://phabricator.services.mozilla.com/D177905
2023-05-12 23:33:12 +00:00

36 lines
929 B
C++

/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
/* vim: set expandtab shiftwidth=2 tabstop=2: */
/* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
#ifndef _mozilla_a11y_style_h_
#define _mozilla_a11y_style_h_
#include "mozilla/gfx/Types.h"
#include "mozilla/AlreadyAddRefed.h"
#include "nsStringFwd.h"
#include "nsColor.h"
class nsAtom;
namespace mozilla {
enum class StyleTextDecorationStyle : uint8_t;
namespace dom {
class Element;
} // namespace dom
namespace a11y {
class StyleInfo {
public:
static void FormatColor(const nscolor& aValue, nsAString& aFormattedValue);
static already_AddRefed<nsAtom> TextDecorationStyleToAtom(
StyleTextDecorationStyle aValue);
};
} // namespace a11y
} // namespace mozilla
#endif