зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1498586 - Add clang-format off to avoid the reformatting of the data structures r=Ehsan
Too hard/impossible for the tool to format correctly these structs Differential Revision: https://phabricator.services.mozilla.com/D8569 --HG-- extra : moz-landing-system : lando
This commit is contained in:
Родитель
06f22ca88b
Коммит
dd5741407b
|
@ -53,6 +53,7 @@ struct AtkStateMap {
|
|||
|
||||
// Map array from cross platform states to ATK states
|
||||
static const AtkStateMap gAtkStateMap[] = { // Cross Platform States
|
||||
// clang-format off
|
||||
{ kNone, kMapOpposite }, // states::UNAVAILABLE = 1 << 0
|
||||
{ ATK_STATE_SELECTED, kMapDirectly }, // states::SELECTED = 1 << 1
|
||||
{ ATK_STATE_FOCUSED, kMapDirectly }, // states::FOCUSED = 1 << 2
|
||||
|
@ -102,6 +103,7 @@ static const AtkStateMap gAtkStateMap[] = { // Cross Platfor
|
|||
{ ATK_STATE_EXPANDABLE, kMapDirectly }, // states::EXPANDABLE = 1 << 46
|
||||
{ kNone, kMapDirectly }, // states::PINNED = 1 << 47
|
||||
{ ATK_STATE_ACTIVE, kMapDirectly } // states::CURRENT = 1 << 48
|
||||
// clang-format on
|
||||
};
|
||||
|
||||
static const auto gAtkStateMapLen = std::extent<decltype(gAtkStateMap)>::value;
|
||||
|
|
|
@ -37,6 +37,7 @@ static const uint32_t kGenericAccType = 0;
|
|||
|
||||
static const nsRoleMapEntry sWAIRoleMaps[] =
|
||||
{
|
||||
// clang-format off
|
||||
{ // alert
|
||||
nsGkAtoms::alert,
|
||||
roles::ALERT,
|
||||
|
@ -1240,6 +1241,7 @@ static const nsRoleMapEntry sWAIRoleMaps[] =
|
|||
eARIASelectable,
|
||||
eARIACheckedMixed
|
||||
}
|
||||
// clang-format on
|
||||
};
|
||||
|
||||
static const nsRoleMapEntry sLandmarkRoleMap = {
|
||||
|
@ -1294,6 +1296,7 @@ struct AttrCharacteristics
|
|||
};
|
||||
|
||||
static const AttrCharacteristics gWAIUnivAttrMap[] = {
|
||||
// clang-format off
|
||||
{nsGkAtoms::aria_activedescendant, ATTR_BYPASSOBJ },
|
||||
{nsGkAtoms::aria_atomic, ATTR_BYPASSOBJ_IF_FALSE | ATTR_VALTOKEN | ATTR_GLOBAL },
|
||||
{nsGkAtoms::aria_busy, ATTR_VALTOKEN | ATTR_GLOBAL },
|
||||
|
@ -1331,6 +1334,7 @@ static const AttrCharacteristics gWAIUnivAttrMap[] = {
|
|||
{nsGkAtoms::aria_valuemin, ATTR_BYPASSOBJ },
|
||||
{nsGkAtoms::aria_valuemax, ATTR_BYPASSOBJ },
|
||||
{nsGkAtoms::aria_valuetext, ATTR_BYPASSOBJ }
|
||||
// clang-format on
|
||||
};
|
||||
|
||||
namespace {
|
||||
|
|
|
@ -1299,6 +1299,7 @@ AccessibleHandler::get_selectionRanges(IA2Range** ranges, long* nRanges)
|
|||
}
|
||||
|
||||
static const GUID kUnsupportedServices[] = {
|
||||
// clang-format off
|
||||
// Unknown, queried by Windows
|
||||
{0x33f139ee, 0xe509, 0x47f7, {0xbf, 0x39, 0x83, 0x76, 0x44, 0xf7, 0x45, 0x76}},
|
||||
// Unknown, queried by Windows
|
||||
|
@ -1313,6 +1314,7 @@ static const GUID kUnsupportedServices[] = {
|
|||
{0x902697FA, 0x80E4, 0x4560, {0x80, 0x2A, 0xA1, 0x3F, 0x22, 0xA6, 0x47, 0x09}},
|
||||
// IID_IHTMLElement, queried by JAWS
|
||||
{0x3050F1FF, 0x98B5, 0x11CF, {0xBB, 0x82, 0x00, 0xAA, 0x00, 0xBD, 0xCE, 0x0B}}
|
||||
// clang-format on
|
||||
};
|
||||
|
||||
/*** IServiceProvider ***/
|
||||
|
|
|
@ -11,6 +11,7 @@
|
|||
const uint32_t kEVENT_WIN_UNKNOWN = 0x00000000;
|
||||
|
||||
static const uint32_t gWinEventMap[] = {
|
||||
// clang-format off
|
||||
kEVENT_WIN_UNKNOWN, // nsIAccessibleEvent doesn't have 0 constant
|
||||
EVENT_OBJECT_SHOW, // nsIAccessibleEvent::EVENT_SHOW
|
||||
EVENT_OBJECT_HIDE, // nsIAccessibleEvent::EVENT_HIDE
|
||||
|
@ -97,7 +98,8 @@ static const uint32_t gWinEventMap[] = {
|
|||
IA2_EVENT_HYPERTEXT_CHANGED, // nsIAccessibleEvent::EVENT_HYPERTEXT_CHANGED
|
||||
IA2_EVENT_HYPERTEXT_NLINKS_CHANGED, // nsIAccessibleEvent::EVENT_HYPERTEXT_NLINKS_CHANGED
|
||||
IA2_EVENT_OBJECT_ATTRIBUTE_CHANGED, // nsIAccessibleEvent::EVENT_OBJECT_ATTRIBUTE_CHANGED
|
||||
kEVENT_WIN_UNKNOWN, // nsIAccessibleEvent::EVENT_VIRTUALCURSOR_CHANGED
|
||||
kEVENT_WIN_UNKNOWN, // nsIAccessibleEvent::EVENT_VIRTUALCURSOR_CHANGED
|
||||
EVENT_OBJECT_VALUECHANGE, // nsIAccessibleEvent::EVENT_TEXT_VALUE_CHANGE
|
||||
kEVENT_WIN_UNKNOWN, // nsIAccessibleEvent::EVENT_SCROLLING
|
||||
// clang-format on
|
||||
};
|
||||
|
|
|
@ -71,6 +71,7 @@ NS_DEFINE_NAMED_CID(NS_MACATTRIBUTIONSERVICE_CID);
|
|||
#endif
|
||||
|
||||
static const mozilla::Module::CIDEntry kBrowserCIDs[] = {
|
||||
// clang-format off
|
||||
{ &kNS_BROWSERDIRECTORYPROVIDER_CID, false, nullptr, DirectoryProviderConstructor },
|
||||
#if defined(XP_WIN)
|
||||
{ &kNS_SHELLSERVICE_CID, false, nullptr, nsWindowsShellServiceConstructor },
|
||||
|
@ -88,9 +89,11 @@ static const mozilla::Module::CIDEntry kBrowserCIDs[] = {
|
|||
{ &kNS_MACATTRIBUTIONSERVICE_CID, false, nullptr, nsMacAttributionServiceConstructor },
|
||||
#endif
|
||||
{ nullptr }
|
||||
// clang-format on
|
||||
};
|
||||
|
||||
static const mozilla::Module::ContractIDEntry kBrowserContracts[] = {
|
||||
// clang-format off
|
||||
{ NS_BROWSERDIRECTORYPROVIDER_CONTRACTID, &kNS_BROWSERDIRECTORYPROVIDER_CID },
|
||||
#if defined(XP_WIN)
|
||||
{ NS_SHELLSERVICE_CONTRACTID, &kNS_SHELLSERVICE_CID },
|
||||
|
@ -126,6 +129,7 @@ static const mozilla::Module::ContractIDEntry kBrowserContracts[] = {
|
|||
{ NS_MACATTRIBUTIONSERVICE_CONTRACTID, &kNS_MACATTRIBUTIONSERVICE_CID },
|
||||
#endif
|
||||
{ nullptr }
|
||||
// clang-format on
|
||||
};
|
||||
|
||||
static const mozilla::Module::CategoryEntry kBrowserCategories[] = {
|
||||
|
|
|
@ -57,15 +57,19 @@ struct MimeTypeAssociation
|
|||
};
|
||||
|
||||
static const ProtocolAssociation appProtocols[] = {
|
||||
// clang-format off
|
||||
{ "http", true },
|
||||
{ "https", true },
|
||||
{ "ftp", false },
|
||||
{ "chrome", false }
|
||||
// clang-format on
|
||||
};
|
||||
|
||||
static const MimeTypeAssociation appTypes[] = {
|
||||
// clang-format off
|
||||
{ "text/html", "htm html shtml" },
|
||||
{ "application/xhtml+xml", "xhtml xht" }
|
||||
// clang-format on
|
||||
};
|
||||
|
||||
// GConf registry key constants
|
||||
|
|
|
@ -116,6 +116,7 @@ NS_DEFINE_NAMED_CID(NS_SHENTRY_CID);
|
|||
NS_DEFINE_NAMED_CID(NS_CONTENTHANDLERSERVICE_CID);
|
||||
|
||||
const mozilla::Module::CIDEntry kDocShellCIDs[] = {
|
||||
// clang-format off
|
||||
{ &kNS_DOCSHELL_CID, false, nullptr, nsDocShellConstructor },
|
||||
{ &kNS_DEFAULTURIFIXUP_CID, false, nullptr, nsDefaultURIFixupConstructor },
|
||||
{ &kNS_WEBNAVIGATION_INFO_CID, false, nullptr, nsWebNavigationInfoConstructor },
|
||||
|
@ -138,9 +139,11 @@ const mozilla::Module::CIDEntry kDocShellCIDs[] = {
|
|||
#endif
|
||||
{ &kNS_SHENTRY_CID, false, nullptr, nsSHEntryConstructor },
|
||||
{ nullptr }
|
||||
// clang-format on
|
||||
};
|
||||
|
||||
const mozilla::Module::ContractIDEntry kDocShellContracts[] = {
|
||||
// clang-format off
|
||||
{ "@mozilla.org/docshell;1", &kNS_DOCSHELL_CID },
|
||||
{ NS_URIFIXUP_CONTRACTID, &kNS_DEFAULTURIFIXUP_CID },
|
||||
{ NS_WEBNAVIGATION_INFO_CONTRACTID, &kNS_WEBNAVIGATION_INFO_CID },
|
||||
|
@ -192,6 +195,7 @@ const mozilla::Module::ContractIDEntry kDocShellContracts[] = {
|
|||
{ NS_SHENTRY_CONTRACTID, &kNS_SHENTRY_CID },
|
||||
{ NS_OSPERMISSIONREQUEST_CONTRACTID, &kNS_OSPERMISSIONREQUEST_CID, mozilla::Module::MAIN_PROCESS_ONLY },
|
||||
{ nullptr }
|
||||
// clang-format on
|
||||
};
|
||||
|
||||
static const mozilla::Module kDocShellModule = {
|
||||
|
|
|
@ -394,6 +394,7 @@ static const uint16_t kValNBSP = 160;
|
|||
|
||||
// This table indexes into kEntityStrings[].
|
||||
static const uint8_t kEntities[] = {
|
||||
// clang-format off
|
||||
_, _, _, _, _, _, _, _, _, _,
|
||||
_, _, _, _, _, _, _, _, _, _,
|
||||
_, _, _, _, _, _, _, _, _, _,
|
||||
|
@ -411,10 +412,12 @@ static const uint8_t kEntities[] = {
|
|||
_, _, _, _, _, _, _, _, _, _,
|
||||
_, _, _, _, _, _, _, _, _, _,
|
||||
5
|
||||
// clang-format on
|
||||
};
|
||||
|
||||
// This table indexes into kEntityStrings[].
|
||||
static const uint8_t kAttrEntities[] = {
|
||||
// clang-format off
|
||||
_, _, _, _, _, _, _, _, _, _,
|
||||
_, _, _, _, _, _, _, _, _, _,
|
||||
_, _, _, _, _, _, _, _, _, _,
|
||||
|
@ -432,6 +435,7 @@ static const uint8_t kAttrEntities[] = {
|
|||
_, _, _, _, _, _, _, _, _, _,
|
||||
_, _, _, _, _, _, _, _, _, _,
|
||||
5
|
||||
// clang-format on
|
||||
};
|
||||
|
||||
#undef _
|
||||
|
|
|
@ -34,6 +34,7 @@ using namespace mozilla::dom;
|
|||
// Thanks to Mark Pilgrim and Sam Ruby for the initial whitelist
|
||||
//
|
||||
const nsStaticAtom* const kElementsHTML[] = {
|
||||
// clang-format off
|
||||
nsGkAtoms::a,
|
||||
nsGkAtoms::abbr,
|
||||
nsGkAtoms::acronym,
|
||||
|
@ -146,9 +147,11 @@ const nsStaticAtom* const kElementsHTML[] = {
|
|||
nsGkAtoms::video,
|
||||
nsGkAtoms::wbr,
|
||||
nullptr
|
||||
// clang-format on
|
||||
};
|
||||
|
||||
const nsStaticAtom* const kAttributesHTML[] = {
|
||||
// clang-format off
|
||||
nsGkAtoms::abbr,
|
||||
nsGkAtoms::accept,
|
||||
nsGkAtoms::acceptcharset,
|
||||
|
@ -254,9 +257,11 @@ const nsStaticAtom* const kAttributesHTML[] = {
|
|||
nsGkAtoms::width,
|
||||
nsGkAtoms::wrap,
|
||||
nullptr
|
||||
// clang-format on
|
||||
};
|
||||
|
||||
const nsStaticAtom* const kPresAttributesHTML[] = {
|
||||
// clang-format off
|
||||
nsGkAtoms::align,
|
||||
nsGkAtoms::background,
|
||||
nsGkAtoms::bgcolor,
|
||||
|
@ -273,9 +278,11 @@ const nsStaticAtom* const kPresAttributesHTML[] = {
|
|||
nsGkAtoms::valign,
|
||||
nsGkAtoms::vspace,
|
||||
nullptr
|
||||
// clang-format on
|
||||
};
|
||||
|
||||
const nsStaticAtom* const kURLAttributesHTML[] = {
|
||||
// clang-format off
|
||||
nsGkAtoms::action,
|
||||
nsGkAtoms::href,
|
||||
nsGkAtoms::src,
|
||||
|
@ -283,6 +290,7 @@ const nsStaticAtom* const kURLAttributesHTML[] = {
|
|||
nsGkAtoms::cite,
|
||||
nsGkAtoms::background,
|
||||
nullptr
|
||||
// clang-format on
|
||||
};
|
||||
|
||||
const nsStaticAtom* const kElementsSVG[] = {
|
||||
|
@ -921,12 +929,14 @@ const nsStaticAtom* const kAttributesMathML[] = {
|
|||
};
|
||||
|
||||
const nsStaticAtom* const kURLAttributesMathML[] = {
|
||||
// clang-format off
|
||||
nsGkAtoms::href,
|
||||
nsGkAtoms::src,
|
||||
nsGkAtoms::cdgroup_,
|
||||
nsGkAtoms::altimg_,
|
||||
nsGkAtoms::definitionURL_,
|
||||
nullptr
|
||||
// clang-format on
|
||||
};
|
||||
|
||||
nsTreeSanitizer::AtomsTable* nsTreeSanitizer::sElementsHTML = nullptr;
|
||||
|
|
|
@ -1181,6 +1181,7 @@ static const uint16_t kGTVal = 62;
|
|||
|
||||
// This table indexes into kEntityStrings[].
|
||||
static const uint8_t kEntities[] = {
|
||||
// clang-format off
|
||||
_, _, _, _, _, _, _, _, _, _,
|
||||
_, _, _, _, _, _, _, _, _, _,
|
||||
_, _, _, _, _, _, _, _, _, _,
|
||||
|
@ -1188,10 +1189,12 @@ static const uint8_t kEntities[] = {
|
|||
_, _, _, _, _, _, _, _, _, _,
|
||||
_, _, _, _, _, _, _, _, _, _,
|
||||
3, _, 4
|
||||
// clang-format on
|
||||
};
|
||||
|
||||
// This table indexes into kEntityStrings[].
|
||||
static const uint8_t kAttrEntities[] = {
|
||||
// clang-format off
|
||||
_, _, _, _, _, _, _, _, _, 5,
|
||||
6, _, _, 7, _, _, _, _, _, _,
|
||||
_, _, _, _, _, _, _, _, _, _,
|
||||
|
@ -1199,6 +1202,7 @@ static const uint8_t kAttrEntities[] = {
|
|||
_, _, _, _, _, _, _, _, _, _,
|
||||
_, _, _, _, _, _, _, _, _, _,
|
||||
3, _, 4
|
||||
// clang-format on
|
||||
};
|
||||
|
||||
#undef _
|
||||
|
|
|
@ -293,6 +293,7 @@ struct ModifierPair
|
|||
const char* name;
|
||||
};
|
||||
static const ModifierPair kPairs[] = {
|
||||
// clang-format off
|
||||
{ MODIFIER_ALT, NS_DOM_KEYNAME_ALT },
|
||||
{ MODIFIER_ALTGRAPH, NS_DOM_KEYNAME_ALTGRAPH },
|
||||
{ MODIFIER_CAPSLOCK, NS_DOM_KEYNAME_CAPSLOCK },
|
||||
|
@ -306,6 +307,7 @@ static const ModifierPair kPairs[] = {
|
|||
{ MODIFIER_SYMBOL, NS_DOM_KEYNAME_SYMBOL },
|
||||
{ MODIFIER_SYMBOLLOCK, NS_DOM_KEYNAME_SYMBOLLOCK },
|
||||
{ MODIFIER_OS, NS_DOM_KEYNAME_OS }
|
||||
// clang-format on
|
||||
};
|
||||
|
||||
// static
|
||||
|
|
|
@ -2685,6 +2685,7 @@ struct MidasCommand {
|
|||
};
|
||||
|
||||
static const struct MidasCommand gMidasCommandTable[] = {
|
||||
// clang-format off
|
||||
{ "bold", "cmd_bold", "", true, false },
|
||||
{ "italic", "cmd_italic", "", true, false },
|
||||
{ "underline", "cmd_underline", "", true, false },
|
||||
|
@ -2742,11 +2743,13 @@ static const struct MidasCommand gMidasCommandTable[] = {
|
|||
{ "print", "cmd_print", "", true, false },
|
||||
#endif
|
||||
{ nullptr, nullptr, nullptr, false, false }
|
||||
// clang-format on
|
||||
};
|
||||
|
||||
#define MidasCommandCount ((sizeof(gMidasCommandTable) / sizeof(struct MidasCommand)) - 1)
|
||||
|
||||
static const char* const gBlocks[] = {
|
||||
// clang-format off
|
||||
"ADDRESS",
|
||||
"BLOCKQUOTE",
|
||||
"DD",
|
||||
|
@ -2761,6 +2764,7 @@ static const char* const gBlocks[] = {
|
|||
"H6",
|
||||
"P",
|
||||
"PRE"
|
||||
// clang-format on
|
||||
};
|
||||
|
||||
static bool
|
||||
|
|
|
@ -25,6 +25,7 @@ public:
|
|||
static FFmpegLibWrapper sLibAV;
|
||||
|
||||
static const char* sLibs[] = {
|
||||
// clang-format off
|
||||
#if defined(XP_DARWIN)
|
||||
"libavcodec.58.dylib",
|
||||
"libavcodec.57.dylib",
|
||||
|
@ -43,6 +44,7 @@ static const char* sLibs[] = {
|
|||
"libavcodec.so.54",
|
||||
"libavcodec.so.53",
|
||||
#endif
|
||||
// clang-format on
|
||||
};
|
||||
|
||||
/* static */ bool
|
||||
|
|
|
@ -49,6 +49,7 @@ DEFINE_GUID(MF_LOW_LATENCY,
|
|||
// R600, R700, Evergreen and Cayman AMD cards. These support DXVA via UVD3 or earlier, and don't
|
||||
// handle 1080p60 well.
|
||||
static const DWORD sAMDPreUVD4[] = {
|
||||
// clang-format off
|
||||
0x9400, 0x9401, 0x9402, 0x9403, 0x9405, 0x940a, 0x940b, 0x940f, 0x94c0, 0x94c1, 0x94c3, 0x94c4, 0x94c5,
|
||||
0x94c6, 0x94c7, 0x94c8, 0x94c9, 0x94cb, 0x94cc, 0x94cd, 0x9580, 0x9581, 0x9583, 0x9586, 0x9587, 0x9588,
|
||||
0x9589, 0x958a, 0x958b, 0x958c, 0x958d, 0x958e, 0x958f, 0x9500, 0x9501, 0x9504, 0x9505, 0x9506, 0x9507,
|
||||
|
@ -73,10 +74,12 @@ static const DWORD sAMDPreUVD4[] = {
|
|||
0x9907, 0x9908, 0x9909, 0x990a, 0x990b, 0x990c, 0x990d, 0x990e, 0x990f, 0x9910, 0x9913, 0x9917, 0x9918,
|
||||
0x9919, 0x9990, 0x9991, 0x9992, 0x9993, 0x9994, 0x9995, 0x9996, 0x9997, 0x9998, 0x9999, 0x999a, 0x999b,
|
||||
0x999c, 0x999d, 0x99a0, 0x99a2, 0x99a4
|
||||
// clang-format on
|
||||
};
|
||||
|
||||
// List of NVidia Telsa GPU known to have broken NV12 rendering.
|
||||
static const DWORD sNVIDIABrokenNV12[] = {
|
||||
// clang-format off
|
||||
0x0191, 0x0193, 0x0194, 0x0197, 0x019d, 0x019e, // G80
|
||||
0x0400, 0x0401, 0x0402, 0x0403, 0x0404, 0x0405, 0x0406, 0x0407, 0x0408, 0x0409, // G84
|
||||
0x040a, 0x040b, 0x040c, 0x040d, 0x040e, 0x040f,
|
||||
|
@ -106,6 +109,7 @@ static const DWORD sNVIDIABrokenNV12[] = {
|
|||
0x0a60, 0x0a62, 0x0a63, 0x0a64, 0x0a65, 0x0a66, 0x0a67, 0x0a68, 0x0a69, 0x0a6a, // GT218
|
||||
0x0a6c, 0x0a6e, 0x0a6f, 0x0a70, 0x0a71, 0x0a72, 0x0a73, 0x0a74, 0x0a75, 0x0a76,
|
||||
0x0a78, 0x0a7a, 0x0a7c, 0x10c0, 0x10c3, 0x10c5, 0x10d8
|
||||
// clang-format on
|
||||
};
|
||||
|
||||
// The size we use for our synchronization surface.
|
||||
|
|
|
@ -358,6 +358,7 @@ struct timerEvent {
|
|||
int32_t timerIdUnschedule;
|
||||
};
|
||||
static timerEvent timerEvents[] = {
|
||||
// clang-format off
|
||||
{-1, 0, 200, false, -1},
|
||||
{0, 0, 400, false, -1},
|
||||
{0, 0, 200, true, -1},
|
||||
|
@ -365,6 +366,7 @@ static timerEvent timerEvents[] = {
|
|||
{0, -1, 0, false, 0},
|
||||
{1, -1, 0, false, -1},
|
||||
{1, -1, 0, false, 1},
|
||||
// clang-format on
|
||||
};
|
||||
static uint32_t currentTimerEventCount = 0;
|
||||
static uint32_t totalTimerEvents = sizeof(timerEvents) / sizeof(timerEvent);
|
||||
|
|
|
@ -32,6 +32,7 @@ GetCspParserLog()
|
|||
#define CSPPARSERLOG(args) MOZ_LOG(GetCspParserLog(), mozilla::LogLevel::Debug, args)
|
||||
#define CSPPARSERLOGENABLED() MOZ_LOG_TEST(GetCspParserLog(), mozilla::LogLevel::Debug)
|
||||
|
||||
// clang-format off
|
||||
static const char16_t COLON = ':';
|
||||
static const char16_t SEMICOLON = ';';
|
||||
static const char16_t SLASH = '/';
|
||||
|
@ -52,6 +53,7 @@ static const char16_t OPENBRACE = '(';
|
|||
static const char16_t CLOSINGBRACE = ')';
|
||||
static const char16_t EQUALS = '=';
|
||||
static const char16_t ATSYMBOL = '@';
|
||||
// clang-format on
|
||||
|
||||
static const uint32_t kSubHostPathCharacterCutoff = 512;
|
||||
|
||||
|
|
|
@ -100,11 +100,14 @@ SVGFEColorMatrixElement::GetPrimitiveDescription(nsSVGFilterInstance* aInstance,
|
|||
type == SVG_FECOLORMATRIX_TYPE_SATURATE ||
|
||||
type == SVG_FECOLORMATRIX_TYPE_HUE_ROTATE)) {
|
||||
atts.mType = (uint32_t)SVG_FECOLORMATRIX_TYPE_MATRIX;
|
||||
static const float identityMatrix[] =
|
||||
{ 1, 0, 0, 0, 0,
|
||||
static const float identityMatrix[] = {
|
||||
// clang-format off
|
||||
1, 0, 0, 0, 0,
|
||||
0, 1, 0, 0, 0,
|
||||
0, 0, 1, 0, 0,
|
||||
0, 0, 0, 1, 0 };
|
||||
0, 0, 0, 1, 0
|
||||
// clang-format on
|
||||
};
|
||||
atts.mValues.AppendElements(identityMatrix, 20);
|
||||
} else {
|
||||
atts.mType = type;
|
||||
|
|
|
@ -470,6 +470,7 @@ struct CharRange {
|
|||
bool txXSLTNumber::isAlphaNumeric(char16_t ch)
|
||||
{
|
||||
static const CharRange alphanumericRanges[] = {
|
||||
// clang-format off
|
||||
{ 0x0030, 0x0039 },
|
||||
{ 0x0041, 0x005A },
|
||||
{ 0x0061, 0x007A },
|
||||
|
@ -760,6 +761,7 @@ bool txXSLTNumber::isAlphaNumeric(char16_t ch)
|
|||
{ 0xFFC2, 0xFFC7 },
|
||||
{ 0xFFCA, 0xFFCF },
|
||||
{ 0xFFD2, 0xFFD7 }
|
||||
// clang-format on
|
||||
};
|
||||
|
||||
CharRange search = { ch, ch };
|
||||
|
|
|
@ -4235,6 +4235,7 @@ technique10 SampleTextTexture
|
|||
|
||||
const BYTE d2deffect[] =
|
||||
{
|
||||
// clang-format off
|
||||
68, 88, 66, 67, 116, 210,
|
||||
237, 43, 26, 169, 147, 99,
|
||||
62, 90, 128, 241, 238, 193,
|
||||
|
@ -16009,4 +16010,5 @@ const BYTE d2deffect[] =
|
|||
7, 0, 0, 0, 0, 0,
|
||||
0, 0, 7, 0, 0, 0,
|
||||
54, 7, 1, 0
|
||||
// clang-format on
|
||||
};
|
||||
|
|
|
@ -181,6 +181,7 @@ ret
|
|||
|
||||
const BYTE SampleRadialGradientPS[] =
|
||||
{
|
||||
// clang-format off
|
||||
68, 88, 66, 67, 20, 173,
|
||||
189, 124, 239, 6, 22, 67,
|
||||
226, 55, 243, 56, 30, 182,
|
||||
|
@ -766,6 +767,7 @@ const BYTE SampleRadialGradientPS[] =
|
|||
15, 0, 0, 0, 83, 86,
|
||||
95, 84, 97, 114, 103, 101,
|
||||
116, 0, 171, 171
|
||||
// clang-format on
|
||||
};
|
||||
#if 0
|
||||
//
|
||||
|
@ -926,6 +928,7 @@ ret
|
|||
|
||||
const BYTE SampleRadialGradientA0PS[] =
|
||||
{
|
||||
// clang-format off
|
||||
68, 88, 66, 67, 47, 105,
|
||||
118, 126, 8, 122, 228, 233,
|
||||
56, 98, 50, 148, 135, 10,
|
||||
|
@ -1416,4 +1419,5 @@ const BYTE SampleRadialGradientA0PS[] =
|
|||
0, 0, 83, 86, 95, 84,
|
||||
97, 114, 103, 101, 116, 0,
|
||||
171, 171
|
||||
// clang-format on
|
||||
};
|
||||
|
|
|
@ -19,6 +19,7 @@ using namespace mozilla;
|
|||
// the same as the default "network.IDN.blacklist_chars" value.
|
||||
static const char16_t sNetworkIDNBlacklistChars[] =
|
||||
{
|
||||
// clang-format off
|
||||
/*0x0020,*/
|
||||
0x00A0, 0x00BC, 0x00BD, 0x00BE, 0x01C3, 0x02D0, 0x0337,
|
||||
0x0338, 0x0589, 0x058A, 0x05C3, 0x05F4, 0x0609, 0x060A, 0x066A, 0x06D4,
|
||||
|
@ -35,6 +36,7 @@ static const char16_t sNetworkIDNBlacklistChars[] =
|
|||
0x33C6, 0x33DF, 0xA789, 0xFE14, 0xFE15, 0xFE3F, 0xFE5D, 0xFE5E,
|
||||
0xFEFF, 0xFF0E, 0xFF0F, 0xFF61, 0xFFA0, 0xFFF9, 0xFFFA, 0xFFFB,
|
||||
0xFFFC, 0xFFFD
|
||||
// clang-format on
|
||||
};
|
||||
|
||||
nsTextToSubURI::~nsTextToSubURI()
|
||||
|
|
|
@ -15,10 +15,13 @@
|
|||
using mozilla::unicode::MultiCharMapping;
|
||||
|
||||
static const MultiCharMapping CaseSpecials_Lower[] = {
|
||||
// clang-format off
|
||||
{ 0x0130, {0x0069, 0x0307, 0x0000} }, // LATIN CAPITAL LETTER I WITH DOT ABOVE
|
||||
// clang-format on
|
||||
};
|
||||
|
||||
static const MultiCharMapping CaseSpecials_Upper[] = {
|
||||
// clang-format off
|
||||
{ 0x00df, {0x0053, 0x0053, 0x0000} }, // LATIN SMALL LETTER SHARP S
|
||||
{ 0x0149, {0x02bc, 0x004e, 0x0000} }, // LATIN SMALL LETTER N PRECEDED BY APOSTROPHE
|
||||
{ 0x01f0, {0x004a, 0x030c, 0x0000} }, // LATIN SMALL LETTER J WITH CARON
|
||||
|
@ -121,9 +124,11 @@ static const MultiCharMapping CaseSpecials_Upper[] = {
|
|||
{ 0xfb15, {0x0544, 0x053b, 0x0000} }, // ARMENIAN SMALL LIGATURE MEN INI
|
||||
{ 0xfb16, {0x054e, 0x0546, 0x0000} }, // ARMENIAN SMALL LIGATURE VEW NOW
|
||||
{ 0xfb17, {0x0544, 0x053d, 0x0000} }, // ARMENIAN SMALL LIGATURE MEN XEH
|
||||
// clang-format on
|
||||
};
|
||||
|
||||
static const MultiCharMapping CaseSpecials_Title[] = {
|
||||
// clang-format off
|
||||
{ 0x00df, {0x0053, 0x0073, 0x0000} }, // LATIN SMALL LETTER SHARP S
|
||||
{ 0x0149, {0x02bc, 0x004e, 0x0000} }, // LATIN SMALL LETTER N PRECEDED BY APOSTROPHE
|
||||
{ 0x01f0, {0x004a, 0x030c, 0x0000} }, // LATIN SMALL LETTER J WITH CARON
|
||||
|
@ -172,6 +177,7 @@ static const MultiCharMapping CaseSpecials_Title[] = {
|
|||
{ 0xfb15, {0x0544, 0x056b, 0x0000} }, // ARMENIAN SMALL LIGATURE MEN INI
|
||||
{ 0xfb16, {0x054e, 0x0576, 0x0000} }, // ARMENIAN SMALL LIGATURE VEW NOW
|
||||
{ 0xfb17, {0x0544, 0x056d, 0x0000} }, // ARMENIAN SMALL LIGATURE MEN XEH
|
||||
// clang-format on
|
||||
};
|
||||
|
||||
static int CompareMCM(const void* aKey, const void* aElement)
|
||||
|
|
|
@ -1016,6 +1016,7 @@ js::FutexThread::notify(NotifyReason reason)
|
|||
}
|
||||
|
||||
const JSFunctionSpec AtomicsMethods[] = {
|
||||
// clang-format off
|
||||
JS_INLINABLE_FN("compareExchange", atomics_compareExchange, 4,0, AtomicsCompareExchange),
|
||||
JS_INLINABLE_FN("load", atomics_load, 2,0, AtomicsLoad),
|
||||
JS_INLINABLE_FN("store", atomics_store, 3,0, AtomicsStore),
|
||||
|
@ -1030,6 +1031,7 @@ const JSFunctionSpec AtomicsMethods[] = {
|
|||
JS_FN("notify", atomics_notify, 3,0),
|
||||
JS_FN("wake", atomics_notify, 3,0), // Legacy name
|
||||
JS_FS_END
|
||||
// clang-format on
|
||||
};
|
||||
|
||||
JSObject*
|
||||
|
|
|
@ -981,6 +981,7 @@ const Class DataViewObject::protoClass_ = {
|
|||
};
|
||||
|
||||
const JSFunctionSpec DataViewObject::methods[] = {
|
||||
// clang-format off
|
||||
JS_FN("getInt8", DataViewObject::fun_getInt8, 1,0),
|
||||
JS_FN("getUint8", DataViewObject::fun_getUint8, 1,0),
|
||||
JS_FN("getInt16", DataViewObject::fun_getInt16, 1,0),
|
||||
|
@ -998,6 +999,7 @@ const JSFunctionSpec DataViewObject::methods[] = {
|
|||
JS_FN("setFloat32", DataViewObject::fun_setFloat32, 2,0),
|
||||
JS_FN("setFloat64", DataViewObject::fun_setFloat64, 2,0),
|
||||
JS_FS_END
|
||||
// clang-format on
|
||||
};
|
||||
|
||||
const JSPropertySpec DataViewObject::properties[] = {
|
||||
|
|
|
@ -57,6 +57,7 @@ InfallibleQuote(RangedPtr<const SrcCharT> srcBegin, RangedPtr<const SrcCharT> sr
|
|||
// Entries with 'u' are handled as \\u00xy, and entries with 0 are not escaped in any way.
|
||||
// Characters >= 256 are all assumed to be unescaped.
|
||||
static const Latin1Char escapeLookup[256] = {
|
||||
// clang-format off
|
||||
'u', 'u', 'u', 'u', 'u', 'u', 'u', 'u', 'b', 't',
|
||||
'n', 'u', 'f', 'r', 'u', 'u', 'u', 'u', 'u', 'u',
|
||||
'u', 'u', 'u', 'u', 'u', 'u', 'u', 'u', 'u', 'u',
|
||||
|
@ -67,6 +68,7 @@ InfallibleQuote(RangedPtr<const SrcCharT> srcBegin, RangedPtr<const SrcCharT> sr
|
|||
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
|
||||
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
|
||||
0, 0, '\\', // rest are all zeros
|
||||
// clang-format on
|
||||
};
|
||||
|
||||
/* Step 1. */
|
||||
|
@ -1103,10 +1105,12 @@ json_stringify(JSContext* cx, unsigned argc, Value* vp)
|
|||
}
|
||||
|
||||
static const JSFunctionSpec json_static_methods[] = {
|
||||
// clang-format off
|
||||
JS_FN(js_toSource_str, json_toSource, 0, 0),
|
||||
JS_FN("parse", json_parse, 2, 0),
|
||||
JS_FN("stringify", json_stringify, 3, 0),
|
||||
JS_FS_END
|
||||
// clang-format on
|
||||
};
|
||||
|
||||
JSObject*
|
||||
|
|
|
@ -460,6 +460,7 @@ const JSPropertySpec MapObject::properties[] = {
|
|||
};
|
||||
|
||||
const JSFunctionSpec MapObject::methods[] = {
|
||||
// clang-format off
|
||||
JS_FN("get", get, 1, 0),
|
||||
JS_FN("has", has, 1, 0),
|
||||
JS_FN("set", set, 2, 0),
|
||||
|
@ -473,6 +474,7 @@ const JSFunctionSpec MapObject::methods[] = {
|
|||
JS_SELF_HOSTED_FN("entries", "MapEntries", 0, 0),
|
||||
JS_SELF_HOSTED_SYM_FN(iterator, "MapEntries", 0, 0),
|
||||
JS_FS_END
|
||||
// clang-format on
|
||||
};
|
||||
|
||||
const JSPropertySpec MapObject::staticProperties[] = {
|
||||
|
@ -1316,6 +1318,7 @@ const JSPropertySpec SetObject::properties[] = {
|
|||
};
|
||||
|
||||
const JSFunctionSpec SetObject::methods[] = {
|
||||
// clang-format off
|
||||
JS_FN("has", has, 1, 0),
|
||||
JS_FN("add", add, 1, 0),
|
||||
JS_FN("delete", delete_, 1, 0),
|
||||
|
@ -1328,6 +1331,7 @@ const JSFunctionSpec SetObject::methods[] = {
|
|||
JS_SELF_HOSTED_FN("keys", "SetValues", 0, 0),
|
||||
JS_SELF_HOSTED_SYM_FN(iterator, "SetValues", 0, 0),
|
||||
JS_FS_END
|
||||
// clang-format on
|
||||
};
|
||||
|
||||
const JSPropertySpec SetObject::staticProperties[] = {
|
||||
|
|
|
@ -2118,6 +2118,7 @@ ProtoSetter(JSContext* cx, unsigned argc, Value* vp)
|
|||
}
|
||||
|
||||
static const JSFunctionSpec object_methods[] = {
|
||||
// clang-format off
|
||||
JS_FN(js_toSource_str, obj_toSource, 0,0),
|
||||
JS_INLINABLE_FN(js_toString_str, obj_toString, 0,0, ObjectToString),
|
||||
JS_SELF_HOSTED_FN(js_toLocaleString_str, "Object_toLocaleString", 0, 0),
|
||||
|
@ -2130,14 +2131,18 @@ static const JSFunctionSpec object_methods[] = {
|
|||
JS_SELF_HOSTED_FN(js_lookupGetter_str, "ObjectLookupGetter", 1,0),
|
||||
JS_SELF_HOSTED_FN(js_lookupSetter_str, "ObjectLookupSetter", 1,0),
|
||||
JS_FS_END
|
||||
// clang-format on
|
||||
};
|
||||
|
||||
static const JSPropertySpec object_properties[] = {
|
||||
// clang-format off
|
||||
JS_PSGS("__proto__", ProtoGetter, ProtoSetter, 0),
|
||||
JS_PS_END
|
||||
// clang-format on
|
||||
};
|
||||
|
||||
static const JSFunctionSpec object_static_methods[] = {
|
||||
// clang-format off
|
||||
JS_FN("assign", obj_assign, 2, 0),
|
||||
JS_SELF_HOSTED_FN("getPrototypeOf", "ObjectGetPrototypeOf", 1, 0),
|
||||
JS_FN("setPrototypeOf", obj_setPrototypeOf, 2, 0),
|
||||
|
@ -2160,6 +2165,7 @@ static const JSFunctionSpec object_static_methods[] = {
|
|||
JS_FN("isSealed", obj_isSealed, 1, 0),
|
||||
JS_SELF_HOSTED_FN("fromEntries", "ObjectFromEntries", 1, 0),
|
||||
JS_FS_END
|
||||
// clang-format on
|
||||
};
|
||||
|
||||
static JSObject*
|
||||
|
|
|
@ -376,6 +376,7 @@ str_uneval(JSContext* cx, unsigned argc, Value* vp)
|
|||
}
|
||||
|
||||
static const JSFunctionSpec string_functions[] = {
|
||||
// clang-format off
|
||||
JS_FN(js_escape_str, str_escape, 1, JSPROP_RESOLVING),
|
||||
JS_FN(js_unescape_str, str_unescape, 1, JSPROP_RESOLVING),
|
||||
JS_FN(js_uneval_str, str_uneval, 1, JSPROP_RESOLVING),
|
||||
|
@ -385,6 +386,7 @@ static const JSFunctionSpec string_functions[] = {
|
|||
JS_FN(js_encodeURIComponent_str, str_encodeURI_Component, 1, JSPROP_RESOLVING),
|
||||
|
||||
JS_FS_END
|
||||
// clang-format on
|
||||
};
|
||||
|
||||
static const unsigned STRING_ELEMENT_ATTRS = JSPROP_ENUMERATE | JSPROP_READONLY | JSPROP_PERMANENT;
|
||||
|
@ -3375,6 +3377,7 @@ js::str_concat(JSContext* cx, unsigned argc, Value* vp)
|
|||
}
|
||||
|
||||
static const JSFunctionSpec string_methods[] = {
|
||||
// clang-format off
|
||||
JS_FN(js_toSource_str, str_toSource, 0,0),
|
||||
|
||||
/* Java-like methods. */
|
||||
|
@ -3438,6 +3441,7 @@ static const JSFunctionSpec string_methods[] = {
|
|||
|
||||
JS_SELF_HOSTED_SYM_FN(iterator, "String_iterator", 0,0),
|
||||
JS_FS_END
|
||||
// clang-format on
|
||||
};
|
||||
|
||||
// ES6 rev 27 (2014 Aug 24) 21.1.1
|
||||
|
@ -3696,6 +3700,7 @@ js::str_fromCodePoint(JSContext* cx, unsigned argc, Value* vp)
|
|||
}
|
||||
|
||||
static const JSFunctionSpec string_static_methods[] = {
|
||||
// clang-format off
|
||||
JS_INLINABLE_FN("fromCharCode", js::str_fromCharCode, 1, 0, StringFromCharCode),
|
||||
JS_INLINABLE_FN("fromCodePoint", js::str_fromCodePoint, 1, 0, StringFromCodePoint),
|
||||
|
||||
|
@ -3730,6 +3735,7 @@ static const JSFunctionSpec string_static_methods[] = {
|
|||
|
||||
JS_SELF_HOSTED_FN("localeCompare", "String_static_localeCompare", 2,0),
|
||||
JS_FS_END
|
||||
// clang-format on
|
||||
};
|
||||
|
||||
/* static */ Shape*
|
||||
|
@ -3822,6 +3828,7 @@ js::InitStringClass(JSContext* cx, Handle<GlobalObject*> global)
|
|||
* - 64: @
|
||||
*/
|
||||
static const bool js_isUriReservedPlusPound[] = {
|
||||
// clang-format off
|
||||
/* 0 1 2 3 4 5 6 7 8 9 */
|
||||
/* 0 */ ____, ____, ____, ____, ____, ____, ____, ____, ____, ____,
|
||||
/* 1 */ ____, ____, ____, ____, ____, ____, ____, ____, ____, ____,
|
||||
|
@ -3836,6 +3843,7 @@ static const bool js_isUriReservedPlusPound[] = {
|
|||
/* 10 */ ____, ____, ____, ____, ____, ____, ____, ____, ____, ____,
|
||||
/* 11 */ ____, ____, ____, ____, ____, ____, ____, ____, ____, ____,
|
||||
/* 12 */ ____, ____, ____, ____, ____, ____, ____, ____
|
||||
// clang-format on
|
||||
};
|
||||
|
||||
/*
|
||||
|
@ -3854,6 +3862,7 @@ static const bool js_isUriReservedPlusPound[] = {
|
|||
* - 126: ~
|
||||
*/
|
||||
static const bool js_isUriUnescaped[] = {
|
||||
// clang-format off
|
||||
/* 0 1 2 3 4 5 6 7 8 9 */
|
||||
/* 0 */ ____, ____, ____, ____, ____, ____, ____, ____, ____, ____,
|
||||
/* 1 */ ____, ____, ____, ____, ____, ____, ____, ____, ____, ____,
|
||||
|
@ -3868,6 +3877,7 @@ static const bool js_isUriUnescaped[] = {
|
|||
/* 10 */ true, true, true, true, true, true, true, true, true, true,
|
||||
/* 11 */ true, true, true, true, true, true, true, true, true, true,
|
||||
/* 12 */ true, true, true, ____, ____, ____, true, ____
|
||||
// clang-format on
|
||||
};
|
||||
|
||||
#undef ____
|
||||
|
|
|
@ -2065,6 +2065,7 @@ enum FirstCharKind {
|
|||
#define T_RC size_t(TokenKind::RightCurly)
|
||||
#define _______ Other
|
||||
static const uint8_t firstCharKinds[] = {
|
||||
// clang-format off
|
||||
/* 0 1 2 3 4 5 6 7 8 9 */
|
||||
/* 0+ */ _______, _______, _______, _______, _______, _______, _______, _______, _______, Space,
|
||||
/* 10+ */ EOL, Space, Space, EOL, _______, _______, _______, _______, _______, _______,
|
||||
|
@ -2079,6 +2080,7 @@ static const uint8_t firstCharKinds[] = {
|
|||
/* 100+ */ Ident, Ident, Ident, Ident, Ident, Ident, Ident, Ident, Ident, Ident,
|
||||
/* 110+ */ Ident, Ident, Ident, Ident, Ident, Ident, Ident, Ident, Ident, Ident,
|
||||
/* 120+ */ Ident, Ident, Ident, T_LC, _______, T_RC,T_BITNOT, _______
|
||||
// clang-format on
|
||||
};
|
||||
#undef T_COMMA
|
||||
#undef T_COLON
|
||||
|
|
|
@ -379,11 +379,13 @@ static const float MinLowFrequencyHeapGrowthFactor =
|
|||
static const int IGC_MARK_SLICE_MULTIPLIER = 2;
|
||||
|
||||
const AllocKind gc::slotsToThingKind[] = {
|
||||
// clang-format off
|
||||
/* 0 */ AllocKind::OBJECT0, AllocKind::OBJECT2, AllocKind::OBJECT2, AllocKind::OBJECT4,
|
||||
/* 4 */ AllocKind::OBJECT4, AllocKind::OBJECT8, AllocKind::OBJECT8, AllocKind::OBJECT8,
|
||||
/* 8 */ AllocKind::OBJECT8, AllocKind::OBJECT12, AllocKind::OBJECT12, AllocKind::OBJECT12,
|
||||
/* 12 */ AllocKind::OBJECT12, AllocKind::OBJECT16, AllocKind::OBJECT16, AllocKind::OBJECT16,
|
||||
/* 16 */ AllocKind::OBJECT16
|
||||
// clang-format on
|
||||
};
|
||||
|
||||
// Check that reserved bits of a Cell are compatible with our typical allocators
|
||||
|
|
|
@ -1421,6 +1421,7 @@ NativeRegExpMacroAssembler::CanReadUnaligned()
|
|||
const uint8_t
|
||||
NativeRegExpMacroAssembler::word_character_map[] =
|
||||
{
|
||||
// clang-format off
|
||||
0x00u, 0x00u, 0x00u, 0x00u, 0x00u, 0x00u, 0x00u, 0x00u,
|
||||
0x00u, 0x00u, 0x00u, 0x00u, 0x00u, 0x00u, 0x00u, 0x00u,
|
||||
0x00u, 0x00u, 0x00u, 0x00u, 0x00u, 0x00u, 0x00u, 0x00u,
|
||||
|
@ -1461,4 +1462,5 @@ NativeRegExpMacroAssembler::word_character_map[] =
|
|||
0x00u, 0x00u, 0x00u, 0x00u, 0x00u, 0x00u, 0x00u, 0x00u,
|
||||
0x00u, 0x00u, 0x00u, 0x00u, 0x00u, 0x00u, 0x00u, 0x00u,
|
||||
0x00u, 0x00u, 0x00u, 0x00u, 0x00u, 0x00u, 0x00u, 0x00u,
|
||||
// clang-format on
|
||||
};
|
||||
|
|
|
@ -711,6 +711,7 @@ MakeTime(double hour, double min, double sec, double ms)
|
|||
/* for use by date_parse */
|
||||
|
||||
static const char* const wtb[] = {
|
||||
// clang-format off
|
||||
"am", "pm",
|
||||
"monday", "tuesday", "wednesday", "thursday", "friday",
|
||||
"saturday", "sunday",
|
||||
|
@ -722,9 +723,11 @@ static const char* const wtb[] = {
|
|||
"mst", "mdt",
|
||||
"pst", "pdt"
|
||||
/* time zone table needs to be expanded */
|
||||
// clang-format on
|
||||
};
|
||||
|
||||
static const int ttb[] = {
|
||||
// clang-format off
|
||||
-1, -2, 0, 0, 0, 0, 0, 0, 0, /* AM/PM */
|
||||
2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13,
|
||||
10000 + 0, 10000 + 0, 10000 + 0, /* GMT/UT/UTC */
|
||||
|
@ -732,6 +735,7 @@ static const int ttb[] = {
|
|||
10000 + 6 * 60, 10000 + 5 * 60, /* CST/CDT */
|
||||
10000 + 7 * 60, 10000 + 6 * 60, /* MST/MDT */
|
||||
10000 + 8 * 60, 10000 + 7 * 60 /* PST/PDT */
|
||||
// clang-format on
|
||||
};
|
||||
|
||||
template <typename CharT>
|
||||
|
@ -3346,13 +3350,16 @@ date_toPrimitive(JSContext* cx, unsigned argc, Value* vp)
|
|||
}
|
||||
|
||||
static const JSFunctionSpec date_static_methods[] = {
|
||||
// clang-format off
|
||||
JS_FN("UTC", date_UTC, 7,0),
|
||||
JS_FN("parse", date_parse, 1,0),
|
||||
JS_FN("now", date_now, 0,0),
|
||||
JS_FS_END
|
||||
// clang-format on
|
||||
};
|
||||
|
||||
static const JSFunctionSpec date_methods[] = {
|
||||
// clang-format off
|
||||
JS_FN("getTime", date_getTime, 0,0),
|
||||
JS_FN("getTimezoneOffset", date_getTimezoneOffset, 0,0),
|
||||
JS_FN("getYear", date_getYear, 0,0),
|
||||
|
@ -3407,6 +3414,7 @@ static const JSFunctionSpec date_methods[] = {
|
|||
JS_FN(js_valueOf_str, date_valueOf, 0,0),
|
||||
JS_SYM_FN(toPrimitive, date_toPrimitive, 1,JSPROP_READONLY),
|
||||
JS_FS_END
|
||||
// clang-format on
|
||||
};
|
||||
|
||||
static bool
|
||||
|
|
|
@ -119,6 +119,7 @@ using JS::ToNumber;
|
|||
using JS::GenericNaN;
|
||||
|
||||
static const JSConstDoubleSpec math_constants[] = {
|
||||
// clang-format off
|
||||
{"E" , M_E },
|
||||
{"LOG2E" , M_LOG2E },
|
||||
{"LOG10E" , M_LOG10E },
|
||||
|
@ -128,6 +129,7 @@ static const JSConstDoubleSpec math_constants[] = {
|
|||
{"SQRT2" , M_SQRT2 },
|
||||
{"SQRT1_2", M_SQRT1_2 },
|
||||
{nullptr , 0 }
|
||||
// clang-format on
|
||||
};
|
||||
|
||||
typedef double (*UnaryMathFunctionType)(double);
|
||||
|
@ -1178,6 +1180,7 @@ math_toSource(JSContext* cx, unsigned argc, Value* vp)
|
|||
}
|
||||
|
||||
static const JSFunctionSpec math_static_methods[] = {
|
||||
// clang-format off
|
||||
JS_FN(js_toSource_str, math_toSource, 0, 0),
|
||||
JS_INLINABLE_FN("abs", math_abs, 1, 0, MathAbs),
|
||||
JS_INLINABLE_FN("acos", math_acos, 1, 0, MathACos),
|
||||
|
@ -1215,6 +1218,7 @@ static const JSFunctionSpec math_static_methods[] = {
|
|||
JS_INLINABLE_FN("sign", math_sign, 1, 0, MathSign),
|
||||
JS_INLINABLE_FN("cbrt", math_cbrt, 1, 0, MathCbrt),
|
||||
JS_FS_END
|
||||
// clang-format on
|
||||
};
|
||||
|
||||
JSObject*
|
||||
|
|
|
@ -1205,6 +1205,7 @@ num_toPrecision(JSContext* cx, unsigned argc, Value* vp)
|
|||
}
|
||||
|
||||
static const JSFunctionSpec number_methods[] = {
|
||||
// clang-format off
|
||||
JS_FN(js_toSource_str, num_toSource, 0, 0),
|
||||
JS_FN(js_toString_str, num_toString, 1, 0),
|
||||
#if EXPOSE_INTL_API
|
||||
|
@ -1217,6 +1218,7 @@ static const JSFunctionSpec number_methods[] = {
|
|||
JS_FN("toExponential", num_toExponential, 1, 0),
|
||||
JS_FN("toPrecision", num_toPrecision, 1, 0),
|
||||
JS_FS_END
|
||||
// clang-format on
|
||||
};
|
||||
|
||||
bool
|
||||
|
@ -1333,6 +1335,7 @@ js::InitNumberClass(JSContext* cx, Handle<GlobalObject*> global)
|
|||
* encoding for our value representation. See Value.h.
|
||||
*/
|
||||
static const JSConstDoubleSpec number_constants[] = {
|
||||
// clang-format off
|
||||
{"NaN", GenericNaN() },
|
||||
{"POSITIVE_INFINITY", mozilla::PositiveInfinity<double>() },
|
||||
{"NEGATIVE_INFINITY", mozilla::NegativeInfinity<double>() },
|
||||
|
@ -1345,6 +1348,7 @@ js::InitNumberClass(JSContext* cx, Handle<GlobalObject*> global)
|
|||
/* ES6 (May 2013 draft) 15.7.3.7 */
|
||||
{"EPSILON", 2.2204460492503130808472633361816e-16},
|
||||
{0,0}
|
||||
// clang-format on
|
||||
};
|
||||
|
||||
/* Add numeric constants (MAX_VALUE, NaN, &c.) to the Number constructor. */
|
||||
|
|
|
@ -100,11 +100,13 @@ pm_canMeasureSomething(JSContext* cx, unsigned argc, Value* vp)
|
|||
|
||||
static const uint8_t PM_FATTRS = JSPROP_READONLY | JSPROP_PERMANENT;
|
||||
static const JSFunctionSpec pm_fns[] = {
|
||||
// clang-format off
|
||||
JS_FN("start", pm_start, 0, PM_FATTRS),
|
||||
JS_FN("stop", pm_stop, 0, PM_FATTRS),
|
||||
JS_FN("reset", pm_reset, 0, PM_FATTRS),
|
||||
JS_FN("canMeasureSomething", pm_canMeasureSomething, 0, PM_FATTRS),
|
||||
JS_FS_END
|
||||
// clang-format on
|
||||
};
|
||||
|
||||
static const uint8_t PM_PATTRS =
|
||||
|
|
|
@ -55,6 +55,7 @@ using namespace js::unicode;
|
|||
* stop if you found the best shift
|
||||
*/
|
||||
const CharacterInfo unicode::js_charinfo[] = {
|
||||
// clang-format off
|
||||
{ 0, 0, 0 },
|
||||
{ 0, 0, 1 },
|
||||
{ 0, 0, 4 },
|
||||
|
@ -225,9 +226,11 @@ const CharacterInfo unicode::js_charinfo[] = {
|
|||
{ 0, 928, 2 },
|
||||
{ 64608, 0, 2 },
|
||||
{ 26672, 0, 2 },
|
||||
// clang-format on
|
||||
};
|
||||
|
||||
const uint8_t unicode::index1[] = {
|
||||
// clang-format off
|
||||
0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17,
|
||||
18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35,
|
||||
36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53,
|
||||
|
@ -285,9 +288,11 @@ const uint8_t unicode::index1[] = {
|
|||
94, 94, 94, 94, 94, 94, 94, 94, 94, 94, 94, 94, 94, 94, 94, 94, 94, 94,
|
||||
94, 94, 94, 94, 94, 94, 26, 26, 26, 26, 26, 162, 26, 163, 164, 165, 166, 167,
|
||||
26, 26, 26, 26, 168, 169, 170, 171, 172, 173, 26, 174, 175, 176, 177, 178,
|
||||
// clang-format on
|
||||
};
|
||||
|
||||
const uint8_t unicode::index2[] = {
|
||||
// clang-format off
|
||||
0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 0, 0, 0, 0,
|
||||
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0,
|
||||
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 2, 2, 2, 2, 2,
|
||||
|
@ -925,9 +930,11 @@ const uint8_t unicode::index2[] = {
|
|||
5, 5, 5, 5, 0, 0, 5, 5, 5, 0, 0, 0, 0, 0, 0, 0, 0, 0,
|
||||
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
|
||||
0, 0, 0, 0, 0, 0, 0, 0,
|
||||
// clang-format on
|
||||
};
|
||||
|
||||
const CodepointsWithSameUpperCaseInfo unicode::js_codepoints_with_same_upper_info[] = {
|
||||
// clang-format off
|
||||
{ 0, 0, 0 },
|
||||
{ 32, 0, 0 },
|
||||
{ 32, 232, 0 },
|
||||
|
@ -1063,9 +1070,11 @@ const CodepointsWithSameUpperCaseInfo unicode::js_codepoints_with_same_upper_inf
|
|||
{ 23254, 0, 0 },
|
||||
{ 23275, 0, 0 },
|
||||
{ 928, 0, 0 },
|
||||
// clang-format on
|
||||
};
|
||||
|
||||
const uint8_t unicode::codepoints_with_same_upper_index1[] = {
|
||||
// clang-format off
|
||||
0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 0, 0, 0, 10, 11, 12, 13, 14,
|
||||
15, 16, 17, 18, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
|
||||
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
|
||||
|
@ -1123,9 +1132,11 @@ const uint8_t unicode::codepoints_with_same_upper_index1[] = {
|
|||
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
|
||||
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
|
||||
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 44, 0, 0, 0,
|
||||
// clang-format on
|
||||
};
|
||||
|
||||
const uint8_t unicode::codepoints_with_same_upper_index2[] = {
|
||||
// clang-format off
|
||||
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
|
||||
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
|
||||
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
|
||||
|
@ -1286,9 +1297,11 @@ const uint8_t unicode::codepoints_with_same_upper_index2[] = {
|
|||
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
|
||||
0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
|
||||
1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0,
|
||||
// clang-format on
|
||||
};
|
||||
|
||||
const FoldingInfo unicode::js_foldinfo[] = {
|
||||
// clang-format off
|
||||
{ 0, 0, 0, 0 },
|
||||
{ 32, 0, 0, 0 },
|
||||
{ 32, 8415, 0, 0 },
|
||||
|
@ -1503,9 +1516,11 @@ const FoldingInfo unicode::js_foldinfo[] = {
|
|||
{ 928, 0, 0, 0 },
|
||||
{ 0, 64608, 0, 0 },
|
||||
{ 26672, 0, 0, 0 },
|
||||
// clang-format on
|
||||
};
|
||||
|
||||
const uint8_t unicode::folding_index1[] = {
|
||||
// clang-format off
|
||||
0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 0, 0, 11, 12, 13, 14, 15,
|
||||
16, 17, 18, 19, 20, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
|
||||
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
|
||||
|
@ -1563,9 +1578,11 @@ const uint8_t unicode::folding_index1[] = {
|
|||
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
|
||||
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
|
||||
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 50, 51, 0, 0,
|
||||
// clang-format on
|
||||
};
|
||||
|
||||
const uint8_t unicode::folding_index2[] = {
|
||||
// clang-format off
|
||||
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
|
||||
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
|
||||
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
|
||||
|
@ -1751,11 +1768,13 @@ const uint8_t unicode::folding_index2[] = {
|
|||
4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 0, 0, 0,
|
||||
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
|
||||
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
|
||||
// clang-format off
|
||||
};
|
||||
|
||||
bool
|
||||
js::unicode::IsIdentifierStartNonBMP(uint32_t codePoint)
|
||||
{
|
||||
// clang-format off
|
||||
if (codePoint >= 0x10000 && codePoint <= 0x1000B) { // LINEAR B SYLLABLE B008 A .. LINEAR B SYLLABLE B046 JE
|
||||
return true;
|
||||
}
|
||||
|
@ -2408,11 +2427,13 @@ js::unicode::IsIdentifierStartNonBMP(uint32_t codePoint)
|
|||
return true;
|
||||
}
|
||||
return false;
|
||||
// clang-format on
|
||||
}
|
||||
|
||||
bool
|
||||
js::unicode::IsIdentifierPartNonBMP(uint32_t codePoint)
|
||||
{
|
||||
// clang-format off
|
||||
if (codePoint >= 0x10000 && codePoint <= 0x1000B) { // LINEAR B SYLLABLE B008 A .. LINEAR B SYLLABLE B046 JE
|
||||
return true;
|
||||
}
|
||||
|
@ -3230,6 +3251,7 @@ js::unicode::IsIdentifierPartNonBMP(uint32_t codePoint)
|
|||
return true;
|
||||
}
|
||||
return false;
|
||||
// clang-format on
|
||||
}
|
||||
|
||||
bool
|
||||
|
@ -3294,6 +3316,7 @@ size_t
|
|||
js::unicode::LengthUpperCaseSpecialCasing(char16_t ch)
|
||||
{
|
||||
switch(ch) {
|
||||
// clang-format off
|
||||
case 0x00DF: return 2; // LATIN SMALL LETTER SHARP S
|
||||
case 0x0149: return 2; // LATIN SMALL LETTER N PRECEDED BY APOSTROPHE (LATIN SMALL LETTER APOSTROPHE N)
|
||||
case 0x01F0: return 2; // LATIN SMALL LETTER J WITH CARON (LATIN SMALL LETTER J HACEK)
|
||||
|
@ -3396,6 +3419,7 @@ js::unicode::LengthUpperCaseSpecialCasing(char16_t ch)
|
|||
case 0xFB15: return 2; // ARMENIAN SMALL LIGATURE MEN INI
|
||||
case 0xFB16: return 2; // ARMENIAN SMALL LIGATURE VEW NOW
|
||||
case 0xFB17: return 2; // ARMENIAN SMALL LIGATURE MEN XEH
|
||||
// clang-format on
|
||||
}
|
||||
|
||||
MOZ_ASSERT_UNREACHABLE("Bad character input.");
|
||||
|
@ -3845,6 +3869,7 @@ js::unicode::AppendUpperCaseSpecialCasing(char16_t ch, char16_t* elements, size_
|
|||
* - 97..122: a..z
|
||||
*/
|
||||
const bool unicode::js_isidstart[] = {
|
||||
// clang-format off
|
||||
/* 0 1 2 3 4 5 6 7 8 9 */
|
||||
/* 0 */ ____, ____, ____, ____, ____, ____, ____, ____, ____, ____,
|
||||
/* 1 */ ____, ____, ____, ____, ____, ____, ____, ____, ____, ____,
|
||||
|
@ -3859,6 +3884,7 @@ const bool unicode::js_isidstart[] = {
|
|||
/* 10 */ true, true, true, true, true, true, true, true, true, true,
|
||||
/* 11 */ true, true, true, true, true, true, true, true, true, true,
|
||||
/* 12 */ true, true, true, ____, ____, ____, ____, ____,
|
||||
// clang-format on
|
||||
};
|
||||
|
||||
/*
|
||||
|
@ -3870,6 +3896,7 @@ const bool unicode::js_isidstart[] = {
|
|||
* - 97..122: a..z
|
||||
*/
|
||||
const bool unicode::js_isident[] = {
|
||||
// clang-format off
|
||||
/* 0 1 2 3 4 5 6 7 8 9 */
|
||||
/* 0 */ ____, ____, ____, ____, ____, ____, ____, ____, ____, ____,
|
||||
/* 1 */ ____, ____, ____, ____, ____, ____, ____, ____, ____, ____,
|
||||
|
@ -3884,10 +3911,12 @@ const bool unicode::js_isident[] = {
|
|||
/* 10 */ true, true, true, true, true, true, true, true, true, true,
|
||||
/* 11 */ true, true, true, true, true, true, true, true, true, true,
|
||||
/* 12 */ true, true, true, ____, ____, ____, ____, ____,
|
||||
// clang-format on
|
||||
};
|
||||
|
||||
/* Whitespace chars: '\t', '\n', '\v', '\f', '\r', ' '. */
|
||||
const bool unicode::js_isspace[] = {
|
||||
// clang-format of
|
||||
/* 0 1 2 3 4 5 6 7 8 9 */
|
||||
/* 0 */ ____, ____, ____, ____, ____, ____, ____, ____, ____, true,
|
||||
/* 1 */ true, true, true, true, ____, ____, ____, ____, ____, ____,
|
||||
|
@ -3902,6 +3931,7 @@ const bool unicode::js_isspace[] = {
|
|||
/* 10 */ ____, ____, ____, ____, ____, ____, ____, ____, ____, ____,
|
||||
/* 11 */ ____, ____, ____, ____, ____, ____, ____, ____, ____, ____,
|
||||
/* 12 */ ____, ____, ____, ____, ____, ____, ____, ____,
|
||||
// clang-format on
|
||||
};
|
||||
|
||||
#undef ____
|
||||
|
|
|
@ -1929,6 +1929,7 @@ JSFunction::maybeRelazify(JSRuntime* rt)
|
|||
}
|
||||
|
||||
const JSFunctionSpec js::function_methods[] = {
|
||||
// clang-format off
|
||||
JS_FN(js_toSource_str, fun_toSource, 0,0),
|
||||
JS_FN(js_toString_str, fun_toString, 0,0),
|
||||
JS_FN(js_apply_str, fun_apply, 2,0),
|
||||
|
@ -1936,6 +1937,7 @@ const JSFunctionSpec js::function_methods[] = {
|
|||
JS_SELF_HOSTED_FN("bind", "FunctionBind", 2, 0),
|
||||
JS_SYM_FN(hasInstance, fun_symbolHasInstance, 1, JSPROP_READONLY | JSPROP_PERMANENT),
|
||||
JS_FS_END
|
||||
// clang-format on
|
||||
};
|
||||
|
||||
// ES2018 draft rev 2aea8f3e617b49df06414eb062ab44fad87661d3
|
||||
|
|
|
@ -281,6 +281,7 @@ Sprinter::jsprintf(const char* format, ...)
|
|||
}
|
||||
|
||||
const char js_EscapeMap[] = {
|
||||
// clang-format off
|
||||
'\b', 'b',
|
||||
'\f', 'f',
|
||||
'\n', 'n',
|
||||
|
@ -291,6 +292,7 @@ const char js_EscapeMap[] = {
|
|||
'\'', '\'',
|
||||
'\\', '\\',
|
||||
'\0'
|
||||
// clang-format on
|
||||
};
|
||||
|
||||
template <typename CharT>
|
||||
|
|
|
@ -2381,6 +2381,7 @@ intrinsic_CopyDataPropertiesOrGetOwnKeys(JSContext* cx, unsigned argc, Value* vp
|
|||
// Additionally, a set of C++-implemented helper functions is defined on the
|
||||
// self-hosting global.
|
||||
static const JSFunctionSpec intrinsic_functions[] = {
|
||||
// clang-format off
|
||||
JS_INLINABLE_FN("std_Array", array_construct, 1,0, Array),
|
||||
JS_INLINABLE_FN("std_Array_join", array_join, 1,0, ArrayJoin),
|
||||
JS_INLINABLE_FN("std_Array_push", array_push, 1,0, ArrayPush),
|
||||
|
@ -2774,6 +2775,7 @@ static const JSFunctionSpec intrinsic_functions[] = {
|
|||
JS_FN("PromiseResolve", intrinsic_PromiseResolve, 2, 0),
|
||||
|
||||
JS_FS_END
|
||||
// clang-format on
|
||||
};
|
||||
|
||||
void
|
||||
|
|
|
@ -1146,19 +1146,23 @@ JSFlatString::isIndexSlow(const char16_t* s, size_t length, uint32_t* indexp);
|
|||
* This is used when we generate our table of short strings, so the compiler is
|
||||
* happier if we use |c| as few times as possible.
|
||||
*/
|
||||
// clang-format off
|
||||
#define FROM_SMALL_CHAR(c) Latin1Char((c) + ((c) < 10 ? '0' : \
|
||||
(c) < 36 ? 'a' - 10 : \
|
||||
'A' - 36))
|
||||
// clang-format on
|
||||
|
||||
/*
|
||||
* Declare length-2 strings. We only store strings where both characters are
|
||||
* alphanumeric. The lower 10 short chars are the numerals, the next 26 are
|
||||
* the lowercase letters, and the next 26 are the uppercase letters.
|
||||
*/
|
||||
// clang-format off
|
||||
#define TO_SMALL_CHAR(c) ((c) >= '0' && (c) <= '9' ? (c) - '0' : \
|
||||
(c) >= 'a' && (c) <= 'z' ? (c) - 'a' + 10 : \
|
||||
(c) >= 'A' && (c) <= 'Z' ? (c) - 'A' + 36 : \
|
||||
StaticStrings::INVALID_SMALL_CHAR)
|
||||
// clang-format on
|
||||
|
||||
#define R TO_SMALL_CHAR
|
||||
const StaticStrings::SmallChar StaticStrings::toSmallChar[] = { R7(0) };
|
||||
|
|
|
@ -678,6 +678,7 @@ RegisterXPCTestComponents(JSContext* cx, unsigned argc, Value* vp)
|
|||
#endif
|
||||
|
||||
static const JSFunctionSpec glob_functions[] = {
|
||||
// clang-format off
|
||||
JS_FN("print", Print, 0,0),
|
||||
JS_FN("readline", ReadLine, 1,0),
|
||||
JS_FN("load", Load, 1,0),
|
||||
|
@ -699,6 +700,7 @@ static const JSFunctionSpec glob_functions[] = {
|
|||
JS_FN("registerXPCTestComponents", RegisterXPCTestComponents, 0, 0),
|
||||
#endif
|
||||
JS_FS_END
|
||||
// clang-format on
|
||||
};
|
||||
|
||||
/***************************************************************************/
|
||||
|
|
|
@ -257,6 +257,7 @@ struct VerifyReflowFlags {
|
|||
};
|
||||
|
||||
static const VerifyReflowFlags gFlags[] = {
|
||||
// clang-format off
|
||||
{ "verify", VERIFY_REFLOW_ON },
|
||||
{ "reflow", VERIFY_REFLOW_NOISY },
|
||||
{ "all", VERIFY_REFLOW_ALL },
|
||||
|
@ -264,6 +265,7 @@ static const VerifyReflowFlags gFlags[] = {
|
|||
{ "noisy-commands", VERIFY_REFLOW_NOISY_RC },
|
||||
{ "really-noisy-commands", VERIFY_REFLOW_REALLY_NOISY_RC },
|
||||
{ "resize", VERIFY_REFLOW_DURING_RESIZE_REFLOW },
|
||||
// clang-format on
|
||||
};
|
||||
|
||||
#define NUM_VERIFY_REFLOW_FLAGS (sizeof(gFlags) / sizeof(gFlags[0]))
|
||||
|
|
|
@ -67,6 +67,7 @@ private:
|
|||
nsresult
|
||||
NS_NewContentDocumentLoaderFactory(nsIDocumentLoaderFactory** aResult);
|
||||
|
||||
// clang-format off
|
||||
#ifdef MOZ_WEBM
|
||||
#define CONTENTDLF_WEBM_CATEGORIES \
|
||||
{ "Gecko-Content-Viewers", VIDEO_WEBM, "@mozilla.org/content/document-loader-factory;1" }, \
|
||||
|
@ -100,7 +101,7 @@ NS_NewContentDocumentLoaderFactory(nsIDocumentLoaderFactory** aResult);
|
|||
{ "Gecko-Content-Viewers", TEXT_VTT, "@mozilla.org/content/document-loader-factory;1" }, \
|
||||
{ "Gecko-Content-Viewers", APPLICATION_WAPXHTML_XML, "@mozilla.org/content/document-loader-factory;1" }, \
|
||||
CONTENTDLF_WEBM_CATEGORIES
|
||||
|
||||
// clang-format on
|
||||
|
||||
#endif
|
||||
|
||||
|
|
|
@ -505,6 +505,7 @@ NS_DEFINE_NAMED_CID(TEXT_INPUT_PROCESSOR_CID);
|
|||
NS_DEFINE_NAMED_CID(NS_SCRIPTERROR_CID);
|
||||
|
||||
static const mozilla::Module::CIDEntry kLayoutCIDs[] = {
|
||||
// clang-format off
|
||||
XPCONNECT_CIDENTRIES
|
||||
#ifdef DEBUG
|
||||
{ &kNS_LAYOUT_DEBUGGER_CID, false, nullptr, CreateNewLayoutDebugger },
|
||||
|
@ -582,9 +583,11 @@ static const mozilla::Module::CIDEntry kLayoutCIDs[] = {
|
|||
{ &kTEXT_INPUT_PROCESSOR_CID, false, nullptr, TextInputProcessorConstructor },
|
||||
{ &kNS_SCRIPTERROR_CID, false, nullptr, nsScriptErrorConstructor },
|
||||
{ nullptr }
|
||||
// clang-format on
|
||||
};
|
||||
|
||||
static const mozilla::Module::ContractIDEntry kLayoutContracts[] = {
|
||||
// clang-format off
|
||||
XPCONNECT_CONTRACTS
|
||||
{ "@mozilla.org/inspector/deep-tree-walker;1", &kIN_DEEPTREEWALKER_CID },
|
||||
{ NS_DOC_ENCODER_CONTRACTID_BASE "text/xml", &kNS_TEXT_ENCODER_CID },
|
||||
|
@ -681,6 +684,7 @@ static const mozilla::Module::CategoryEntry kLayoutCategories[] = {
|
|||
{ "profile-after-change", "PresentationService", PRESENTATION_SERVICE_CONTRACTID },
|
||||
{ "profile-after-change", "Notification Telemetry Service", NOTIFICATIONTELEMETRYSERVICE_CONTRACTID },
|
||||
{ nullptr }
|
||||
// clang-format on
|
||||
};
|
||||
|
||||
static void
|
||||
|
|
|
@ -492,18 +492,23 @@ nsResizerFrame::RestoreOriginalSize(nsIContent* aContent)
|
|||
nsResizerFrame::Direction
|
||||
nsResizerFrame::GetDirection()
|
||||
{
|
||||
static const Element::AttrValuesArray strings[] =
|
||||
{nsGkAtoms::topleft, nsGkAtoms::top, nsGkAtoms::topright,
|
||||
static const Element::AttrValuesArray strings[] = {
|
||||
// clang-format off
|
||||
nsGkAtoms::topleft, nsGkAtoms::top, nsGkAtoms::topright,
|
||||
nsGkAtoms::left, nsGkAtoms::right,
|
||||
nsGkAtoms::bottomleft, nsGkAtoms::bottom, nsGkAtoms::bottomright,
|
||||
nsGkAtoms::bottomstart, nsGkAtoms::bottomend,
|
||||
nullptr};
|
||||
nullptr
|
||||
// clang-format on
|
||||
};
|
||||
|
||||
static const Direction directions[] =
|
||||
{{-1, -1}, {0, -1}, {1, -1},
|
||||
static const Direction directions[] = {
|
||||
// clang-format off
|
||||
{-1, -1}, {0, -1}, {1, -1},
|
||||
{-1, 0}, {1, 0},
|
||||
{-1, 1}, {0, 1}, {1, 1},
|
||||
{-1, 1}, {1, 1}
|
||||
// clang-format on
|
||||
};
|
||||
|
||||
if (!GetContent()) {
|
||||
|
|
|
@ -17,6 +17,7 @@ using namespace std;
|
|||
// This is the CENC initData from Google's web-platform tests.
|
||||
// https://github.com/w3c/web-platform-tests/blob/master/encrypted-media/Google/encrypted-media-utils.js#L50
|
||||
const uint8_t gGoogleWPTCencInitData[] = {
|
||||
// clang-format off
|
||||
0x00, 0x00, 0x00, 0x00, // size = 0
|
||||
0x70, 0x73, 0x73, 0x68, // 'pssh'
|
||||
0x01, // version = 1
|
||||
|
@ -27,11 +28,13 @@ const uint8_t gGoogleWPTCencInitData[] = {
|
|||
0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, // key
|
||||
0x08, 0x09, 0x0A, 0x0B, 0x0C, 0x0D, 0x0E, 0x0F,
|
||||
0x00, 0x00, 0x00, 0x00 // datasize
|
||||
// clang-format on
|
||||
};
|
||||
|
||||
// Example CENC initData from the EME spec format registry:
|
||||
// https://w3c.github.io/encrypted-media/format-registry/initdata/cenc.html
|
||||
const uint8_t gW3SpecExampleCencInitData[] = {
|
||||
// clang-format off
|
||||
0x00, 0x00, 0x00, 0x44, 0x70, 0x73, 0x73, 0x68, // BMFF box header (68 bytes, 'pssh')
|
||||
0x01, 0x00, 0x00, 0x00, // Full box header (version = 1, flags = 0)
|
||||
0x10, 0x77, 0xef, 0xec, 0xc0, 0xb2, 0x4d, 0x02, // SystemID
|
||||
|
@ -42,6 +45,7 @@ const uint8_t gW3SpecExampleCencInitData[] = {
|
|||
0x41, 0x42, 0x43, 0x44, 0x45, 0x46, 0x47, 0x48, // Second KID ("ABCDEFGHIJKLMNOP")
|
||||
0x49, 0x4a, 0x4b, 0x4c, 0x4d, 0x4e, 0x4f, 0x50,
|
||||
0x00, 0x00, 0x00, 0x00 // Size of Data (0)
|
||||
// clang-format on
|
||||
};
|
||||
|
||||
// Invalid box size, would overflow if used.
|
||||
|
@ -51,6 +55,7 @@ const uint8_t gOverflowBoxSize[] = {
|
|||
|
||||
// Valid box size, but key count too large.
|
||||
const uint8_t gTooLargeKeyCountInitData[] = {
|
||||
// clang-format off
|
||||
0x00, 0x00, 0x00, 0x34, // size = too big a number
|
||||
0x70, 0x73, 0x73, 0x68, // 'pssh'
|
||||
0x01, // version = 1
|
||||
|
@ -61,11 +66,13 @@ const uint8_t gTooLargeKeyCountInitData[] = {
|
|||
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, // key
|
||||
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
|
||||
0xff, 0xff, 0xff, 0xff // datasize
|
||||
// clang-format on
|
||||
};
|
||||
|
||||
// Non common SystemID PSSH.
|
||||
// No keys Ids can be extracted, but don't consider the box invalid.
|
||||
const uint8_t gNonCencInitData[] = {
|
||||
// clang-format off
|
||||
0x00, 0x00, 0x00, 0x5c, // size = 92
|
||||
0x70, 0x73, 0x73, 0x68, // 'pssh'
|
||||
0x01, // version = 1
|
||||
|
@ -80,16 +87,20 @@ const uint8_t gNonCencInitData[] = {
|
|||
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
|
||||
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
|
||||
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
|
||||
// clang-format on
|
||||
};
|
||||
|
||||
const uint8_t gNonPSSHBoxZeroSize[] = {
|
||||
// clang-format off
|
||||
0x00, 0x00, 0x00, 0x00, // size = 0
|
||||
0xff, 0xff, 0xff, 0xff, // something other than 'pssh'
|
||||
// clang-format on
|
||||
};
|
||||
|
||||
// Two lots of the google init data. To ensure we handle
|
||||
// multiple boxes with size 0.
|
||||
const uint8_t g2xGoogleWPTCencInitData[] = {
|
||||
// clang-format off
|
||||
0x00, 0x00, 0x00, 0x00, // size = 0
|
||||
0x70, 0x73, 0x73, 0x68, // 'pssh'
|
||||
0x01, // version = 1
|
||||
|
@ -111,6 +122,7 @@ const uint8_t g2xGoogleWPTCencInitData[] = {
|
|||
0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, // key
|
||||
0x08, 0x09, 0x0A, 0x0B, 0x0C, 0x0D, 0x0E, 0x0F,
|
||||
0x00, 0x00, 0x00, 0x00 // datasize
|
||||
// clang-format on
|
||||
};
|
||||
|
||||
TEST(PsshParser, ParseCencInitData) {
|
||||
|
|
|
@ -26,6 +26,7 @@ namespace mozilla {
|
|||
// XXX Populate this based on a pref (which we should consider sorting because
|
||||
// people won't assume they need to).
|
||||
static VideoStreamFactory::ResolutionAndBitrateLimits kResolutionAndBitrateLimits[] = {
|
||||
// clang-format off
|
||||
{MB_OF(1920, 1200), KBPS(1500), KBPS(2000), KBPS(10000)}, // >HD (3K, 4K, etc)
|
||||
{MB_OF(1280, 720), KBPS(1200), KBPS(1500), KBPS(5000)}, // HD ~1080-1200
|
||||
{MB_OF(800, 480), KBPS(600), KBPS(800), KBPS(2500)}, // HD ~720
|
||||
|
@ -33,6 +34,7 @@ static VideoStreamFactory::ResolutionAndBitrateLimits kResolutionAndBitrateLimit
|
|||
{tl::Max<MB_OF(400, 240), MB_OF(352, 288)>::value, KBPS(125), KBPS(300), KBPS(1300)}, // VGA
|
||||
{MB_OF(176, 144), KBPS(100), KBPS(150), KBPS(500)}, // WQVGA, CIF
|
||||
{0 , KBPS(40), KBPS(80), KBPS(250)} // QCIF and below
|
||||
// clang-format on
|
||||
};
|
||||
|
||||
static VideoStreamFactory::ResolutionAndBitrateLimits
|
||||
|
|
|
@ -760,6 +760,7 @@ NS_DEFINE_NAMED_CID(NETWORKINFOSERVICE_CID);
|
|||
#endif // BUILD_NETWORK_INFO_SERVICE
|
||||
|
||||
static const mozilla::Module::CIDEntry kNeckoCIDs[] = {
|
||||
// clang-format off
|
||||
{ &kNS_IOSERVICE_CID, false, nullptr, nsIOServiceConstructor },
|
||||
{ &kNS_STREAMTRANSPORTSERVICE_CID, false, nullptr, nsStreamTransportServiceConstructor },
|
||||
{ &kNS_SOCKETTRANSPORTSERVICE_CID, false, nullptr, nsSocketTransportServiceConstructor },
|
||||
|
@ -876,9 +877,11 @@ static const mozilla::Module::CIDEntry kNeckoCIDs[] = {
|
|||
{ &kNETWORKINFOSERVICE_CID, false, nullptr, nsNetworkInfoServiceConstructor },
|
||||
#endif
|
||||
{ nullptr }
|
||||
// clang-format on
|
||||
};
|
||||
|
||||
static const mozilla::Module::ContractIDEntry kNeckoContracts[] = {
|
||||
// clang-format off
|
||||
{ NS_IOSERVICE_CONTRACTID, &kNS_IOSERVICE_CID },
|
||||
{ NS_NETUTIL_CONTRACTID, &kNS_IOSERVICE_CID },
|
||||
{ NS_STREAMTRANSPORTSERVICE_CONTRACTID, &kNS_STREAMTRANSPORTSERVICE_CID },
|
||||
|
@ -992,6 +995,7 @@ static const mozilla::Module::ContractIDEntry kNeckoContracts[] = {
|
|||
{ NETWORKINFOSERVICE_CONTRACT_ID, &kNETWORKINFOSERVICE_CID },
|
||||
#endif
|
||||
{ nullptr }
|
||||
// clang-format on
|
||||
};
|
||||
|
||||
static const mozilla::Module kNeckoModule = {
|
||||
|
|
|
@ -1301,6 +1301,7 @@ nsOfflineCacheDevice::InitWithSqlite(mozIStorageService * ss)
|
|||
|
||||
// create all (most) of our statements up front
|
||||
StatementSql prepared[] = {
|
||||
// clang-format off
|
||||
StatementSql ( mStatement_CacheSize, "SELECT Sum(DataSize) from moz_cache;" ),
|
||||
StatementSql ( mStatement_ApplicationCacheSize, "SELECT Sum(DataSize) from moz_cache WHERE ClientID = ?;" ),
|
||||
StatementSql ( mStatement_EntryCount, "SELECT count(*) from moz_cache;" ),
|
||||
|
@ -1335,6 +1336,7 @@ nsOfflineCacheDevice::InitWithSqlite(mozIStorageService * ss)
|
|||
StatementSql ( mStatement_EnumerateApps, "SELECT GroupID, ActiveClientID FROM moz_cache_groups WHERE GroupID LIKE ?1;"),
|
||||
StatementSql ( mStatement_EnumerateGroups, "SELECT GroupID, ActiveClientID FROM moz_cache_groups;"),
|
||||
StatementSql ( mStatement_EnumerateGroupsTimeOrder, "SELECT GroupID, ActiveClientID FROM moz_cache_groups ORDER BY ActivateTimeStamp;")
|
||||
// clang-format on
|
||||
};
|
||||
for (uint32_t i = 0; NS_SUCCEEDED(rv) && i < ArrayLength(prepared); ++i)
|
||||
{
|
||||
|
|
|
@ -175,6 +175,7 @@ static const struct {
|
|||
LABELS_DOCUMENT_ANALYTICS_TRACKER_FASTBLOCKED mTelemetryLabel;
|
||||
const char* mHostName;
|
||||
} gFastBlockAnalyticsProviders[] = {
|
||||
// clang-format off
|
||||
{ LABELS_DOCUMENT_ANALYTICS_TRACKER_FASTBLOCKED::googleanalytics, "google-analytics.com" },
|
||||
{ LABELS_DOCUMENT_ANALYTICS_TRACKER_FASTBLOCKED::scorecardresearch, "scorecardresearch.com" },
|
||||
{ LABELS_DOCUMENT_ANALYTICS_TRACKER_FASTBLOCKED::hotjar, "hotjar.com" },
|
||||
|
@ -185,6 +186,7 @@ static const struct {
|
|||
{ LABELS_DOCUMENT_ANALYTICS_TRACKER_FASTBLOCKED::yahooanalytics, "analytics.yahoo.com" },
|
||||
{ LABELS_DOCUMENT_ANALYTICS_TRACKER_FASTBLOCKED::statcounter, "statcounter.com" },
|
||||
{ LABELS_DOCUMENT_ANALYTICS_TRACKER_FASTBLOCKED::v12group, "v12group.com" }
|
||||
// clang-format on
|
||||
};
|
||||
|
||||
void
|
||||
|
|
|
@ -23,6 +23,7 @@ struct VMFlagString
|
|||
};
|
||||
|
||||
static const VMFlagString sVMFlagStrings[] = {
|
||||
// clang-format off
|
||||
{"ac", "Accountable", VMFlag::Accountable},
|
||||
{"ar", "ArchSpecific", VMFlag::ArchSpecific},
|
||||
{"dc", "NoFork", VMFlag::NoFork},
|
||||
|
@ -51,6 +52,7 @@ static const VMFlagString sVMFlagStrings[] = {
|
|||
{"sh", "Shared", VMFlag::Shared},
|
||||
{"sr", "Sequential", VMFlag::Sequential},
|
||||
{"wr", "Writable", VMFlag::Writable},
|
||||
// clang-format on
|
||||
};
|
||||
} // anonymous namespace
|
||||
|
||||
|
@ -59,6 +61,7 @@ constexpr size_t kVMFlags = size_t(-1);
|
|||
// An array of known field names which may be present in an smaps file, and the
|
||||
// offsets of the corresponding fields in a MemoryMapping class.
|
||||
const MemoryMapping::Field MemoryMapping::sFields[] = {
|
||||
// clang-format off
|
||||
{"AnonHugePages", offsetof(MemoryMapping, mAnonHugePages)},
|
||||
{"Anonymous", offsetof(MemoryMapping, mAnonymous)},
|
||||
{"KernelPageSize", offsetof(MemoryMapping, mKernelPageSize)},
|
||||
|
@ -83,6 +86,7 @@ const MemoryMapping::Field MemoryMapping::sFields[] = {
|
|||
// it in this array to aid in parsing, but give it a separate sentinel value,
|
||||
// and treat it specially.
|
||||
{"VmFlags", kVMFlags},
|
||||
// clang-format on
|
||||
};
|
||||
|
||||
template <typename T, int n>
|
||||
|
|
|
@ -561,6 +561,7 @@ typedef struct {
|
|||
|
||||
#if defined(__i386__)
|
||||
static AsmInstructionMatch possibleInstructions[] = {
|
||||
// clang-format off
|
||||
{ 0x5, {0xFF, 0x00, 0x00, 0x00, 0x00}, {0xE9, 0x00, 0x00, 0x00, 0x00} }, // jmp 0x????????
|
||||
{ 0x5, {0xFF, 0xFF, 0xFF, 0xFF, 0xFF}, {0x55, 0x89, 0xe5, 0xc9, 0xc3} }, // push %ebp; mov %esp,%ebp; leave; ret
|
||||
{ 0x1, {0xFF}, {0x90} }, // nop
|
||||
|
@ -578,9 +579,11 @@ static AsmInstructionMatch possibleInstructions[] = {
|
|||
{ 0x5, {0xFF, 0x00, 0x00, 0x00, 0x00}, {0xB8, 0x00, 0x00, 0x00, 0x00} }, // mov $imm, %eax
|
||||
{ 0x6, {0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF}, {0xE8, 0x00, 0x00, 0x00, 0x00, 0x58} }, // call $imm; pop %eax
|
||||
{ 0x0 }
|
||||
// clang-format on
|
||||
};
|
||||
#elif defined(__x86_64__)
|
||||
static AsmInstructionMatch possibleInstructions[] = {
|
||||
// clang-format off
|
||||
{ 0x5, {0xFF, 0x00, 0x00, 0x00, 0x00}, {0xE9, 0x00, 0x00, 0x00, 0x00} }, // jmp 0x????????
|
||||
{ 0x1, {0xFF}, {0x90} }, // nop
|
||||
{ 0x1, {0xF8}, {0x50} }, // push %rX
|
||||
|
@ -599,6 +602,7 @@ static AsmInstructionMatch possibleInstructions[] = {
|
|||
{ 0x7, {0xFF, 0xFF, 0xFF, 0x00, 0x00, 0x00, 0x00}, {0x48, 0x8d, 0x05, 0x00, 0x00, 0x00, 0x00} },
|
||||
|
||||
{ 0x0 }
|
||||
// clang-format on
|
||||
};
|
||||
#endif
|
||||
|
||||
|
|
|
@ -61,6 +61,7 @@ struct ManifestDirective
|
|||
int aLineNo, char* const* aArgv, int aFlags);
|
||||
};
|
||||
static const ManifestDirective kParsingTable[] = {
|
||||
// clang-format off
|
||||
{
|
||||
"manifest", 1, true, false,
|
||||
&nsComponentManagerImpl::ManifestManifest, nullptr,
|
||||
|
@ -99,6 +100,7 @@ static const ManifestDirective kParsingTable[] = {
|
|||
"resource", 2, false, true,
|
||||
nullptr, &nsChromeRegistry::ManifestResource,
|
||||
}
|
||||
// clang-format on
|
||||
};
|
||||
|
||||
static const char kWhitespace[] = "\t ";
|
||||
|
|
|
@ -2899,6 +2899,7 @@ nsLocalFile::IsExecutable(bool* aResult)
|
|||
|
||||
// Search for any of the set of executable extensions.
|
||||
static const char* const executableExts[] = {
|
||||
// clang-format off
|
||||
"ad",
|
||||
"ade", // access project extension
|
||||
"adp",
|
||||
|
@ -2974,6 +2975,7 @@ nsLocalFile::IsExecutable(bool* aResult)
|
|||
"wsc",
|
||||
"wsf",
|
||||
"wsh"
|
||||
// clang-format on
|
||||
};
|
||||
nsDependentSubstring ext = Substring(path, dotIdx + 1);
|
||||
for (size_t i = 0; i < ArrayLength(executableExts); ++i) {
|
||||
|
|
|
@ -222,12 +222,14 @@ static const size_t VALS_LEN = 131072;
|
|||
// Note that no "Inserts" value can exceed VALS_LEN.
|
||||
// Also, if any failing lookups are done, Inserts must be <= VALS_LEN/2.
|
||||
const Params gParamsList[] = {
|
||||
// clang-format off
|
||||
// Successful Failing Remove
|
||||
// Inserts lookups lookups Iterations inserts
|
||||
{ "succ_lookups", 1024, 5000, 0, 0, false },
|
||||
{ "fail_lookups", 1024, 0, 5000, 0, false },
|
||||
{ "insert_remove", VALS_LEN, 0, 0, 0, true },
|
||||
{ "iterate", 1024, 0, 0, 5000, false },
|
||||
// clang-format on
|
||||
};
|
||||
|
||||
class BenchCollections : public ::testing::Test
|
||||
|
|
Загрузка…
Ссылка в новой задаче