Bug 1550519 - Show a translucent parent highlight when a subgrid is highlighted....
[gecko.git] / dom / base / DOMPrefs.cpp
blob5237f7b1b5b30d3bd7f9d3706d3d3afc923f70c7
1 /* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
2 /* vim: set ts=8 sts=2 et sw=2 tw=80: */
3 /* This Source Code Form is subject to the terms of the Mozilla Public
4 * License, v. 2.0. If a copy of the MPL was not distributed with this
5 * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
7 #include "DOMPrefs.h"
8 #include "mozilla/Atomics.h"
9 #include "mozilla/Preferences.h"
10 #include "mozilla/StaticPrefs.h"
12 namespace mozilla {
13 namespace dom {
15 void DOMPrefs::Initialize() {
16 MOZ_ASSERT(NS_IsMainThread());
18 // Let's cache all the values on the main-thread.
19 #if !(defined(DEBUG) || defined(MOZ_ENABLE_JS_DUMP))
20 DOMPrefs::DumpEnabled();
21 #endif
23 #define DOM_WEBIDL_PREF(name)
25 #include "DOMPrefsInternal.h"
27 #undef DOM_WEBIDL_PREF
30 /* static */
31 bool DOMPrefs::DumpEnabled() {
32 #if !(defined(DEBUG) || defined(MOZ_ENABLE_JS_DUMP))
33 return StaticPrefs::browser_dom_window_dump_enabled();
34 #else
35 return true;
36 #endif
39 #define DOM_WEBIDL_PREF(name) \
40 /* static */ bool DOMPrefs::name(JSContext* aCx, JSObject* aObj) { \
41 return StaticPrefs::name(); \
44 #include "DOMPrefsInternal.h"
46 #undef DOM_WEBIDL_PREF
48 } // namespace dom
49 } // namespace mozilla