dom/ipc/PrefsTypes.ipdlh
author Emilio Cobos Álvarez <emilio@crisal.io>
Wed, 23 Jan 2019 14:48:42 +0000
changeset 515269 08c85a7f6bccaf072f95d06c82c4e9162a311cad
parent 513455 4e94bbb9031517d9953adc24b6ff5646600df028
child 527228 6194cbc69a4c5d2b712280746737674c6b1489a0
permissions -rw-r--r--
Bug 1521884 - Use proper case for maxLength attribute in datetimebox widget. r=Gijs In non-HTML documents, getAttribute is not case-insensitive. Differential Revision: https://phabricator.services.mozilla.com/D17355

/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 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/. */

using struct mozilla::null_t from "ipc/IPCMessageUtils.h";

namespace mozilla {
namespace dom {

union PrefValue {
  nsCString;
  int32_t;
  bool;
};

union MaybePrefValue {
  PrefValue;
  null_t;
};

// This serialization form mirrors that used in mozilla::Pref in
// Preferences.cpp. The two should be kept in sync, e.g. if something is added
// to one it should also be added to the other.
//
// Note: there is no need to pass the isSticky attribute because that's an
// immutable attribute obtained from file at startup.
struct Pref {
  nsCString name;
  bool isLocked;
  MaybePrefValue defaultValue;
  MaybePrefValue userValue;
};

} // namespace dom
} // namespace mozilla