Bug 1519636 - Reformat recent changes to the Google coding style r=geckoview-reviewers,profiler-reviewers,win-reviewers,dom-storage-reviewers,nalexander,gstoll,tcampbell,janv,julienw
Updated with clang-format version 19.1.7 (taskcluster-DYvBxDZJRVqTi8E7pTSJAQ) Differential Revision: https://phabricator.services.mozilla.com/D249880
This commit is contained in:
committed by
sledru@mozilla.com
parent
1df22ac023
commit
8ae54ea4f9
@@ -56,12 +56,8 @@ class xpcAccessibilityService : public nsIAccessibilityService {
|
||||
|
||||
// for component registration
|
||||
// {3b265b69-f813-48ff-880d-d88d101af404}
|
||||
#define NS_ACCESSIBILITY_SERVICE_CID \
|
||||
{ \
|
||||
0x3b265b69, 0xf813, 0x48ff, { \
|
||||
0x88, 0x0d, 0xd8, 0x8d, 0x10, 0x1a, 0xf4, 0x04 \
|
||||
} \
|
||||
}
|
||||
#define NS_ACCESSIBILITY_SERVICE_CID \
|
||||
{0x3b265b69, 0xf813, 0x48ff, {0x88, 0x0d, 0xd8, 0x8d, 0x10, 0x1a, 0xf4, 0x04}}
|
||||
|
||||
extern nsresult NS_GetAccessibilityService(nsIAccessibilityService** aResult);
|
||||
|
||||
|
||||
@@ -5,37 +5,24 @@
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#ifdef XP_WIN
|
||||
# define NS_WINIEHISTORYENUMERATOR_CID \
|
||||
{ \
|
||||
0x93480624, 0x806e, 0x4756, { \
|
||||
0xb7, 0xcb, 0x0f, 0xb7, 0xdd, 0x74, 0x6a, 0x8f \
|
||||
} \
|
||||
}
|
||||
# define NS_WINIEHISTORYENUMERATOR_CID \
|
||||
{0x93480624, \
|
||||
0x806e, \
|
||||
0x4756, \
|
||||
{0xb7, 0xcb, 0x0f, 0xb7, 0xdd, 0x74, 0x6a, 0x8f}}
|
||||
|
||||
# define NS_IEHISTORYENUMERATOR_CONTRACTID \
|
||||
"@mozilla.org/profile/migrator/iehistoryenumerator;1"
|
||||
#endif
|
||||
|
||||
#define NS_SHELLSERVICE_CID \
|
||||
{ \
|
||||
0x63c7b9f4, 0xcc8, 0x43f8, { \
|
||||
0xb6, 0x66, 0xa, 0x66, 0x16, 0x55, 0xcb, 0x73 \
|
||||
} \
|
||||
}
|
||||
#define NS_SHELLSERVICE_CID \
|
||||
{0x63c7b9f4, 0xcc8, 0x43f8, {0xb6, 0x66, 0xa, 0x66, 0x16, 0x55, 0xcb, 0x73}}
|
||||
|
||||
#define NS_SHELLSERVICE_CONTRACTID "@mozilla.org/browser/shell-service;1"
|
||||
|
||||
#define NS_RDF_FORWARDPROXY_INFER_DATASOURCE_CID \
|
||||
{ \
|
||||
0x7a024bcf, 0xedd5, 0x4d9a, { \
|
||||
0x86, 0x14, 0xd4, 0x4b, 0xe1, 0xda, 0xda, 0xd3 \
|
||||
} \
|
||||
}
|
||||
#define NS_RDF_FORWARDPROXY_INFER_DATASOURCE_CID \
|
||||
{0x7a024bcf, 0xedd5, 0x4d9a, {0x86, 0x14, 0xd4, 0x4b, 0xe1, 0xda, 0xda, 0xd3}}
|
||||
|
||||
// 136e2c4d-c5a4-477c-b131-d93d7d704f64
|
||||
#define NS_PRIVATE_BROWSING_SERVICE_WRAPPER_CID \
|
||||
{ \
|
||||
0x136e2c4d, 0xc5a4, 0x477c, { \
|
||||
0xb1, 0x31, 0xd9, 0x3d, 0x7d, 0x70, 0x4f, 0x64 \
|
||||
} \
|
||||
}
|
||||
#define NS_PRIVATE_BROWSING_SERVICE_WRAPPER_CID \
|
||||
{0x136e2c4d, 0xc5a4, 0x477c, {0xb1, 0x31, 0xd9, 0x3d, 0x7d, 0x70, 0x4f, 0x64}}
|
||||
|
||||
@@ -274,7 +274,7 @@ void DBusHandleResultMetas(
|
||||
static void ActivateResultID(
|
||||
RefPtr<nsGNOMEShellHistorySearchResult> aSearchResult,
|
||||
const char* aResultID, uint32_t aTimeStamp) {
|
||||
mozilla::UniquePtr<char[]>commandLine;
|
||||
mozilla::UniquePtr<char[]> commandLine;
|
||||
int len;
|
||||
|
||||
if (strncmp(aResultID, KEYWORD_SEARCH_STRING, KEYWORD_SEARCH_STRING_LEN) ==
|
||||
|
||||
@@ -69,8 +69,7 @@ struct RelR : public Elf<bits> {
|
||||
using Elf_Verneed = typename Elf<bits>::Verneed;
|
||||
using Elf_Vernaux = typename Elf<bits>::Vernaux;
|
||||
|
||||
#define TAG_NAME(t) \
|
||||
{ t, #t }
|
||||
#define TAG_NAME(t) {t, #t}
|
||||
class DynInfo {
|
||||
public:
|
||||
using Tag = decltype(Elf_Dyn::d_tag);
|
||||
|
||||
@@ -6,11 +6,11 @@
|
||||
|
||||
/* Recent binutils would put .ctors content into a .init_array section */
|
||||
__attribute__((section(".manual_ctors"), used)) static void (*ctors[])() = {
|
||||
(void (*)()) - 1, end_test, test, NULL};
|
||||
(void (*)())-1, end_test, test, NULL};
|
||||
|
||||
__attribute__((section(".init"))) void _init() {
|
||||
void (**func)() = &ctors[sizeof(ctors) / sizeof(void (*)()) - 1];
|
||||
while (*(--func) != (void (*)()) - 1) {
|
||||
while (*(--func) != (void (*)())-1) {
|
||||
(*func)();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -85,11 +85,7 @@ class ContentPrincipal final : public BasePrincipal {
|
||||
|
||||
} // namespace mozilla
|
||||
|
||||
#define NS_PRINCIPAL_CID \
|
||||
{ \
|
||||
0x653e0e4d, 0x3ee4, 0x45fa, { \
|
||||
0xb2, 0x72, 0x97, 0xc2, 0x0b, 0xc0, 0x1e, 0xb8 \
|
||||
} \
|
||||
}
|
||||
#define NS_PRINCIPAL_CID \
|
||||
{0x653e0e4d, 0x3ee4, 0x45fa, {0xb2, 0x72, 0x97, 0xc2, 0x0b, 0xc0, 0x1e, 0xb8}}
|
||||
|
||||
#endif // mozilla_ContentPrincipal_h
|
||||
|
||||
@@ -90,11 +90,7 @@ class ExpandedPrincipal : public nsIExpandedPrincipal,
|
||||
MOZ_GUARDED_BY(mozilla::sMainThreadCapability);
|
||||
};
|
||||
|
||||
#define NS_EXPANDEDPRINCIPAL_CID \
|
||||
{ \
|
||||
0xe8ee88b0, 0x5571, 0x4086, { \
|
||||
0xa4, 0x5b, 0x39, 0xa7, 0x16, 0x90, 0x6b, 0xdb \
|
||||
} \
|
||||
}
|
||||
#define NS_EXPANDEDPRINCIPAL_CID \
|
||||
{0xe8ee88b0, 0x5571, 0x4086, {0xa4, 0x5b, 0x39, 0xa7, 0x16, 0x90, 0x6b, 0xdb}}
|
||||
|
||||
#endif // ExpandedPrincipal_h
|
||||
|
||||
@@ -22,12 +22,8 @@
|
||||
class nsIDocShell;
|
||||
class nsIURI;
|
||||
|
||||
#define NS_NULLPRINCIPAL_CID \
|
||||
{ \
|
||||
0xbd066e5f, 0x146f, 0x4472, { \
|
||||
0x83, 0x31, 0x7b, 0xfd, 0x05, 0xb1, 0xed, 0x90 \
|
||||
} \
|
||||
}
|
||||
#define NS_NULLPRINCIPAL_CID \
|
||||
{0xbd066e5f, 0x146f, 0x4472, {0x83, 0x31, 0x7b, 0xfd, 0x05, 0xb1, 0xed, 0x90}}
|
||||
|
||||
#define NS_NULLPRINCIPAL_SCHEME "moz-nullprincipal"
|
||||
|
||||
|
||||
@@ -14,12 +14,8 @@
|
||||
|
||||
#include "mozilla/BasePrincipal.h"
|
||||
|
||||
#define NS_SYSTEMPRINCIPAL_CID \
|
||||
{ \
|
||||
0x4a6212db, 0xaccb, 0x11d3, { \
|
||||
0xb7, 0x65, 0x0, 0x60, 0xb0, 0xb6, 0xce, 0xcb \
|
||||
} \
|
||||
}
|
||||
#define NS_SYSTEMPRINCIPAL_CID \
|
||||
{0x4a6212db, 0xaccb, 0x11d3, {0xb7, 0x65, 0x0, 0x60, 0xb0, 0xb6, 0xce, 0xcb}}
|
||||
#define NS_SYSTEMPRINCIPAL_CONTRACTID "@mozilla.org/systemprincipal;1"
|
||||
|
||||
class nsScriptSecurityManager;
|
||||
|
||||
@@ -12,8 +12,8 @@ TEST(PrincipalHash, DocumentDomain)
|
||||
nsCOMPtr<nsIScriptSecurityManager> ssm =
|
||||
nsScriptSecurityManager::GetScriptSecurityManager();
|
||||
nsCOMPtr<nsIPrincipal> principal;
|
||||
nsresult rv =
|
||||
ssm->CreateContentPrincipalFromOrigin("https://sub.mozilla.org"_ns, getter_AddRefs(principal));
|
||||
nsresult rv = ssm->CreateContentPrincipalFromOrigin(
|
||||
"https://sub.mozilla.org"_ns, getter_AddRefs(principal));
|
||||
EXPECT_NS_SUCCEEDED(rv);
|
||||
|
||||
const auto hash = principal->GetHashValue();
|
||||
@@ -23,5 +23,6 @@ TEST(PrincipalHash, DocumentDomain)
|
||||
EXPECT_NS_SUCCEEDED(rv);
|
||||
principal->SetDomain(domain);
|
||||
|
||||
ASSERT_EQ(principal->GetHashValue(), hash) << "Principal hash shouldn't change";
|
||||
ASSERT_EQ(principal->GetHashValue(), hash)
|
||||
<< "Principal hash shouldn't change";
|
||||
}
|
||||
|
||||
@@ -10,12 +10,12 @@
|
||||
#include "nsWeakReference.h"
|
||||
#include "mozilla/Attributes.h"
|
||||
|
||||
#define NS_CHROMEPROTOCOLHANDLER_CID \
|
||||
{ /* 61ba33c0-3031-11d3-8cd0-0060b0fc14a3 */ \
|
||||
0x61ba33c0, 0x3031, 0x11d3, { \
|
||||
0x8c, 0xd0, 0x00, 0x60, 0xb0, 0xfc, 0x14, 0xa3 \
|
||||
} \
|
||||
}
|
||||
#define NS_CHROMEPROTOCOLHANDLER_CID \
|
||||
{/* 61ba33c0-3031-11d3-8cd0-0060b0fc14a3 */ \
|
||||
0x61ba33c0, \
|
||||
0x3031, \
|
||||
0x11d3, \
|
||||
{0x8c, 0xd0, 0x00, 0x60, 0xb0, 0xfc, 0x14, 0xa3}}
|
||||
|
||||
class nsChromeProtocolHandler final : public nsIProtocolHandler,
|
||||
public nsSupportsWeakReference {
|
||||
|
||||
@@ -29,12 +29,8 @@ class nsIURL;
|
||||
|
||||
// for component registration
|
||||
// {47049e42-1d87-482a-984d-56ae185e367a}
|
||||
#define NS_CHROMEREGISTRY_CID \
|
||||
{ \
|
||||
0x47049e42, 0x1d87, 0x482a, { \
|
||||
0x98, 0x4d, 0x56, 0xae, 0x18, 0x5e, 0x36, 0x7a \
|
||||
} \
|
||||
}
|
||||
#define NS_CHROMEREGISTRY_CID \
|
||||
{0x47049e42, 0x1d87, 0x482a, {0x98, 0x4d, 0x56, 0xae, 0x18, 0x5e, 0x36, 0x7a}}
|
||||
|
||||
class nsChromeRegistry : public nsIToolkitChromeRegistry,
|
||||
public nsIObserver,
|
||||
|
||||
@@ -13,12 +13,8 @@
|
||||
|
||||
#define JSDEBUGGER_CONTRACTID "@mozilla.org/jsdebugger;1"
|
||||
|
||||
#define JSDEBUGGER_CID \
|
||||
{ \
|
||||
0x0365cbd5, 0xd46e, 0x4e94, { \
|
||||
0xa3, 0x9f, 0x83, 0xb6, 0x3c, 0xd1, 0xa9, 0x63 \
|
||||
} \
|
||||
}
|
||||
#define JSDEBUGGER_CID \
|
||||
{0x0365cbd5, 0xd46e, 0x4e94, {0xa3, 0x9f, 0x83, 0xb6, 0x3c, 0xd1, 0xa9, 0x63}}
|
||||
|
||||
namespace mozilla::jsdebugger {
|
||||
|
||||
|
||||
@@ -11,12 +11,8 @@
|
||||
|
||||
#define JSINSPECTOR_CONTRACTID "@mozilla.org/jsinspector;1"
|
||||
|
||||
#define JSINSPECTOR_CID \
|
||||
{ \
|
||||
0xec5aa99c, 0x7abb, 0x4142, { \
|
||||
0xac, 0x5f, 0xaa, 0xb2, 0x41, 0x9e, 0x38, 0xe2 \
|
||||
} \
|
||||
}
|
||||
#define JSINSPECTOR_CID \
|
||||
{0xec5aa99c, 0x7abb, 0x4142, {0xac, 0x5f, 0xaa, 0xb2, 0x41, 0x9e, 0x38, 0xe2}}
|
||||
|
||||
namespace mozilla {
|
||||
namespace jsinspector {
|
||||
|
||||
@@ -119,7 +119,7 @@ static const RedirEntry kRedirMap[] = {
|
||||
nsIAboutModule::URI_CAN_LOAD_IN_PRIVILEGEDABOUT_PROCESS},
|
||||
#ifdef MOZ_WIDGET_ANDROID
|
||||
{"home", "about:blank",
|
||||
nsIAboutModule::URI_SAFE_FOR_UNTRUSTED_CONTENT |
|
||||
nsIAboutModule::URI_SAFE_FOR_UNTRUSTED_CONTENT |
|
||||
nsIAboutModule::URI_CAN_LOAD_IN_PRIVILEGEDABOUT_PROCESS |
|
||||
nsIAboutModule::URI_MUST_LOAD_IN_CHILD},
|
||||
#endif
|
||||
|
||||
@@ -18,6 +18,7 @@ namespace mozilla {
|
||||
template <typename AnimationPtrType>
|
||||
class AnimationPtrComparator {
|
||||
mutable nsContentUtils::NodeIndexCache mCache;
|
||||
|
||||
public:
|
||||
bool Equals(const AnimationPtrType& a, const AnimationPtrType& b) const {
|
||||
return a == b;
|
||||
|
||||
@@ -2652,8 +2652,7 @@ void ChromeUtils::AndroidMoveTaskToBack(GlobalObject& aGlobal) {
|
||||
already_AddRefed<nsIContentSecurityPolicy> ChromeUtils::CreateCSPFromHeader(
|
||||
GlobalObject& aGlobal, const nsAString& aHeader, nsIURI* aSelfURI,
|
||||
nsIPrincipal* aLoadingPrincipal, ErrorResult& aRv) {
|
||||
return CSP_CreateFromHeader(aHeader, aSelfURI, aLoadingPrincipal,
|
||||
aRv);
|
||||
return CSP_CreateFromHeader(aHeader, aSelfURI, aLoadingPrincipal, aRv);
|
||||
}
|
||||
|
||||
} // namespace mozilla::dom
|
||||
|
||||
@@ -15014,8 +15014,8 @@ void Document::HandleEscKey() {
|
||||
if (RefPtr dialogElement = HTMLDialogElement::FromNodeOrNull(element)) {
|
||||
if (StaticPrefs::dom_dialog_light_dismiss_enabled()) {
|
||||
if (dialogElement->GetClosedBy() != HTMLDialogElement::ClosedBy::None) {
|
||||
const mozilla::dom::Optional<nsAString> returnValue;
|
||||
dialogElement->RequestClose(returnValue);
|
||||
const mozilla::dom::Optional<nsAString> returnValue;
|
||||
dialogElement->RequestClose(returnValue);
|
||||
}
|
||||
} else {
|
||||
dialogElement->QueueCancelDialog();
|
||||
@@ -20370,8 +20370,8 @@ already_AddRefed<Document> Document::ParseHTML(GlobalObject& aGlobal,
|
||||
// Step 4. Let sanitizer be the result of calling get a sanitizer instance
|
||||
// from options with options and true.
|
||||
nsCOMPtr<nsIGlobalObject> global = do_QueryInterface(aGlobal.GetAsSupports());
|
||||
RefPtr<Sanitizer> sanitizer =
|
||||
Sanitizer::GetInstance(global, aOptions.mSanitizer, /* aSafe */ true, aError);
|
||||
RefPtr<Sanitizer> sanitizer = Sanitizer::GetInstance(
|
||||
global, aOptions.mSanitizer, /* aSafe */ true, aError);
|
||||
if (aError.Failed()) {
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
@@ -63,8 +63,8 @@ struct ChangesToFlush {
|
||||
: mFlushType(aFlushType),
|
||||
mFlushAnimations(aFlushAnimations),
|
||||
mUpdateRelevancy(aUpdateRelevancy) {
|
||||
MOZ_ASSERT_IF(mUpdateRelevancy, mFlushType >= FlushType::Layout);
|
||||
}
|
||||
MOZ_ASSERT_IF(mUpdateRelevancy, mFlushType >= FlushType::Layout);
|
||||
}
|
||||
|
||||
FlushType mFlushType;
|
||||
bool mFlushAnimations;
|
||||
|
||||
@@ -140,7 +140,8 @@ NS_IMPL_CYCLE_COLLECTING_RELEASE_WITH_LAST_RELEASE_AND_DESTROY(nsIContent,
|
||||
LastRelease(),
|
||||
Destroy())
|
||||
|
||||
nsIContent* nsIContent::FindFirstNonChromeOnlyAccessContent() const {
|
||||
nsIContent*
|
||||
nsIContent::FindFirstNonChromeOnlyAccessContent() const {
|
||||
// This handles also nested native anonymous content.
|
||||
// Oops, this function signature allows casting const to non-const. (Then
|
||||
// again, so does GetFirstChild()->GetParent().)
|
||||
|
||||
@@ -1557,8 +1557,7 @@ int32_t nsAttrValue::EnumTableEntryToValue(EnumTableSpan aEnumTable,
|
||||
return value;
|
||||
}
|
||||
|
||||
bool nsAttrValue::ParseEnumValue(const nsAString& aValue,
|
||||
EnumTableSpan aTable,
|
||||
bool nsAttrValue::ParseEnumValue(const nsAString& aValue, EnumTableSpan aTable,
|
||||
bool aCaseSensitive,
|
||||
const EnumTableEntry* aDefaultValue) {
|
||||
ResetIfSet();
|
||||
|
||||
@@ -9,19 +9,19 @@
|
||||
|
||||
#include "nsISupports.h"
|
||||
|
||||
#define NS_DOM_SCRIPT_OBJECT_FACTORY_CID \
|
||||
{ /* 9eb760f0-4380-11d2-b328-00805f8a3859 */ \
|
||||
0x9eb760f0, 0x4380, 0x11d2, { \
|
||||
0xb3, 0x28, 0x00, 0x80, 0x5f, 0x8a, 0x38, 0x59 \
|
||||
} \
|
||||
}
|
||||
#define NS_DOM_SCRIPT_OBJECT_FACTORY_CID \
|
||||
{/* 9eb760f0-4380-11d2-b328-00805f8a3859 */ \
|
||||
0x9eb760f0, \
|
||||
0x4380, \
|
||||
0x11d2, \
|
||||
{0xb3, 0x28, 0x00, 0x80, 0x5f, 0x8a, 0x38, 0x59}}
|
||||
|
||||
#define NS_SCRIPT_NAMESET_REGISTRY_CID \
|
||||
{ /* 45f27d10-987b-11d2-bd40-00105aa45e89 */ \
|
||||
0x45f27d10, 0x987b, 0x11d2, { \
|
||||
0xbd, 0x40, 0x00, 0x10, 0x5a, 0xa4, 0x5e, 0x89 \
|
||||
} \
|
||||
}
|
||||
#define NS_SCRIPT_NAMESET_REGISTRY_CID \
|
||||
{/* 45f27d10-987b-11d2-bd40-00105aa45e89 */ \
|
||||
0x45f27d10, \
|
||||
0x987b, \
|
||||
0x11d2, \
|
||||
{0xbd, 0x40, 0x00, 0x10, 0x5a, 0xa4, 0x5e, 0x89}}
|
||||
|
||||
#define NS_XPATH_EVALUATOR_CONTRACTID "@mozilla.org/dom/xpath-evaluator;1"
|
||||
|
||||
|
||||
@@ -14,12 +14,8 @@
|
||||
#define nsDataDocumentContentPolicy_h__
|
||||
|
||||
/* 1147d32c-215b-4014-b180-07fe7aedf915 */
|
||||
#define NS_DATADOCUMENTCONTENTPOLICY_CID \
|
||||
{ \
|
||||
0x1147d32c, 0x215b, 0x4014, { \
|
||||
0xb1, 0x80, 0x07, 0xfe, 0x7a, 0xed, 0xf9, 0x15 \
|
||||
} \
|
||||
}
|
||||
#define NS_DATADOCUMENTCONTENTPOLICY_CID \
|
||||
{0x1147d32c, 0x215b, 0x4014, {0xb1, 0x80, 0x07, 0xfe, 0x7a, 0xed, 0xf9, 0x15}}
|
||||
#define NS_DATADOCUMENTCONTENTPOLICY_CONTRACTID \
|
||||
"@mozilla.org/data-document-content-policy;1"
|
||||
|
||||
|
||||
@@ -50,8 +50,7 @@ using mozilla::dom::ServiceWorkerRegistration;
|
||||
using mozilla::dom::ServiceWorkerRegistrationDescriptor;
|
||||
using mozilla::dom::VoidFunction;
|
||||
|
||||
nsIGlobalObject::nsIGlobalObject()
|
||||
: mIsDying(false), mIsInnerWindow(false) {}
|
||||
nsIGlobalObject::nsIGlobalObject() : mIsDying(false), mIsInnerWindow(false) {}
|
||||
|
||||
bool nsIGlobalObject::IsScriptForbidden(JSObject* aCallback,
|
||||
bool aIsJSImplementedWebIDL) const {
|
||||
|
||||
@@ -14,12 +14,8 @@
|
||||
#define nsNoDataProtocolContentPolicy_h__
|
||||
|
||||
/* ac9e3e82-bfbd-4f26-941e-f58c8ee178c1 */
|
||||
#define NS_NODATAPROTOCOLCONTENTPOLICY_CID \
|
||||
{ \
|
||||
0xac9e3e82, 0xbfbd, 0x4f26, { \
|
||||
0x94, 0x1e, 0xf5, 0x8c, 0x8e, 0xe1, 0x78, 0xc1 \
|
||||
} \
|
||||
}
|
||||
#define NS_NODATAPROTOCOLCONTENTPOLICY_CID \
|
||||
{0xac9e3e82, 0xbfbd, 0x4f26, {0x94, 0x1e, 0xf5, 0x8c, 0x8e, 0xe1, 0x78, 0xc1}}
|
||||
#define NS_NODATAPROTOCOLCONTENTPOLICY_CONTRACTID \
|
||||
"@mozilla.org/no-data-protocol-content-policy;1"
|
||||
|
||||
|
||||
@@ -16,12 +16,12 @@ class nsIVariant;
|
||||
|
||||
#define NS_STRUCTUREDCLONECONTAINER_CONTRACTID \
|
||||
"@mozilla.org/docshell/structured-clone-container;1"
|
||||
#define NS_STRUCTUREDCLONECONTAINER_CID \
|
||||
{ /* 38bd0634-0fd4-46f0-b85f-13ced889eeec */ \
|
||||
0x38bd0634, 0x0fd4, 0x46f0, { \
|
||||
0xb8, 0x5f, 0x13, 0xce, 0xd8, 0x89, 0xee, 0xec \
|
||||
} \
|
||||
}
|
||||
#define NS_STRUCTUREDCLONECONTAINER_CID \
|
||||
{/* 38bd0634-0fd4-46f0-b85f-13ced889eeec */ \
|
||||
0x38bd0634, \
|
||||
0x0fd4, \
|
||||
0x46f0, \
|
||||
{0xb8, 0x5f, 0x13, 0xce, 0xd8, 0x89, 0xee, 0xec}}
|
||||
|
||||
class nsStructuredCloneContainer final
|
||||
: public nsIStructuredCloneContainer,
|
||||
|
||||
@@ -344,4 +344,6 @@ TEST(TestScheduler, Idle)
|
||||
}
|
||||
|
||||
TEST(TestScheduler, NonIdle)
|
||||
{ EXPECT_TRUE(BasicScenario(scheduler, &gc, &ccNonIdle)); }
|
||||
{
|
||||
EXPECT_TRUE(BasicScenario(scheduler, &gc, &ccNonIdle));
|
||||
}
|
||||
|
||||
@@ -906,46 +906,46 @@ namespace binding_detail {
|
||||
template <typename Union, typename UnionMemberType, typename = int>
|
||||
struct ApplyToTypedArray;
|
||||
|
||||
#define APPLY_IMPL(type) \
|
||||
template <typename Union> \
|
||||
struct ApplyToTypedArray<Union, type, decltype((void)&Union::Is##type, 0)> { \
|
||||
/* Return type of calling the lambda with a TypedArray 'type'. */ \
|
||||
template <typename F> \
|
||||
using FunReturnType = decltype(std::declval<F>()(std::declval<type>())); \
|
||||
\
|
||||
/* Whether the return type of calling the lambda with a TypedArray */ \
|
||||
/* 'type' is void. */ \
|
||||
template <typename F> \
|
||||
static constexpr bool FunReturnsVoid = \
|
||||
std::is_same_v<FunReturnType<F>, void>; \
|
||||
\
|
||||
/* The return type of calling Apply with a union that has 'type' as */ \
|
||||
/* one of its union member types depends on the return type of */ \
|
||||
/* calling the lambda. This return type will be bool if the lambda */ \
|
||||
/* returns void, or it will be a Maybe<…> with the inner type being */ \
|
||||
/* the actual return type of calling the lambda. If the union */ \
|
||||
/* contains a value of the right type, then calling Apply will return */ \
|
||||
/* either 'true', or 'Some(…)' containing the return value of calling */ \
|
||||
/* the lambda. If the union does not contain a value of the right */ \
|
||||
/* type, then calling Apply will return either 'false', or */ \
|
||||
/* 'Nothing()'. */ \
|
||||
template <typename F> \
|
||||
using ApplyReturnType = \
|
||||
std::conditional_t<FunReturnsVoid<F>, bool, Maybe<FunReturnType<F>>>; \
|
||||
\
|
||||
public: \
|
||||
template <typename F> \
|
||||
static ApplyReturnType<F> Apply(const Union& aUnion, F&& aFun) { \
|
||||
if (!aUnion.Is##type()) { \
|
||||
return ApplyReturnType<F>(); /* false or Nothing() */ \
|
||||
} \
|
||||
if constexpr (FunReturnsVoid<F>) { \
|
||||
std::forward<F>(aFun)(aUnion.GetAs##type()); \
|
||||
return true; \
|
||||
} else { \
|
||||
return Some(std::forward<F>(aFun)(aUnion.GetAs##type())); \
|
||||
} \
|
||||
} \
|
||||
#define APPLY_IMPL(type) \
|
||||
template <typename Union> \
|
||||
struct ApplyToTypedArray<Union, type, decltype((void)&Union::Is##type, 0)> { \
|
||||
/* Return type of calling the lambda with a TypedArray 'type'. */ \
|
||||
template <typename F> \
|
||||
using FunReturnType = decltype(std::declval<F>()(std::declval<type>())); \
|
||||
\
|
||||
/* Whether the return type of calling the lambda with a TypedArray */ \
|
||||
/* 'type' is void. */ \
|
||||
template <typename F> \
|
||||
static constexpr bool FunReturnsVoid = \
|
||||
std::is_same_v<FunReturnType<F>, void>; \
|
||||
\
|
||||
/* The return type of calling Apply with a union that has 'type' as */ \
|
||||
/* one of its union member types depends on the return type of */ \
|
||||
/* calling the lambda. This return type will be bool if the lambda */ \
|
||||
/* returns void, or it will be a Maybe<…> with the inner type being */ \
|
||||
/* the actual return type of calling the lambda. If the union */ \
|
||||
/* contains a value of the right type, then calling Apply will return */ \
|
||||
/* either 'true', or 'Some(…)' containing the return value of calling */ \
|
||||
/* the lambda. If the union does not contain a value of the right */ \
|
||||
/* type, then calling Apply will return either 'false', or */ \
|
||||
/* 'Nothing()'. */ \
|
||||
template <typename F> \
|
||||
using ApplyReturnType = \
|
||||
std::conditional_t<FunReturnsVoid<F>, bool, Maybe<FunReturnType<F>>>; \
|
||||
\
|
||||
public: \
|
||||
template <typename F> \
|
||||
static ApplyReturnType<F> Apply(const Union& aUnion, F&& aFun) { \
|
||||
if (!aUnion.Is##type()) { \
|
||||
return ApplyReturnType<F>(); /* false or Nothing() */ \
|
||||
} \
|
||||
if constexpr (FunReturnsVoid<F>) { \
|
||||
std::forward<F>(aFun)(aUnion.GetAs##type()); \
|
||||
return true; \
|
||||
} else { \
|
||||
return Some(std::forward<F>(aFun)(aUnion.GetAs##type())); \
|
||||
} \
|
||||
} \
|
||||
};
|
||||
|
||||
APPLY_IMPL(Int8Array)
|
||||
|
||||
@@ -57,7 +57,7 @@ static Maybe<ImageBitmapFormat> GetImageBitmapFormatFromPlanarYCbCrData(
|
||||
uintptr_t(aData->mYChannel),
|
||||
uintptr_t(aData->mYChannel) + ySize.height * aData->mYStride),
|
||||
CbInterval(
|
||||
uintptr_t(aData->mCbChannel),
|
||||
uintptr_t(aData -> mCbChannel),
|
||||
uintptr_t(aData->mCbChannel) + cbcrSize.height * aData->mCbCrStride),
|
||||
CrInterval(
|
||||
uintptr_t(aData->mCrChannel),
|
||||
|
||||
@@ -677,12 +677,8 @@ RefPtr<WebGLContext> WebGLContext::Create(HostWebGLContext* host,
|
||||
LOCAL_GL_FRAGMENT_SHADER,
|
||||
};
|
||||
constexpr GLenum PRECISIONS[] = {
|
||||
LOCAL_GL_LOW_FLOAT,
|
||||
LOCAL_GL_MEDIUM_FLOAT,
|
||||
LOCAL_GL_HIGH_FLOAT,
|
||||
LOCAL_GL_LOW_INT,
|
||||
LOCAL_GL_MEDIUM_INT,
|
||||
LOCAL_GL_HIGH_INT,
|
||||
LOCAL_GL_LOW_FLOAT, LOCAL_GL_MEDIUM_FLOAT, LOCAL_GL_HIGH_FLOAT,
|
||||
LOCAL_GL_LOW_INT, LOCAL_GL_MEDIUM_INT, LOCAL_GL_HIGH_INT,
|
||||
};
|
||||
for (const auto& shaderType : SHADER_TYPES) {
|
||||
for (const auto& precisionType : PRECISIONS) {
|
||||
@@ -701,8 +697,10 @@ RefPtr<WebGLContext> WebGLContext::Create(HostWebGLContext* host,
|
||||
}
|
||||
|
||||
if (webgl->mDisableFragHighP) {
|
||||
out->shaderPrecisions->at({LOCAL_GL_FRAGMENT_SHADER, LOCAL_GL_HIGH_FLOAT}) = {};
|
||||
out->shaderPrecisions->at({LOCAL_GL_FRAGMENT_SHADER, LOCAL_GL_HIGH_INT}) = {};
|
||||
out->shaderPrecisions->at(
|
||||
{LOCAL_GL_FRAGMENT_SHADER, LOCAL_GL_HIGH_FLOAT}) = {};
|
||||
out->shaderPrecisions->at(
|
||||
{LOCAL_GL_FRAGMENT_SHADER, LOCAL_GL_HIGH_INT}) = {};
|
||||
}
|
||||
|
||||
// -
|
||||
|
||||
@@ -806,14 +806,10 @@ struct InitContextResult final {
|
||||
Limits limits;
|
||||
EnumMask<layers::SurfaceDescriptor::Type> uploadableSdTypes;
|
||||
// Padded because of "Android 5.0 ARMv7" builds:
|
||||
Padded<
|
||||
std::unordered_map<
|
||||
GetShaderPrecisionFormatArgs,
|
||||
ShaderPrecisionFormat,
|
||||
TupleStdHash<GetShaderPrecisionFormatArgs>
|
||||
>,
|
||||
64
|
||||
> shaderPrecisions;
|
||||
Padded<std::unordered_map<GetShaderPrecisionFormatArgs, ShaderPrecisionFormat,
|
||||
TupleStdHash<GetShaderPrecisionFormatArgs>>,
|
||||
64>
|
||||
shaderPrecisions;
|
||||
|
||||
auto MutTiedFields() {
|
||||
return std::tie(error, options, vendor, optionalRenderableFormatBits,
|
||||
@@ -1412,10 +1408,9 @@ inline std::string ToStringWithCommas(uint64_t v) {
|
||||
// https://en.cppreference.com/w/cpp/container/array/to_array
|
||||
|
||||
namespace detail {
|
||||
template<class T, size_t N, size_t... I>
|
||||
constexpr std::array<std::remove_cv_t<T>, N>
|
||||
to_array_impl(T (&a)[N], std::index_sequence<I...>)
|
||||
{
|
||||
template <class T, size_t N, size_t... I>
|
||||
constexpr std::array<std::remove_cv_t<T>, N> to_array_impl(
|
||||
T (&a)[N], std::index_sequence<I...>) {
|
||||
return {{a[I]...}};
|
||||
}
|
||||
|
||||
@@ -1426,9 +1421,9 @@ constexpr std::array<std::remove_cv_t<T>, N> to_array_impl(
|
||||
}
|
||||
} // namespace detail
|
||||
|
||||
template<class T, size_t N>
|
||||
template <class T, size_t N>
|
||||
constexpr std::array<std::remove_cv_t<T>, N> to_array(T (&a)[N]) {
|
||||
return detail::to_array_impl(a, std::make_index_sequence<N>{});
|
||||
return detail::to_array_impl(a, std::make_index_sequence<N>{});
|
||||
}
|
||||
|
||||
template <class T, size_t N>
|
||||
|
||||
@@ -818,7 +818,8 @@ static bool IsUncancelableIfOnlyPassiveListeners(const WidgetEvent* aEvent) {
|
||||
|
||||
// There might be non-passive listeners in the remote document
|
||||
// So return false if we are in the parent process with remote target
|
||||
nsCOMPtr<nsIContent> target = nsIContent::FromEventTargetOrNull(aEvent->mOriginalTarget);
|
||||
nsCOMPtr<nsIContent> target =
|
||||
nsIContent::FromEventTargetOrNull(aEvent->mOriginalTarget);
|
||||
return !(XRE_IsParentProcess() && BrowserParent::GetFrom(target));
|
||||
}
|
||||
|
||||
|
||||
@@ -1852,16 +1852,20 @@ bool EventListenerManager::HasNonPassiveListenersFor(
|
||||
// After dispatching wheel, legacy mouse scroll events are dispatched
|
||||
// and listeners on those can also default prevent the behavior.
|
||||
if (aEvent->mMessage == eWheel) {
|
||||
if (const auto& listeners = mListenerMap.GetListenersForType(nsGkAtoms::onDOMMouseScroll)) {
|
||||
if (const auto& listeners =
|
||||
mListenerMap.GetListenersForType(nsGkAtoms::onDOMMouseScroll)) {
|
||||
for (const Listener& listener : listeners->NonObservingRange()) {
|
||||
if (!listener.mFlags.mPassive && ListenerCanHandle(&listener, aEvent)) {
|
||||
if (!listener.mFlags.mPassive &&
|
||||
ListenerCanHandle(&listener, aEvent)) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
}
|
||||
if (const auto& listeners = mListenerMap.GetListenersForType(nsGkAtoms::onMozMousePixelScroll)) {
|
||||
if (const auto& listeners = mListenerMap.GetListenersForType(
|
||||
nsGkAtoms::onMozMousePixelScroll)) {
|
||||
for (const Listener& listener : listeners->NonObservingRange()) {
|
||||
if (!listener.mFlags.mPassive && ListenerCanHandle(&listener, aEvent)) {
|
||||
if (!listener.mFlags.mPassive &&
|
||||
ListenerCanHandle(&listener, aEvent)) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -4368,20 +4368,22 @@ nsresult EventStateManager::PostHandleEvent(nsPresContext* aPresContext,
|
||||
// events after they have been processed. When determining if
|
||||
// a swipe should occur, we should not prefer the current wheel
|
||||
// transaction.
|
||||
nsIFrame* lastScrollFrame = WheelTransaction::GetScrollTargetFrame();
|
||||
nsIFrame* lastScrollFrame =
|
||||
WheelTransaction::GetScrollTargetFrame();
|
||||
bool wheelTransactionHandlesInput = false;
|
||||
if (lastScrollFrame) {
|
||||
ScrollContainerFrame* scrollContainerFrame = lastScrollFrame->GetScrollTargetFrame();
|
||||
ScrollContainerFrame* scrollContainerFrame =
|
||||
lastScrollFrame->GetScrollTargetFrame();
|
||||
if (scrollContainerFrame->IsRootScrollFrameOfDocument()) {
|
||||
// If the current wheel transaction target is the root scroll
|
||||
// frame and is not scrollable on the x-axis, all delta is
|
||||
// overflown and swipe-to-nav may occur.
|
||||
wheelTransactionHandlesInput = true;
|
||||
allDeltaOverflown = !WheelHandlingUtils::CanScrollOn(scrollContainerFrame,
|
||||
wheelEvent->mDeltaX, 0.0);
|
||||
} else if(WheelHandlingUtils::CanScrollOn(scrollContainerFrame,
|
||||
wheelEvent->mDeltaX,
|
||||
wheelEvent->mDeltaY)) {
|
||||
allDeltaOverflown = !WheelHandlingUtils::CanScrollOn(
|
||||
scrollContainerFrame, wheelEvent->mDeltaX, 0.0);
|
||||
} else if (WheelHandlingUtils::CanScrollOn(
|
||||
scrollContainerFrame, wheelEvent->mDeltaX,
|
||||
wheelEvent->mDeltaY)) {
|
||||
// If the current wheel transaction target is not the root
|
||||
// scroll frame, ensure that swipe to nav does not occur if
|
||||
// the scroll frame is scrollable on the x or y axis. If the
|
||||
|
||||
@@ -429,7 +429,7 @@ gboolean LinuxGamepadService::OnGamepadData(GIOChannel* source,
|
||||
}
|
||||
|
||||
while (true) {
|
||||
struct input_event event {};
|
||||
struct input_event event{};
|
||||
gsize count;
|
||||
GError* err = nullptr;
|
||||
if (g_io_channel_read_chars(source, (gchar*)&event, sizeof(event), &count,
|
||||
|
||||
@@ -282,7 +282,8 @@ void HTMLDialogElement::Show(ErrorResult& aError) {
|
||||
}
|
||||
|
||||
bool HTMLDialogElement::Open() const {
|
||||
MOZ_ASSERT(GetBoolAttr(nsGkAtoms::open) == State().HasState(ElementState::OPEN));
|
||||
MOZ_ASSERT(GetBoolAttr(nsGkAtoms::open) ==
|
||||
State().HasState(ElementState::OPEN));
|
||||
return State().HasState(ElementState::OPEN);
|
||||
}
|
||||
|
||||
@@ -369,7 +370,8 @@ void HTMLDialogElement::ShowModal(ErrorResult& aError) {
|
||||
// 3. If subject's node document is not fully active, then throw an
|
||||
// "InvalidStateError" DOMException.
|
||||
if (!OwnerDoc()->IsFullyActive()) {
|
||||
return aError.ThrowInvalidStateError("The owner document is not fully active");
|
||||
return aError.ThrowInvalidStateError(
|
||||
"The owner document is not fully active");
|
||||
}
|
||||
|
||||
// 4. If subject is not connected, then throw an "InvalidStateError"
|
||||
|
||||
@@ -629,7 +629,7 @@ CSSIntSize HTMLImageElement::NaturalSize() {
|
||||
return {};
|
||||
}
|
||||
|
||||
CSSIntSize size; // defaults to 0,0
|
||||
CSSIntSize size; // defaults to 0,0
|
||||
if (!StaticPrefs::image_natural_size_fallback_enabled()) {
|
||||
size.width = intrinsicSize.mWidth.valueOr(0);
|
||||
size.height = intrinsicSize.mHeight.valueOr(0);
|
||||
|
||||
@@ -613,8 +613,10 @@ void nsHTMLDocument::NamedGetter(JSContext* aCx, const nsAString& aName,
|
||||
}
|
||||
}
|
||||
|
||||
// To limit the possible performance/memory impact, only collect at most 10 properties.
|
||||
if (mShadowedHTMLDocumentProperties.Length() <= 10 && HTMLDocument_Binding::InterfaceHasNonEventHandlerProperty(aName)) {
|
||||
// To limit the possible performance/memory impact, only collect at most 10
|
||||
// properties.
|
||||
if (mShadowedHTMLDocumentProperties.Length() <= 10 &&
|
||||
HTMLDocument_Binding::InterfaceHasNonEventHandlerProperty(aName)) {
|
||||
if (!mShadowedHTMLDocumentProperties.Contains(aName)) {
|
||||
mShadowedHTMLDocumentProperties.AppendElement(aName);
|
||||
}
|
||||
|
||||
@@ -297,8 +297,8 @@ template <typename T>
|
||||
class CheckedUnsafePtr;
|
||||
|
||||
template <typename T>
|
||||
SafeRefPtr(const CheckedUnsafePtr<T>&,
|
||||
const AcquireStrongRefFromRawPtr&) -> SafeRefPtr<T>;
|
||||
SafeRefPtr(const CheckedUnsafePtr<T>&, const AcquireStrongRefFromRawPtr&)
|
||||
-> SafeRefPtr<T>;
|
||||
|
||||
template <typename T>
|
||||
SafeRefPtr<T>::SafeRefPtr(T* aRawPtr, detail::InitialConstructionTag)
|
||||
|
||||
@@ -1624,8 +1624,8 @@ void MaybeLogBlockShutdownDiagnostics(ContentParent* aSelf, const char* aMsg,
|
||||
if (aSelf->IsBlockingShutdown()) {
|
||||
MOZ_LOG(
|
||||
ContentParent::GetLog(), LogLevel::Info,
|
||||
("ContentParent: id=%p childID=%" PRIu64 " pid=%d - %s at %s(%d)", aSelf,
|
||||
(uint64_t)aSelf->ChildID(), aSelf->Pid(), aMsg, aFile, aLine));
|
||||
("ContentParent: id=%p childID=%" PRIu64 " pid=%d - %s at %s(%d)",
|
||||
aSelf, (uint64_t)aSelf->ChildID(), aSelf->Pid(), aMsg, aFile, aLine));
|
||||
}
|
||||
#else
|
||||
Unused << aSelf;
|
||||
|
||||
@@ -326,7 +326,8 @@ bool MathMLElement::ParseNumericValue(const nsString& aString,
|
||||
return true;
|
||||
} else {
|
||||
uint8_t unitType = SVGLength::GetUnitTypeForString(unit);
|
||||
if (unitType == SVGLength_Binding::SVG_LENGTHTYPE_UNKNOWN) { // unexpected unit
|
||||
if (unitType ==
|
||||
SVGLength_Binding::SVG_LENGTHTYPE_UNKNOWN) { // unexpected unit
|
||||
if (!(aFlags & PARSE_SUPPRESS_WARNINGS)) {
|
||||
ReportLengthParseError(aString, aDocument);
|
||||
}
|
||||
|
||||
@@ -14,8 +14,7 @@ namespace mozilla {
|
||||
BaseMediaMgrError::BaseMediaMgrError(Name aName, const nsACString& aMessage,
|
||||
const nsAString& aConstraint)
|
||||
: mMessage(aMessage), mConstraint(aConstraint), mName(aName) {
|
||||
#define MAP_MEDIAERR(name, msg) \
|
||||
{ Name::name, #name, msg }
|
||||
#define MAP_MEDIAERR(name, msg) {Name::name, #name, msg}
|
||||
|
||||
static struct {
|
||||
Name mName;
|
||||
|
||||
@@ -47,8 +47,8 @@ NS_IMPL_CYCLE_COLLECTION_TRAVERSE_BEGIN(MediaStreamTrackSource)
|
||||
NS_IMPL_CYCLE_COLLECTION_TRAVERSE_END
|
||||
|
||||
auto MediaStreamTrackSource::ApplyConstraints(
|
||||
const dom::MediaTrackConstraints& aConstraints,
|
||||
CallerType aCallerType) -> RefPtr<ApplyConstraintsPromise> {
|
||||
const dom::MediaTrackConstraints& aConstraints, CallerType aCallerType)
|
||||
-> RefPtr<ApplyConstraintsPromise> {
|
||||
return ApplyConstraintsPromise::CreateAndReject(
|
||||
MakeRefPtr<MediaMgrError>(MediaMgrError::Name::OverconstrainedError, ""),
|
||||
__func__);
|
||||
|
||||
@@ -328,7 +328,8 @@ static bool IsMFCDMAllowedByOrigin(const Maybe<nsCString>& aOrigin) {
|
||||
for (const auto& entry : sOriginStatusEntries) {
|
||||
// Check if the given origin matches the entry, or if it's a suborigin.
|
||||
if (FindInReadable(entry.origin(), *aOrigin)) {
|
||||
isAllowed = entry.status() ==
|
||||
isAllowed =
|
||||
entry.status() ==
|
||||
nsIWindowsMediaFoundationCDMOriginsListService::ORIGIN_ALLOWED;
|
||||
isFound = true;
|
||||
break;
|
||||
@@ -337,7 +338,8 @@ static bool IsMFCDMAllowedByOrigin(const Maybe<nsCString>& aOrigin) {
|
||||
EME_LOG(
|
||||
"MediaKeySystemAccess::IsMFCDMAllowedByOrigin, origin (%s) "
|
||||
"is %s to use MFCDM %s(Remote)",
|
||||
aOrigin->get(), isAllowed ? "ALLOWED" : "BLOCKED", isFound ? "" : "by default ");
|
||||
aOrigin->get(), isAllowed ? "ALLOWED" : "BLOCKED",
|
||||
isFound ? "" : "by default ");
|
||||
return isAllowed;
|
||||
}
|
||||
#endif
|
||||
|
||||
@@ -76,16 +76,24 @@ static void TestAudioCompactor(size_t aBytes) {
|
||||
}
|
||||
|
||||
TEST(Media, AudioCompactor_4000)
|
||||
{ TestAudioCompactor(4000); }
|
||||
{
|
||||
TestAudioCompactor(4000);
|
||||
}
|
||||
|
||||
TEST(Media, AudioCompactor_4096)
|
||||
{ TestAudioCompactor(4096); }
|
||||
{
|
||||
TestAudioCompactor(4096);
|
||||
}
|
||||
|
||||
TEST(Media, AudioCompactor_5000)
|
||||
{ TestAudioCompactor(5000); }
|
||||
{
|
||||
TestAudioCompactor(5000);
|
||||
}
|
||||
|
||||
TEST(Media, AudioCompactor_5256)
|
||||
{ TestAudioCompactor(5256); }
|
||||
{
|
||||
TestAudioCompactor(5256);
|
||||
}
|
||||
|
||||
TEST(Media, AudioCompactor_NativeCopy)
|
||||
{
|
||||
|
||||
@@ -276,8 +276,11 @@ void MFMediaEngineParent::NotifyError(MF_MEDIA_ENGINE_ERR aError,
|
||||
// A special error requires to reset the hareware context, not a real error.
|
||||
if (aResult == DRM_E_TEE_INVALID_HWDRM_STATE) {
|
||||
LOG("Notify error 'DRM_E_TEE_INVALID_HWDRM_STATE', hr=%lx", aResult);
|
||||
ENGINE_MARKER("MFMediaEngineParent,Received 'DRM_E_TEE_INVALID_HWDRM_STATE'");
|
||||
auto* proxy = mContentProtectionManager ? mContentProtectionManager->GetCDMProxy() : nullptr;
|
||||
ENGINE_MARKER(
|
||||
"MFMediaEngineParent,Received 'DRM_E_TEE_INVALID_HWDRM_STATE'");
|
||||
auto* proxy = mContentProtectionManager
|
||||
? mContentProtectionManager->GetCDMProxy()
|
||||
: nullptr;
|
||||
if (proxy) {
|
||||
proxy->OnHardwareContextReset();
|
||||
}
|
||||
|
||||
@@ -99,10 +99,10 @@ using MFMediaEngineError = MF_MEDIA_ENGINE_ERR;
|
||||
text)
|
||||
|
||||
#ifdef MOZ_WMF_CDM
|
||||
// This eror can happen during OS sleep/resume, or moving video to different
|
||||
// graphics adapters.
|
||||
inline constexpr HRESULT DRM_E_TEE_INVALID_HWDRM_STATE =
|
||||
static_cast<HRESULT>(0x8004CD12);
|
||||
// This eror can happen during OS sleep/resume, or moving video to different
|
||||
// graphics adapters.
|
||||
inline constexpr HRESULT DRM_E_TEE_INVALID_HWDRM_STATE =
|
||||
static_cast<HRESULT>(0x8004CD12);
|
||||
#endif
|
||||
|
||||
const char* MediaEventTypeToStr(MediaEventType aType);
|
||||
|
||||
@@ -192,8 +192,8 @@ RefPtr<GenericNonExclusivePromise> RDDProcessManager::LaunchRDDProcess() {
|
||||
}
|
||||
|
||||
auto RDDProcessManager::EnsureRDDProcessAndCreateBridge(
|
||||
ipc::EndpointProcInfo aOtherProcess,
|
||||
dom::ContentParentId aParentId) -> RefPtr<EnsureRDDPromise> {
|
||||
ipc::EndpointProcInfo aOtherProcess, dom::ContentParentId aParentId)
|
||||
-> RefPtr<EnsureRDDPromise> {
|
||||
return InvokeAsync(
|
||||
GetMainThreadSerialEventTarget(), __func__,
|
||||
[aOtherProcess, aParentId, this]() -> RefPtr<EnsureRDDPromise> {
|
||||
|
||||
@@ -316,8 +316,7 @@ Result<H265SPS, nsresult> H265::DecodeSPSFromSPSNALU(const H265NALU& aSPSNALU) {
|
||||
return Err(NS_ERROR_FAILURE);
|
||||
}
|
||||
IN_RANGE_OR_RETURN(width.value(), 0, sps.pic_width_in_luma_samples);
|
||||
CheckedUint32 height =
|
||||
sps.pic_height_in_luma_samples;
|
||||
CheckedUint32 height = sps.pic_height_in_luma_samples;
|
||||
height -=
|
||||
sps.subHeightC * (sps.conf_win_bottom_offset - sps.conf_win_top_offset);
|
||||
if (!height.isValid()) {
|
||||
|
||||
@@ -12,4 +12,6 @@
|
||||
using namespace mozilla;
|
||||
|
||||
TEST(CanCreateMFTDecoder, NoIPC)
|
||||
{ EXPECT_TRUE(WMFDecoderModule::CanCreateMFTDecoder(WMFStreamType::H264)); }
|
||||
{
|
||||
EXPECT_TRUE(WMFDecoderModule::CanCreateMFTDecoder(WMFStreamType::H264));
|
||||
}
|
||||
|
||||
@@ -45,7 +45,8 @@ inline bool FuzzyEqual(double v1, double v2) { return fabs(v1 - v2) < 1e-7; }
|
||||
*/
|
||||
inline float ConvertLinearToDecibels(float aLinearValue, float aMinDecibels) {
|
||||
MOZ_ASSERT(aLinearValue >= 0);
|
||||
return aLinearValue > 0.0f ? 20.0f * fdlibm_log10f(aLinearValue) : aMinDecibels;
|
||||
return aLinearValue > 0.0f ? 20.0f * fdlibm_log10f(aLinearValue)
|
||||
: aMinDecibels;
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -26,7 +26,7 @@ class NormalizedConstraintSet {
|
||||
protected:
|
||||
class BaseRange {
|
||||
protected:
|
||||
typedef BaseRange NormalizedConstraintSet::*MemberPtrType;
|
||||
typedef BaseRange NormalizedConstraintSet::* MemberPtrType;
|
||||
|
||||
BaseRange(MemberPtrType aMemberPtr, const char* aName,
|
||||
nsTArray<MemberPtrType>* aList)
|
||||
@@ -44,7 +44,7 @@ class NormalizedConstraintSet {
|
||||
const char* mName;
|
||||
};
|
||||
|
||||
typedef BaseRange NormalizedConstraintSet::*MemberPtrType;
|
||||
typedef BaseRange NormalizedConstraintSet::* MemberPtrType;
|
||||
|
||||
public:
|
||||
template <class ValueType>
|
||||
@@ -133,7 +133,7 @@ class NormalizedConstraintSet {
|
||||
};
|
||||
|
||||
struct LongRange : public Range<int32_t> {
|
||||
typedef LongRange NormalizedConstraintSet::*LongPtrType;
|
||||
typedef LongRange NormalizedConstraintSet::* LongPtrType;
|
||||
|
||||
LongRange(LongPtrType aMemberPtr, const char* aName,
|
||||
const dom::Optional<dom::OwningLongOrConstrainLongRange>& aOther,
|
||||
@@ -141,14 +141,14 @@ class NormalizedConstraintSet {
|
||||
};
|
||||
|
||||
struct LongLongRange : public Range<int64_t> {
|
||||
typedef LongLongRange NormalizedConstraintSet::*LongLongPtrType;
|
||||
typedef LongLongRange NormalizedConstraintSet::* LongLongPtrType;
|
||||
|
||||
LongLongRange(LongLongPtrType aMemberPtr, const char* aName,
|
||||
const long long& aOther, nsTArray<MemberPtrType>* aList);
|
||||
};
|
||||
|
||||
struct DoubleRange : public Range<double> {
|
||||
typedef DoubleRange NormalizedConstraintSet::*DoublePtrType;
|
||||
typedef DoubleRange NormalizedConstraintSet::* DoublePtrType;
|
||||
|
||||
DoubleRange(
|
||||
DoublePtrType aMemberPtr, const char* aName,
|
||||
@@ -157,7 +157,7 @@ class NormalizedConstraintSet {
|
||||
};
|
||||
|
||||
struct BooleanRange : public Range<bool> {
|
||||
typedef BooleanRange NormalizedConstraintSet::*BooleanPtrType;
|
||||
typedef BooleanRange NormalizedConstraintSet::* BooleanPtrType;
|
||||
|
||||
BooleanRange(
|
||||
BooleanPtrType aMemberPtr, const char* aName,
|
||||
@@ -176,7 +176,7 @@ class NormalizedConstraintSet {
|
||||
typedef std::set<nsString> ValueType;
|
||||
ValueType mExact, mIdeal;
|
||||
|
||||
typedef StringRange NormalizedConstraintSet::*StringPtrType;
|
||||
typedef StringRange NormalizedConstraintSet::* StringPtrType;
|
||||
|
||||
StringRange(
|
||||
StringPtrType aMemberPtr, const char* aName,
|
||||
|
||||
@@ -51,8 +51,8 @@ void RemoteTrackSource::Destroy() {
|
||||
}
|
||||
|
||||
auto RemoteTrackSource::ApplyConstraints(
|
||||
const dom::MediaTrackConstraints& aConstraints,
|
||||
dom::CallerType aCallerType) -> RefPtr<ApplyConstraintsPromise> {
|
||||
const dom::MediaTrackConstraints& aConstraints, dom::CallerType aCallerType)
|
||||
-> RefPtr<ApplyConstraintsPromise> {
|
||||
return ApplyConstraintsPromise::CreateAndReject(
|
||||
MakeRefPtr<MediaMgrError>(
|
||||
dom::MediaStreamError::Name::OverconstrainedError, ""),
|
||||
|
||||
@@ -162,8 +162,9 @@ auto WebrtcGlobalStatsHistory::Entry::Prune(const DOMHighResTimeStamp aBefore)
|
||||
// Note: we always keep the most recent SDP
|
||||
}
|
||||
|
||||
auto WebrtcGlobalStatsHistory::InitHistory(
|
||||
const nsAString& aPcId, const bool aIsLongTermStatsDisabled) -> void {
|
||||
auto WebrtcGlobalStatsHistory::InitHistory(const nsAString& aPcId,
|
||||
const bool aIsLongTermStatsDisabled)
|
||||
-> void {
|
||||
MOZ_ASSERT(XRE_IsParentProcess());
|
||||
if (WebrtcGlobalStatsHistory::Get().MaybeGet(aPcId)) {
|
||||
return;
|
||||
|
||||
@@ -57,4 +57,4 @@ webrtc::NtpTime CreateNtp(webrtc::Timestamp aTime) {
|
||||
|
||||
namespace webrtc {
|
||||
int64_t SystemTimeNanos() { return mozilla::WebrtcSystemTime().us() * 1000; }
|
||||
} // namespace rtc
|
||||
} // namespace webrtc
|
||||
|
||||
@@ -28,7 +28,9 @@ class TestSimpleTokenBucket : public SimpleTokenBucket {
|
||||
};
|
||||
|
||||
TEST(SimpleTokenBucketTest, TestConstruct)
|
||||
{ TestSimpleTokenBucket b(10, 1); }
|
||||
{
|
||||
TestSimpleTokenBucket b(10, 1);
|
||||
}
|
||||
|
||||
TEST(SimpleTokenBucketTest, TestGet)
|
||||
{
|
||||
|
||||
@@ -11,12 +11,8 @@
|
||||
#include "nsCycleCollectionParticipant.h"
|
||||
#include "nsCOMPtr.h"
|
||||
|
||||
#define TCPSERVERSOCKETCHILD_CID \
|
||||
{ \
|
||||
0x41a77ec8, 0xfd86, 0x409e, { \
|
||||
0xae, 0xa9, 0xaf, 0x2c, 0xa4, 0x07, 0xef, 0x8e \
|
||||
} \
|
||||
}
|
||||
#define TCPSERVERSOCKETCHILD_CID \
|
||||
{0x41a77ec8, 0xfd86, 0x409e, {0xae, 0xa9, 0xaf, 0x2c, 0xa4, 0x07, 0xef, 0x8e}}
|
||||
|
||||
class nsITCPServerSocketInternal;
|
||||
|
||||
|
||||
@@ -13,12 +13,8 @@
|
||||
#include "nsCOMPtr.h"
|
||||
#include "js/TypeDecls.h"
|
||||
|
||||
#define TCPSOCKETPARENT_CID \
|
||||
{ \
|
||||
0x4e7246c6, 0xa8b3, 0x426d, { \
|
||||
0x9c, 0x17, 0x76, 0xda, 0xb1, 0xe1, 0xe1, 0x4a \
|
||||
} \
|
||||
}
|
||||
#define TCPSOCKETPARENT_CID \
|
||||
{0x4e7246c6, 0xa8b3, 0x426d, {0x9c, 0x17, 0x76, 0xda, 0xb1, 0xe1, 0xe1, 0x4a}}
|
||||
|
||||
namespace mozilla::dom {
|
||||
|
||||
|
||||
@@ -11,12 +11,8 @@
|
||||
#include "nsCycleCollectionParticipant.h"
|
||||
#include "nsCOMPtr.h"
|
||||
|
||||
#define UDPSOCKETCHILD_CID \
|
||||
{ \
|
||||
0xb47e5a0f, 0xd384, 0x48ef, { \
|
||||
0x88, 0x85, 0x42, 0x59, 0x79, 0x3d, 0x9c, 0xf0 \
|
||||
} \
|
||||
}
|
||||
#define UDPSOCKETCHILD_CID \
|
||||
{0xb47e5a0f, 0xd384, 0x48ef, {0x88, 0x85, 0x42, 0x59, 0x79, 0x3d, 0x9c, 0xf0}}
|
||||
|
||||
class nsIInputStream;
|
||||
class nsIPrincipal;
|
||||
|
||||
@@ -614,7 +614,8 @@ nsresult Notification::ResolveIconURL(nsIGlobalObject* aGlobal,
|
||||
if (NS_SUCCEEDED(rv)) {
|
||||
nsAutoCString src;
|
||||
srcUri->GetSpec(src);
|
||||
// XXX(krosylight): We should be able to pass UTF8 as-is, or ideally the URI object itself.
|
||||
// XXX(krosylight): We should be able to pass UTF8 as-is, or ideally the URI
|
||||
// object itself.
|
||||
CopyUTF8toUTF16(src, aDecodedUrl);
|
||||
}
|
||||
|
||||
|
||||
@@ -194,7 +194,9 @@ class Notification : public DOMEventTargetHelper, public SupportsWeakPtr {
|
||||
bool CreateActor();
|
||||
bool SendShow(Promise* aPromise);
|
||||
|
||||
static nsresult ResolveIconURL(nsIGlobalObject* aGlobal, const nsAString& aIconURL, nsString& aResolvedURL);
|
||||
static nsresult ResolveIconURL(nsIGlobalObject* aGlobal,
|
||||
const nsAString& aIconURL,
|
||||
nsString& aResolvedURL);
|
||||
};
|
||||
|
||||
} // namespace mozilla::dom
|
||||
|
||||
@@ -21,13 +21,11 @@ using std::begin;
|
||||
using std::end;
|
||||
|
||||
template <typename T, typename NestedRange>
|
||||
auto Flatten(NestedRange&& aRange)
|
||||
-> std::enable_if_t<
|
||||
std::is_same_v<T,
|
||||
std::decay_t<typename decltype(begin(
|
||||
std::declval<const NestedRange&>()))::value_type>>,
|
||||
std::conditional_t<std::is_rvalue_reference_v<NestedRange>,
|
||||
std::decay_t<NestedRange>, NestedRange>> {
|
||||
auto Flatten(NestedRange&& aRange) -> std::enable_if_t<
|
||||
std::is_same_v<T, std::decay_t<typename decltype(begin(
|
||||
std::declval<const NestedRange&>()))::value_type>>,
|
||||
std::conditional_t<std::is_rvalue_reference_v<NestedRange>,
|
||||
std::decay_t<NestedRange>, NestedRange>> {
|
||||
return std::forward<NestedRange>(aRange);
|
||||
}
|
||||
|
||||
@@ -100,12 +98,11 @@ struct FlatRange {
|
||||
};
|
||||
|
||||
template <typename T, typename NestedRange>
|
||||
auto Flatten(NestedRange&& aRange)
|
||||
-> std::enable_if_t<
|
||||
!std::is_same_v<T, std::decay_t<typename decltype(begin(
|
||||
std::declval<const std::decay_t<
|
||||
NestedRange>&>()))::value_type>>,
|
||||
FlatRange<T, NestedRange>> {
|
||||
auto Flatten(NestedRange&& aRange) -> std::enable_if_t<
|
||||
!std::is_same_v<
|
||||
T, std::decay_t<typename decltype(begin(
|
||||
std::declval<const std::decay_t<NestedRange>&>()))::value_type>>,
|
||||
FlatRange<T, NestedRange>> {
|
||||
return FlatRange<T, NestedRange>{std::forward<NestedRange>(aRange)};
|
||||
}
|
||||
|
||||
|
||||
@@ -29,10 +29,8 @@ struct IsExclusiveMozPromise<
|
||||
} // namespace detail
|
||||
|
||||
template <typename T, typename U, typename F>
|
||||
auto Map(RefPtr<U> aPromise, F&& aFunc)
|
||||
-> std::enable_if_t<
|
||||
detail::IsExclusiveMozPromise<RemoveSmartPointer<U>>::value,
|
||||
RefPtr<T>> {
|
||||
auto Map(RefPtr<U> aPromise, F&& aFunc) -> std::enable_if_t<
|
||||
detail::IsExclusiveMozPromise<RemoveSmartPointer<U>>::value, RefPtr<T>> {
|
||||
return aPromise->Then(
|
||||
GetCurrentSerialEventTarget(), __func__,
|
||||
[func =
|
||||
@@ -48,10 +46,8 @@ auto Map(RefPtr<U> aPromise, F&& aFunc)
|
||||
}
|
||||
|
||||
template <typename T, typename U, typename F>
|
||||
auto Map(RefPtr<U> aPromise, F&& aFunc)
|
||||
-> std::enable_if_t<
|
||||
!detail::IsExclusiveMozPromise<RemoveSmartPointer<U>>::value,
|
||||
RefPtr<T>> {
|
||||
auto Map(RefPtr<U> aPromise, F&& aFunc) -> std::enable_if_t<
|
||||
!detail::IsExclusiveMozPromise<RemoveSmartPointer<U>>::value, RefPtr<T>> {
|
||||
return aPromise->Then(GetCurrentSerialEventTarget(), __func__,
|
||||
[func = std::forward<F>(aFunc)](
|
||||
const typename U::ResolveOrRejectValue& aValue) {
|
||||
|
||||
@@ -1050,7 +1050,8 @@ auto OrElseIf(Result<V, E>&& aResult, P&& aPred, F&& aFunc) -> Result<V, E> {
|
||||
return Err(NS_FAILED(_status) ? (_status) : (_rv))
|
||||
#else
|
||||
# define RECORD_IN_NIGHTLY(_dummy, _status) \
|
||||
{}
|
||||
{ \
|
||||
}
|
||||
|
||||
# define OK_IN_NIGHTLY_PROPAGATE_IN_OTHERS QM_PROPAGATE
|
||||
|
||||
@@ -1142,8 +1143,8 @@ auto ErrToDefaultOk(const nsresult aValue) -> Result<V, nsresult> {
|
||||
}
|
||||
|
||||
template <typename MozPromiseType, typename RejectValueT = nsresult>
|
||||
auto CreateAndRejectMozPromise(StaticString aFunc,
|
||||
const RejectValueT& aRv) -> decltype(auto) {
|
||||
auto CreateAndRejectMozPromise(StaticString aFunc, const RejectValueT& aRv)
|
||||
-> decltype(auto) {
|
||||
if constexpr (std::is_same_v<RejectValueT, nsresult>) {
|
||||
return MozPromiseType::CreateAndReject(aRv, aFunc);
|
||||
} else if constexpr (std::is_same_v<RejectValueT, QMResult>) {
|
||||
@@ -1235,8 +1236,8 @@ auto Reduce(Range&& aRange, T aInit, const BinaryOp& aBinaryOp) {
|
||||
}
|
||||
|
||||
template <typename Range, typename Body>
|
||||
auto CollectEachInRange(Range&& aRange,
|
||||
const Body& aBody) -> Result<mozilla::Ok, nsresult> {
|
||||
auto CollectEachInRange(Range&& aRange, const Body& aBody)
|
||||
-> Result<mozilla::Ok, nsresult> {
|
||||
for (auto&& element : aRange) {
|
||||
MOZ_TRY(aBody(element));
|
||||
}
|
||||
|
||||
@@ -1088,7 +1088,7 @@ TEST(QuotaCommon_TryUnwrap, NonConstDecl)
|
||||
|
||||
TEST(QuotaCommon_TryUnwrap, RvalueDecl)
|
||||
{
|
||||
QM_TRY_UNWRAP(int32_t && x, (Result<int32_t, nsresult>{42}), QM_VOID);
|
||||
QM_TRY_UNWRAP(int32_t&& x, (Result<int32_t, nsresult>{42}), QM_VOID);
|
||||
|
||||
static_assert(std::is_same_v<decltype(x), int32_t&&>);
|
||||
|
||||
@@ -1836,10 +1836,14 @@ TEST(QuotaCommon_ErrToDefaultOkOrErr, NsCOMPtr_Err)
|
||||
}
|
||||
|
||||
TEST(QuotaCommon_IsSpecificError, Match)
|
||||
{ EXPECT_TRUE(IsSpecificError<NS_ERROR_FAILURE>(NS_ERROR_FAILURE)); }
|
||||
{
|
||||
EXPECT_TRUE(IsSpecificError<NS_ERROR_FAILURE>(NS_ERROR_FAILURE));
|
||||
}
|
||||
|
||||
TEST(QuotaCommon_IsSpecificError, Mismatch)
|
||||
{ EXPECT_FALSE(IsSpecificError<NS_ERROR_FAILURE>(NS_ERROR_UNEXPECTED)); }
|
||||
{
|
||||
EXPECT_FALSE(IsSpecificError<NS_ERROR_FAILURE>(NS_ERROR_UNEXPECTED));
|
||||
}
|
||||
|
||||
TEST(QuotaCommon_ErrToOk, Bool_True)
|
||||
{
|
||||
|
||||
@@ -64,8 +64,7 @@ CSPViolationData::CSPViolationData(uint32_t aViolatedPolicyIndex,
|
||||
BlockedContentSource::TrustedTypesPolicy)
|
||||
? nsString(aSample)
|
||||
: MaybeTruncateSampleWithEllipsis(aSample)},
|
||||
mHashSHA256{aHashSHA256}
|
||||
{}
|
||||
mHashSHA256{aHashSHA256} {}
|
||||
|
||||
// Required for `mElement`, since its destructor requires a definition of
|
||||
// `Element`.
|
||||
|
||||
@@ -47,7 +47,8 @@ struct CSPViolationData {
|
||||
const CSPDirective aEffectiveDirective,
|
||||
const nsACString& aSourceFile, uint32_t aLineNumber,
|
||||
uint32_t aColumnNumber, Element* aElement,
|
||||
const nsAString& aSample, const nsACString& aHashSHA256 = ""_ns);
|
||||
const nsAString& aSample,
|
||||
const nsACString& aHashSHA256 = ""_ns);
|
||||
|
||||
~CSPViolationData();
|
||||
|
||||
|
||||
@@ -16,12 +16,8 @@
|
||||
|
||||
#define REFERRERINFO_CONTRACTID "@mozilla.org/referrer-info;1"
|
||||
// 041a129f-10ce-4bda-a60d-e027a26d5ed0
|
||||
#define REFERRERINFO_CID \
|
||||
{ \
|
||||
0x041a129f, 0x10ce, 0x4bda, { \
|
||||
0xa6, 0x0d, 0xe0, 0x27, 0xa2, 0x6d, 0x5e, 0xd0 \
|
||||
} \
|
||||
}
|
||||
#define REFERRERINFO_CID \
|
||||
{0x041a129f, 0x10ce, 0x4bda, {0xa6, 0x0d, 0xe0, 0x27, 0xa2, 0x6d, 0x5e, 0xd0}}
|
||||
|
||||
class nsIHttpChannel;
|
||||
class nsIURI;
|
||||
|
||||
@@ -597,11 +597,12 @@ void nsCSPContext::ReportInlineViolation(
|
||||
nsAutoCString hashSHA256;
|
||||
// We optionally include the hash to create more helpful error messages.
|
||||
nsCOMPtr<nsICryptoHash> hasher;
|
||||
if (NS_SUCCEEDED(NS_NewCryptoHash(nsICryptoHash::SHA256, getter_AddRefs(hasher)))) {
|
||||
if (NS_SUCCEEDED(
|
||||
NS_NewCryptoHash(nsICryptoHash::SHA256, getter_AddRefs(hasher)))) {
|
||||
NS_ConvertUTF16toUTF8 source(aSourceCode);
|
||||
if (NS_SUCCEEDED(hasher->Update(
|
||||
reinterpret_cast<const uint8_t*>(source.get()), source.Length()))) {
|
||||
(void) hasher->Finish(true, hashSHA256);
|
||||
(void)hasher->Finish(true, hashSHA256);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1693,8 +1694,9 @@ class CSPReportSenderRunnable final : public Runnable {
|
||||
: "CSPInlineScriptViolation2";
|
||||
}
|
||||
|
||||
AutoTArray<nsString, 3> params = {mViolatedDirectiveNameAndValue,
|
||||
effectiveDirective, NS_ConvertUTF8toUTF16(mCSPViolationData.mHashSHA256)};
|
||||
AutoTArray<nsString, 3> params = {
|
||||
mViolatedDirectiveNameAndValue, effectiveDirective,
|
||||
NS_ConvertUTF8toUTF16(mCSPViolationData.mHashSHA256)};
|
||||
mCSPContext->logToConsole(
|
||||
errorName, params, mCSPViolationData.mSourceFile,
|
||||
mCSPViolationData.mSample, mCSPViolationData.mLineNumber,
|
||||
|
||||
@@ -13,12 +13,8 @@
|
||||
#include "nsIChannelEventSink.h"
|
||||
|
||||
#define CSPSERVICE_CONTRACTID "@mozilla.org/cspservice;1"
|
||||
#define CSPSERVICE_CID \
|
||||
{ \
|
||||
0x8d2f40b2, 0x4875, 0x4c95, { \
|
||||
0x97, 0xd9, 0x3f, 0x7d, 0xca, 0x2c, 0xb4, 0x60 \
|
||||
} \
|
||||
}
|
||||
#define CSPSERVICE_CID \
|
||||
{0x8d2f40b2, 0x4875, 0x4c95, {0x97, 0xd9, 0x3f, 0x7d, 0xca, 0x2c, 0xb4, 0x60}}
|
||||
class CSPService : public nsIContentPolicy, public nsIChannelEventSink {
|
||||
public:
|
||||
NS_DECL_ISUPPORTS
|
||||
|
||||
@@ -415,16 +415,16 @@ CSPDirective CSP_ContentTypeToDirective(nsContentPolicyType aType) {
|
||||
return nsIContentSecurityPolicy::DEFAULT_SRC_DIRECTIVE;
|
||||
}
|
||||
|
||||
already_AddRefed<nsIContentSecurityPolicy> CSP_CreateFromHeader(const nsAString& aHeaderValue, nsIURI* aSelfURI,
|
||||
nsIPrincipal* aLoadingPrincipal,
|
||||
ErrorResult& aRv) {
|
||||
already_AddRefed<nsIContentSecurityPolicy> CSP_CreateFromHeader(
|
||||
const nsAString& aHeaderValue, nsIURI* aSelfURI,
|
||||
nsIPrincipal* aLoadingPrincipal, ErrorResult& aRv) {
|
||||
RefPtr<nsCSPContext> csp = new nsCSPContext();
|
||||
// Hard code some default values until we have a use case where we can provide
|
||||
// something else.
|
||||
// When inheriting from this CSP, these values will be overwritten anyway.
|
||||
aRv = csp->SetRequestContextWithPrincipal(aLoadingPrincipal, aSelfURI,
|
||||
/* aReferrer */ ""_ns,
|
||||
/* aInnerWindowId */ 0);
|
||||
/* aReferrer */ ""_ns,
|
||||
/* aInnerWindowId */ 0);
|
||||
if (aRv.Failed()) {
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
@@ -194,9 +194,9 @@ nsresult CSP_AppendCSPFromHeader(nsIContentSecurityPolicy* aCsp,
|
||||
|
||||
/* =============== Helpers ================== */
|
||||
|
||||
already_AddRefed<nsIContentSecurityPolicy> CSP_CreateFromHeader(const nsAString& aHeaderValue, nsIURI* aSelfURI,
|
||||
nsIPrincipal* aLoadingPrincipal,
|
||||
mozilla::ErrorResult& aRv);
|
||||
already_AddRefed<nsIContentSecurityPolicy> CSP_CreateFromHeader(
|
||||
const nsAString& aHeaderValue, nsIURI* aSelfURI,
|
||||
nsIPrincipal* aLoadingPrincipal, mozilla::ErrorResult& aRv);
|
||||
|
||||
class nsCSPHostSrc;
|
||||
|
||||
|
||||
@@ -19,12 +19,8 @@ class nsIStreamListener;
|
||||
#define NS_CONTENTSECURITYMANAGER_CONTRACTID \
|
||||
"@mozilla.org/contentsecuritymanager;1"
|
||||
// cdcc1ab8-3cea-4e6c-a294-a651fa35227f
|
||||
#define NS_CONTENTSECURITYMANAGER_CID \
|
||||
{ \
|
||||
0xcdcc1ab8, 0x3cea, 0x4e6c, { \
|
||||
0xa2, 0x94, 0xa6, 0x51, 0xfa, 0x35, 0x22, 0x7f \
|
||||
} \
|
||||
}
|
||||
#define NS_CONTENTSECURITYMANAGER_CID \
|
||||
{0xcdcc1ab8, 0x3cea, 0x4e6c, {0xa2, 0x94, 0xa6, 0x51, 0xfa, 0x35, 0x22, 0x7f}}
|
||||
|
||||
class nsContentSecurityManager : public nsIContentSecurityManager,
|
||||
public nsIChannelEventSink {
|
||||
|
||||
@@ -9,12 +9,8 @@
|
||||
|
||||
#define NS_MIXEDCONTENTBLOCKER_CONTRACTID "@mozilla.org/mixedcontentblocker;1"
|
||||
/* daf1461b-bf29-4f88-8d0e-4bcdf332c862 */
|
||||
#define NS_MIXEDCONTENTBLOCKER_CID \
|
||||
{ \
|
||||
0xdaf1461b, 0xbf29, 0x4f88, { \
|
||||
0x8d, 0x0e, 0x4b, 0xcd, 0xf3, 0x32, 0xc8, 0x62 \
|
||||
} \
|
||||
}
|
||||
#define NS_MIXEDCONTENTBLOCKER_CID \
|
||||
{0xdaf1461b, 0xbf29, 0x4f88, {0x8d, 0x0e, 0x4b, 0xcd, 0xf3, 0x32, 0xc8, 0x62}}
|
||||
|
||||
// This enum defines type of content that is detected when an
|
||||
// nsMixedContentEvent fires
|
||||
|
||||
@@ -775,8 +775,10 @@ void Sanitizer::SanitizeChildren(nsINode* aNode, bool aSafe) {
|
||||
child = next) {
|
||||
next = child->GetNextSibling();
|
||||
|
||||
// Step 1.1. Assert: child implements Text, Comment, Element, or DocumentType.
|
||||
MOZ_ASSERT(child->IsText() || child->IsComment() || child->IsElement() || child->NodeType() == nsINode::DOCUMENT_TYPE_NODE);
|
||||
// Step 1.1. Assert: child implements Text, Comment, Element, or
|
||||
// DocumentType.
|
||||
MOZ_ASSERT(child->IsText() || child->IsComment() || child->IsElement() ||
|
||||
child->NodeType() == nsINode::DOCUMENT_TYPE_NODE);
|
||||
|
||||
// Step 1.2. If child implements DocumentType, then continue.
|
||||
if (child->NodeType() == nsINode::DOCUMENT_TYPE_NODE) {
|
||||
|
||||
@@ -137,8 +137,8 @@ class ViewTransition final : public nsISupports, public nsWrapperCache {
|
||||
void ClearActiveTransition(bool aIsDocumentHidden);
|
||||
void Timeout();
|
||||
MOZ_CAN_RUN_SCRIPT void Setup();
|
||||
[[nodiscard]] MOZ_CAN_RUN_SCRIPT
|
||||
Maybe<SkipTransitionReason> CaptureOldState();
|
||||
[[nodiscard]] MOZ_CAN_RUN_SCRIPT Maybe<SkipTransitionReason>
|
||||
CaptureOldState();
|
||||
[[nodiscard]] Maybe<SkipTransitionReason> CaptureNewState();
|
||||
void SetupTransitionPseudoElements();
|
||||
[[nodiscard]] bool UpdatePseudoElementStyles(bool aNeedsInvalidation);
|
||||
|
||||
@@ -203,7 +203,8 @@ struct FeatureImplementationStatus {
|
||||
return implemented(WGPUWEBGPU_FEATURE_TEXTURE_COMPRESSION_ASTC);
|
||||
|
||||
case dom::GPUFeatureName::Texture_compression_astc_sliced_3d:
|
||||
return implemented(WGPUWEBGPU_FEATURE_TEXTURE_COMPRESSION_ASTC_SLICED_3D);
|
||||
return implemented(
|
||||
WGPUWEBGPU_FEATURE_TEXTURE_COMPRESSION_ASTC_SLICED_3D);
|
||||
|
||||
case dom::GPUFeatureName::Timestamp_query:
|
||||
return implemented(WGPUWEBGPU_FEATURE_TIMESTAMP_QUERY);
|
||||
|
||||
@@ -31,10 +31,14 @@
|
||||
/** Magic constants that should match the entries in constants.ts's kBit.f64 */
|
||||
constexpr double kF64NegativeMin = std::bit_cast<double>(0xFFEFFFFFFFFFFFFFull);
|
||||
constexpr double kF64NegativeMax = std::bit_cast<double>(0x8010000000000000ull);
|
||||
constexpr double kF64NegativeSubnormalMin = std::bit_cast<double>(0x800FFFFFFFFFFFFFull);
|
||||
constexpr double kF64NegativeSubnormalMax = std::bit_cast<double>(0x8000000000000001ull);
|
||||
constexpr double kF64PositiveSubnormalMin = std::bit_cast<double>(0x0000000000000001ull);
|
||||
constexpr double kF64PositiveSubnormalMax = std::bit_cast<double>(0x000FFFFFFFFFFFFFull);
|
||||
constexpr double kF64NegativeSubnormalMin =
|
||||
std::bit_cast<double>(0x800FFFFFFFFFFFFFull);
|
||||
constexpr double kF64NegativeSubnormalMax =
|
||||
std::bit_cast<double>(0x8000000000000001ull);
|
||||
constexpr double kF64PositiveSubnormalMin =
|
||||
std::bit_cast<double>(0x0000000000000001ull);
|
||||
constexpr double kF64PositiveSubnormalMax =
|
||||
std::bit_cast<double>(0x000FFFFFFFFFFFFFull);
|
||||
constexpr double kF64PositiveMin = std::bit_cast<double>(0x0010000000000000ull);
|
||||
constexpr double kF64PositiveMax = std::bit_cast<double>(0x7FEFFFFFFFFFFFFFull);
|
||||
|
||||
@@ -43,34 +47,37 @@ constexpr double kF64PositiveMax = std::bit_cast<double>(0x7FEFFFFFFFFFFFFFull);
|
||||
* values that appear in kInterestingF64Values in math.ts
|
||||
*/
|
||||
const std::map<double, std::string> kInterestingF64s = {
|
||||
{ kF64NegativeMin, "kValue.f64.negative.min" },
|
||||
{ -10.0, "-10.0" },
|
||||
{ -1.0, "-1.0" },
|
||||
{ -0.125, "-0.125" },
|
||||
{ kF64NegativeMax, "kValue.f64.negative.max"},
|
||||
{ kF64NegativeSubnormalMin, "kValue.f64.negative.subnormal.min" },
|
||||
{ kF64NegativeSubnormalMax, "kValue.f64.negative.subnormal.max" },
|
||||
{ 0.0, "0.0" },
|
||||
{ kF64PositiveSubnormalMin, "kValue.f64.positive.subnormal.min" },
|
||||
{ kF64PositiveSubnormalMax, "kValue.f64.positive.subnormal.max" },
|
||||
{ kF64PositiveMin, "kValue.f64.positive.min" },
|
||||
{ 0.125, "0.125" },
|
||||
{ 1.0, "1.0" },
|
||||
{ 10.0, "10.0" },
|
||||
{ kF64PositiveMax, "kValue.f64.positive.max"}
|
||||
};
|
||||
{kF64NegativeMin, "kValue.f64.negative.min"},
|
||||
{-10.0, "-10.0"},
|
||||
{-1.0, "-1.0"},
|
||||
{-0.125, "-0.125"},
|
||||
{kF64NegativeMax, "kValue.f64.negative.max"},
|
||||
{kF64NegativeSubnormalMin, "kValue.f64.negative.subnormal.min"},
|
||||
{kF64NegativeSubnormalMax, "kValue.f64.negative.subnormal.max"},
|
||||
{0.0, "0.0"},
|
||||
{kF64PositiveSubnormalMin, "kValue.f64.positive.subnormal.min"},
|
||||
{kF64PositiveSubnormalMax, "kValue.f64.positive.subnormal.max"},
|
||||
{kF64PositiveMin, "kValue.f64.positive.min"},
|
||||
{0.125, "0.125"},
|
||||
{1.0, "1.0"},
|
||||
{10.0, "10.0"},
|
||||
{kF64PositiveMax, "kValue.f64.positive.max"}};
|
||||
|
||||
/** Additional values to use for testing 'fract' */
|
||||
const std::map<double, std::string> kFractF64s = {
|
||||
{ 0.5, "0.5" }, // 0.5 -> 0.5
|
||||
{ 1, "1" }, // 1 -> 0
|
||||
{ 2, "2" }, // 2 -> 0
|
||||
{ -0.5, "-0.5" }, // -0.5 -> 0.5
|
||||
{ -1, "-1" }, // -1 -> 0
|
||||
{ -2, "-2" }, // -2 -> 0
|
||||
{ 10.0000999999999997669, "10.0000999999999997669" }, // ~10.0001 -> ~0.0001
|
||||
{ -10.0000999999999997669, "-10.0000999999999997669" }, // -10.0001 -> ~0.9999
|
||||
{ 3937509.87755102012306, "3937509.87755102012306" }, // 3937509.87755102012306 -> ~0.877551..., not [0, 0.75], https://github.com/gpuweb/gpuweb/issues/4523
|
||||
{0.5, "0.5"}, // 0.5 -> 0.5
|
||||
{1, "1"}, // 1 -> 0
|
||||
{2, "2"}, // 2 -> 0
|
||||
{-0.5, "-0.5"}, // -0.5 -> 0.5
|
||||
{-1, "-1"}, // -1 -> 0
|
||||
{-2, "-2"}, // -2 -> 0
|
||||
{10.0000999999999997669, "10.0000999999999997669"}, // ~10.0001 -> ~0.0001
|
||||
{-10.0000999999999997669,
|
||||
"-10.0000999999999997669"}, // -10.0001 -> ~0.9999
|
||||
{3937509.87755102012306,
|
||||
"3937509.87755102012306"}, // 3937509.87755102012306 -> ~0.877551..., not
|
||||
// [0, 0.75],
|
||||
// https://github.com/gpuweb/gpuweb/issues/4523
|
||||
};
|
||||
|
||||
/**
|
||||
@@ -78,33 +85,36 @@ const std::map<double, std::string> kFractF64s = {
|
||||
* a CTS test
|
||||
*/
|
||||
std::string printAbstractFloat(const double val) {
|
||||
if (!std::isfinite(val)) {
|
||||
if (val > 0) {
|
||||
return "kValue.f64.positive.infinity";
|
||||
}
|
||||
if (val < 0) {
|
||||
return "kValue.f64.negative.infinity";
|
||||
}
|
||||
assert("Generated a NaN");
|
||||
if (!std::isfinite(val)) {
|
||||
if (val > 0) {
|
||||
return "kValue.f64.positive.infinity";
|
||||
}
|
||||
if (val < 0) {
|
||||
return "kValue.f64.negative.infinity";
|
||||
}
|
||||
assert("Generated a NaN");
|
||||
}
|
||||
|
||||
if (const auto iter = kInterestingF64s.find(val); iter != kInterestingF64s.end()) {
|
||||
return iter->second;
|
||||
}
|
||||
if (const auto iter = kInterestingF64s.find(val);
|
||||
iter != kInterestingF64s.end()) {
|
||||
return iter->second;
|
||||
}
|
||||
|
||||
std::stringstream ss;
|
||||
// Print 'easy' to read integers as literals, otherwise dump the hex value
|
||||
if ( val == round(val) && fabs(val) < 100000) {
|
||||
ss << val;
|
||||
} else {
|
||||
ss << "reinterpretU64AsF64(0x" << std::hex << std::setfill('0') << std::setw(16) << std::bit_cast<uint64_t>(val) << "n) /* " << val << " */";
|
||||
}
|
||||
return ss.str();
|
||||
std::stringstream ss;
|
||||
// Print 'easy' to read integers as literals, otherwise dump the hex value
|
||||
if (val == round(val) && fabs(val) < 100000) {
|
||||
ss << val;
|
||||
} else {
|
||||
ss << "reinterpretU64AsF64(0x" << std::hex << std::setfill('0')
|
||||
<< std::setw(16) << std::bit_cast<uint64_t>(val) << "n) /* " << val
|
||||
<< " */";
|
||||
}
|
||||
return ss.str();
|
||||
}
|
||||
|
||||
/** Could this value potentially be affected by FTZ behaviour */
|
||||
bool couldBeFlushed(const double val) {
|
||||
return std::fpclassify(val) == FP_SUBNORMAL;
|
||||
return std::fpclassify(val) == FP_SUBNORMAL;
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -120,95 +130,98 @@ bool couldBeFlushed(const double val) {
|
||||
* processes.
|
||||
*/
|
||||
std::tuple<double, double> quantizeToAbstractFloat(const long double val) {
|
||||
const int round_mode = fegetround();
|
||||
const int round_mode = fegetround();
|
||||
|
||||
assert(0 == fesetround(FE_DOWNWARD));
|
||||
const auto downward = static_cast<double>(val);
|
||||
assert(0 == fesetround(FE_UPWARD));
|
||||
const auto upward = static_cast<double>(val);
|
||||
assert(0 == fesetround(FE_DOWNWARD));
|
||||
const auto downward = static_cast<double>(val);
|
||||
assert(0 == fesetround(FE_UPWARD));
|
||||
const auto upward = static_cast<double>(val);
|
||||
|
||||
assert(0 == fesetround(round_mode));
|
||||
assert(0 == fesetround(round_mode));
|
||||
|
||||
return { downward, upward };
|
||||
return {downward, upward};
|
||||
}
|
||||
|
||||
/**
|
||||
* Generates a string for an unary operation result that can be copied into a
|
||||
* CTS test file.
|
||||
*/
|
||||
std::string printBinaryCase(const std::string &input, const std::vector<double> &result) {
|
||||
assert(!result.empty());
|
||||
std::stringstream ss;
|
||||
ss << "{ input: ";
|
||||
ss << input;
|
||||
ss << ", ";
|
||||
ss << "expected: [ ";
|
||||
if (!result.empty()) {
|
||||
for (auto i = 0; i < result.size() - 1; i++) {
|
||||
ss << "" << printAbstractFloat(result[i]) << ", ";
|
||||
}
|
||||
ss << printAbstractFloat(result.back());
|
||||
std::string printBinaryCase(const std::string& input,
|
||||
const std::vector<double>& result) {
|
||||
assert(!result.empty());
|
||||
std::stringstream ss;
|
||||
ss << "{ input: ";
|
||||
ss << input;
|
||||
ss << ", ";
|
||||
ss << "expected: [ ";
|
||||
if (!result.empty()) {
|
||||
for (auto i = 0; i < result.size() - 1; i++) {
|
||||
ss << "" << printAbstractFloat(result[i]) << ", ";
|
||||
}
|
||||
ss << " ] }";
|
||||
return ss.str();
|
||||
ss << printAbstractFloat(result.back());
|
||||
}
|
||||
ss << " ] }";
|
||||
return ss.str();
|
||||
}
|
||||
|
||||
/**
|
||||
* Generates a string for a binary operation result that can be copied into a
|
||||
* CTS test file.
|
||||
*/
|
||||
std::string printBinaryCase(const std::string &lhs, const std::string &rhs, const std::vector<double> &result) {
|
||||
assert(!result.empty());
|
||||
std::stringstream ss;
|
||||
ss << "{ lhs: ";
|
||||
ss << lhs;
|
||||
ss << ", rhs: ";
|
||||
ss << rhs;
|
||||
ss << ", ";
|
||||
ss << "expected: [ ";
|
||||
if (!result.empty()) {
|
||||
for (auto i = 0; i < result.size() - 1; i++) {
|
||||
ss << "" << printAbstractFloat(result[i]) << ", ";
|
||||
}
|
||||
ss << printAbstractFloat(result.back());
|
||||
std::string printBinaryCase(const std::string& lhs, const std::string& rhs,
|
||||
const std::vector<double>& result) {
|
||||
assert(!result.empty());
|
||||
std::stringstream ss;
|
||||
ss << "{ lhs: ";
|
||||
ss << lhs;
|
||||
ss << ", rhs: ";
|
||||
ss << rhs;
|
||||
ss << ", ";
|
||||
ss << "expected: [ ";
|
||||
if (!result.empty()) {
|
||||
for (auto i = 0; i < result.size() - 1; i++) {
|
||||
ss << "" << printAbstractFloat(result[i]) << ", ";
|
||||
}
|
||||
ss << " ] }";
|
||||
return ss.str();
|
||||
ss << printAbstractFloat(result.back());
|
||||
}
|
||||
ss << " ] }";
|
||||
return ss.str();
|
||||
}
|
||||
|
||||
/** Function that performs a binary operation, i.e. addition, etc */
|
||||
typedef long double (*BinaryOp)(long double, long double);
|
||||
|
||||
const BinaryOp kAdditionOp= [](const long double lhs, const long double rhs) {
|
||||
return lhs + rhs;
|
||||
const BinaryOp kAdditionOp = [](const long double lhs, const long double rhs) {
|
||||
return lhs + rhs;
|
||||
};
|
||||
|
||||
const BinaryOp kSubtractionOp= [](const long double lhs, const long double rhs) {
|
||||
return lhs - rhs;
|
||||
};
|
||||
const BinaryOp kSubtractionOp = [](const long double lhs,
|
||||
const long double rhs) { return lhs - rhs; };
|
||||
|
||||
const BinaryOp kMultiplicationOp= [](const long double lhs, const long double rhs) {
|
||||
return lhs * rhs;
|
||||
};
|
||||
const BinaryOp kMultiplicationOp =
|
||||
[](const long double lhs, const long double rhs) { return lhs * rhs; };
|
||||
|
||||
/**
|
||||
* Calculates all of the possible results for a binary operation given the
|
||||
* provided inputs. This handles both quantization and flushing behaviours.
|
||||
*/
|
||||
std::vector<double> calculateBinaryResults(const BinaryOp op, long double lhs, long double rhs) {
|
||||
// CTS needs to consider that subnormals may be flushed to zero at
|
||||
// any point, so applying potential flushings to get additional
|
||||
// results.
|
||||
std::set<double> results;
|
||||
for (const auto l: couldBeFlushed(lhs) ? std::vector{0, lhs} : std::vector{lhs}) {
|
||||
for (const auto r: couldBeFlushed(rhs) ? std::vector{0, rhs} : std::vector{rhs}) {
|
||||
const auto [downward, upward] = quantizeToAbstractFloat(op(l, r));
|
||||
results.insert(downward);
|
||||
results.insert(upward);
|
||||
}
|
||||
std::vector<double> calculateBinaryResults(const BinaryOp op, long double lhs,
|
||||
long double rhs) {
|
||||
// CTS needs to consider that subnormals may be flushed to zero at
|
||||
// any point, so applying potential flushings to get additional
|
||||
// results.
|
||||
std::set<double> results;
|
||||
for (const auto l :
|
||||
couldBeFlushed(lhs) ? std::vector{0, lhs} : std::vector{lhs}) {
|
||||
for (const auto r :
|
||||
couldBeFlushed(rhs) ? std::vector{0, rhs} : std::vector{rhs}) {
|
||||
const auto [downward, upward] = quantizeToAbstractFloat(op(l, r));
|
||||
results.insert(downward);
|
||||
results.insert(upward);
|
||||
}
|
||||
}
|
||||
|
||||
return { results.begin(), results.end() };
|
||||
return {results.begin(), results.end()};
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -216,15 +229,17 @@ std::vector<double> calculateBinaryResults(const BinaryOp op, long double lhs, l
|
||||
* tests cases for a binary operation.
|
||||
*/
|
||||
std::string printBinaryOpCases(const BinaryOp op, const std::string& name) {
|
||||
std::stringstream ss;
|
||||
ss << "BEGIN " << name << " CASES" << std::endl;
|
||||
for (const auto& [lhs, lhs_str] : kInterestingF64s) {
|
||||
for (const auto& [rhs, rhs_str] : kInterestingF64s) {
|
||||
ss << printBinaryCase(lhs_str, rhs_str, calculateBinaryResults(op, lhs, rhs)) << "," << std::endl;
|
||||
}
|
||||
std::stringstream ss;
|
||||
ss << "BEGIN " << name << " CASES" << std::endl;
|
||||
for (const auto& [lhs, lhs_str] : kInterestingF64s) {
|
||||
for (const auto& [rhs, rhs_str] : kInterestingF64s) {
|
||||
ss << printBinaryCase(lhs_str, rhs_str,
|
||||
calculateBinaryResults(op, lhs, rhs))
|
||||
<< "," << std::endl;
|
||||
}
|
||||
ss << "END " << name << " CASES" << std::endl;
|
||||
return ss.str();
|
||||
}
|
||||
ss << "END " << name << " CASES" << std::endl;
|
||||
return ss.str();
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -232,39 +247,47 @@ std::string printBinaryOpCases(const BinaryOp op, const std::string& name) {
|
||||
* tests cases for `fract`. WGSL defines frac(x) = x - floor(x).
|
||||
*/
|
||||
std::string printFractCases() {
|
||||
std::stringstream ss;
|
||||
ss << "BEGIN FRACT CASES" << std::endl;
|
||||
// Do not have to calculate quantization/roundings for floor(input),
|
||||
// because floor of a double is guaranteed to be a double, and all of
|
||||
// the values in kInterestingF64s and kFractF64s are doubles.
|
||||
for (const auto& [input, input_str] : kInterestingF64s) {
|
||||
ss << printBinaryCase(input_str, calculateBinaryResults(kSubtractionOp, input, floor(input))) << "," << std::endl;
|
||||
}
|
||||
for (const auto& [input, input_str] : kFractF64s) {
|
||||
ss << printBinaryCase(input_str, calculateBinaryResults(kSubtractionOp, input, floor(input))) << "," << std::endl;
|
||||
}
|
||||
ss << "END FRACT CASES" << std::endl;
|
||||
return ss.str();
|
||||
std::stringstream ss;
|
||||
ss << "BEGIN FRACT CASES" << std::endl;
|
||||
// Do not have to calculate quantization/roundings for floor(input),
|
||||
// because floor of a double is guaranteed to be a double, and all of
|
||||
// the values in kInterestingF64s and kFractF64s are doubles.
|
||||
for (const auto& [input, input_str] : kInterestingF64s) {
|
||||
ss << printBinaryCase(input_str, calculateBinaryResults(
|
||||
kSubtractionOp, input, floor(input)))
|
||||
<< "," << std::endl;
|
||||
}
|
||||
for (const auto& [input, input_str] : kFractF64s) {
|
||||
ss << printBinaryCase(input_str, calculateBinaryResults(
|
||||
kSubtractionOp, input, floor(input)))
|
||||
<< "," << std::endl;
|
||||
}
|
||||
ss << "END FRACT CASES" << std::endl;
|
||||
return ss.str();
|
||||
}
|
||||
|
||||
int main() {
|
||||
assert(sizeof(double) < sizeof(long double) && "Need higher precision long double");
|
||||
assert(sizeof(long double) == 16 && "Code assume 'proper' quad support, not some other higher precision floating point implementation");
|
||||
assert(sizeof(double) < sizeof(long double) &&
|
||||
"Need higher precision long double");
|
||||
assert(sizeof(long double) == 16 &&
|
||||
"Code assume 'proper' quad support, not some other higher precision "
|
||||
"floating point implementation");
|
||||
|
||||
{
|
||||
// Confirms that calculating f64 imprecise results generates two possible
|
||||
// roundings.
|
||||
const auto [begin, end] =
|
||||
quantizeToAbstractFloat(static_cast<long double>(0.1) * static_cast<long double>(0.1));
|
||||
assert(std::bit_cast<uint64_t>(begin) == 0x3F847AE147AE147bull &&
|
||||
std::bit_cast<uint64_t>(end) == 0x3F847AE147AE147Cull &&
|
||||
"0.1 * 0.1 returned unexpected values");
|
||||
}
|
||||
{
|
||||
// Confirms that calculating f64 imprecise results generates two possible
|
||||
// roundings.
|
||||
const auto [begin, end] = quantizeToAbstractFloat(
|
||||
static_cast<long double>(0.1) * static_cast<long double>(0.1));
|
||||
assert(std::bit_cast<uint64_t>(begin) == 0x3F847AE147AE147bull &&
|
||||
std::bit_cast<uint64_t>(end) == 0x3F847AE147AE147Cull &&
|
||||
"0.1 * 0.1 returned unexpected values");
|
||||
}
|
||||
|
||||
std::cout << printBinaryOpCases(kAdditionOp, "ADDITION") << std::endl;
|
||||
std::cout << printBinaryOpCases(kSubtractionOp, "SUBTRACTION") << std::endl;
|
||||
std::cout << printBinaryOpCases(kMultiplicationOp, "MULTIPLICATION") << std::endl;
|
||||
std::cout << printFractCases() << std::endl;
|
||||
std::cout << printBinaryOpCases(kAdditionOp, "ADDITION") << std::endl;
|
||||
std::cout << printBinaryOpCases(kSubtractionOp, "SUBTRACTION") << std::endl;
|
||||
std::cout << printBinaryOpCases(kMultiplicationOp, "MULTIPLICATION")
|
||||
<< std::endl;
|
||||
std::cout << printFractCases() << std::endl;
|
||||
|
||||
return 0;
|
||||
return 0;
|
||||
}
|
||||
|
||||
@@ -726,8 +726,7 @@ bool txXSLTNumber::isAlphaNumeric(char16_t ch) {
|
||||
{ 0xFF66, 0xFFBE },
|
||||
{ 0xFFC2, 0xFFC7 },
|
||||
{ 0xFFCA, 0xFFCF },
|
||||
{ 0xFFD2, 0xFFD7 }
|
||||
// clang-format on
|
||||
{ 0xFFD2, 0xFFD7 } // clang-format on
|
||||
};
|
||||
|
||||
CharRange search = {ch, ch};
|
||||
|
||||
@@ -72,8 +72,7 @@ XULResizerElement::Direction XULResizerElement::GetDirection() {
|
||||
{-1, -1}, {0, -1}, {1, -1},
|
||||
{-1, 0}, {1, 0},
|
||||
{-1, 1}, {0, 1}, {1, 1},
|
||||
{-1, 1}, {1, 1}
|
||||
// clang-format on
|
||||
{-1, 1}, {1, 1} // clang-format on
|
||||
};
|
||||
|
||||
const auto* frame = GetPrimaryFrame();
|
||||
|
||||
@@ -44,8 +44,7 @@ NS_IMPL_CYCLE_COLLECTING_NATIVE_RELEASE_WITH_LAST_RELEASE(TransactionItem,
|
||||
|
||||
NS_IMPL_CYCLE_COLLECTION_CLASS(TransactionItem)
|
||||
|
||||
NS_IMPL_CYCLE_COLLECTION_UNLINK_BEGIN(TransactionItem)
|
||||
tmp->CleanUp();
|
||||
NS_IMPL_CYCLE_COLLECTION_UNLINK_BEGIN(TransactionItem) tmp->CleanUp();
|
||||
NS_IMPL_CYCLE_COLLECTION_UNLINK_END
|
||||
|
||||
NS_IMPL_CYCLE_COLLECTION_TRAVERSE_BEGIN(TransactionItem)
|
||||
|
||||
@@ -79,13 +79,9 @@
|
||||
#include "mozHunspellAllocator.h"
|
||||
|
||||
#define MOZ_HUNSPELL_CONTRACTID "@mozilla.org/spellchecker/engine;1"
|
||||
#define MOZ_HUNSPELL_CID \
|
||||
/* 56c778e4-1bee-45f3-a689-886692a97fe7 */ \
|
||||
{ \
|
||||
0x56c778e4, 0x1bee, 0x45f3, { \
|
||||
0xa6, 0x89, 0x88, 0x66, 0x92, 0xa9, 0x7f, 0xe7 \
|
||||
} \
|
||||
}
|
||||
#define MOZ_HUNSPELL_CID \
|
||||
/* 56c778e4-1bee-45f3-a689-886692a97fe7 */ \
|
||||
{0x56c778e4, 0x1bee, 0x45f3, {0xa6, 0x89, 0x88, 0x66, 0x92, 0xa9, 0x7f, 0xe7}}
|
||||
|
||||
class mozHunspell final : public mozISpellCheckingEngine,
|
||||
public nsIObserver,
|
||||
|
||||
@@ -19,12 +19,12 @@
|
||||
|
||||
#define MOZ_PERSONALDICTIONARY_CONTRACTID \
|
||||
"@mozilla.org/spellchecker/personaldictionary;1"
|
||||
#define MOZ_PERSONALDICTIONARY_CID \
|
||||
{ /* 7EF52EAF-B7E1-462B-87E2-5D1DBACA9048 */ \
|
||||
0X7EF52EAF, 0XB7E1, 0X462B, { \
|
||||
0X87, 0XE2, 0X5D, 0X1D, 0XBA, 0XCA, 0X90, 0X48 \
|
||||
} \
|
||||
}
|
||||
#define MOZ_PERSONALDICTIONARY_CID \
|
||||
{/* 7EF52EAF-B7E1-462B-87E2-5D1DBACA9048 */ \
|
||||
0X7EF52EAF, \
|
||||
0XB7E1, \
|
||||
0X462B, \
|
||||
{0X87, 0XE2, 0X5D, 0X1D, 0XBA, 0XCA, 0X90, 0X48}}
|
||||
|
||||
class mozPersonalDictionaryLoader;
|
||||
class mozPersonalDictionarySave;
|
||||
|
||||
@@ -1957,7 +1957,6 @@ class DrawTarget : public external::AtomicRefCounted<DrawTarget> {
|
||||
return CreateSimilarDrawTarget(aSize, aFormat);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Get the BackendType of Paths/PathBuilders created from this DrawTarget.
|
||||
* This will usually just be the same as the DrawTarget's BackendType.
|
||||
|
||||
@@ -106,7 +106,9 @@ bool GLXLibrary::EnsureInitialized(Display* aDisplay) {
|
||||
#define SYMBOL(X) \
|
||||
{ \
|
||||
(PRFuncPtr*)&mSymbols.f##X, { \
|
||||
{ "glX" #X } \
|
||||
{ \
|
||||
"glX" #X \
|
||||
} \
|
||||
} \
|
||||
}
|
||||
#define END_OF_SYMBOLS \
|
||||
|
||||
@@ -97,7 +97,9 @@ bool WGLLibrary::EnsureInitialized() {
|
||||
#define SYMBOL(X) \
|
||||
{ \
|
||||
(PRFuncPtr*)&mSymbols.f##X, { \
|
||||
{ "wgl" #X } \
|
||||
{ \
|
||||
"wgl" #X \
|
||||
} \
|
||||
} \
|
||||
}
|
||||
#define END_OF_SYMBOLS \
|
||||
|
||||
@@ -150,9 +150,8 @@ static auto ForEachNode(Node aRoot, const PreAction& aPreAction,
|
||||
* ForEachNode pre-order traversal, using TraversalFlag.
|
||||
*/
|
||||
template <typename Iterator, typename Node, typename PreAction>
|
||||
auto ForEachNode(Node aRoot, const PreAction& aPreAction)
|
||||
-> std::enable_if_t<
|
||||
std::is_same_v<decltype(aPreAction(aRoot)), TraversalFlag>, bool> {
|
||||
auto ForEachNode(Node aRoot, const PreAction& aPreAction) -> std::enable_if_t<
|
||||
std::is_same_v<decltype(aPreAction(aRoot)), TraversalFlag>, bool> {
|
||||
return ForEachNode<Iterator>(
|
||||
aRoot, aPreAction, [](Node aNode) { return TraversalFlag::Continue; });
|
||||
}
|
||||
|
||||
@@ -37,7 +37,6 @@ namespace layers {
|
||||
//
|
||||
class FenceD3D11 final : public Fence {
|
||||
public:
|
||||
|
||||
static RefPtr<FenceD3D11> Create(ID3D11Device* aDevice);
|
||||
static RefPtr<FenceD3D11> CreateFromHandle(
|
||||
RefPtr<gfx::FileHandleWrapper> aHandle,
|
||||
|
||||
@@ -7,25 +7,13 @@
|
||||
#ifndef nsGfxCIID_h__
|
||||
#define nsGfxCIID_h__
|
||||
|
||||
#define NS_FONT_ENUMERATOR_CID \
|
||||
{ \
|
||||
0xa6cf9115, 0x15b3, 0x11d2, { \
|
||||
0x93, 0x2e, 0x00, 0x80, 0x5f, 0x8a, 0xdd, 0x32 \
|
||||
} \
|
||||
}
|
||||
#define NS_FONT_ENUMERATOR_CID \
|
||||
{0xa6cf9115, 0x15b3, 0x11d2, {0x93, 0x2e, 0x00, 0x80, 0x5f, 0x8a, 0xdd, 0x32}}
|
||||
|
||||
#define NS_SCRIPTABLE_REGION_CID \
|
||||
{ \
|
||||
0xda5b130a, 0x1dd1, 0x11b2, { \
|
||||
0xad, 0x47, 0xf4, 0x55, 0xb1, 0x81, 0x4a, 0x78 \
|
||||
} \
|
||||
}
|
||||
#define NS_SCRIPTABLE_REGION_CID \
|
||||
{0xda5b130a, 0x1dd1, 0x11b2, {0xad, 0x47, 0xf4, 0x55, 0xb1, 0x81, 0x4a, 0x78}}
|
||||
|
||||
#define NS_GFX_INITIALIZATION_CID \
|
||||
{ \
|
||||
0x67c41576, 0x9664, 0x4ed5, { \
|
||||
0x90, 0xc1, 0xf6, 0x68, 0x3f, 0xd5, 0x2c, 0x8f \
|
||||
} \
|
||||
}
|
||||
#define NS_GFX_INITIALIZATION_CID \
|
||||
{0x67c41576, 0x9664, 0x4ed5, {0x90, 0xc1, 0xf6, 0x68, 0x3f, 0xd5, 0x2c, 0x8f}}
|
||||
|
||||
#endif
|
||||
|
||||
@@ -644,10 +644,14 @@ TEST(Gfx, gfxRect)
|
||||
}
|
||||
|
||||
TEST(Gfx, nsRectAbsolute)
|
||||
{ TestUnionEmptyRects<nsRectAbsolute>(); }
|
||||
{
|
||||
TestUnionEmptyRects<nsRectAbsolute>();
|
||||
}
|
||||
|
||||
TEST(Gfx, IntRectAbsolute)
|
||||
{ TestUnionEmptyRects<IntRectAbsolute>(); }
|
||||
{
|
||||
TestUnionEmptyRects<IntRectAbsolute>();
|
||||
}
|
||||
|
||||
static void TestMoveInsideAndClamp(IntRect aSrc, IntRect aTarget,
|
||||
IntRect aExpected) {
|
||||
|
||||
@@ -122,16 +122,24 @@ TEST(Gfx, RegionSingleRect)
|
||||
}
|
||||
|
||||
TEST(Gfx, RegionNonRectangular)
|
||||
{ TestLargestRegion::TestNonRectangular(); }
|
||||
{
|
||||
TestLargestRegion::TestNonRectangular();
|
||||
}
|
||||
|
||||
TEST(Gfx, RegionTwoRectTest)
|
||||
{ TestLargestRegion::TwoRectTest(); }
|
||||
{
|
||||
TestLargestRegion::TwoRectTest();
|
||||
}
|
||||
|
||||
TEST(Gfx, RegionContainsSpecifiedRect)
|
||||
{ TestLargestRegion::TestContainsSpecifiedRect(); }
|
||||
{
|
||||
TestLargestRegion::TestContainsSpecifiedRect();
|
||||
}
|
||||
|
||||
TEST(Gfx, RegionTestContainsSpecifiedOverflowingRect)
|
||||
{ TestLargestRegion::TestContainsSpecifiedOverflowingRect(); }
|
||||
{
|
||||
TestLargestRegion::TestContainsSpecifiedOverflowingRect();
|
||||
}
|
||||
|
||||
TEST(Gfx, RegionScaleToInside)
|
||||
{
|
||||
|
||||
@@ -3317,7 +3317,8 @@ already_AddRefed<gfxFont> gfxFontGroup::FindFontForChar(
|
||||
return true;
|
||||
}
|
||||
// Does the candidate font provide a color glyph for the current character?
|
||||
bool hasColorGlyph = f->HasColorGlyphFor(aCh, aNextCh) ||
|
||||
bool hasColorGlyph =
|
||||
f->HasColorGlyphFor(aCh, aNextCh) ||
|
||||
(!nextIsVarSelector && f->HasColorGlyphFor(aCh, kVariationSelector16));
|
||||
// If the provided glyph matches the preference, accept the font.
|
||||
if (hasColorGlyph == PrefersColor(presentation)) {
|
||||
|
||||
@@ -15,8 +15,7 @@
|
||||
|
||||
#include "nsString.h"
|
||||
|
||||
gfxWindowsSurface::gfxWindowsSurface(HDC dc, uint32_t flags)
|
||||
: mDC(dc) {
|
||||
gfxWindowsSurface::gfxWindowsSurface(HDC dc, uint32_t flags) : mDC(dc) {
|
||||
InitWithDC(flags);
|
||||
}
|
||||
|
||||
|
||||
@@ -10,12 +10,8 @@
|
||||
#include "nsICommandLineHandler.h"
|
||||
|
||||
// 5baca10a-4d53-4335-b24d-c69696640a9a
|
||||
#define NS_FXRCOMMANDLINEHANDLER_CID \
|
||||
{ \
|
||||
0x5baca10a, 0x4d53, 0x4335, { \
|
||||
0xb2, 0x4d, 0xc6, 0x96, 0x96, 0x64, 0x0a, 0x9a \
|
||||
} \
|
||||
}
|
||||
#define NS_FXRCOMMANDLINEHANDLER_CID \
|
||||
{0x5baca10a, 0x4d53, 0x4335, {0xb2, 0x4d, 0xc6, 0x96, 0x96, 0x64, 0x0a, 0x9a}}
|
||||
|
||||
// nsFxrCommandLineHandler is responsible for handling parameters used to
|
||||
// bootstrap Firefox Reality running on desktop-class machines.
|
||||
|
||||
@@ -371,7 +371,8 @@ bool RenderDXGITextureHost::LockInternal() {
|
||||
|
||||
if (!mLocked) {
|
||||
if (mFencesHolderId.isSome()) {
|
||||
auto* fencesHolderMap = layers::CompositeProcessD3D11FencesHolderMap::Get();
|
||||
auto* fencesHolderMap =
|
||||
layers::CompositeProcessD3D11FencesHolderMap::Get();
|
||||
if (!fencesHolderMap) {
|
||||
MOZ_ASSERT_UNREACHABLE("unexpected to be called");
|
||||
return false;
|
||||
|
||||
@@ -912,7 +912,7 @@ static inline void draw_quad_spans(int nump, Point2D p[4], uint32_t z,
|
||||
if (y > checkY) {
|
||||
// If we're outside the clip rect, we're done.
|
||||
if (y > clipRect.y1) break;
|
||||
// Helper to find the next non-duplicate vertex that doesn't loop back.
|
||||
// Helper to find the next non-duplicate vertex that doesn't loop back.
|
||||
#define STEP_EDGE(y, e0i, e0, e1i, e1, STEP_POINT, end) \
|
||||
do { \
|
||||
/* Set new start of edge to be end of old edge */ \
|
||||
|
||||
@@ -17,7 +17,8 @@ using namespace Microsoft::WRL;
|
||||
// A basic composition layer backed by a swap-chain for DirectComposition
|
||||
class Layer {
|
||||
public:
|
||||
Layer(int width, int height, bool is_opaque, const ComPtr<IDXGIFactory2>& dxgiFactory,
|
||||
Layer(int width, int height, bool is_opaque,
|
||||
const ComPtr<IDXGIFactory2>& dxgiFactory,
|
||||
const ComPtr<ID3D11Device>& d3dDevice,
|
||||
const ComPtr<IDCompositionDesktopDevice>& dCompDevice) {
|
||||
HRESULT hr;
|
||||
@@ -33,7 +34,8 @@ class Layer {
|
||||
// DXGI_SCALING_NONE caused swap chain creation failure.
|
||||
desc.Scaling = DXGI_SCALING_STRETCH;
|
||||
desc.SwapEffect = DXGI_SWAP_EFFECT_FLIP_SEQUENTIAL;
|
||||
desc.AlphaMode = is_opaque ? DXGI_ALPHA_MODE_IGNORE : DXGI_ALPHA_MODE_PREMULTIPLIED;
|
||||
desc.AlphaMode =
|
||||
is_opaque ? DXGI_ALPHA_MODE_IGNORE : DXGI_ALPHA_MODE_PREMULTIPLIED;
|
||||
desc.Flags = 0;
|
||||
|
||||
// Create a swap-chain, visual, attach them and get the backbuffer texture
|
||||
@@ -105,17 +107,15 @@ class Compositor {
|
||||
|
||||
// Construct a layer of given dimensions.
|
||||
Layer* create_layer(int width, int height, bool is_opaque) {
|
||||
Layer* layer =
|
||||
new Layer(width, height, is_opaque, pIDXGIFactory, pD3DDevice, pDCompDevice);
|
||||
Layer* layer = new Layer(width, height, is_opaque, pIDXGIFactory,
|
||||
pD3DDevice, pDCompDevice);
|
||||
|
||||
return layer;
|
||||
}
|
||||
|
||||
void begin_frame() {
|
||||
pRootVisual->RemoveAllVisuals();
|
||||
}
|
||||
void begin_frame() { pRootVisual->RemoveAllVisuals(); }
|
||||
|
||||
void add_layer(Layer *layer) {
|
||||
void add_layer(Layer* layer) {
|
||||
// TODO(gwc): Don't add the visual during creation. Once we support multiple
|
||||
// swap-chain layers, we'll need to support rebuilding the visual tree for
|
||||
// DC as needed.
|
||||
@@ -148,7 +148,8 @@ Compositor* wrc_new(void* d3d11_device, void* hwnd) {
|
||||
|
||||
void wrc_delete(Compositor* compositor) { delete compositor; }
|
||||
|
||||
Layer* wrc_create_layer(Compositor* compositor, int width, int height, bool is_opaque) {
|
||||
Layer* wrc_create_layer(Compositor* compositor, int width, int height,
|
||||
bool is_opaque) {
|
||||
return compositor->create_layer(width, height, is_opaque);
|
||||
}
|
||||
|
||||
@@ -163,15 +164,14 @@ void wrc_begin_frame(Compositor* compositor) { compositor->begin_frame(); }
|
||||
|
||||
void wrc_end_frame(Compositor* compositor) { compositor->end_frame(); }
|
||||
|
||||
void wrc_add_layer(Compositor *compositor, Layer *layer) {
|
||||
void wrc_add_layer(Compositor* compositor, Layer* layer) {
|
||||
compositor->add_layer(layer);
|
||||
}
|
||||
|
||||
void wrc_set_layer_position(Layer *layer, float x, float y) {
|
||||
layer->mVisual->SetOffsetX(x);
|
||||
layer->mVisual->SetOffsetY(y);
|
||||
void wrc_set_layer_position(Layer* layer, float x, float y) {
|
||||
layer->mVisual->SetOffsetX(x);
|
||||
layer->mVisual->SetOffsetY(y);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
@@ -12,12 +12,12 @@ namespace mozilla {
|
||||
namespace image {
|
||||
|
||||
#define IMAGEBLOCKER_CONTRACTID "@mozilla.org/image-blocker-content-policy;1"
|
||||
#define IMAGEBLOCKER_CID \
|
||||
{ /* f6fcd651-164b-4416-b001-9c8c393fd93b */ \
|
||||
0xf6fcd651, 0x164b, 0x4416, { \
|
||||
0xb0, 0x01, 0x9c, 0x8c, 0x39, 0x3f, 0xd9, 0x3b \
|
||||
} \
|
||||
}
|
||||
#define IMAGEBLOCKER_CID \
|
||||
{/* f6fcd651-164b-4416-b001-9c8c393fd93b */ \
|
||||
0xf6fcd651, \
|
||||
0x164b, \
|
||||
0x4416, \
|
||||
{0xb0, 0x01, 0x9c, 0x8c, 0x39, 0x3f, 0xd9, 0x3b}}
|
||||
|
||||
class ImageBlocker final : public nsIContentPolicy {
|
||||
~ImageBlocker() = default;
|
||||
|
||||
@@ -47,12 +47,12 @@
|
||||
class nsIInputStream;
|
||||
class nsIRequest;
|
||||
|
||||
#define NS_RASTERIMAGE_CID \
|
||||
{ /* 376ff2c1-9bf6-418a-b143-3340c00112f7 */ \
|
||||
0x376ff2c1, 0x9bf6, 0x418a, { \
|
||||
0xb1, 0x43, 0x33, 0x40, 0xc0, 0x01, 0x12, 0xf7 \
|
||||
} \
|
||||
}
|
||||
#define NS_RASTERIMAGE_CID \
|
||||
{/* 376ff2c1-9bf6-418a-b143-3340c00112f7 */ \
|
||||
0x376ff2c1, \
|
||||
0x9bf6, \
|
||||
0x418a, \
|
||||
{0xb1, 0x43, 0x33, 0x40, 0xc0, 0x01, 0x12, 0xf7}}
|
||||
|
||||
/**
|
||||
* Handles static and animated image containers.
|
||||
|
||||
@@ -120,15 +120,15 @@ static GdkRGBA GetForegroundColor(nsIMozIconURI* aIconURI) {
|
||||
}
|
||||
return dark ? mozilla::ColorScheme::Dark : mozilla::ColorScheme::Light;
|
||||
}();
|
||||
auto color = mozilla::LookAndFeel::Color(mozilla::LookAndFeel::ColorID::Windowtext, scheme, mozilla::LookAndFeel::UseStandins::No);
|
||||
auto ToGdk = [](uint8_t aGecko) {
|
||||
return aGecko / 255.0;
|
||||
};
|
||||
return GdkRGBA {
|
||||
.red = ToGdk(NS_GET_R(color)),
|
||||
.green = ToGdk(NS_GET_G(color)),
|
||||
.blue = ToGdk(NS_GET_B(color)),
|
||||
.alpha = ToGdk(NS_GET_A(color)),
|
||||
auto color = mozilla::LookAndFeel::Color(
|
||||
mozilla::LookAndFeel::ColorID::Windowtext, scheme,
|
||||
mozilla::LookAndFeel::UseStandins::No);
|
||||
auto ToGdk = [](uint8_t aGecko) { return aGecko / 255.0; };
|
||||
return GdkRGBA{
|
||||
.red = ToGdk(NS_GET_R(color)),
|
||||
.green = ToGdk(NS_GET_G(color)),
|
||||
.blue = ToGdk(NS_GET_B(color)),
|
||||
.alpha = ToGdk(NS_GET_A(color)),
|
||||
};
|
||||
}
|
||||
|
||||
@@ -353,5 +353,4 @@ nsresult nsIconChannel::Init(nsIURI* aURI) {
|
||||
return StreamToChannel(stream.forget(), aURI, getter_AddRefs(mRealChannel));
|
||||
}
|
||||
|
||||
void nsIconChannel::Shutdown() {
|
||||
}
|
||||
void nsIconChannel::Shutdown() {}
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user