Bug 1519636 - Reformat recent changes to the Google coding style r=Ehsan
Please note that it is the first reformat with clang-format 9 I only saw a fix in the .mm file # ignore-this-changeset Differential Revision: https://phabricator.services.mozilla.com/D49056
This commit is contained in:
@@ -69,13 +69,11 @@ AccIterator::IteratorState::IteratorState(const Accessible* aParent,
|
|||||||
RelatedAccIterator::RelatedAccIterator(DocAccessible* aDocument,
|
RelatedAccIterator::RelatedAccIterator(DocAccessible* aDocument,
|
||||||
nsIContent* aDependentContent,
|
nsIContent* aDependentContent,
|
||||||
nsAtom* aRelAttr)
|
nsAtom* aRelAttr)
|
||||||
: mDocument(aDocument),
|
: mDocument(aDocument), mRelAttr(aRelAttr), mProviders(nullptr), mIndex(0) {
|
||||||
mRelAttr(aRelAttr),
|
|
||||||
mProviders(nullptr),
|
|
||||||
mIndex(0) {
|
|
||||||
nsAutoString id;
|
nsAutoString id;
|
||||||
if (aDependentContent->IsElement() &&
|
if (aDependentContent->IsElement() &&
|
||||||
aDependentContent->AsElement()->GetAttr(kNameSpaceID_None, nsGkAtoms::id, id)) {
|
aDependentContent->AsElement()->GetAttr(kNameSpaceID_None, nsGkAtoms::id,
|
||||||
|
id)) {
|
||||||
mProviders = mDocument->GetRelProviders(aDependentContent->AsElement(), id);
|
mProviders = mDocument->GetRelProviders(aDependentContent->AsElement(), id);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -103,7 +103,8 @@ void HandlerProvider::GetAndSerializePayload(
|
|||||||
|
|
||||||
IA2Payload payload{};
|
IA2Payload payload{};
|
||||||
|
|
||||||
if (!mscom::InvokeOnMainThread("HandlerProvider::BuildInitialIA2Data", this,
|
if (!mscom::InvokeOnMainThread(
|
||||||
|
"HandlerProvider::BuildInitialIA2Data", this,
|
||||||
&HandlerProvider::BuildInitialIA2Data,
|
&HandlerProvider::BuildInitialIA2Data,
|
||||||
std::forward<NotNull<mscom::IInterceptor*>>(aInterceptor),
|
std::forward<NotNull<mscom::IInterceptor*>>(aInterceptor),
|
||||||
std::forward<StaticIA2Data*>(&payload.mStaticData),
|
std::forward<StaticIA2Data*>(&payload.mStaticData),
|
||||||
@@ -634,8 +635,7 @@ HandlerProvider::get_AllTextInfo(BSTR* aText,
|
|||||||
std::forward<IAccessibleHyperlink***>(aHyperlinks),
|
std::forward<IAccessibleHyperlink***>(aHyperlinks),
|
||||||
std::forward<long*>(aNHyperlinks),
|
std::forward<long*>(aNHyperlinks),
|
||||||
std::forward<IA2TextSegment**>(aAttribRuns),
|
std::forward<IA2TextSegment**>(aAttribRuns),
|
||||||
std::forward<long*>(aNAttribRuns),
|
std::forward<long*>(aNAttribRuns), std::forward<HRESULT*>(&hr))) {
|
||||||
std::forward<HRESULT*>(&hr))) {
|
|
||||||
return E_FAIL;
|
return E_FAIL;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -700,12 +700,11 @@ HandlerProvider::get_RelationsInfo(IARelationData** aRelations,
|
|||||||
}
|
}
|
||||||
|
|
||||||
HRESULT hr;
|
HRESULT hr;
|
||||||
if (!mscom::InvokeOnMainThread("HandlerProvider::GetRelationsInfoMainThread",
|
if (!mscom::InvokeOnMainThread(
|
||||||
this,
|
"HandlerProvider::GetRelationsInfoMainThread", this,
|
||||||
&HandlerProvider::GetRelationsInfoMainThread,
|
&HandlerProvider::GetRelationsInfoMainThread,
|
||||||
std::forward<IARelationData**>(aRelations),
|
std::forward<IARelationData**>(aRelations),
|
||||||
std::forward<long*>(aNRelations),
|
std::forward<long*>(aNRelations), std::forward<HRESULT*>(&hr))) {
|
||||||
std::forward<HRESULT*>(&hr))) {
|
|
||||||
return E_FAIL;
|
return E_FAIL;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -843,12 +842,11 @@ HandlerProvider::get_AllChildren(AccChildData** aChildren, ULONG* aNChildren) {
|
|||||||
MOZ_ASSERT(mscom::IsCurrentThreadMTA());
|
MOZ_ASSERT(mscom::IsCurrentThreadMTA());
|
||||||
|
|
||||||
HRESULT hr;
|
HRESULT hr;
|
||||||
if (!mscom::InvokeOnMainThread("HandlerProvider::GetAllChildrenMainThread",
|
if (!mscom::InvokeOnMainThread(
|
||||||
this,
|
"HandlerProvider::GetAllChildrenMainThread", this,
|
||||||
&HandlerProvider::GetAllChildrenMainThread,
|
&HandlerProvider::GetAllChildrenMainThread,
|
||||||
std::forward<AccChildData**>(aChildren),
|
std::forward<AccChildData**>(aChildren),
|
||||||
std::forward<ULONG*>(aNChildren),
|
std::forward<ULONG*>(aNChildren), std::forward<HRESULT*>(&hr))) {
|
||||||
std::forward<HRESULT*>(&hr))) {
|
|
||||||
return E_FAIL;
|
return E_FAIL;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -28,9 +28,7 @@ XULComboboxAccessible::XULComboboxAccessible(nsIContent* aContent,
|
|||||||
mGenericTypes |= eCombobox;
|
mGenericTypes |= eCombobox;
|
||||||
}
|
}
|
||||||
|
|
||||||
role XULComboboxAccessible::NativeRole() const {
|
role XULComboboxAccessible::NativeRole() const { return roles::COMBOBOX; }
|
||||||
return roles::COMBOBOX;
|
|
||||||
}
|
|
||||||
|
|
||||||
uint64_t XULComboboxAccessible::NativeState() const {
|
uint64_t XULComboboxAccessible::NativeState() const {
|
||||||
// As a nsComboboxAccessible we can have the following states:
|
// As a nsComboboxAccessible we can have the following states:
|
||||||
|
|||||||
@@ -389,5 +389,6 @@ bool nsJSPrincipals::write(JSContext* aCx, JSStructuredCloneWriter* aWriter) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
bool nsJSPrincipals::isSystemOrAddonPrincipal() {
|
bool nsJSPrincipals::isSystemOrAddonPrincipal() {
|
||||||
return this->IsSystemPrincipal() || this->GetIsAddonOrExpandedAddonPrincipal();
|
return this->IsSystemPrincipal() ||
|
||||||
|
this->GetIsAddonOrExpandedAddonPrincipal();
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -81,7 +81,8 @@ JSObject* SerializedStackHolder::ReadStack(JSContext* aCx) {
|
|||||||
set.emplace(mWorkerRef->Private()->GetPrincipal());
|
set.emplace(mWorkerRef->Private()->GetPrincipal());
|
||||||
}
|
}
|
||||||
|
|
||||||
mHolder.Read(xpc::CurrentNativeGlobal(aCx), aCx, &stackValue, IgnoreErrors());
|
mHolder.Read(xpc::CurrentNativeGlobal(aCx), aCx, &stackValue,
|
||||||
|
IgnoreErrors());
|
||||||
}
|
}
|
||||||
|
|
||||||
return stackValue.isObject() ? &stackValue.toObject() : nullptr;
|
return stackValue.isObject() ? &stackValue.toObject() : nullptr;
|
||||||
|
|||||||
@@ -1079,8 +1079,8 @@ class EventStateManager : public nsSupportsWeakReference, public nsIObserver {
|
|||||||
bool DoDefaultDragStart(nsPresContext* aPresContext,
|
bool DoDefaultDragStart(nsPresContext* aPresContext,
|
||||||
WidgetDragEvent* aDragEvent,
|
WidgetDragEvent* aDragEvent,
|
||||||
dom::DataTransfer* aDataTransfer,
|
dom::DataTransfer* aDataTransfer,
|
||||||
bool aAllowEmptyDataTransfer,
|
bool aAllowEmptyDataTransfer, nsIContent* aDragTarget,
|
||||||
nsIContent* aDragTarget, dom::Selection* aSelection,
|
dom::Selection* aSelection,
|
||||||
dom::RemoteDragStartData* aDragStartData,
|
dom::RemoteDragStartData* aDragStartData,
|
||||||
nsIPrincipal* aPrincipal,
|
nsIPrincipal* aPrincipal,
|
||||||
nsIContentSecurityPolicy* aCsp);
|
nsIContentSecurityPolicy* aCsp);
|
||||||
|
|||||||
@@ -86,8 +86,9 @@ void ForwardedInputTrack::SetInput(MediaInputPort* aPort) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
void ForwardedInputTrack::ProcessInputImpl(MediaTrack* aSource,
|
void ForwardedInputTrack::ProcessInputImpl(MediaTrack* aSource,
|
||||||
MediaSegment* aSegment, GraphTime aFrom,
|
MediaSegment* aSegment,
|
||||||
GraphTime aTo, uint32_t aFlags) {
|
GraphTime aFrom, GraphTime aTo,
|
||||||
|
uint32_t aFlags) {
|
||||||
GraphTime next;
|
GraphTime next;
|
||||||
for (GraphTime t = aFrom; t < aTo; t = next) {
|
for (GraphTime t = aFrom; t < aTo; t = next) {
|
||||||
MediaInputPort::InputInterval interval =
|
MediaInputPort::InputInterval interval =
|
||||||
|
|||||||
@@ -57,7 +57,8 @@ void StartAudioCallbackTracing();
|
|||||||
AutoTracer trace(gAudioCallbackTraceLogger, FUNCTION_SIGNATURE, getpid(), \
|
AutoTracer trace(gAudioCallbackTraceLogger, FUNCTION_SIGNATURE, getpid(), \
|
||||||
0, AutoTracer::EventType::DURATION, aFmt, ##__VA_ARGS__);
|
0, AutoTracer::EventType::DURATION, aFmt, ##__VA_ARGS__);
|
||||||
# define TRACE() \
|
# define TRACE() \
|
||||||
AutoTracer trace(gAudioCallbackTraceLogger, FUNCTION_SIGNATURE, getpid(),\
|
AutoTracer trace( \
|
||||||
|
gAudioCallbackTraceLogger, FUNCTION_SIGNATURE, getpid(), \
|
||||||
std::hash<std::thread::id>{}(std::this_thread::get_id()));
|
std::hash<std::thread::id>{}(std::this_thread::get_id()));
|
||||||
# define TRACE_COMMENT(aFmt, ...) \
|
# define TRACE_COMMENT(aFmt, ...) \
|
||||||
AutoTracer trace(gAudioCallbackTraceLogger, FUNCTION_SIGNATURE, getpid(), \
|
AutoTracer trace(gAudioCallbackTraceLogger, FUNCTION_SIGNATURE, getpid(), \
|
||||||
|
|||||||
@@ -35,6 +35,7 @@ class RemoteAudioDecoderParent final : public RemoteDecoderParent {
|
|||||||
protected:
|
protected:
|
||||||
MediaResult ProcessDecodedData(const MediaDataDecoder::DecodedData& aData,
|
MediaResult ProcessDecodedData(const MediaDataDecoder::DecodedData& aData,
|
||||||
DecodedOutputIPDL& aDecodedData) override;
|
DecodedOutputIPDL& aDecodedData) override;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
// Can only be accessed from the manager thread
|
// Can only be accessed from the manager thread
|
||||||
// Note: we can't keep a reference to the original AudioInfo here
|
// Note: we can't keep a reference to the original AudioInfo here
|
||||||
|
|||||||
@@ -243,8 +243,7 @@ nsresult MediaEngineTabVideoSource::Start() {
|
|||||||
AssertIsOnOwningThread();
|
AssertIsOnOwningThread();
|
||||||
MOZ_ASSERT(mState == kAllocated);
|
MOZ_ASSERT(mState == kAllocated);
|
||||||
|
|
||||||
NS_DispatchToMainThread(
|
NS_DispatchToMainThread(new StartRunnable(this, mTrack, mPrincipalHandle));
|
||||||
new StartRunnable(this, mTrack, mPrincipalHandle));
|
|
||||||
mState = kStarted;
|
mState = kStarted;
|
||||||
|
|
||||||
return NS_OK;
|
return NS_OK;
|
||||||
|
|||||||
@@ -22,8 +22,8 @@ typedef int int32_t;
|
|||||||
typedef unsigned int uint32_t;
|
typedef unsigned int uint32_t;
|
||||||
typedef long long int64_t;
|
typedef long long int64_t;
|
||||||
typedef unsigned long long uint64_t;
|
typedef unsigned long long uint64_t;
|
||||||
# elif defined(_AIX) || defined(__sun) || defined(__osf__) || \
|
#elif defined(_AIX) || defined(__sun) || defined(__osf__) || defined(IRIX) || \
|
||||||
defined(IRIX) || defined(HPUX)
|
defined(HPUX)
|
||||||
/*
|
/*
|
||||||
* AIX and SunOS ship a inttypes.h header that defines [u]int32_t,
|
* AIX and SunOS ship a inttypes.h header that defines [u]int32_t,
|
||||||
* but not bool for C.
|
* but not bool for C.
|
||||||
|
|||||||
@@ -65,8 +65,8 @@ ServiceWorkerPrivateImpl::RAIIActorPtrHolder::~RAIIActorPtrHolder() {
|
|||||||
mActor->MaybeSendDelete();
|
mActor->MaybeSendDelete();
|
||||||
}
|
}
|
||||||
|
|
||||||
RemoteWorkerControllerChild* ServiceWorkerPrivateImpl::RAIIActorPtrHolder::
|
RemoteWorkerControllerChild*
|
||||||
operator->() const {
|
ServiceWorkerPrivateImpl::RAIIActorPtrHolder::operator->() const {
|
||||||
AssertIsOnMainThread();
|
AssertIsOnMainThread();
|
||||||
|
|
||||||
return get();
|
return get();
|
||||||
|
|||||||
@@ -67,8 +67,9 @@ ServiceWorkerRegistrationDescriptor::ServiceWorkerRegistrationDescriptor(
|
|||||||
operator=(aRight);
|
operator=(aRight);
|
||||||
}
|
}
|
||||||
|
|
||||||
ServiceWorkerRegistrationDescriptor& ServiceWorkerRegistrationDescriptor::
|
ServiceWorkerRegistrationDescriptor&
|
||||||
operator=(const ServiceWorkerRegistrationDescriptor& aRight) {
|
ServiceWorkerRegistrationDescriptor::operator=(
|
||||||
|
const ServiceWorkerRegistrationDescriptor& aRight) {
|
||||||
if (this == &aRight) {
|
if (this == &aRight) {
|
||||||
return *this;
|
return *this;
|
||||||
}
|
}
|
||||||
@@ -84,8 +85,9 @@ ServiceWorkerRegistrationDescriptor::ServiceWorkerRegistrationDescriptor(
|
|||||||
MOZ_DIAGNOSTIC_ASSERT(IsValid());
|
MOZ_DIAGNOSTIC_ASSERT(IsValid());
|
||||||
}
|
}
|
||||||
|
|
||||||
ServiceWorkerRegistrationDescriptor& ServiceWorkerRegistrationDescriptor::
|
ServiceWorkerRegistrationDescriptor&
|
||||||
operator=(ServiceWorkerRegistrationDescriptor&& aRight) {
|
ServiceWorkerRegistrationDescriptor::operator=(
|
||||||
|
ServiceWorkerRegistrationDescriptor&& aRight) {
|
||||||
mData.reset();
|
mData.reset();
|
||||||
mData = std::move(aRight.mData);
|
mData = std::move(aRight.mData);
|
||||||
MOZ_DIAGNOSTIC_ASSERT(IsValid());
|
MOZ_DIAGNOSTIC_ASSERT(IsValid());
|
||||||
|
|||||||
@@ -155,14 +155,16 @@ template <bool aSwapRB>
|
|||||||
void UnpackRowRGB24_SSSE3(const uint8_t*, uint8_t*, int32_t);
|
void UnpackRowRGB24_SSSE3(const uint8_t*, uint8_t*, int32_t);
|
||||||
|
|
||||||
# define UNPACK_ROW_RGB_SSSE3(aDstFormat) \
|
# define UNPACK_ROW_RGB_SSSE3(aDstFormat) \
|
||||||
FORMAT_CASE_ROW(SurfaceFormat::R8G8B8, aDstFormat, \
|
FORMAT_CASE_ROW( \
|
||||||
|
SurfaceFormat::R8G8B8, aDstFormat, \
|
||||||
UnpackRowRGB24_SSSE3<ShouldSwapRB(SurfaceFormat::R8G8B8, aDstFormat)>)
|
UnpackRowRGB24_SSSE3<ShouldSwapRB(SurfaceFormat::R8G8B8, aDstFormat)>)
|
||||||
|
|
||||||
template <bool aSwapRB>
|
template <bool aSwapRB>
|
||||||
void UnpackRowRGB24_AVX2(const uint8_t*, uint8_t*, int32_t);
|
void UnpackRowRGB24_AVX2(const uint8_t*, uint8_t*, int32_t);
|
||||||
|
|
||||||
# define UNPACK_ROW_RGB_AVX2(aDstFormat) \
|
# define UNPACK_ROW_RGB_AVX2(aDstFormat) \
|
||||||
FORMAT_CASE_ROW(SurfaceFormat::R8G8B8, aDstFormat, \
|
FORMAT_CASE_ROW( \
|
||||||
|
SurfaceFormat::R8G8B8, aDstFormat, \
|
||||||
UnpackRowRGB24_AVX2<ShouldSwapRB(SurfaceFormat::R8G8B8, aDstFormat)>)
|
UnpackRowRGB24_AVX2<ShouldSwapRB(SurfaceFormat::R8G8B8, aDstFormat)>)
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
@@ -892,7 +894,8 @@ template void UnpackRowRGB24<false>(const uint8_t*, uint8_t*, int32_t);
|
|||||||
template void UnpackRowRGB24<true>(const uint8_t*, uint8_t*, int32_t);
|
template void UnpackRowRGB24<true>(const uint8_t*, uint8_t*, int32_t);
|
||||||
|
|
||||||
#define UNPACK_ROW_RGB(aDstFormat) \
|
#define UNPACK_ROW_RGB(aDstFormat) \
|
||||||
FORMAT_CASE_ROW(SurfaceFormat::R8G8B8, aDstFormat, \
|
FORMAT_CASE_ROW( \
|
||||||
|
SurfaceFormat::R8G8B8, aDstFormat, \
|
||||||
UnpackRowRGB24<ShouldSwapRB(SurfaceFormat::R8G8B8, aDstFormat)>)
|
UnpackRowRGB24<ShouldSwapRB(SurfaceFormat::R8G8B8, aDstFormat)>)
|
||||||
|
|
||||||
bool SwizzleData(const uint8_t* aSrc, int32_t aSrcStride,
|
bool SwizzleData(const uint8_t* aSrc, int32_t aSrcStride,
|
||||||
|
|||||||
@@ -45,17 +45,20 @@ GFX2D_API bool SwizzleData(const uint8_t* aSrc, int32_t aSrcStride,
|
|||||||
* Swizzles source and writes it to destination. Source and destination may be
|
* Swizzles source and writes it to destination. Source and destination may be
|
||||||
* the same to swizzle in-place.
|
* the same to swizzle in-place.
|
||||||
*/
|
*/
|
||||||
typedef void (*SwizzleRowFn)(const uint8_t* aSrc, uint8_t* aDst, int32_t aLength);
|
typedef void (*SwizzleRowFn)(const uint8_t* aSrc, uint8_t* aDst,
|
||||||
|
int32_t aLength);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Get a function pointer to perform premultiplication between two formats.
|
* Get a function pointer to perform premultiplication between two formats.
|
||||||
*/
|
*/
|
||||||
GFX2D_API SwizzleRowFn PremultiplyRow(SurfaceFormat aSrcFormat, SurfaceFormat aDstFormat);
|
GFX2D_API SwizzleRowFn PremultiplyRow(SurfaceFormat aSrcFormat,
|
||||||
|
SurfaceFormat aDstFormat);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Get a function pointer to perform swizzling between two formats.
|
* Get a function pointer to perform swizzling between two formats.
|
||||||
*/
|
*/
|
||||||
GFX2D_API SwizzleRowFn SwizzleRow(SurfaceFormat aSrcFormat, SurfaceFormat aDstFormat);
|
GFX2D_API SwizzleRowFn SwizzleRow(SurfaceFormat aSrcFormat,
|
||||||
|
SurfaceFormat aDstFormat);
|
||||||
|
|
||||||
} // namespace gfx
|
} // namespace gfx
|
||||||
} // namespace mozilla
|
} // namespace mozilla
|
||||||
|
|||||||
@@ -353,8 +353,7 @@ void Swizzle_NEON(const uint8_t* aSrc, int32_t aSrcGap, uint8_t* aDst,
|
|||||||
aDstGap += 4 * remainder;
|
aDstGap += 4 * remainder;
|
||||||
|
|
||||||
for (int32_t height = aSize.height; height > 0; height--) {
|
for (int32_t height = aSize.height; height > 0; height--) {
|
||||||
SwizzleChunk_NEON<aSwapRB, aOpaqueAlpha>(aSrc, aDst, alignedRow,
|
SwizzleChunk_NEON<aSwapRB, aOpaqueAlpha>(aSrc, aDst, alignedRow, remainder);
|
||||||
remainder);
|
|
||||||
aSrc += aSrcGap;
|
aSrc += aSrcGap;
|
||||||
aDst += aDstGap;
|
aDst += aDstGap;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -575,9 +575,8 @@ struct DIGroup {
|
|||||||
GP("\n\n");
|
GP("\n\n");
|
||||||
GP("Begin EndGroup\n");
|
GP("Begin EndGroup\n");
|
||||||
|
|
||||||
mVisibleRect = mVisibleRect.Intersect(
|
mVisibleRect = mVisibleRect.Intersect(ViewAs<LayerPixel>(
|
||||||
ViewAs<LayerPixel>(mActualBounds,
|
mActualBounds, PixelCastJustification::LayerIsImage));
|
||||||
PixelCastJustification::LayerIsImage));
|
|
||||||
|
|
||||||
if (mVisibleRect.IsEmpty()) {
|
if (mVisibleRect.IsEmpty()) {
|
||||||
return;
|
return;
|
||||||
@@ -785,7 +784,8 @@ struct DIGroup {
|
|||||||
dirty = false;
|
dirty = false;
|
||||||
BlobItemData* data = GetBlobItemData(item);
|
BlobItemData* data = GetBlobItemData(item);
|
||||||
if (data->mInvalid) {
|
if (data->mInvalid) {
|
||||||
gfxCriticalError() << "DisplayItem" << item->Name() << "-should be invalid";
|
gfxCriticalError()
|
||||||
|
<< "DisplayItem" << item->Name() << "-should be invalid";
|
||||||
}
|
}
|
||||||
// if the item is invalid it needs to be fully contained
|
// if the item is invalid it needs to be fully contained
|
||||||
MOZ_RELEASE_ASSERT(!data->mInvalid);
|
MOZ_RELEASE_ASSERT(!data->mInvalid);
|
||||||
|
|||||||
@@ -203,10 +203,9 @@ TEST(Moz2D, SwizzleRow)
|
|||||||
// check unpacking
|
// check unpacking
|
||||||
uint8_t out_unpack[16 * 4];
|
uint8_t out_unpack[16 * 4];
|
||||||
const uint8_t in_rgb[16 * 3] = {
|
const uint8_t in_rgb[16 * 3] = {
|
||||||
0, 254, 253, 255, 0, 0, 0, 0, 0, 3, 2, 1,
|
0, 254, 253, 255, 0, 0, 0, 0, 0, 3, 2, 1, 9, 0, 127, 4,
|
||||||
9, 0, 127, 4, 5, 6, 9, 8, 7, 10, 11, 12,
|
5, 6, 9, 8, 7, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20,
|
||||||
13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24,
|
21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36,
|
||||||
25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36,
|
|
||||||
};
|
};
|
||||||
const uint8_t check_unpack_rgbx[16 * 4] = {
|
const uint8_t check_unpack_rgbx[16 * 4] = {
|
||||||
0, 254, 253, 255, 255, 0, 0, 255, 0, 0, 0, 255, 3, 2, 1, 255,
|
0, 254, 253, 255, 255, 0, 0, 255, 0, 0, 0, 255, 3, 2, 1, 255,
|
||||||
|
|||||||
@@ -940,12 +940,15 @@ gfxFontEntry* gfxDWriteFontList::CreateFontEntry(
|
|||||||
mSystemFonts;
|
mSystemFonts;
|
||||||
#endif
|
#endif
|
||||||
RefPtr<IDWriteFontFamily> family;
|
RefPtr<IDWriteFontFamily> family;
|
||||||
HRESULT hr = collection->GetFontFamily(aFamily->Index(), getter_AddRefs(family));
|
HRESULT hr =
|
||||||
// Check that the family name is what we expected; if not, fall back to search by name.
|
collection->GetFontFamily(aFamily->Index(), getter_AddRefs(family));
|
||||||
// It's sad we have to do this, but it is possible for Windows to have given different versions
|
// Check that the family name is what we expected; if not, fall back to search
|
||||||
// of the system font collection to the parent and child processes.
|
// by name. It's sad we have to do this, but it is possible for Windows to
|
||||||
|
// have given different versions of the system font collection to the parent
|
||||||
|
// and child processes.
|
||||||
bool foundFamily = false;
|
bool foundFamily = false;
|
||||||
const nsCString& familyName = aFamily->DisplayName().AsString(SharedFontList());
|
const nsCString& familyName =
|
||||||
|
aFamily->DisplayName().AsString(SharedFontList());
|
||||||
if (SUCCEEDED(hr) && family) {
|
if (SUCCEEDED(hr) && family) {
|
||||||
RefPtr<IDWriteLocalizedStrings> names;
|
RefPtr<IDWriteLocalizedStrings> names;
|
||||||
hr = family->GetFamilyNames(getter_AddRefs(names));
|
hr = family->GetFamilyNames(getter_AddRefs(names));
|
||||||
@@ -957,11 +960,13 @@ gfxFontEntry* gfxDWriteFontList::CreateFontEntry(
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (!foundFamily) {
|
if (!foundFamily) {
|
||||||
// Try to get family by name instead of index (to deal with the case of collection mismatch).
|
// Try to get family by name instead of index (to deal with the case of
|
||||||
|
// collection mismatch).
|
||||||
UINT32 index;
|
UINT32 index;
|
||||||
BOOL exists;
|
BOOL exists;
|
||||||
NS_ConvertUTF8toUTF16 name16(familyName);
|
NS_ConvertUTF8toUTF16 name16(familyName);
|
||||||
hr = collection->FindFamilyName(reinterpret_cast<const WCHAR*>(name16.BeginReading()), &index, &exists);
|
hr = collection->FindFamilyName(
|
||||||
|
reinterpret_cast<const WCHAR*>(name16.BeginReading()), &index, &exists);
|
||||||
if (SUCCEEDED(hr) && exists && index != UINT_MAX) {
|
if (SUCCEEDED(hr) && exists && index != UINT_MAX) {
|
||||||
hr = collection->GetFontFamily(index, getter_AddRefs(family));
|
hr = collection->GetFontFamily(index, getter_AddRefs(family));
|
||||||
if (FAILED(hr) || !family) {
|
if (FAILED(hr) || !family) {
|
||||||
|
|||||||
@@ -40,7 +40,8 @@ class MainThreadInvoker {
|
|||||||
|
|
||||||
template <typename Class, typename... Args>
|
template <typename Class, typename... Args>
|
||||||
inline bool InvokeOnMainThread(const char* aName, Class* aObject,
|
inline bool InvokeOnMainThread(const char* aName, Class* aObject,
|
||||||
void (Class::*aMethod)(Args...), Args&&... aArgs) {
|
void (Class::*aMethod)(Args...),
|
||||||
|
Args&&... aArgs) {
|
||||||
nsCOMPtr<nsIRunnable> runnable(NewNonOwningRunnableMethod<Args...>(
|
nsCOMPtr<nsIRunnable> runnable(NewNonOwningRunnableMethod<Args...>(
|
||||||
aName, aObject, aMethod, std::forward<Args>(aArgs)...));
|
aName, aObject, aMethod, std::forward<Args>(aArgs)...));
|
||||||
|
|
||||||
|
|||||||
@@ -37,7 +37,8 @@ class MOZ_NONHEAP_CLASS Factory : public IClassFactory {
|
|||||||
}
|
}
|
||||||
|
|
||||||
template <typename... Args>
|
template <typename... Args>
|
||||||
HRESULT DoCreate(HRESULT (*aFnPtr)(IUnknown*, REFIID, void**), Args&&... args) {
|
HRESULT DoCreate(HRESULT (*aFnPtr)(IUnknown*, REFIID, void**),
|
||||||
|
Args&&... args) {
|
||||||
return aFnPtr(std::forward<Args>(args)...);
|
return aFnPtr(std::forward<Args>(args)...);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -2281,11 +2281,7 @@ static MOZ_MUST_USE bool PerformPromiseRace(
|
|||||||
JSContext* cx, PromiseForOfIterator& iterator, HandleObject C,
|
JSContext* cx, PromiseForOfIterator& iterator, HandleObject C,
|
||||||
Handle<PromiseCapability> resultCapability, bool* done);
|
Handle<PromiseCapability> resultCapability, bool* done);
|
||||||
|
|
||||||
enum class IterationMode {
|
enum class IterationMode { All, AllSettled, Race };
|
||||||
All,
|
|
||||||
AllSettled,
|
|
||||||
Race
|
|
||||||
};
|
|
||||||
|
|
||||||
// ES2020 draft rev dc1e21c454bd316810be1c0e7af0131a2d7f38e9
|
// ES2020 draft rev dc1e21c454bd316810be1c0e7af0131a2d7f38e9
|
||||||
//
|
//
|
||||||
|
|||||||
@@ -880,16 +880,14 @@ BufferOffset AssemblerMIPSShared::as_sdr(Register rd, Register rs,
|
|||||||
return writeInst(InstImm(op_sdr, rs, rd, Imm16(off)).encode());
|
return writeInst(InstImm(op_sdr, rs, rd, Imm16(off)).encode());
|
||||||
}
|
}
|
||||||
|
|
||||||
BufferOffset
|
BufferOffset AssemblerMIPSShared::as_seleqz(Register rd, Register rs,
|
||||||
AssemblerMIPSShared::as_seleqz(Register rd, Register rs, Register rt)
|
Register rt) {
|
||||||
{
|
|
||||||
spew("seleqz %3s,%3s,%3s", rd.name(), rs.name(), rt.name());
|
spew("seleqz %3s,%3s,%3s", rd.name(), rs.name(), rt.name());
|
||||||
return writeInst(InstReg(op_special, rs, rt, rd, 0x0, ff_seleqz).encode());
|
return writeInst(InstReg(op_special, rs, rt, rd, 0x0, ff_seleqz).encode());
|
||||||
}
|
}
|
||||||
|
|
||||||
BufferOffset
|
BufferOffset AssemblerMIPSShared::as_selnez(Register rd, Register rs,
|
||||||
AssemblerMIPSShared::as_selnez(Register rd, Register rs, Register rt)
|
Register rt) {
|
||||||
{
|
|
||||||
spew("selnez %3s,%3s,%3s", rd.name(), rs.name(), rt.name());
|
spew("selnez %3s,%3s,%3s", rd.name(), rs.name(), rt.name());
|
||||||
return writeInst(InstReg(op_special, rs, rt, rd, 0x0, ff_selnez).encode());
|
return writeInst(InstReg(op_special, rs, rt, rd, 0x0, ff_selnez).encode());
|
||||||
}
|
}
|
||||||
@@ -1532,8 +1530,8 @@ BufferOffset AssemblerMIPSShared::as_cf(FloatFormat fmt, FloatRegister fs,
|
|||||||
spew("c.f.d FCC%d,%3s,%3s", fcc, fs.name(), ft.name());
|
spew("c.f.d FCC%d,%3s,%3s", fcc, fs.name(), ft.name());
|
||||||
#ifdef MIPSR6
|
#ifdef MIPSR6
|
||||||
return writeInst(
|
return writeInst(
|
||||||
InstReg(op_cop1, rs_d_r6, ft, fs, FloatRegisters::f24,
|
InstReg(op_cop1, rs_d_r6, ft, fs, FloatRegisters::f24, ff_c_f_fmt)
|
||||||
ff_c_f_fmt).encode());
|
.encode());
|
||||||
#else
|
#else
|
||||||
return writeInst(
|
return writeInst(
|
||||||
InstReg(op_cop1, rs_d, ft, fs, fcc << FccShift, ff_c_f_fmt).encode());
|
InstReg(op_cop1, rs_d, ft, fs, fcc << FccShift, ff_c_f_fmt).encode());
|
||||||
@@ -1542,8 +1540,8 @@ BufferOffset AssemblerMIPSShared::as_cf(FloatFormat fmt, FloatRegister fs,
|
|||||||
spew("c.f.s FCC%d,%3s,%3s", fcc, fs.name(), ft.name());
|
spew("c.f.s FCC%d,%3s,%3s", fcc, fs.name(), ft.name());
|
||||||
#ifdef MIPSR6
|
#ifdef MIPSR6
|
||||||
return writeInst(
|
return writeInst(
|
||||||
InstReg(op_cop1, rs_s_r6, ft, fs, FloatRegisters::f24,
|
InstReg(op_cop1, rs_s_r6, ft, fs, FloatRegisters::f24, ff_c_f_fmt)
|
||||||
ff_c_f_fmt).encode());
|
.encode());
|
||||||
#else
|
#else
|
||||||
return writeInst(
|
return writeInst(
|
||||||
InstReg(op_cop1, rs_s, ft, fs, fcc << FccShift, ff_c_f_fmt).encode());
|
InstReg(op_cop1, rs_s, ft, fs, fcc << FccShift, ff_c_f_fmt).encode());
|
||||||
@@ -1557,8 +1555,8 @@ BufferOffset AssemblerMIPSShared::as_cun(FloatFormat fmt, FloatRegister fs,
|
|||||||
spew("c.un.d FCC%d,%3s,%3s", fcc, fs.name(), ft.name());
|
spew("c.un.d FCC%d,%3s,%3s", fcc, fs.name(), ft.name());
|
||||||
#ifdef MIPSR6
|
#ifdef MIPSR6
|
||||||
return writeInst(
|
return writeInst(
|
||||||
InstReg(op_cop1, rs_d_r6, ft, fs, FloatRegisters::f24,
|
InstReg(op_cop1, rs_d_r6, ft, fs, FloatRegisters::f24, ff_c_un_fmt)
|
||||||
ff_c_un_fmt).encode());
|
.encode());
|
||||||
#else
|
#else
|
||||||
return writeInst(
|
return writeInst(
|
||||||
InstReg(op_cop1, rs_d, ft, fs, fcc << FccShift, ff_c_un_fmt).encode());
|
InstReg(op_cop1, rs_d, ft, fs, fcc << FccShift, ff_c_un_fmt).encode());
|
||||||
@@ -1567,8 +1565,8 @@ BufferOffset AssemblerMIPSShared::as_cun(FloatFormat fmt, FloatRegister fs,
|
|||||||
spew("c.un.s FCC%d,%3s,%3s", fcc, fs.name(), ft.name());
|
spew("c.un.s FCC%d,%3s,%3s", fcc, fs.name(), ft.name());
|
||||||
#ifdef MIPSR6
|
#ifdef MIPSR6
|
||||||
return writeInst(
|
return writeInst(
|
||||||
InstReg(op_cop1, rs_s_r6, ft, fs, FloatRegisters::f24,
|
InstReg(op_cop1, rs_s_r6, ft, fs, FloatRegisters::f24, ff_c_un_fmt)
|
||||||
ff_c_un_fmt).encode());
|
.encode());
|
||||||
#else
|
#else
|
||||||
return writeInst(
|
return writeInst(
|
||||||
InstReg(op_cop1, rs_s, ft, fs, fcc << FccShift, ff_c_un_fmt).encode());
|
InstReg(op_cop1, rs_s, ft, fs, fcc << FccShift, ff_c_un_fmt).encode());
|
||||||
@@ -1582,8 +1580,8 @@ BufferOffset AssemblerMIPSShared::as_ceq(FloatFormat fmt, FloatRegister fs,
|
|||||||
spew("c.eq.d FCC%d,%3s,%3s", fcc, fs.name(), ft.name());
|
spew("c.eq.d FCC%d,%3s,%3s", fcc, fs.name(), ft.name());
|
||||||
#ifdef MIPSR6
|
#ifdef MIPSR6
|
||||||
return writeInst(
|
return writeInst(
|
||||||
InstReg(op_cop1, rs_d_r6, ft, fs, FloatRegisters::f24,
|
InstReg(op_cop1, rs_d_r6, ft, fs, FloatRegisters::f24, ff_c_eq_fmt)
|
||||||
ff_c_eq_fmt).encode());
|
.encode());
|
||||||
#else
|
#else
|
||||||
return writeInst(
|
return writeInst(
|
||||||
InstReg(op_cop1, rs_d, ft, fs, fcc << FccShift, ff_c_eq_fmt).encode());
|
InstReg(op_cop1, rs_d, ft, fs, fcc << FccShift, ff_c_eq_fmt).encode());
|
||||||
@@ -1592,8 +1590,8 @@ BufferOffset AssemblerMIPSShared::as_ceq(FloatFormat fmt, FloatRegister fs,
|
|||||||
spew("c.eq.s FCC%d,%3s,%3s", fcc, fs.name(), ft.name());
|
spew("c.eq.s FCC%d,%3s,%3s", fcc, fs.name(), ft.name());
|
||||||
#ifdef MIPSR6
|
#ifdef MIPSR6
|
||||||
return writeInst(
|
return writeInst(
|
||||||
InstReg(op_cop1, rs_s_r6, ft, fs, FloatRegisters::f24,
|
InstReg(op_cop1, rs_s_r6, ft, fs, FloatRegisters::f24, ff_c_eq_fmt)
|
||||||
ff_c_eq_fmt).encode());
|
.encode());
|
||||||
#else
|
#else
|
||||||
return writeInst(
|
return writeInst(
|
||||||
InstReg(op_cop1, rs_s, ft, fs, fcc << FccShift, ff_c_eq_fmt).encode());
|
InstReg(op_cop1, rs_s, ft, fs, fcc << FccShift, ff_c_eq_fmt).encode());
|
||||||
@@ -1608,8 +1606,8 @@ BufferOffset AssemblerMIPSShared::as_cueq(FloatFormat fmt, FloatRegister fs,
|
|||||||
spew("c.ueq.d FCC%d,%3s,%3s", fcc, fs.name(), ft.name());
|
spew("c.ueq.d FCC%d,%3s,%3s", fcc, fs.name(), ft.name());
|
||||||
#ifdef MIPSR6
|
#ifdef MIPSR6
|
||||||
return writeInst(
|
return writeInst(
|
||||||
InstReg(op_cop1, rs_d_r6, ft, fs, FloatRegisters::f24,
|
InstReg(op_cop1, rs_d_r6, ft, fs, FloatRegisters::f24, ff_c_ueq_fmt)
|
||||||
ff_c_ueq_fmt).encode());
|
.encode());
|
||||||
#else
|
#else
|
||||||
return writeInst(
|
return writeInst(
|
||||||
InstReg(op_cop1, rs_d, ft, fs, fcc << FccShift, ff_c_ueq_fmt).encode());
|
InstReg(op_cop1, rs_d, ft, fs, fcc << FccShift, ff_c_ueq_fmt).encode());
|
||||||
@@ -1618,8 +1616,8 @@ BufferOffset AssemblerMIPSShared::as_cueq(FloatFormat fmt, FloatRegister fs,
|
|||||||
spew("c.ueq.s FCC%d,%3s,%3s", fcc, fs.name(), ft.name());
|
spew("c.ueq.s FCC%d,%3s,%3s", fcc, fs.name(), ft.name());
|
||||||
#ifdef MIPSR6
|
#ifdef MIPSR6
|
||||||
return writeInst(
|
return writeInst(
|
||||||
InstReg(op_cop1, rs_s_r6, ft, fs, FloatRegisters::f24,
|
InstReg(op_cop1, rs_s_r6, ft, fs, FloatRegisters::f24, ff_c_ueq_fmt)
|
||||||
ff_c_ueq_fmt).encode());
|
.encode());
|
||||||
#else
|
#else
|
||||||
return writeInst(
|
return writeInst(
|
||||||
InstReg(op_cop1, rs_s, ft, fs, fcc << FccShift, ff_c_ueq_fmt).encode());
|
InstReg(op_cop1, rs_s, ft, fs, fcc << FccShift, ff_c_ueq_fmt).encode());
|
||||||
@@ -1634,8 +1632,8 @@ BufferOffset AssemblerMIPSShared::as_colt(FloatFormat fmt, FloatRegister fs,
|
|||||||
spew("c.olt.d FCC%d,%3s,%3s", fcc, fs.name(), ft.name());
|
spew("c.olt.d FCC%d,%3s,%3s", fcc, fs.name(), ft.name());
|
||||||
#ifdef MIPSR6
|
#ifdef MIPSR6
|
||||||
return writeInst(
|
return writeInst(
|
||||||
InstReg(op_cop1, rs_d_r6, ft, fs, FloatRegisters::f24,
|
InstReg(op_cop1, rs_d_r6, ft, fs, FloatRegisters::f24, ff_c_olt_fmt)
|
||||||
ff_c_olt_fmt).encode());
|
.encode());
|
||||||
#else
|
#else
|
||||||
return writeInst(
|
return writeInst(
|
||||||
InstReg(op_cop1, rs_d, ft, fs, fcc << FccShift, ff_c_olt_fmt).encode());
|
InstReg(op_cop1, rs_d, ft, fs, fcc << FccShift, ff_c_olt_fmt).encode());
|
||||||
@@ -1644,8 +1642,8 @@ BufferOffset AssemblerMIPSShared::as_colt(FloatFormat fmt, FloatRegister fs,
|
|||||||
spew("c.olt.s FCC%d,%3s,%3s", fcc, fs.name(), ft.name());
|
spew("c.olt.s FCC%d,%3s,%3s", fcc, fs.name(), ft.name());
|
||||||
#ifdef MIPSR6
|
#ifdef MIPSR6
|
||||||
return writeInst(
|
return writeInst(
|
||||||
InstReg(op_cop1, rs_s_r6, ft, fs, FloatRegisters::f24,
|
InstReg(op_cop1, rs_s_r6, ft, fs, FloatRegisters::f24, ff_c_olt_fmt)
|
||||||
ff_c_olt_fmt).encode());
|
.encode());
|
||||||
#else
|
#else
|
||||||
return writeInst(
|
return writeInst(
|
||||||
InstReg(op_cop1, rs_s, ft, fs, fcc << FccShift, ff_c_olt_fmt).encode());
|
InstReg(op_cop1, rs_s, ft, fs, fcc << FccShift, ff_c_olt_fmt).encode());
|
||||||
@@ -1660,8 +1658,8 @@ BufferOffset AssemblerMIPSShared::as_cult(FloatFormat fmt, FloatRegister fs,
|
|||||||
spew("c.ult.d FCC%d,%3s,%3s", fcc, fs.name(), ft.name());
|
spew("c.ult.d FCC%d,%3s,%3s", fcc, fs.name(), ft.name());
|
||||||
#ifdef MIPSR6
|
#ifdef MIPSR6
|
||||||
return writeInst(
|
return writeInst(
|
||||||
InstReg(op_cop1, rs_d_r6, ft, fs, FloatRegisters::f24,
|
InstReg(op_cop1, rs_d_r6, ft, fs, FloatRegisters::f24, ff_c_ult_fmt)
|
||||||
ff_c_ult_fmt).encode());
|
.encode());
|
||||||
#else
|
#else
|
||||||
return writeInst(
|
return writeInst(
|
||||||
InstReg(op_cop1, rs_d, ft, fs, fcc << FccShift, ff_c_ult_fmt).encode());
|
InstReg(op_cop1, rs_d, ft, fs, fcc << FccShift, ff_c_ult_fmt).encode());
|
||||||
@@ -1670,8 +1668,8 @@ BufferOffset AssemblerMIPSShared::as_cult(FloatFormat fmt, FloatRegister fs,
|
|||||||
spew("c.ult.s FCC%d,%3s,%3s", fcc, fs.name(), ft.name());
|
spew("c.ult.s FCC%d,%3s,%3s", fcc, fs.name(), ft.name());
|
||||||
#ifdef MIPSR6
|
#ifdef MIPSR6
|
||||||
return writeInst(
|
return writeInst(
|
||||||
InstReg(op_cop1, rs_s_r6, ft, fs, FloatRegisters::f24,
|
InstReg(op_cop1, rs_s_r6, ft, fs, FloatRegisters::f24, ff_c_ult_fmt)
|
||||||
ff_c_ult_fmt).encode());
|
.encode());
|
||||||
#else
|
#else
|
||||||
return writeInst(
|
return writeInst(
|
||||||
InstReg(op_cop1, rs_s, ft, fs, fcc << FccShift, ff_c_ult_fmt).encode());
|
InstReg(op_cop1, rs_s, ft, fs, fcc << FccShift, ff_c_ult_fmt).encode());
|
||||||
@@ -1686,8 +1684,8 @@ BufferOffset AssemblerMIPSShared::as_cole(FloatFormat fmt, FloatRegister fs,
|
|||||||
spew("c.ole.d FCC%d,%3s,%3s", fcc, fs.name(), ft.name());
|
spew("c.ole.d FCC%d,%3s,%3s", fcc, fs.name(), ft.name());
|
||||||
#ifdef MIPSR6
|
#ifdef MIPSR6
|
||||||
return writeInst(
|
return writeInst(
|
||||||
InstReg(op_cop1, rs_d_r6, ft, fs, FloatRegisters::f24,
|
InstReg(op_cop1, rs_d_r6, ft, fs, FloatRegisters::f24, ff_c_ole_fmt)
|
||||||
ff_c_ole_fmt).encode());
|
.encode());
|
||||||
#else
|
#else
|
||||||
return writeInst(
|
return writeInst(
|
||||||
InstReg(op_cop1, rs_d, ft, fs, fcc << FccShift, ff_c_ole_fmt).encode());
|
InstReg(op_cop1, rs_d, ft, fs, fcc << FccShift, ff_c_ole_fmt).encode());
|
||||||
@@ -1696,8 +1694,8 @@ BufferOffset AssemblerMIPSShared::as_cole(FloatFormat fmt, FloatRegister fs,
|
|||||||
spew("c.ole.s FCC%d,%3s,%3s", fcc, fs.name(), ft.name());
|
spew("c.ole.s FCC%d,%3s,%3s", fcc, fs.name(), ft.name());
|
||||||
#ifdef MIPSR6
|
#ifdef MIPSR6
|
||||||
return writeInst(
|
return writeInst(
|
||||||
InstReg(op_cop1, rs_s_r6, ft, fs, FloatRegisters::f24,
|
InstReg(op_cop1, rs_s_r6, ft, fs, FloatRegisters::f24, ff_c_ole_fmt)
|
||||||
ff_c_ole_fmt).encode());
|
.encode());
|
||||||
#else
|
#else
|
||||||
return writeInst(
|
return writeInst(
|
||||||
InstReg(op_cop1, rs_s, ft, fs, fcc << FccShift, ff_c_ole_fmt).encode());
|
InstReg(op_cop1, rs_s, ft, fs, fcc << FccShift, ff_c_ole_fmt).encode());
|
||||||
@@ -1712,8 +1710,8 @@ BufferOffset AssemblerMIPSShared::as_cule(FloatFormat fmt, FloatRegister fs,
|
|||||||
spew("c.ule.d FCC%d,%3s,%3s", fcc, fs.name(), ft.name());
|
spew("c.ule.d FCC%d,%3s,%3s", fcc, fs.name(), ft.name());
|
||||||
#ifdef MIPSR6
|
#ifdef MIPSR6
|
||||||
return writeInst(
|
return writeInst(
|
||||||
InstReg(op_cop1, rs_d_r6, ft, fs, FloatRegisters::f24,
|
InstReg(op_cop1, rs_d_r6, ft, fs, FloatRegisters::f24, ff_c_ule_fmt)
|
||||||
ff_c_ule_fmt).encode());
|
.encode());
|
||||||
#else
|
#else
|
||||||
return writeInst(
|
return writeInst(
|
||||||
InstReg(op_cop1, rs_d, ft, fs, fcc << FccShift, ff_c_ule_fmt).encode());
|
InstReg(op_cop1, rs_d, ft, fs, fcc << FccShift, ff_c_ule_fmt).encode());
|
||||||
@@ -1722,8 +1720,8 @@ BufferOffset AssemblerMIPSShared::as_cule(FloatFormat fmt, FloatRegister fs,
|
|||||||
spew("c.ule.s FCC%d,%3s,%3s", fcc, fs.name(), ft.name());
|
spew("c.ule.s FCC%d,%3s,%3s", fcc, fs.name(), ft.name());
|
||||||
#ifdef MIPSR6
|
#ifdef MIPSR6
|
||||||
return writeInst(
|
return writeInst(
|
||||||
InstReg(op_cop1, rs_s_r6, ft, fs, FloatRegisters::f24,
|
InstReg(op_cop1, rs_s_r6, ft, fs, FloatRegisters::f24, ff_c_ule_fmt)
|
||||||
ff_c_ule_fmt).encode());
|
.encode());
|
||||||
#else
|
#else
|
||||||
return writeInst(
|
return writeInst(
|
||||||
InstReg(op_cop1, rs_s, ft, fs, fcc << FccShift, ff_c_ule_fmt).encode());
|
InstReg(op_cop1, rs_s, ft, fs, fcc << FccShift, ff_c_ule_fmt).encode());
|
||||||
|
|||||||
@@ -207,7 +207,8 @@ void Assembler::bind(InstImm* inst, uintptr_t branch, uintptr_t target) {
|
|||||||
Assembler::WriteLoad64Instructions(inst, ScratchRegister,
|
Assembler::WriteLoad64Instructions(inst, ScratchRegister,
|
||||||
LabelBase::INVALID_OFFSET);
|
LabelBase::INVALID_OFFSET);
|
||||||
#ifdef MIPSR6
|
#ifdef MIPSR6
|
||||||
inst[4] = InstReg(op_special, ScratchRegister, zero, zero, ff_jalr).encode();
|
inst[4] =
|
||||||
|
InstReg(op_special, ScratchRegister, zero, zero, ff_jalr).encode();
|
||||||
#else
|
#else
|
||||||
inst[4] = InstReg(op_special, ScratchRegister, zero, zero, ff_jr).encode();
|
inst[4] = InstReg(op_special, ScratchRegister, zero, zero, ff_jr).encode();
|
||||||
#endif
|
#endif
|
||||||
@@ -220,7 +221,8 @@ void Assembler::bind(InstImm* inst, uintptr_t branch, uintptr_t target) {
|
|||||||
Assembler::WriteLoad64Instructions(&inst[1], ScratchRegister,
|
Assembler::WriteLoad64Instructions(&inst[1], ScratchRegister,
|
||||||
LabelBase::INVALID_OFFSET);
|
LabelBase::INVALID_OFFSET);
|
||||||
#ifdef MIPSR6
|
#ifdef MIPSR6
|
||||||
inst[5] = InstReg(op_special, ScratchRegister, zero, zero, ff_jalr).encode();
|
inst[5] =
|
||||||
|
InstReg(op_special, ScratchRegister, zero, zero, ff_jalr).encode();
|
||||||
#else
|
#else
|
||||||
inst[5] = InstReg(op_special, ScratchRegister, zero, zero, ff_jr).encode();
|
inst[5] = InstReg(op_special, ScratchRegister, zero, zero, ff_jr).encode();
|
||||||
#endif
|
#endif
|
||||||
|
|||||||
@@ -764,8 +764,7 @@ static JSString* ErrorReportToString(JSContext* cx, JSErrorReport* reportp) {
|
|||||||
return ConcatStrings<CanGC>(cx, str, message);
|
return ConcatStrings<CanGC>(cx, str, message);
|
||||||
}
|
}
|
||||||
|
|
||||||
ErrorReport::ErrorReport(JSContext* cx)
|
ErrorReport::ErrorReport(JSContext* cx) : reportp(nullptr), exnObject(cx) {}
|
||||||
: reportp(nullptr), exnObject(cx) {}
|
|
||||||
|
|
||||||
ErrorReport::~ErrorReport() = default;
|
ErrorReport::~ErrorReport() = default;
|
||||||
|
|
||||||
|
|||||||
@@ -242,10 +242,12 @@ static bool EvalScript(JSContext* cx, HandleObject targetObj,
|
|||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool mozJSSubScriptLoader::ReadScript(
|
bool mozJSSubScriptLoader::ReadScript(JS::MutableHandle<JSScript*> script,
|
||||||
JS::MutableHandle<JSScript*> script,
|
nsIURI* uri, JSContext* cx,
|
||||||
nsIURI* uri, JSContext* cx, HandleObject targetObj, const char* uriStr,
|
HandleObject targetObj,
|
||||||
nsIIOService* serv, bool wantReturnValue, bool useCompilationScope) {
|
const char* uriStr, nsIIOService* serv,
|
||||||
|
bool wantReturnValue,
|
||||||
|
bool useCompilationScope) {
|
||||||
// We create a channel and call SetContentType, to avoid expensive MIME type
|
// We create a channel and call SetContentType, to avoid expensive MIME type
|
||||||
// lookups (bug 632490).
|
// lookups (bug 632490).
|
||||||
nsCOMPtr<nsIChannel> chan;
|
nsCOMPtr<nsIChannel> chan;
|
||||||
@@ -302,8 +304,8 @@ bool mozJSSubScriptLoader::ReadScript(
|
|||||||
ar.emplace(cx, xpc::CompilationScope());
|
ar.emplace(cx, xpc::CompilationScope());
|
||||||
}
|
}
|
||||||
|
|
||||||
JSScript* ret = PrepareScript(uri, cx, JS_IsGlobalObject(targetObj), uriStr, buf.get(),
|
JSScript* ret = PrepareScript(uri, cx, JS_IsGlobalObject(targetObj), uriStr,
|
||||||
len, wantReturnValue);
|
buf.get(), len, wantReturnValue);
|
||||||
if (!ret) {
|
if (!ret) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
@@ -472,8 +474,9 @@ nsresult mozJSSubScriptLoader::DoLoadSubScriptWithOptions(
|
|||||||
// |back there.
|
// |back there.
|
||||||
cache = nullptr;
|
cache = nullptr;
|
||||||
} else {
|
} else {
|
||||||
if (!ReadScript(&script, uri, cx, targetObj, static_cast<const char*>(uriStr.get()),
|
if (!ReadScript(&script, uri, cx, targetObj,
|
||||||
serv, options.wantReturnValue, useCompilationScope)) {
|
static_cast<const char*>(uriStr.get()), serv,
|
||||||
|
options.wantReturnValue, useCompilationScope)) {
|
||||||
return NS_OK;
|
return NS_OK;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -31,10 +31,10 @@ class mozJSSubScriptLoader : public mozIJSSubScriptLoader {
|
|||||||
private:
|
private:
|
||||||
virtual ~mozJSSubScriptLoader();
|
virtual ~mozJSSubScriptLoader();
|
||||||
|
|
||||||
bool ReadScript(JS::MutableHandle<JSScript*> script,
|
bool ReadScript(JS::MutableHandle<JSScript*> script, nsIURI* uri,
|
||||||
nsIURI* uri, JSContext* cx, JS::HandleObject targetObj,
|
JSContext* cx, JS::HandleObject targetObj, const char* uriStr,
|
||||||
const char* uriStr, nsIIOService* serv,
|
nsIIOService* serv, bool wantReturnValue,
|
||||||
bool wantReturnValue, bool useCompilationScope);
|
bool useCompilationScope);
|
||||||
|
|
||||||
nsresult ReadScriptAsync(nsIURI* uri, JS::HandleObject targetObj,
|
nsresult ReadScriptAsync(nsIURI* uri, JS::HandleObject targetObj,
|
||||||
JS::HandleObject loadScope, nsIIOService* serv,
|
JS::HandleObject loadScope, nsIIOService* serv,
|
||||||
|
|||||||
@@ -1617,23 +1617,27 @@ inline nsLineList_const_iterator& nsLineList_const_iterator::operator=(
|
|||||||
ASSIGN_FROM(aOther)
|
ASSIGN_FROM(aOther)
|
||||||
}
|
}
|
||||||
|
|
||||||
inline nsLineList_const_reverse_iterator& nsLineList_const_reverse_iterator::
|
inline nsLineList_const_reverse_iterator&
|
||||||
operator=(const nsLineList_iterator& aOther) {
|
nsLineList_const_reverse_iterator::operator=(
|
||||||
|
const nsLineList_iterator& aOther) {
|
||||||
ASSIGN_FROM(aOther)
|
ASSIGN_FROM(aOther)
|
||||||
}
|
}
|
||||||
|
|
||||||
inline nsLineList_const_reverse_iterator& nsLineList_const_reverse_iterator::
|
inline nsLineList_const_reverse_iterator&
|
||||||
operator=(const nsLineList_reverse_iterator& aOther) {
|
nsLineList_const_reverse_iterator::operator=(
|
||||||
|
const nsLineList_reverse_iterator& aOther) {
|
||||||
ASSIGN_FROM(aOther)
|
ASSIGN_FROM(aOther)
|
||||||
}
|
}
|
||||||
|
|
||||||
inline nsLineList_const_reverse_iterator& nsLineList_const_reverse_iterator::
|
inline nsLineList_const_reverse_iterator&
|
||||||
operator=(const nsLineList_const_iterator& aOther) {
|
nsLineList_const_reverse_iterator::operator=(
|
||||||
|
const nsLineList_const_iterator& aOther) {
|
||||||
ASSIGN_FROM(aOther)
|
ASSIGN_FROM(aOther)
|
||||||
}
|
}
|
||||||
|
|
||||||
inline nsLineList_const_reverse_iterator& nsLineList_const_reverse_iterator::
|
inline nsLineList_const_reverse_iterator&
|
||||||
operator=(const nsLineList_const_reverse_iterator& aOther) {
|
nsLineList_const_reverse_iterator::operator=(
|
||||||
|
const nsLineList_const_reverse_iterator& aOther) {
|
||||||
ASSIGN_FROM(aOther)
|
ASSIGN_FROM(aOther)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -107,7 +107,8 @@ nsresult nsMathMLmencloseFrame::AddNotation(const nsAString& aNotation) {
|
|||||||
mNotationsToDraw += NOTATION_TOP;
|
mNotationsToDraw += NOTATION_TOP;
|
||||||
} else if (aNotation.EqualsLiteral("radical")) {
|
} else if (aNotation.EqualsLiteral("radical")) {
|
||||||
if (!StaticPrefs::mathml_deprecated_menclose_notation_radical_disabled()) {
|
if (!StaticPrefs::mathml_deprecated_menclose_notation_radical_disabled()) {
|
||||||
mContent->OwnerDoc()->WarnOnceAbout(dom::Document::eMathML_DeprecatedMencloseNotationRadical);
|
mContent->OwnerDoc()->WarnOnceAbout(
|
||||||
|
dom::Document::eMathML_DeprecatedMencloseNotationRadical);
|
||||||
rv = AllocateMathMLChar(NOTATION_RADICAL);
|
rv = AllocateMathMLChar(NOTATION_RADICAL);
|
||||||
NS_ENSURE_SUCCESS(rv, rv);
|
NS_ENSURE_SUCCESS(rv, rv);
|
||||||
mNotationsToDraw += NOTATION_RADICAL;
|
mNotationsToDraw += NOTATION_RADICAL;
|
||||||
|
|||||||
@@ -135,8 +135,8 @@ class LoadInfo final : public nsILoadInfo {
|
|||||||
const Maybe<mozilla::dom::ServiceWorkerDescriptor>& aController,
|
const Maybe<mozilla::dom::ServiceWorkerDescriptor>& aController,
|
||||||
nsSecurityFlags aSecurityFlags,
|
nsSecurityFlags aSecurityFlags,
|
||||||
nsContentPolicyType aContentPolicyType, LoadTainting aTainting,
|
nsContentPolicyType aContentPolicyType, LoadTainting aTainting,
|
||||||
bool aBlockAllMixedContent,
|
bool aBlockAllMixedContent, bool aUpgradeInsecureRequests,
|
||||||
bool aUpgradeInsecureRequests, bool aBrowserUpgradeInsecureRequests,
|
bool aBrowserUpgradeInsecureRequests,
|
||||||
bool aBrowserWouldUpgradeInsecureRequests, bool aForceAllowDataURI,
|
bool aBrowserWouldUpgradeInsecureRequests, bool aForceAllowDataURI,
|
||||||
bool aAllowInsecureRedirectToDataURI, bool aBypassCORSChecks,
|
bool aAllowInsecureRedirectToDataURI, bool aBypassCORSChecks,
|
||||||
bool aSkipContentPolicyCheckForWebRequest,
|
bool aSkipContentPolicyCheckForWebRequest,
|
||||||
|
|||||||
@@ -23,9 +23,7 @@ class FuzzingStreamListener final : public nsIStreamListener {
|
|||||||
SpinEventLoopUntil([&]() { return mChannelDone; });
|
SpinEventLoopUntil([&]() { return mChannelDone; });
|
||||||
}
|
}
|
||||||
|
|
||||||
bool isDone() {
|
bool isDone() { return mChannelDone; }
|
||||||
return mChannelDone;
|
|
||||||
}
|
|
||||||
|
|
||||||
private:
|
private:
|
||||||
~FuzzingStreamListener() = default;
|
~FuzzingStreamListener() = default;
|
||||||
|
|||||||
@@ -354,7 +354,8 @@ TEST(TestMozURL, UrlTestData)
|
|||||||
Json::Value root;
|
Json::Value root;
|
||||||
Json::CharReaderBuilder builder;
|
Json::CharReaderBuilder builder;
|
||||||
std::unique_ptr<Json::CharReader> const reader(builder.newCharReader());
|
std::unique_ptr<Json::CharReader> const reader(builder.newCharReader());
|
||||||
ASSERT_TRUE(reader->parse(data.BeginReading(), data.EndReading(), &root, nullptr));
|
ASSERT_TRUE(
|
||||||
|
reader->parse(data.BeginReading(), data.EndReading(), &root, nullptr));
|
||||||
ASSERT_TRUE(root.isArray());
|
ASSERT_TRUE(root.isArray());
|
||||||
|
|
||||||
for (uint32_t index = 0; index < root.size(); index++) {
|
for (uint32_t index = 0; index < root.size(); index++) {
|
||||||
|
|||||||
@@ -227,8 +227,8 @@ already_AddRefed<nsIURI> GetJSValueAsURI(JSContext* aCtx,
|
|||||||
|
|
||||||
nsCOMPtr<nsIXPConnectWrappedNative> wrappedObj;
|
nsCOMPtr<nsIXPConnectWrappedNative> wrappedObj;
|
||||||
JS::Rooted<JSObject*> obj(aCtx, aValue.toObjectOrNull());
|
JS::Rooted<JSObject*> obj(aCtx, aValue.toObjectOrNull());
|
||||||
nsresult rv = xpc->GetWrappedNativeOfJSObject(aCtx, obj,
|
nsresult rv =
|
||||||
getter_AddRefs(wrappedObj));
|
xpc->GetWrappedNativeOfJSObject(aCtx, obj, getter_AddRefs(wrappedObj));
|
||||||
NS_ENSURE_SUCCESS(rv, nullptr);
|
NS_ENSURE_SUCCESS(rv, nullptr);
|
||||||
nsCOMPtr<nsIURI> uri = do_QueryInterface(wrappedObj->Native());
|
nsCOMPtr<nsIURI> uri = do_QueryInterface(wrappedObj->Native());
|
||||||
return uri.forget();
|
return uri.forget();
|
||||||
|
|||||||
@@ -67,8 +67,8 @@ static nsIFormAutoComplete* GetFormAutoComplete() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
NS_IMPL_CYCLE_COLLECTION(nsFormFillController, mController, mLoginManagerAC,
|
NS_IMPL_CYCLE_COLLECTION(nsFormFillController, mController, mLoginManagerAC,
|
||||||
mLoginReputationService, mFocusedPopup,
|
mLoginReputationService, mFocusedPopup, mPopups,
|
||||||
mPopups, mLastListener, mLastFormAutoComplete)
|
mLastListener, mLastFormAutoComplete)
|
||||||
|
|
||||||
NS_INTERFACE_MAP_BEGIN_CYCLE_COLLECTION(nsFormFillController)
|
NS_INTERFACE_MAP_BEGIN_CYCLE_COLLECTION(nsFormFillController)
|
||||||
NS_INTERFACE_MAP_ENTRY_AMBIGUOUS(nsISupports, nsIFormFillController)
|
NS_INTERFACE_MAP_ENTRY_AMBIGUOUS(nsISupports, nsIFormFillController)
|
||||||
@@ -211,7 +211,8 @@ void nsFormFillController::MaybeRemoveMutationObserver(nsINode* aNode) {
|
|||||||
NS_IMETHODIMP
|
NS_IMETHODIMP
|
||||||
nsFormFillController::AttachToDocument(Document* aDocument,
|
nsFormFillController::AttachToDocument(Document* aDocument,
|
||||||
nsIAutoCompletePopup* aPopup) {
|
nsIAutoCompletePopup* aPopup) {
|
||||||
MOZ_LOG(sLogger, LogLevel::Debug,
|
MOZ_LOG(
|
||||||
|
sLogger, LogLevel::Debug,
|
||||||
("AttachToDocument for document %p with popup %p", aDocument, aPopup));
|
("AttachToDocument for document %p with popup %p", aDocument, aPopup));
|
||||||
NS_ENSURE_TRUE(aDocument && aPopup, NS_ERROR_ILLEGAL_VALUE);
|
NS_ENSURE_TRUE(aDocument && aPopup, NS_ERROR_ILLEGAL_VALUE);
|
||||||
|
|
||||||
|
|||||||
@@ -116,7 +116,9 @@ class nsFormFillController final : public nsIFormFillController,
|
|||||||
nsINode* mListNode;
|
nsINode* mListNode;
|
||||||
nsCOMPtr<nsIAutoCompletePopup> mFocusedPopup;
|
nsCOMPtr<nsIAutoCompletePopup> mFocusedPopup;
|
||||||
|
|
||||||
nsInterfaceHashtable<nsRefPtrHashKey<mozilla::dom::Document>, nsIAutoCompletePopup> mPopups;
|
nsInterfaceHashtable<nsRefPtrHashKey<mozilla::dom::Document>,
|
||||||
|
nsIAutoCompletePopup>
|
||||||
|
mPopups;
|
||||||
|
|
||||||
// The observer passed to StartSearch. It will be notified when the search is
|
// The observer passed to StartSearch. It will be notified when the search is
|
||||||
// complete or the data from a datalist changes.
|
// complete or the data from a datalist changes.
|
||||||
|
|||||||
@@ -243,8 +243,10 @@ void MainThreadParsePersistedProbes(const nsACString& aProbeData) {
|
|||||||
ANDROID_LOG("MainThreadParsePersistedProbes");
|
ANDROID_LOG("MainThreadParsePersistedProbes");
|
||||||
|
|
||||||
// We need a JS context to run the parsing stuff in.
|
// We need a JS context to run the parsing stuff in.
|
||||||
JS::Rooted<JSObject*> cleanGlobal(mozilla::dom::RootingCx(),
|
JS::Rooted<JSObject*> cleanGlobal(
|
||||||
SimpleGlobalObject::Create(SimpleGlobalObject::GlobalType::BindingDetail));
|
mozilla::dom::RootingCx(),
|
||||||
|
SimpleGlobalObject::Create(
|
||||||
|
SimpleGlobalObject::GlobalType::BindingDetail));
|
||||||
if (!cleanGlobal) {
|
if (!cleanGlobal) {
|
||||||
ANDROID_LOG(
|
ANDROID_LOG(
|
||||||
"MainThreadParsePersistedProbes - Failed to create a JS global object");
|
"MainThreadParsePersistedProbes - Failed to create a JS global object");
|
||||||
|
|||||||
@@ -356,20 +356,18 @@ void glxtest() {
|
|||||||
|
|
||||||
int screenCount = ScreenCount(dpy);
|
int screenCount = ScreenCount(dpy);
|
||||||
int defaultScreen = DefaultScreen(dpy);
|
int defaultScreen = DefaultScreen(dpy);
|
||||||
if (screenCount != 0)
|
if (screenCount != 0) {
|
||||||
{
|
|
||||||
length += snprintf(buf + length, bufsize - length, "SCREEN_INFO\n");
|
length += snprintf(buf + length, bufsize - length, "SCREEN_INFO\n");
|
||||||
if (length >= bufsize)
|
if (length >= bufsize)
|
||||||
fatal_error("Screen Info strings length too large for buffer size");
|
fatal_error("Screen Info strings length too large for buffer size");
|
||||||
for (int idx = 0; idx < screenCount; idx++)
|
for (int idx = 0; idx < screenCount; idx++) {
|
||||||
{
|
|
||||||
Screen* scrn = ScreenOfDisplay(dpy, idx);
|
Screen* scrn = ScreenOfDisplay(dpy, idx);
|
||||||
int current_height = scrn->height;
|
int current_height = scrn->height;
|
||||||
int current_width = scrn->width;
|
int current_width = scrn->width;
|
||||||
|
|
||||||
length += snprintf(buf + length, bufsize - length, "%dx%d%s%s",
|
length +=
|
||||||
current_width, current_height,
|
snprintf(buf + length, bufsize - length, "%dx%d%s%s", current_width,
|
||||||
idx == defaultScreen ? " default" : "",
|
current_height, idx == defaultScreen ? " default" : "",
|
||||||
idx == screenCount - 1 ? ";\n" : ";");
|
idx == screenCount - 1 ? ";\n" : ";");
|
||||||
if (length >= bufsize)
|
if (length >= bufsize)
|
||||||
fatal_error("Screen Info strings length too large for buffer size");
|
fatal_error("Screen Info strings length too large for buffer size");
|
||||||
|
|||||||
@@ -296,8 +296,7 @@ void GfxInfo::GetData() {
|
|||||||
if (!screenInfo.IsEmpty()) {
|
if (!screenInfo.IsEmpty()) {
|
||||||
PRInt32 start = 0;
|
PRInt32 start = 0;
|
||||||
PRInt32 loc = screenInfo.Find(";", PR_FALSE, start);
|
PRInt32 loc = screenInfo.Find(";", PR_FALSE, start);
|
||||||
while (loc != kNotFound)
|
while (loc != kNotFound) {
|
||||||
{
|
|
||||||
nsCString line(screenInfo.get() + start, loc - start);
|
nsCString line(screenInfo.get() + start, loc - start);
|
||||||
nsString value;
|
nsString value;
|
||||||
CopyASCIItoUTF16(line, value);
|
CopyASCIItoUTF16(line, value);
|
||||||
|
|||||||
@@ -298,12 +298,12 @@ void AndroidBridge::GetExtensionFromMimeType(const nsACString& aMimeType,
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
gfx::Rect AndroidBridge::getScreenSize()
|
gfx::Rect AndroidBridge::getScreenSize() {
|
||||||
{
|
|
||||||
ALOG_BRIDGE("AndroidBridge::getScreenSize");
|
ALOG_BRIDGE("AndroidBridge::getScreenSize");
|
||||||
|
|
||||||
java::sdk::Rect::LocalRef screenrect = GeckoAppShell::GetScreenSize();
|
java::sdk::Rect::LocalRef screenrect = GeckoAppShell::GetScreenSize();
|
||||||
gfx::Rect screensize(screenrect->Left(), screenrect->Top(), screenrect->Width(), screenrect->Height());
|
gfx::Rect screensize(screenrect->Left(), screenrect->Top(),
|
||||||
|
screenrect->Width(), screenrect->Height());
|
||||||
|
|
||||||
return screensize;
|
return screensize;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -81,6 +81,7 @@ class GfxInfo : public GfxInfoBase {
|
|||||||
struct ScreenInfo {
|
struct ScreenInfo {
|
||||||
gfx::Rect mScreenDimensions;
|
gfx::Rect mScreenDimensions;
|
||||||
};
|
};
|
||||||
|
|
||||||
private:
|
private:
|
||||||
void AddCrashReportAnnotations();
|
void AddCrashReportAnnotations();
|
||||||
int32_t WebRtcHwVp8EncodeSupported();
|
int32_t WebRtcHwVp8EncodeSupported();
|
||||||
|
|||||||
@@ -228,11 +228,8 @@ GfxInfo::GetDisplayInfo(nsTArray<nsString>& aDisplayInfo) {
|
|||||||
for (NSScreen* screen in [NSScreen screens]) {
|
for (NSScreen* screen in [NSScreen screens]) {
|
||||||
NSRect rect = [screen frame];
|
NSRect rect = [screen frame];
|
||||||
nsString desc;
|
nsString desc;
|
||||||
desc.AppendPrintf(
|
desc.AppendPrintf("%dx%d scale:%f", (int32_t)rect.size.width, (int32_t)rect.size.height,
|
||||||
"%dx%d scale:%f",
|
nsCocoaUtils::GetBackingScaleFactor(screen));
|
||||||
(int32_t)rect.size.width, (int32_t)rect.size.height,
|
|
||||||
nsCocoaUtils::GetBackingScaleFactor(screen)
|
|
||||||
);
|
|
||||||
aDisplayInfo.AppendElement(desc);
|
aDisplayInfo.AppendElement(desc);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -905,11 +905,9 @@ NS_IMETHODIMP
|
|||||||
GfxInfo::GetDisplayInfo(nsTArray<nsString>& aDisplayInfo) {
|
GfxInfo::GetDisplayInfo(nsTArray<nsString>& aDisplayInfo) {
|
||||||
for (auto displayInfo : mDisplayInfo) {
|
for (auto displayInfo : mDisplayInfo) {
|
||||||
nsString value;
|
nsString value;
|
||||||
value.AppendPrintf(
|
value.AppendPrintf("%dx%d@%dHz %s", displayInfo.mScreenWidth,
|
||||||
"%dx%d@%dHz %s",
|
displayInfo.mScreenHeight, displayInfo.mRefreshRate,
|
||||||
displayInfo.mScreenWidth, displayInfo.mScreenHeight,
|
displayInfo.mIsPseudoDisplay ? "Pseudo Display" : "");
|
||||||
displayInfo.mRefreshRate, displayInfo.mIsPseudoDisplay ? "Pseudo Display" : ""
|
|
||||||
);
|
|
||||||
|
|
||||||
aDisplayInfo.AppendElement(value);
|
aDisplayInfo.AppendElement(value);
|
||||||
}
|
}
|
||||||
@@ -1800,33 +1798,36 @@ const nsTArray<GfxDriverInfo>& GfxInfo::GetGfxDriverInfo() {
|
|||||||
(nsAString&)GfxDriverInfo::GetDeviceVendor(VendorIntel),
|
(nsAString&)GfxDriverInfo::GetDeviceVendor(VendorIntel),
|
||||||
(nsAString&)GfxDriverInfo::GetDriverVendor(DriverVendorAll),
|
(nsAString&)GfxDriverInfo::GetDriverVendor(DriverVendorAll),
|
||||||
GfxDriverInfo::allDevices, nsIGfxInfo::FEATURE_WEBRENDER,
|
GfxDriverInfo::allDevices, nsIGfxInfo::FEATURE_WEBRENDER,
|
||||||
nsIGfxInfo::FEATURE_BLOCKED_DRIVER_VERSION,
|
nsIGfxInfo::FEATURE_BLOCKED_DRIVER_VERSION, DRIVER_BETWEEN_INCLUSIVE,
|
||||||
DRIVER_BETWEEN_INCLUSIVE, V(10, 18, 15, 4256), V(10, 18, 15, 4281),
|
V(10, 18, 15, 4256), V(10, 18, 15, 4281),
|
||||||
"FEATURE_FAILURE_WEBRENDER_INTEL_BAD_DRIVER", "Intel driver >= 21.20.16.4590");
|
"FEATURE_FAILURE_WEBRENDER_INTEL_BAD_DRIVER",
|
||||||
|
"Intel driver >= 21.20.16.4590");
|
||||||
APPEND_TO_DRIVER_BLOCKLIST_RANGE(
|
APPEND_TO_DRIVER_BLOCKLIST_RANGE(
|
||||||
OperatingSystem::Windows,
|
OperatingSystem::Windows,
|
||||||
(nsAString&)GfxDriverInfo::GetDeviceVendor(VendorIntel),
|
(nsAString&)GfxDriverInfo::GetDeviceVendor(VendorIntel),
|
||||||
(nsAString&)GfxDriverInfo::GetDriverVendor(DriverVendorAll),
|
(nsAString&)GfxDriverInfo::GetDriverVendor(DriverVendorAll),
|
||||||
GfxDriverInfo::allDevices, nsIGfxInfo::FEATURE_WEBRENDER,
|
GfxDriverInfo::allDevices, nsIGfxInfo::FEATURE_WEBRENDER,
|
||||||
nsIGfxInfo::FEATURE_BLOCKED_DRIVER_VERSION,
|
nsIGfxInfo::FEATURE_BLOCKED_DRIVER_VERSION, DRIVER_BETWEEN_INCLUSIVE,
|
||||||
DRIVER_BETWEEN_INCLUSIVE, V(20, 19, 15, 4285), V(20, 19, 15, 4835),
|
V(20, 19, 15, 4285), V(20, 19, 15, 4835),
|
||||||
"FEATURE_FAILURE_WEBRENDER_INTEL_BAD_DRIVER", "Intel driver >= 21.20.16.4590");
|
"FEATURE_FAILURE_WEBRENDER_INTEL_BAD_DRIVER",
|
||||||
|
"Intel driver >= 21.20.16.4590");
|
||||||
APPEND_TO_DRIVER_BLOCKLIST_RANGE(
|
APPEND_TO_DRIVER_BLOCKLIST_RANGE(
|
||||||
OperatingSystem::Windows,
|
OperatingSystem::Windows,
|
||||||
(nsAString&)GfxDriverInfo::GetDeviceVendor(VendorIntel),
|
(nsAString&)GfxDriverInfo::GetDeviceVendor(VendorIntel),
|
||||||
(nsAString&)GfxDriverInfo::GetDriverVendor(DriverVendorAll),
|
(nsAString&)GfxDriverInfo::GetDriverVendor(DriverVendorAll),
|
||||||
GfxDriverInfo::allDevices, nsIGfxInfo::FEATURE_WEBRENDER,
|
GfxDriverInfo::allDevices, nsIGfxInfo::FEATURE_WEBRENDER,
|
||||||
nsIGfxInfo::FEATURE_BLOCKED_DRIVER_VERSION,
|
nsIGfxInfo::FEATURE_BLOCKED_DRIVER_VERSION, DRIVER_BETWEEN_INCLUSIVE,
|
||||||
DRIVER_BETWEEN_INCLUSIVE, V(21, 20, 16, 4471), V(21, 20, 16, 4565),
|
V(21, 20, 16, 4471), V(21, 20, 16, 4565),
|
||||||
"FEATURE_FAILURE_WEBRENDER_INTEL_BAD_DRIVER", "Intel driver >= 21.20.16.4590");
|
"FEATURE_FAILURE_WEBRENDER_INTEL_BAD_DRIVER",
|
||||||
|
"Intel driver >= 21.20.16.4590");
|
||||||
#else
|
#else
|
||||||
APPEND_TO_DRIVER_BLOCKLIST2(
|
APPEND_TO_DRIVER_BLOCKLIST2(
|
||||||
OperatingSystem::Windows,
|
OperatingSystem::Windows,
|
||||||
(nsAString&)GfxDriverInfo::GetDeviceVendor(VendorIntel),
|
(nsAString&)GfxDriverInfo::GetDeviceVendor(VendorIntel),
|
||||||
(nsAString&)GfxDriverInfo::GetDriverVendor(DriverVendorAll),
|
(nsAString&)GfxDriverInfo::GetDriverVendor(DriverVendorAll),
|
||||||
GfxDriverInfo::allDevices, nsIGfxInfo::FEATURE_WEBRENDER,
|
GfxDriverInfo::allDevices, nsIGfxInfo::FEATURE_WEBRENDER,
|
||||||
nsIGfxInfo::FEATURE_BLOCKED_DRIVER_VERSION,
|
nsIGfxInfo::FEATURE_BLOCKED_DRIVER_VERSION, DRIVER_LESS_THAN,
|
||||||
DRIVER_LESS_THAN, V(21, 20, 16, 4590), "Intel driver >= 21.20.16.4590");
|
V(21, 20, 16, 4590), "Intel driver >= 21.20.16.4590");
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
return *sDriverInfo;
|
return *sDriverInfo;
|
||||||
@@ -1908,16 +1909,20 @@ nsresult GfxInfo::FindMonitors(JSContext* aCx, JS::HandleObject aOutArray) {
|
|||||||
for (auto displayInfo : mDisplayInfo) {
|
for (auto displayInfo : mDisplayInfo) {
|
||||||
JS::Rooted<JSObject*> obj(aCx, JS_NewPlainObject(aCx));
|
JS::Rooted<JSObject*> obj(aCx, JS_NewPlainObject(aCx));
|
||||||
|
|
||||||
JS::Rooted<JS::Value> screenWidth(aCx, JS::Int32Value(displayInfo.mScreenWidth));
|
JS::Rooted<JS::Value> screenWidth(aCx,
|
||||||
|
JS::Int32Value(displayInfo.mScreenWidth));
|
||||||
JS_SetProperty(aCx, obj, "screenWidth", screenWidth);
|
JS_SetProperty(aCx, obj, "screenWidth", screenWidth);
|
||||||
|
|
||||||
JS::Rooted<JS::Value> screenHeight(aCx, JS::Int32Value(displayInfo.mScreenHeight));
|
JS::Rooted<JS::Value> screenHeight(
|
||||||
|
aCx, JS::Int32Value(displayInfo.mScreenHeight));
|
||||||
JS_SetProperty(aCx, obj, "screenHeight", screenHeight);
|
JS_SetProperty(aCx, obj, "screenHeight", screenHeight);
|
||||||
|
|
||||||
JS::Rooted<JS::Value> refreshRate(aCx, JS::Int32Value(displayInfo.mRefreshRate));
|
JS::Rooted<JS::Value> refreshRate(aCx,
|
||||||
|
JS::Int32Value(displayInfo.mRefreshRate));
|
||||||
JS_SetProperty(aCx, obj, "refreshRate", refreshRate);
|
JS_SetProperty(aCx, obj, "refreshRate", refreshRate);
|
||||||
|
|
||||||
JS::Rooted<JS::Value> pseudoDisplay(aCx, JS::BooleanValue(displayInfo.mIsPseudoDisplay));
|
JS::Rooted<JS::Value> pseudoDisplay(
|
||||||
|
aCx, JS::BooleanValue(displayInfo.mIsPseudoDisplay));
|
||||||
JS_SetProperty(aCx, obj, "pseudoDisplay", pseudoDisplay);
|
JS_SetProperty(aCx, obj, "pseudoDisplay", pseudoDisplay);
|
||||||
|
|
||||||
JS::Rooted<JS::Value> element(aCx, JS::ObjectValue(*obj));
|
JS::Rooted<JS::Value> element(aCx, JS::ObjectValue(*obj));
|
||||||
|
|||||||
Reference in New Issue
Block a user