зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1519636 - Reformat recent changes to the Google coding style r=Ehsan
# ignore-this-changeset Differential Revision: https://phabricator.services.mozilla.com/D30883 --HG-- extra : moz-landing-system : lando
This commit is contained in:
Родитель
a1552ab73e
Коммит
d57d4905f1
|
@ -338,7 +338,8 @@ uint64_t HTMLTextFieldAccessible::NativeState() const {
|
|||
return state | states::SUPPORTS_AUTOCOMPLETION | states::HASPOPUP;
|
||||
|
||||
// Ordinal XUL textboxes don't support autocomplete.
|
||||
if (!BindingOrWidgetParent() && Preferences::GetBool("browser.formfill.enable")) {
|
||||
if (!BindingOrWidgetParent() &&
|
||||
Preferences::GetBool("browser.formfill.enable")) {
|
||||
// Check to see if autocompletion is allowed on this input. We don't expose
|
||||
// it for password fields even though the entire password can be remembered
|
||||
// for a page if the user asks it to be. However, the kind of autocomplete
|
||||
|
|
|
@ -102,7 +102,7 @@ class HTMLTextFieldAccessible final : public HyperTextAccessibleWrap {
|
|||
* HTML:input@type="number".
|
||||
*/
|
||||
nsIContent* BindingOrWidgetParent() const {
|
||||
nsIContent * el = mContent->GetBindingParent();
|
||||
nsIContent* el = mContent->GetBindingParent();
|
||||
if (el) {
|
||||
return el;
|
||||
}
|
||||
|
|
|
@ -176,11 +176,11 @@ static mozilla::Maybe<bool> RunAsLauncherProcess(int& argc, wchar_t** argv) {
|
|||
bool runAsLauncher = DoLauncherProcessChecks(argc, argv);
|
||||
|
||||
#if defined(MOZ_LAUNCHER_PROCESS)
|
||||
bool forceLauncher = runAsLauncher &&
|
||||
mozilla::CheckArg(argc, argv, L"force-launcher",
|
||||
static_cast<const wchar_t**>(nullptr),
|
||||
mozilla::CheckArgFlag::RemoveArg) ==
|
||||
mozilla::ARG_FOUND;
|
||||
bool forceLauncher =
|
||||
runAsLauncher &&
|
||||
mozilla::CheckArg(argc, argv, L"force-launcher",
|
||||
static_cast<const wchar_t**>(nullptr),
|
||||
mozilla::CheckArgFlag::RemoveArg) == mozilla::ARG_FOUND;
|
||||
|
||||
mozilla::LauncherRegistryInfo::ProcessType desiredType =
|
||||
runAsLauncher ? mozilla::LauncherRegistryInfo::ProcessType::Launcher
|
||||
|
|
|
@ -49,8 +49,7 @@ NS_IMPL_CI_INTERFACE_GETTER(ContentPrincipal, nsIPrincipal, nsISerializable)
|
|||
|
||||
ContentPrincipal::ContentPrincipal() : BasePrincipal(eCodebasePrincipal) {}
|
||||
|
||||
ContentPrincipal::~ContentPrincipal() {
|
||||
}
|
||||
ContentPrincipal::~ContentPrincipal() {}
|
||||
|
||||
nsresult ContentPrincipal::Init(nsIURI* aCodebase,
|
||||
const OriginAttributes& aOriginAttributes,
|
||||
|
|
|
@ -810,9 +810,9 @@ void BrowsingContext::Transaction::Apply(BrowsingContext* aBrowsingContext,
|
|||
}
|
||||
|
||||
BrowsingContext::IPCInitializer BrowsingContext::GetIPCInitializer() {
|
||||
MOZ_ASSERT(
|
||||
!mozilla::Preferences::GetBool("fission.preserve_browsing_contexts", false) ||
|
||||
IsContent());
|
||||
MOZ_ASSERT(!mozilla::Preferences::GetBool(
|
||||
"fission.preserve_browsing_contexts", false) ||
|
||||
IsContent());
|
||||
|
||||
IPCInitializer init;
|
||||
init.mId = Id();
|
||||
|
|
|
@ -766,24 +766,24 @@ class nsDocShell final : public nsDocLoader,
|
|||
BFCACHE_SUCCESS,
|
||||
UNLOAD = mozilla::dom::BFCacheStatus::UNLOAD_LISTENER,
|
||||
UNLOAD_REQUEST = mozilla::dom::BFCacheStatus::UNLOAD_LISTENER |
|
||||
mozilla::dom::BFCacheStatus::REQUEST,
|
||||
mozilla::dom::BFCacheStatus::REQUEST,
|
||||
REQUEST = mozilla::dom::BFCacheStatus::REQUEST,
|
||||
UNLOAD_REQUEST_PEER = mozilla::dom::BFCacheStatus::UNLOAD_LISTENER |
|
||||
mozilla::dom::BFCacheStatus::REQUEST |
|
||||
mozilla::dom::BFCacheStatus::ACTIVE_PEER_CONNECTION,
|
||||
UNLOAD_REQUEST_PEER_MSE =
|
||||
mozilla::dom::BFCacheStatus::UNLOAD_LISTENER |
|
||||
mozilla::dom::BFCacheStatus::REQUEST |
|
||||
mozilla::dom::BFCacheStatus::ACTIVE_PEER_CONNECTION |
|
||||
mozilla::dom::BFCacheStatus::CONTAINS_MSE_CONTENT,
|
||||
mozilla::dom::BFCacheStatus::UNLOAD_LISTENER |
|
||||
mozilla::dom::BFCacheStatus::REQUEST |
|
||||
mozilla::dom::BFCacheStatus::ACTIVE_PEER_CONNECTION |
|
||||
mozilla::dom::BFCacheStatus::CONTAINS_MSE_CONTENT,
|
||||
UNLOAD_REQUEST_MSE = mozilla::dom::BFCacheStatus::UNLOAD_LISTENER |
|
||||
mozilla::dom::BFCacheStatus::REQUEST |
|
||||
mozilla::dom::BFCacheStatus::CONTAINS_MSE_CONTENT,
|
||||
SUSPENDED_UNLOAD_REQUEST_PEER =
|
||||
mozilla::dom::BFCacheStatus::SUSPENDED |
|
||||
mozilla::dom::BFCacheStatus::UNLOAD_LISTENER |
|
||||
mozilla::dom::BFCacheStatus::REQUEST |
|
||||
mozilla::dom::BFCacheStatus::ACTIVE_PEER_CONNECTION,
|
||||
mozilla::dom::BFCacheStatus::SUSPENDED |
|
||||
mozilla::dom::BFCacheStatus::UNLOAD_LISTENER |
|
||||
mozilla::dom::BFCacheStatus::REQUEST |
|
||||
mozilla::dom::BFCacheStatus::ACTIVE_PEER_CONNECTION,
|
||||
};
|
||||
|
||||
void ReportBFCacheComboTelemetry(uint16_t aCombo);
|
||||
|
|
|
@ -7027,7 +7027,7 @@ static Maybe<LayoutDeviceToScreenScale> ParseScaleString(
|
|||
}
|
||||
|
||||
Maybe<LayoutDeviceToScreenScale> Document::ParseScaleInHeader(
|
||||
nsAtom* aHeaderField) {
|
||||
nsAtom* aHeaderField) {
|
||||
MOZ_ASSERT(aHeaderField == nsGkAtoms::viewport_initial_scale ||
|
||||
aHeaderField == nsGkAtoms::viewport_maximum_scale ||
|
||||
aHeaderField == nsGkAtoms::viewport_minimum_scale);
|
||||
|
|
|
@ -280,7 +280,7 @@ void ResizeObserverEntry::SetContentRectAndSize(const nsSize& aSize) {
|
|||
nsIFrame* frame = mTarget->GetPrimaryFrame();
|
||||
|
||||
// 1. Update mContentRect.
|
||||
nsMargin padding = frame ? frame->GetUsedPadding(): nsMargin();
|
||||
nsMargin padding = frame ? frame->GetUsedPadding() : nsMargin();
|
||||
// Per the spec, we need to use the top-left padding offset as the origin of
|
||||
// our contentRect.
|
||||
nsRect rect(nsPoint(padding.left, padding.top), aSize);
|
||||
|
|
|
@ -59,8 +59,9 @@ void ResizeObserverNotificationHelper::Unregister() {
|
|||
}
|
||||
|
||||
nsRefreshDriver* refreshDriver = GetRefreshDriver();
|
||||
MOZ_RELEASE_ASSERT(refreshDriver,
|
||||
"We should not leave a dangling reference to the observer around");
|
||||
MOZ_RELEASE_ASSERT(
|
||||
refreshDriver,
|
||||
"We should not leave a dangling reference to the observer around");
|
||||
|
||||
bool rv = refreshDriver->RemoveRefreshObserver(this, FlushType::Display);
|
||||
MOZ_DIAGNOSTIC_ASSERT(rv, "Should remove the observer successfully");
|
||||
|
|
|
@ -13,9 +13,10 @@ namespace mozilla {
|
|||
namespace dom {
|
||||
|
||||
SerializedStackHolder::SerializedStackHolder()
|
||||
: mHolder(StructuredCloneHolder::CloningSupported,
|
||||
StructuredCloneHolder::TransferringNotSupported,
|
||||
StructuredCloneHolder::StructuredCloneScope::SameProcessDifferentThread) {}
|
||||
: mHolder(StructuredCloneHolder::CloningSupported,
|
||||
StructuredCloneHolder::TransferringNotSupported,
|
||||
StructuredCloneHolder::StructuredCloneScope::
|
||||
SameProcessDifferentThread) {}
|
||||
|
||||
void SerializedStackHolder::WriteStack(JSContext* aCx,
|
||||
JS::HandleObject aStack) {
|
||||
|
@ -37,8 +38,8 @@ void SerializedStackHolder::SerializeWorkerStack(JSContext* aCx,
|
|||
JS::HandleObject aStack) {
|
||||
MOZ_ASSERT(aWorkerPrivate->IsOnCurrentThread());
|
||||
|
||||
RefPtr<StrongWorkerRef> workerRef = StrongWorkerRef::Create(
|
||||
aWorkerPrivate, "WorkerErrorReport");
|
||||
RefPtr<StrongWorkerRef> workerRef =
|
||||
StrongWorkerRef::Create(aWorkerPrivate, "WorkerErrorReport");
|
||||
if (workerRef) {
|
||||
mWorkerRef = new ThreadSafeWorkerRef(workerRef);
|
||||
} else {
|
||||
|
@ -78,8 +79,7 @@ JSObject* SerializedStackHolder::ReadStack(JSContext* aCx) {
|
|||
}
|
||||
|
||||
JS::RootedValue stackValue(aCx);
|
||||
mHolder.Read(xpc::CurrentNativeGlobal(aCx), aCx, &stackValue,
|
||||
IgnoreErrors());
|
||||
mHolder.Read(xpc::CurrentNativeGlobal(aCx), aCx, &stackValue, IgnoreErrors());
|
||||
return stackValue.isObject() ? &stackValue.toObject() : nullptr;
|
||||
}
|
||||
|
||||
|
@ -92,8 +92,8 @@ UniquePtr<SerializedStackHolder> GetCurrentStackForNetMonitor(JSContext* aCx) {
|
|||
return stack;
|
||||
}
|
||||
|
||||
void NotifyNetworkMonitorAlternateStack(nsISupports* aChannel,
|
||||
UniquePtr<SerializedStackHolder> aStackHolder) {
|
||||
void NotifyNetworkMonitorAlternateStack(
|
||||
nsISupports* aChannel, UniquePtr<SerializedStackHolder> aStackHolder) {
|
||||
if (!aStackHolder) {
|
||||
return;
|
||||
}
|
||||
|
@ -121,8 +121,8 @@ void ConvertSerializedStackToJSON(UniquePtr<SerializedStackHolder> aStackHolder,
|
|||
}
|
||||
|
||||
JS::RootedObject converted(cx);
|
||||
converted = JS::ConvertSavedFrameToPlainObject(cx, savedFrame,
|
||||
JS::SavedFrameSelfHosted::Exclude);
|
||||
converted = JS::ConvertSavedFrameToPlainObject(
|
||||
cx, savedFrame, JS::SavedFrameSelfHosted::Exclude);
|
||||
if (!converted) {
|
||||
JS_ClearPendingException(cx);
|
||||
return;
|
||||
|
|
|
@ -59,8 +59,8 @@ UniquePtr<SerializedStackHolder> GetCurrentStackForNetMonitor(JSContext* aCx);
|
|||
// thread. This call is synchronous, and aChannel and aStackHolder will not be
|
||||
// used afterward. aChannel is an nsISupports object because this can be used
|
||||
// with either nsIChannel or nsIWebSocketChannel.
|
||||
void NotifyNetworkMonitorAlternateStack(nsISupports* aChannel,
|
||||
UniquePtr<SerializedStackHolder> aStackHolder);
|
||||
void NotifyNetworkMonitorAlternateStack(
|
||||
nsISupports* aChannel, UniquePtr<SerializedStackHolder> aStackHolder);
|
||||
|
||||
// Read back the saved frame stack and store it in a string as JSON.
|
||||
// This must be called on the main thread.
|
||||
|
|
|
@ -81,13 +81,11 @@ void TabGroup::EnsureThrottledEventQueues() {
|
|||
for (size_t i = 0; i < size_t(TaskCategory::Count); i++) {
|
||||
TaskCategory category = static_cast<TaskCategory>(i);
|
||||
if (category == TaskCategory::Worker) {
|
||||
mEventTargets[i] =
|
||||
ThrottledEventQueue::Create(mEventTargets[i],
|
||||
"TabGroup worker queue");
|
||||
mEventTargets[i] = ThrottledEventQueue::Create(mEventTargets[i],
|
||||
"TabGroup worker queue");
|
||||
} else if (category == TaskCategory::Timer) {
|
||||
mEventTargets[i] =
|
||||
ThrottledEventQueue::Create(mEventTargets[i],
|
||||
"TabGroup timer queue");
|
||||
ThrottledEventQueue::Create(mEventTargets[i], "TabGroup timer queue");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -4180,10 +4180,9 @@ void nsContentUtils::RequestFrameFocus(Element& aFrameElement, bool aCanRaise) {
|
|||
RefPtr<Element> target = &aFrameElement;
|
||||
bool defaultAction = true;
|
||||
if (aCanRaise) {
|
||||
DispatchEventOnlyToChrome(target->OwnerDoc(), target,
|
||||
NS_LITERAL_STRING("framefocusrequested"),
|
||||
CanBubble::eYes, Cancelable::eYes,
|
||||
&defaultAction);
|
||||
DispatchEventOnlyToChrome(
|
||||
target->OwnerDoc(), target, NS_LITERAL_STRING("framefocusrequested"),
|
||||
CanBubble::eYes, Cancelable::eYes, &defaultAction);
|
||||
}
|
||||
if (!defaultAction) {
|
||||
return;
|
||||
|
|
|
@ -142,7 +142,9 @@ mozilla::dom::Nullable<uint16_t> nsDOMDataChannel::GetMaxRetransmits() const {
|
|||
return mDataChannel->GetMaxRetransmits();
|
||||
}
|
||||
|
||||
bool nsDOMDataChannel::Negotiated() const { return mDataChannel->GetNegotiated(); }
|
||||
bool nsDOMDataChannel::Negotiated() const {
|
||||
return mDataChannel->GetNegotiated();
|
||||
}
|
||||
|
||||
bool nsDOMDataChannel::Ordered() const { return mDataChannel->GetOrdered(); }
|
||||
|
||||
|
|
|
@ -617,19 +617,20 @@ nsresult nsDocumentEncoder::SerializeNodeStart(nsINode& aOriginalNode,
|
|||
return rv;
|
||||
}
|
||||
Element* originalElement = aOriginalNode.AsElement();
|
||||
rv = mSerializer->AppendElementStart(node->AsElement(), originalElement, aStr);
|
||||
rv = mSerializer->AppendElementStart(node->AsElement(), originalElement,
|
||||
aStr);
|
||||
return rv;
|
||||
}
|
||||
|
||||
switch (node->NodeType()) {
|
||||
case nsINode::TEXT_NODE: {
|
||||
rv = mSerializer->AppendText(static_cast<nsIContent*>(node), aStartOffset,
|
||||
aEndOffset, aStr);
|
||||
aEndOffset, aStr);
|
||||
break;
|
||||
}
|
||||
case nsINode::CDATA_SECTION_NODE: {
|
||||
rv = mSerializer->AppendCDATASection(static_cast<nsIContent*>(node),
|
||||
aStartOffset, aEndOffset, aStr);
|
||||
aStartOffset, aEndOffset, aStr);
|
||||
break;
|
||||
}
|
||||
case nsINode::PROCESSING_INSTRUCTION_NODE: {
|
||||
|
@ -640,7 +641,7 @@ nsresult nsDocumentEncoder::SerializeNodeStart(nsINode& aOriginalNode,
|
|||
}
|
||||
case nsINode::COMMENT_NODE: {
|
||||
rv = mSerializer->AppendComment(static_cast<Comment*>(node), aStartOffset,
|
||||
aEndOffset, aStr);
|
||||
aEndOffset, aStr);
|
||||
break;
|
||||
}
|
||||
case nsINode::DOCUMENT_TYPE_NODE: {
|
||||
|
|
|
@ -47,7 +47,8 @@ void nsFrameLoaderOwner::ChangeRemoteness(
|
|||
// Policy, do not preserve the browsing context. Otherwise, save off the
|
||||
// browsing context and use it when creating our new FrameLoader.
|
||||
if (!aOptions.mReplaceBrowsingContext && !isChromeRemoteToLocal &&
|
||||
mozilla::Preferences::GetBool("fission.preserve_browsing_contexts", false)) {
|
||||
mozilla::Preferences::GetBool("fission.preserve_browsing_contexts",
|
||||
false)) {
|
||||
bc = mFrameLoader->GetBrowsingContext();
|
||||
mFrameLoader->SkipBrowsingContextDetach();
|
||||
}
|
||||
|
|
|
@ -231,9 +231,7 @@ class nsGlobalWindowOuter final : public mozilla::dom::EventTarget,
|
|||
}
|
||||
|
||||
// nsIGlobalJSObjectHolder
|
||||
JSObject* GetGlobalJSObject() final {
|
||||
return GetWrapper();
|
||||
}
|
||||
JSObject* GetGlobalJSObject() final { return GetWrapper(); }
|
||||
JSObject* GetGlobalJSObjectPreserveColor() const final {
|
||||
return GetWrapperPreserveColor();
|
||||
}
|
||||
|
|
|
@ -134,8 +134,8 @@ void WebGLShader::CompileShader() {
|
|||
PrintLongString(mCleanSource.BeginReading(), mCleanSource.Length());
|
||||
}
|
||||
|
||||
const bool success = Translate(mCleanSource, mValidator.get(), &mValidationLog,
|
||||
&mTranslatedSource);
|
||||
const bool success = Translate(mCleanSource, mValidator.get(),
|
||||
&mValidationLog, &mTranslatedSource);
|
||||
|
||||
if (MOZ_UNLIKELY(kDumpShaders)) {
|
||||
printf_stderr("\n==== \\/ \\/ \\/ ====\n");
|
||||
|
|
|
@ -16,9 +16,10 @@ namespace mozilla {
|
|||
namespace webgl {
|
||||
|
||||
class ShaderValidator final {
|
||||
public:
|
||||
public:
|
||||
const ShHandle mHandle;
|
||||
private:
|
||||
|
||||
private:
|
||||
const ShCompileOptions mCompileOptions;
|
||||
const int mMaxVaryingVectors;
|
||||
bool mHasRun;
|
||||
|
|
|
@ -518,8 +518,8 @@ void PointerEventHandler::DispatchPointerFromMouseOrTouch(
|
|||
break;
|
||||
case eMouseDown:
|
||||
pointerMessage =
|
||||
mouseEvent->mButtons &
|
||||
~nsContentUtils::GetButtonsFlagForButton(mouseEvent->mButton)
|
||||
mouseEvent->mButtons & ~nsContentUtils::GetButtonsFlagForButton(
|
||||
mouseEvent->mButton)
|
||||
? ePointerMove
|
||||
: ePointerDown;
|
||||
break;
|
||||
|
|
|
@ -55,9 +55,7 @@ class BrowserHost : public RemoteBrowser,
|
|||
ContentParent* GetContentParent() const {
|
||||
return mRoot ? mRoot->Manager() : nullptr;
|
||||
}
|
||||
TabId GetTabId() const {
|
||||
return mId;
|
||||
}
|
||||
TabId GetTabId() const { return mId; }
|
||||
|
||||
BrowserHost* AsBrowserHost() override { return this; }
|
||||
BrowserBridgeHost* AsBrowserBridgeHost() override { return nullptr; }
|
||||
|
|
|
@ -161,17 +161,17 @@ NS_IMETHODIMP RemoteWebProgressRequest::GetMatchedFullHash(
|
|||
}
|
||||
|
||||
NS_IMETHODIMP RemoteWebProgressRequest::SetMatchedTrackingInfo(
|
||||
const nsTArray<nsCString> &aLists, const nsTArray<nsCString> &aFullHashes) {
|
||||
const nsTArray<nsCString>& aLists, const nsTArray<nsCString>& aFullHashes) {
|
||||
return NS_ERROR_NOT_IMPLEMENTED;
|
||||
}
|
||||
|
||||
NS_IMETHODIMP RemoteWebProgressRequest::GetMatchedTrackingLists(
|
||||
nsTArray<nsCString> &aLists) {
|
||||
nsTArray<nsCString>& aLists) {
|
||||
return NS_ERROR_NOT_IMPLEMENTED;
|
||||
}
|
||||
|
||||
NS_IMETHODIMP RemoteWebProgressRequest::GetMatchedTrackingFullHashes(
|
||||
nsTArray<nsCString> &aFullHashes) {
|
||||
nsTArray<nsCString>& aFullHashes) {
|
||||
return NS_ERROR_NOT_IMPLEMENTED;
|
||||
}
|
||||
// nsIRequest methods
|
||||
|
|
|
@ -974,10 +974,14 @@ long AudioCallbackDriver::DataCallback(const AudioDataValue* aInputBuffer,
|
|||
|
||||
static const char* StateToString(cubeb_state aState) {
|
||||
switch (aState) {
|
||||
case CUBEB_STATE_STARTED: return "STARTED";
|
||||
case CUBEB_STATE_STOPPED: return "STOPPED";
|
||||
case CUBEB_STATE_DRAINED: return "DRAINED";
|
||||
case CUBEB_STATE_ERROR: return "ERROR";
|
||||
case CUBEB_STATE_STARTED:
|
||||
return "STARTED";
|
||||
case CUBEB_STATE_STOPPED:
|
||||
return "STOPPED";
|
||||
case CUBEB_STATE_DRAINED:
|
||||
return "DRAINED";
|
||||
case CUBEB_STATE_ERROR:
|
||||
return "ERROR";
|
||||
default:
|
||||
MOZ_CRASH("Unexpected state!");
|
||||
}
|
||||
|
@ -985,7 +989,8 @@ static const char* StateToString(cubeb_state aState) {
|
|||
|
||||
void AudioCallbackDriver::StateCallback(cubeb_state aState) {
|
||||
MOZ_ASSERT(!OnGraphThread());
|
||||
LOG(LogLevel::Debug, ("AudioCallbackDriver State: %s", StateToString(aState)));
|
||||
LOG(LogLevel::Debug,
|
||||
("AudioCallbackDriver State: %s", StateToString(aState)));
|
||||
|
||||
// Clear the flag for the not running
|
||||
// states: stopped, drained, error.
|
||||
|
|
|
@ -16,7 +16,7 @@
|
|||
#include "MediaInfo.h"
|
||||
#include "VPXDecoder.h"
|
||||
#include "gfxPrefs.h"
|
||||
#include "nsIXULRuntime.h" // for BrowserTabsRemoteAutostart
|
||||
#include "nsIXULRuntime.h" // for BrowserTabsRemoteAutostart
|
||||
#include "mozilla/CDMProxy.h"
|
||||
#include "mozilla/ClearOnShutdown.h"
|
||||
#include "mozilla/GpuDecoderModule.h"
|
||||
|
@ -345,8 +345,7 @@ void PDMFactory::CreatePDMs() {
|
|||
return;
|
||||
}
|
||||
|
||||
if (StaticPrefs::MediaRddProcessEnabled()
|
||||
&& BrowserTabsRemoteAutostart()) {
|
||||
if (StaticPrefs::MediaRddProcessEnabled() && BrowserTabsRemoteAutostart()) {
|
||||
m = new RemoteDecoderModule;
|
||||
StartupPDM(m);
|
||||
}
|
||||
|
|
|
@ -26,8 +26,7 @@ bool AgnosticDecoderModule::SupportsMimeType(
|
|||
VPXDecoder::IsVPX(aMimeType) || OpusDataDecoder::IsOpus(aMimeType) ||
|
||||
WaveDataDecoder::IsWave(aMimeType) || TheoraDecoder::IsTheora(aMimeType);
|
||||
if (!StaticPrefs::MediaRddVorbisEnabled() ||
|
||||
!StaticPrefs::MediaRddProcessEnabled() ||
|
||||
!BrowserTabsRemoteAutostart()) {
|
||||
!StaticPrefs::MediaRddProcessEnabled() || !BrowserTabsRemoteAutostart()) {
|
||||
supports |= VorbisDataDecoder::IsVorbis(aMimeType);
|
||||
}
|
||||
#ifdef MOZ_AV1
|
||||
|
|
|
@ -43,8 +43,7 @@ using namespace net;
|
|||
|
||||
namespace dom {
|
||||
|
||||
static void FireInteralError(TCPSocketParent* aActor,
|
||||
uint32_t aLineNo) {
|
||||
static void FireInteralError(TCPSocketParent* aActor, uint32_t aLineNo) {
|
||||
MOZ_ASSERT(aActor->IPCOpen());
|
||||
|
||||
mozilla::Unused << aActor->SendCallback(
|
||||
|
|
|
@ -66,9 +66,7 @@ struct GCPolicy<nsJSObjWrapper*> {
|
|||
(*wrapper)->trace(trc);
|
||||
}
|
||||
|
||||
static bool isValid(const nsJSObjWrapper *&wrapper) {
|
||||
return true;
|
||||
}
|
||||
static bool isValid(const nsJSObjWrapper*& wrapper) { return true; }
|
||||
};
|
||||
} // namespace JS
|
||||
|
||||
|
|
|
@ -173,7 +173,8 @@ class QuotaManager final : public BackgroundThreadObject {
|
|||
/**
|
||||
* For use when creating an origin directory. It's possible that origin usage
|
||||
* is already being tracked due to a call to EnsureQuotaForOrigin, and in that
|
||||
* case we need to update the existing OriginInfo rather than create a new one.
|
||||
* case we need to update the existing OriginInfo rather than create a new
|
||||
* one.
|
||||
*/
|
||||
void NoteOriginDirectoryCreated(PersistenceType aPersistenceType,
|
||||
const nsACString& aGroup,
|
||||
|
|
|
@ -75,8 +75,8 @@ void StorageNotifierService::Broadcast(StorageEvent* aEvent,
|
|||
|
||||
// No reasons to continue if the principal of the event doesn't match with
|
||||
// the window's one.
|
||||
if (!StorageUtils::PrincipalsEqual(aEvent->GetPrincipal(),
|
||||
observer->GetEffectiveStoragePrincipal())) {
|
||||
if (!StorageUtils::PrincipalsEqual(
|
||||
aEvent->GetPrincipal(), observer->GetEffectiveStoragePrincipal())) {
|
||||
continue;
|
||||
}
|
||||
|
||||
|
|
|
@ -165,9 +165,11 @@ class SVGPathData {
|
|||
* which is generated by cbindgen from Rust (see ServoStyleConsts.h).
|
||||
* Basically, this is a variant of the above BuildPath() functions.
|
||||
*/
|
||||
static already_AddRefed<Path> BuildPath(
|
||||
Span<const StylePathCommand> aPath, PathBuilder* aBuilder,
|
||||
uint8_t aStrokeLineCap, Float aStrokeWidth, float aZoomFactor = 1.0);
|
||||
static already_AddRefed<Path> BuildPath(Span<const StylePathCommand> aPath,
|
||||
PathBuilder* aBuilder,
|
||||
uint8_t aStrokeLineCap,
|
||||
Float aStrokeWidth,
|
||||
float aZoomFactor = 1.0);
|
||||
|
||||
const_iterator begin() const { return mData.Elements(); }
|
||||
const_iterator end() const { return mData.Elements() + mData.Length(); }
|
||||
|
|
|
@ -1649,11 +1649,11 @@ nsresult WebSocketImpl::Init(JSContext* aCx, nsIPrincipal* aLoadingPrincipal,
|
|||
return NS_OK;
|
||||
}
|
||||
|
||||
nsresult WebSocketImpl::AsyncOpen(nsIPrincipal* aPrincipal,
|
||||
uint64_t aInnerWindowID,
|
||||
nsITransportProvider* aTransportProvider,
|
||||
const nsACString& aNegotiatedExtensions,
|
||||
UniquePtr<SerializedStackHolder> aOriginStack) {
|
||||
nsresult WebSocketImpl::AsyncOpen(
|
||||
nsIPrincipal* aPrincipal, uint64_t aInnerWindowID,
|
||||
nsITransportProvider* aTransportProvider,
|
||||
const nsACString& aNegotiatedExtensions,
|
||||
UniquePtr<SerializedStackHolder> aOriginStack) {
|
||||
MOZ_ASSERT(NS_IsMainThread(), "Not running on main thread");
|
||||
MOZ_ASSERT_IF(!aTransportProvider, aNegotiatedExtensions.IsEmpty());
|
||||
|
||||
|
|
|
@ -72,7 +72,7 @@
|
|||
#include "xpcpublic.h"
|
||||
|
||||
#if defined(XP_MACOSX)
|
||||
# include "nsMacUtilsImpl.h"
|
||||
# include "nsMacUtilsImpl.h"
|
||||
#endif
|
||||
|
||||
#include "Principal.h"
|
||||
|
|
|
@ -844,8 +844,7 @@ class ScriptLoaderRunnable final : public nsIRunnable, public nsINamed {
|
|||
// thread) explicitly, so that we can use the stack to notify the net
|
||||
// monitor about every script we load.
|
||||
if (mOriginStack) {
|
||||
ConvertSerializedStackToJSON(std::move(mOriginStack),
|
||||
mOriginStackJSON);
|
||||
ConvertSerializedStackToJSON(std::move(mOriginStack), mOriginStackJSON);
|
||||
}
|
||||
|
||||
if (!mWorkerPrivate->IsServiceWorker() || IsDebuggerScript()) {
|
||||
|
@ -2125,8 +2124,8 @@ void LoadAllScripts(WorkerPrivate* aWorkerPrivate,
|
|||
}
|
||||
|
||||
RefPtr<ScriptLoaderRunnable> loader = new ScriptLoaderRunnable(
|
||||
aWorkerPrivate, std::move(aOriginStack), syncLoopTarget, aLoadInfos, clientInfo,
|
||||
controller, aIsMainScript, aWorkerScriptType, aRv);
|
||||
aWorkerPrivate, std::move(aOriginStack), syncLoopTarget, aLoadInfos,
|
||||
clientInfo, controller, aIsMainScript, aWorkerScriptType, aRv);
|
||||
|
||||
NS_ASSERTION(aLoadInfos.IsEmpty(), "Should have swapped!");
|
||||
|
||||
|
|
|
@ -310,7 +310,8 @@ class CompileScriptRunnable final : public WorkerDebuggeeRunnable {
|
|||
UniquePtr<SerializedStackHolder> aOriginStack,
|
||||
const nsAString& aScriptURL)
|
||||
: WorkerDebuggeeRunnable(aWorkerPrivate, WorkerThreadModifyBusyCount),
|
||||
mScriptURL(aScriptURL), mOriginStack(aOriginStack.release()) {}
|
||||
mScriptURL(aScriptURL),
|
||||
mOriginStack(aOriginStack.release()) {}
|
||||
|
||||
private:
|
||||
// We can't implement PreRun effectively, because at the point when that would
|
||||
|
@ -2178,10 +2179,9 @@ WorkerPrivate::WorkerPrivate(WorkerPrivate* aParent,
|
|||
mMainThreadEventTargetForMessaging =
|
||||
ThrottledEventQueue::Create(target, "Worker queue for messaging");
|
||||
if (StaticPrefs::dom_worker_use_medium_high_event_queue()) {
|
||||
mMainThreadEventTarget =
|
||||
ThrottledEventQueue::Create(GetMainThreadSerialEventTarget(),
|
||||
"Worker queue",
|
||||
nsIRunnablePriority::PRIORITY_MEDIUMHIGH);
|
||||
mMainThreadEventTarget = ThrottledEventQueue::Create(
|
||||
GetMainThreadSerialEventTarget(), "Worker queue",
|
||||
nsIRunnablePriority::PRIORITY_MEDIUMHIGH);
|
||||
} else {
|
||||
mMainThreadEventTarget = mMainThreadEventTargetForMessaging;
|
||||
}
|
||||
|
|
|
@ -766,9 +766,7 @@ class WorkerPrivate : public RelativeTimeline {
|
|||
return mLoadInfo.mServiceWorkersTestingInWindow;
|
||||
}
|
||||
|
||||
bool IsWatchedByDevtools() const {
|
||||
return mLoadInfo.mWatchedByDevtools;
|
||||
}
|
||||
bool IsWatchedByDevtools() const { return mLoadInfo.mWatchedByDevtools; }
|
||||
|
||||
// Determine if the worker is currently loading its top level script.
|
||||
bool IsLoadingWorkerScript() const { return mLoadingWorkerScript; }
|
||||
|
|
|
@ -5,10 +5,10 @@
|
|||
|
||||
#include "mozilla/HTMLEditorController.h"
|
||||
|
||||
#include "mozilla/EditorCommands.h" // for StyleUpdatingCommand, etc
|
||||
#include "mozilla/mozalloc.h" // for operator new
|
||||
#include "nsControllerCommandTable.h" // for nsControllerCommandTable
|
||||
#include "nsError.h" // for NS_OK
|
||||
#include "mozilla/EditorCommands.h" // for StyleUpdatingCommand, etc
|
||||
#include "mozilla/mozalloc.h" // for operator new
|
||||
#include "nsControllerCommandTable.h" // for nsControllerCommandTable
|
||||
#include "nsError.h" // for NS_OK
|
||||
|
||||
namespace mozilla {
|
||||
|
||||
|
|
|
@ -5,17 +5,17 @@
|
|||
|
||||
#include "mozilla/EditorCommands.h"
|
||||
|
||||
#include "mozilla/HTMLEditor.h" // for HTMLEditor
|
||||
#include "mozilla/TextEditor.h" // for TextEditor
|
||||
#include "mozilla/dom/Document.h" // for Document
|
||||
#include "nsCommandParams.h" // for nsCommandParams
|
||||
#include "nsIDocShell.h" // for nsIDocShell
|
||||
#include "nsIEditingSession.h" // for nsIEditingSession, etc
|
||||
#include "nsISelectionController.h" // for nsISelectionController
|
||||
#include "nsISupportsImpl.h" // for nsPresContext::Release
|
||||
#include "nsISupportsUtils.h" // for NS_IF_ADDREF
|
||||
#include "nsIURI.h" // for nsIURI
|
||||
#include "nsPresContext.h" // for nsPresContext
|
||||
#include "mozilla/HTMLEditor.h" // for HTMLEditor
|
||||
#include "mozilla/TextEditor.h" // for TextEditor
|
||||
#include "mozilla/dom/Document.h" // for Document
|
||||
#include "nsCommandParams.h" // for nsCommandParams
|
||||
#include "nsIDocShell.h" // for nsIDocShell
|
||||
#include "nsIEditingSession.h" // for nsIEditingSession, etc
|
||||
#include "nsISelectionController.h" // for nsISelectionController
|
||||
#include "nsISupportsImpl.h" // for nsPresContext::Release
|
||||
#include "nsISupportsUtils.h" // for NS_IF_ADDREF
|
||||
#include "nsIURI.h" // for nsIURI
|
||||
#include "nsPresContext.h" // for nsPresContext
|
||||
|
||||
// defines
|
||||
#define STATE_ENABLED "state_enabled"
|
||||
|
|
|
@ -141,15 +141,13 @@ static void NotifySubdocumentInvalidation(
|
|||
}
|
||||
|
||||
static void SetChildrenChangedRecursive(Layer* aLayer) {
|
||||
ForEachNode<ForwardIterator>(
|
||||
aLayer,
|
||||
[](Layer* layer) {
|
||||
ContainerLayer* container = layer->AsContainerLayer();
|
||||
if (container) {
|
||||
container->SetChildrenChanged(true);
|
||||
container->SetInvalidCompositeRect(nullptr);
|
||||
}
|
||||
});
|
||||
ForEachNode<ForwardIterator>(aLayer, [](Layer* layer) {
|
||||
ContainerLayer* container = layer->AsContainerLayer();
|
||||
if (container) {
|
||||
container->SetChildrenChanged(true);
|
||||
container->SetInvalidCompositeRect(nullptr);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
struct LayerPropertiesBase : public LayerProperties {
|
||||
|
|
|
@ -590,6 +590,7 @@ class APZCTreeManager : public IAPZCTreeManager, public APZInputBridge {
|
|||
|
||||
// Also used for controlling time during tests
|
||||
void SetTestSampleTime(const Maybe<TimeStamp>& aTime);
|
||||
|
||||
private:
|
||||
Maybe<TimeStamp> mTestSampleTime;
|
||||
|
||||
|
|
|
@ -666,8 +666,7 @@ static bool PrepareForSetTargetAPZCNotification(
|
|||
nsIWidget* aWidget, const LayersId& aLayersId, nsIFrame* aRootFrame,
|
||||
const LayoutDeviceIntPoint& aRefPoint,
|
||||
nsTArray<SLGuidAndRenderRoot>* aTargets) {
|
||||
SLGuidAndRenderRoot guid(aLayersId, 0,
|
||||
ScrollableLayerGuid::NULL_SCROLL_ID,
|
||||
SLGuidAndRenderRoot guid(aLayersId, 0, ScrollableLayerGuid::NULL_SCROLL_ID,
|
||||
wr::RenderRoot::Default);
|
||||
nsPoint point = nsLayoutUtils::GetEventCoordinatesRelativeTo(
|
||||
aWidget, aRefPoint, aRootFrame);
|
||||
|
@ -818,9 +817,11 @@ void DisplayportSetListener::DidRefresh() {
|
|||
}
|
||||
|
||||
UniquePtr<DisplayportSetListener>
|
||||
APZCCallbackHelper::SendSetTargetAPZCNotification(
|
||||
nsIWidget* aWidget, dom::Document* aDocument, const WidgetGUIEvent& aEvent,
|
||||
const LayersId& aLayersId, uint64_t aInputBlockId) {
|
||||
APZCCallbackHelper::SendSetTargetAPZCNotification(nsIWidget* aWidget,
|
||||
dom::Document* aDocument,
|
||||
const WidgetGUIEvent& aEvent,
|
||||
const LayersId& aLayersId,
|
||||
uint64_t aInputBlockId) {
|
||||
if (!aWidget || !aDocument) {
|
||||
return nullptr;
|
||||
}
|
||||
|
|
|
@ -176,8 +176,8 @@ void APZEventState::ProcessSingleTap(const CSSPoint& aPoint,
|
|||
const CSSToLayoutDeviceScale& aScale,
|
||||
Modifiers aModifiers,
|
||||
int32_t aClickCount) {
|
||||
APZES_LOG("Handling single tap at %s with %d\n",
|
||||
Stringify(aPoint).c_str(), mTouchEndCancelled);
|
||||
APZES_LOG("Handling single tap at %s with %d\n", Stringify(aPoint).c_str(),
|
||||
mTouchEndCancelled);
|
||||
|
||||
RefPtr<nsIContent> touchRollup = GetTouchRollup();
|
||||
mTouchRollup = nullptr;
|
||||
|
|
|
@ -225,7 +225,6 @@ BasicCompositor::BasicCompositor(CompositorBridgeParent* aParent,
|
|||
mMaxTextureSize =
|
||||
std::min(Factory::GetMaxSurfaceSize(gfxVars::ContentBackend()),
|
||||
Factory::GetMaxSurfaceSize(BackendType::CAIRO));
|
||||
|
||||
}
|
||||
|
||||
BasicCompositor::~BasicCompositor() { MOZ_COUNT_DTOR(BasicCompositor); }
|
||||
|
|
|
@ -451,7 +451,8 @@ CompositorD3D11::CreateRenderTargetFromSource(
|
|||
|
||||
bool CompositorD3D11::ShouldAllowFrameRecording() const {
|
||||
#ifdef MOZ_GECKO_PROFILER
|
||||
return mAllowFrameRecording || profiler_feature_active(ProfilerFeature::Screenshots);
|
||||
return mAllowFrameRecording ||
|
||||
profiler_feature_active(ProfilerFeature::Screenshots);
|
||||
#else
|
||||
return mAllowFrameRecording;
|
||||
#endif
|
||||
|
|
|
@ -480,13 +480,13 @@ void WebRenderLayerManager::MakeSnapshotIfRequired(LayoutDeviceIntSize aSize) {
|
|||
// so on Android we use RGBA.
|
||||
SurfaceFormat format =
|
||||
#ifdef MOZ_WIDGET_ANDROID
|
||||
SurfaceFormat::R8G8B8A8;
|
||||
SurfaceFormat::R8G8B8A8;
|
||||
#else
|
||||
SurfaceFormat::B8G8R8A8;
|
||||
SurfaceFormat::B8G8R8A8;
|
||||
#endif
|
||||
RefPtr<TextureClient> texture = TextureClient::CreateForRawBufferAccess(
|
||||
WrBridge(), format, aSize.ToUnknownSize(),
|
||||
BackendType::SKIA, TextureFlags::SNAPSHOT);
|
||||
WrBridge(), format, aSize.ToUnknownSize(), BackendType::SKIA,
|
||||
TextureFlags::SNAPSHOT);
|
||||
if (!texture) {
|
||||
return;
|
||||
}
|
||||
|
|
|
@ -76,7 +76,7 @@ class FontList {
|
|||
* do not appear in this master list, but are referred to as aliases (see
|
||||
* SetAliases below); the alias list need not be populated before the font
|
||||
* list is shared to content processes and used.
|
||||
*
|
||||
*
|
||||
* Only used in the parent process.
|
||||
*/
|
||||
void SetFamilyNames(const nsTArray<Family::InitData>& aFamilies);
|
||||
|
@ -182,12 +182,12 @@ class FontList {
|
|||
* to use std::atomic<> for these.
|
||||
*/
|
||||
struct Header {
|
||||
std::atomic<uint32_t> mAllocated; // Space allocated from this block;
|
||||
// must be first field in Header
|
||||
uint32_t mGeneration; // Font-list generation ID
|
||||
uint32_t mFamilyCount; // Number of font families in the list
|
||||
std::atomic<uint32_t> mBlockCount; // Total number of blocks that exist
|
||||
std::atomic<uint32_t> mAliasCount; // Number of family aliases
|
||||
std::atomic<uint32_t> mAllocated; // Space allocated from this block;
|
||||
// must be first field in Header
|
||||
uint32_t mGeneration; // Font-list generation ID
|
||||
uint32_t mFamilyCount; // Number of font families in the list
|
||||
std::atomic<uint32_t> mBlockCount; // Total number of blocks that exist
|
||||
std::atomic<uint32_t> mAliasCount; // Number of family aliases
|
||||
std::atomic<uint32_t> mLocalFaceCount; // Number of local face names
|
||||
Pointer mFamilies; // Pointer to array of |mFamilyCount| families
|
||||
Pointer mAliases; // Pointer to array of |mAliasCount| aliases
|
||||
|
@ -254,9 +254,9 @@ class FontList {
|
|||
}
|
||||
|
||||
RefPtr<mozilla::ipc::SharedMemoryBasic> mShmem;
|
||||
void* mAddr; // Address where the shared memory block is mapped in this
|
||||
// process; avoids virtual call to mShmem->memory() each time
|
||||
// we need to convert between Pointer and a real C++ pointer.
|
||||
void* mAddr; // Address where the shared memory block is mapped in this
|
||||
// process; avoids virtual call to mShmem->memory() each time
|
||||
// we need to convert between Pointer and a real C++ pointer.
|
||||
};
|
||||
|
||||
Header& GetHeader() {
|
||||
|
|
|
@ -112,7 +112,7 @@ void Family::AddFaces(FontList* aList, const nsTArray<Face::InitData>& aFaces) {
|
|||
// of the full CSS font-matching algorithm) if there is at maximum one normal,
|
||||
// bold, italic, and bold-italic face; in this case, they are stored at known
|
||||
// positions in the mFaces array.
|
||||
const Face::InitData* slots[4] = { nullptr, nullptr, nullptr, nullptr };
|
||||
const Face::InitData* slots[4] = {nullptr, nullptr, nullptr, nullptr};
|
||||
if (count >= 2 && count <= 4) {
|
||||
// Check if this can be treated as a "simple" family
|
||||
isSimple = true;
|
||||
|
@ -308,7 +308,7 @@ void Family::SearchAllFontsForChar(FontList* aList,
|
|||
}
|
||||
}
|
||||
uint32_t numFaces = NumFaces();
|
||||
uint32_t charMapsLoaded = 0; // number of faces whose charmap is loaded
|
||||
uint32_t charMapsLoaded = 0; // number of faces whose charmap is loaded
|
||||
Pointer* facePtrs = Faces(aList);
|
||||
for (uint32_t i = 0; i < numFaces; i++) {
|
||||
Face* face = static_cast<Face*>(facePtrs[i].ToPtr(aList));
|
||||
|
@ -332,8 +332,9 @@ void Family::SearchAllFontsForChar(FontList* aList,
|
|||
// already checked character coverage, do it now (note that
|
||||
// HasCharacter() will trigger loading the fontEntry's cmap, if
|
||||
// needed).
|
||||
RefPtr<gfxFontEntry> fe = gfxPlatformFontList::PlatformFontList()
|
||||
->GetOrCreateFontEntry(face, this);
|
||||
RefPtr<gfxFontEntry> fe =
|
||||
gfxPlatformFontList::PlatformFontList()->GetOrCreateFontEntry(face,
|
||||
this);
|
||||
if (!fe) {
|
||||
continue;
|
||||
}
|
||||
|
@ -358,9 +359,8 @@ void Family::SetFacePtrs(FontList* aList, nsTArray<Pointer>& aFaces) {
|
|||
// them at the appropriate slots in mFaces and set the mIsSimple flag to
|
||||
// accelerate font-matching.
|
||||
bool isSimple = true;
|
||||
Pointer slots[4] = {
|
||||
Pointer::Null(), Pointer::Null(), Pointer::Null(), Pointer::Null()
|
||||
};
|
||||
Pointer slots[4] = {Pointer::Null(), Pointer::Null(), Pointer::Null(),
|
||||
Pointer::Null()};
|
||||
for (const Pointer& fp : aFaces) {
|
||||
const Face* f = static_cast<const Face*>(fp.ToPtr(aList));
|
||||
if (!f->mWeight.IsSingle() || !f->mStyle.IsSingle() ||
|
||||
|
@ -438,7 +438,7 @@ void Family::SetupFamilyCharMap(FontList* aList) {
|
|||
}
|
||||
if (merged) {
|
||||
mCharacterMap =
|
||||
gfxPlatformFontList::PlatformFontList()->GetShmemCharMap(&familyMap);
|
||||
gfxPlatformFontList::PlatformFontList()->GetShmemCharMap(&familyMap);
|
||||
} else {
|
||||
mCharacterMap = firstMapShmPointer;
|
||||
}
|
||||
|
|
|
@ -124,13 +124,13 @@ struct String {
|
|||
struct Face {
|
||||
// Data required to initialize a Face
|
||||
struct InitData {
|
||||
nsCString mDescriptor; // descriptor that can be used to instantiate a
|
||||
// platform font reference
|
||||
uint16_t mIndex; // an index used with descriptor (on some platforms)
|
||||
bool mFixedPitch; // is the face fixed-pitch (monospaced)?
|
||||
mozilla::WeightRange mWeight; // CSS font-weight value
|
||||
mozilla::StretchRange mStretch; // CSS font-stretch value
|
||||
mozilla::SlantStyleRange mStyle; // CSS font-style value
|
||||
nsCString mDescriptor; // descriptor that can be used to instantiate a
|
||||
// platform font reference
|
||||
uint16_t mIndex; // an index used with descriptor (on some platforms)
|
||||
bool mFixedPitch; // is the face fixed-pitch (monospaced)?
|
||||
mozilla::WeightRange mWeight; // CSS font-weight value
|
||||
mozilla::StretchRange mStretch; // CSS font-stretch value
|
||||
mozilla::SlantStyleRange mStyle; // CSS font-style value
|
||||
};
|
||||
|
||||
Face(FontList* aList, const InitData& aData)
|
||||
|
@ -167,15 +167,15 @@ struct Face {
|
|||
struct Family {
|
||||
// Data required to initialize a Family
|
||||
struct InitData {
|
||||
InitData(const nsACString& aKey, // lookup key (lowercased)
|
||||
const nsACString& aName, // display name
|
||||
uint32_t aIndex = 0, // [win] index in the system font collection
|
||||
bool aHidden = false, // [mac] hidden font (e.g. .SFNSText)?
|
||||
bool aBundled = false, // [win] font was bundled with the app
|
||||
// rather than system-installed
|
||||
bool aBadUnderline = false, // underline-position in font is bad
|
||||
bool aForceClassic = false // [win] use "GDI classic" rendering
|
||||
)
|
||||
InitData(const nsACString& aKey, // lookup key (lowercased)
|
||||
const nsACString& aName, // display name
|
||||
uint32_t aIndex = 0, // [win] index in the system font collection
|
||||
bool aHidden = false, // [mac] hidden font (e.g. .SFNSText)?
|
||||
bool aBundled = false, // [win] font was bundled with the app
|
||||
// rather than system-installed
|
||||
bool aBadUnderline = false, // underline-position in font is bad
|
||||
bool aForceClassic = false // [win] use "GDI classic" rendering
|
||||
)
|
||||
: mKey(aKey),
|
||||
mName(aName),
|
||||
mIndex(aIndex),
|
||||
|
@ -261,15 +261,15 @@ struct Family {
|
|||
std::atomic<uint32_t> mFaceCount;
|
||||
String mKey;
|
||||
String mName;
|
||||
Pointer mCharacterMap; // If non-null, union of character coverage of all
|
||||
// faces in the family
|
||||
Pointer mFaces; // Pointer to array of |mFaceCount| face pointers
|
||||
uint32_t mIndex; // [win] Top bit set indicates app-bundled font family
|
||||
Pointer mCharacterMap; // If non-null, union of character coverage of all
|
||||
// faces in the family
|
||||
Pointer mFaces; // Pointer to array of |mFaceCount| face pointers
|
||||
uint32_t mIndex; // [win] Top bit set indicates app-bundled font family
|
||||
bool mIsHidden;
|
||||
bool mIsBadUnderlineFamily;
|
||||
bool mIsForceClassic;
|
||||
bool mIsSimple; // family allows simplified style matching: mFaces contains
|
||||
// exactly 4 entries [Regular, Bold, Italic, BoldItalic].
|
||||
bool mIsSimple; // family allows simplified style matching: mFaces contains
|
||||
// exactly 4 entries [Regular, Bold, Italic, BoldItalic].
|
||||
};
|
||||
|
||||
/**
|
||||
|
@ -325,7 +325,7 @@ struct ParamTraits<mozilla::fontlist::Pointer> {
|
|||
|
||||
} // namespace IPC
|
||||
|
||||
#undef ERROR // This is defined via Windows.h, but conflicts with some bindings
|
||||
// code when this gets included in the same compilation unit.
|
||||
#undef ERROR // This is defined via Windows.h, but conflicts with some bindings
|
||||
// code when this gets included in the same compilation unit.
|
||||
|
||||
#endif /* SharedFontList_h */
|
||||
|
|
|
@ -525,7 +525,7 @@ nsresult gfxDWriteFontEntry::ReadCMAP(FontInfoData* aFontInfoData) {
|
|||
gfxPlatformFontList* pfl = gfxPlatformFontList::PlatformFontList();
|
||||
fontlist::FontList* sharedFontList = pfl->SharedFontList();
|
||||
if (!IsUserFont() && mShmemFace) {
|
||||
mShmemFace->SetCharacterMap(sharedFontList, charmap); // async
|
||||
mShmemFace->SetCharacterMap(sharedFontList, charmap); // async
|
||||
if (!TrySetShmemCharacterMap()) {
|
||||
// Temporarily retain charmap, until the shared version is
|
||||
// ready for use.
|
||||
|
|
|
@ -140,8 +140,7 @@ gfxFontEntry::~gfxFontEntry() {
|
|||
MOZ_ASSERT(!mGrFaceInitialized);
|
||||
}
|
||||
|
||||
bool gfxFontEntry::TrySetShmemCharacterMap()
|
||||
{
|
||||
bool gfxFontEntry::TrySetShmemCharacterMap() {
|
||||
MOZ_ASSERT(mShmemFace);
|
||||
auto list = gfxPlatformFontList::PlatformFontList()->SharedFontList();
|
||||
mShmemCharacterMap =
|
||||
|
|
|
@ -487,7 +487,8 @@ inline void gfxSparseBitSet::Union(const SharedBitSet& aBitset) {
|
|||
mBlockIndex.AppendElement(NO_BLOCK);
|
||||
}
|
||||
auto blockIndex = reinterpret_cast<const uint16_t*>(&aBitset + 1);
|
||||
auto blocks = reinterpret_cast<const Block*>(blockIndex + aBitset.mBlockIndexCount);
|
||||
auto blocks =
|
||||
reinterpret_cast<const Block*>(blockIndex + aBitset.mBlockIndexCount);
|
||||
for (uint32_t i = 0; i < aBitset.mBlockIndexCount; ++i) {
|
||||
// if it is missing (implicitly empty) in source, just skip
|
||||
if (blockIndex[i] == NO_BLOCK) {
|
||||
|
@ -501,10 +502,9 @@ inline void gfxSparseBitSet::Union(const SharedBitSet& aBitset) {
|
|||
continue;
|
||||
}
|
||||
// else set existing target block to the union of both
|
||||
uint32_t* dst = reinterpret_cast<uint32_t*>(
|
||||
&mBlocks[mBlockIndex[i]].mBits);
|
||||
const uint32_t* src = reinterpret_cast<const uint32_t*>(
|
||||
&blocks[blockIndex[i]].mBits);
|
||||
uint32_t* dst = reinterpret_cast<uint32_t*>(&mBlocks[mBlockIndex[i]].mBits);
|
||||
const uint32_t* src =
|
||||
reinterpret_cast<const uint32_t*>(&blocks[blockIndex[i]].mBits);
|
||||
for (uint32_t j = 0; j < BLOCK_SIZE / 4; ++j) {
|
||||
dst[j] |= src[j];
|
||||
}
|
||||
|
|
|
@ -239,7 +239,7 @@ nsresult MacOSFontEntry::ReadCMAP(FontInfoData* aFontInfoData) {
|
|||
gfxPlatformFontList* pfl = gfxPlatformFontList::PlatformFontList();
|
||||
fontlist::FontList* sharedFontList = pfl->SharedFontList();
|
||||
if (!IsUserFont() && mShmemFace) {
|
||||
mShmemFace->SetCharacterMap(sharedFontList, charmap); // async
|
||||
mShmemFace->SetCharacterMap(sharedFontList, charmap); // async
|
||||
if (!TrySetShmemCharacterMap()) {
|
||||
// Temporarily retain charmap, until the shared version is
|
||||
// ready for use.
|
||||
|
@ -1763,8 +1763,7 @@ void gfxMacPlatformFontList::ActivateFontsFromDir(nsIFile* aDir) {
|
|||
}
|
||||
|
||||
void gfxMacPlatformFontList::GetFacesInitDataForFamily(
|
||||
const fontlist::Family* aFamily,
|
||||
nsTArray<fontlist::Face::InitData>& aFaces) const {
|
||||
const fontlist::Family* aFamily, nsTArray<fontlist::Face::InitData>& aFaces) const {
|
||||
nsAutoreleasePool localPool;
|
||||
|
||||
NS_ConvertUTF8toUTF16 name(aFamily->Key().AsString(SharedFontList()));
|
||||
|
@ -1860,8 +1859,7 @@ void gfxMacPlatformFontList::ReadFaceNamesForFamily(fontlist::Family* aFamily,
|
|||
// of the macOS UI font; see MacOSFontEntry::GetFontRef(). We pass 16.0 in
|
||||
// order to get a standard text-size face in this case, although it's
|
||||
// unlikely to matter for the purpose of just reading family names.
|
||||
auto fe = MakeUnique<MacOSFontEntry>(name, WeightRange(FontWeight::Normal()),
|
||||
false, 16.0);
|
||||
auto fe = MakeUnique<MacOSFontEntry>(name, WeightRange(FontWeight::Normal()), false, 16.0);
|
||||
if (!fe) {
|
||||
continue;
|
||||
}
|
||||
|
@ -1872,8 +1870,8 @@ void gfxMacPlatformFontList::ReadFaceNamesForFamily(fontlist::Family* aFamily,
|
|||
uint32_t dataLength;
|
||||
const char* nameData = hb_blob_get_data(nameTable, &dataLength);
|
||||
AutoTArray<nsCString, 4> otherFamilyNames;
|
||||
gfxFontUtils::ReadOtherFamilyNamesForFace(canonicalName, nameData, dataLength,
|
||||
otherFamilyNames, false);
|
||||
gfxFontUtils::ReadOtherFamilyNamesForFace(canonicalName, nameData, dataLength, otherFamilyNames,
|
||||
false);
|
||||
for (const auto& alias : otherFamilyNames) {
|
||||
auto af = mAliasTable.LookupOrAdd(alias);
|
||||
af->AppendElement(facePtrs[i]);
|
||||
|
|
|
@ -1756,8 +1756,8 @@ bool gfxPlatformFontList::LoadFontInfo() {
|
|||
uint32_t i, endIndex = mNumFamilies;
|
||||
fontlist::FontList* list = SharedFontList();
|
||||
bool loadCmaps =
|
||||
!list && (!UsesSystemFallback() ||
|
||||
gfxPlatform::GetPlatform()->UseCmapsDuringSystemFallback());
|
||||
!list && (!UsesSystemFallback() ||
|
||||
gfxPlatform::GetPlatform()->UseCmapsDuringSystemFallback());
|
||||
|
||||
// for each font family, load in various font info
|
||||
for (i = mStartIndex; i < endIndex; i++) {
|
||||
|
|
|
@ -129,8 +129,7 @@ bool RendererOGL::UpdateAndRender(const Maybe<gfx::IntSize>& aReadbackSize,
|
|||
MOZ_ASSERT(aReadbackSize.isSome());
|
||||
MOZ_ASSERT(aReadbackFormat.isSome());
|
||||
wr_renderer_readback(mRenderer, aReadbackSize.ref().width,
|
||||
aReadbackSize.ref().height,
|
||||
aReadbackFormat.ref(),
|
||||
aReadbackSize.ref().height, aReadbackFormat.ref(),
|
||||
&aReadbackBuffer.ref()[0],
|
||||
aReadbackBuffer.ref().length());
|
||||
}
|
||||
|
|
|
@ -430,7 +430,10 @@ void WebRenderAPI::Readback(const TimeStamp& aStartTime, gfx::IntSize size,
|
|||
explicit Readback(layers::SynchronousTask* aTask, TimeStamp aStartTime,
|
||||
gfx::IntSize aSize, const gfx::SurfaceFormat& aFormat,
|
||||
const Range<uint8_t>& aBuffer)
|
||||
: mTask(aTask), mStartTime(aStartTime), mSize(aSize), mFormat(aFormat),
|
||||
: mTask(aTask),
|
||||
mStartTime(aStartTime),
|
||||
mSize(aSize),
|
||||
mFormat(aFormat),
|
||||
mBuffer(aBuffer) {
|
||||
MOZ_COUNT_CTOR(Readback);
|
||||
}
|
||||
|
@ -1161,8 +1164,7 @@ void DisplayListBuilder::PushShadow(const wr::LayoutRect& aRect,
|
|||
// being re-enabled mid-shadow. The optimization is restored in PopAllShadows.
|
||||
SuspendClipLeafMerging();
|
||||
wr_dp_push_shadow(mWrState, aRect, aClip, aIsBackfaceVisible,
|
||||
&mCurrentSpaceAndClipChain, aShadow,
|
||||
aShouldInflate);
|
||||
&mCurrentSpaceAndClipChain, aShadow, aShouldInflate);
|
||||
}
|
||||
|
||||
void DisplayListBuilder::PopAllShadows() {
|
||||
|
|
|
@ -114,7 +114,7 @@ void GetCurrentScreenConfiguration(ScreenConfiguration* aScreenConfiguration) {
|
|||
screen->GetColorDepth(&colorDepth);
|
||||
screen->GetPixelDepth(&pixelDepth);
|
||||
orientation =
|
||||
static_cast<hal::ScreenOrientation>(bridge->GetScreenOrientation());
|
||||
static_cast<hal::ScreenOrientation>(bridge->GetScreenOrientation());
|
||||
angle = bridge->GetScreenAngle();
|
||||
|
||||
*aScreenConfiguration =
|
||||
|
|
|
@ -25,8 +25,8 @@ class nsHyphenator {
|
|||
private:
|
||||
~nsHyphenator();
|
||||
|
||||
void HyphenateWord(const nsAString& aString, uint32_t aStart,
|
||||
uint32_t aLimit, nsTArray<bool>& aHyphens);
|
||||
void HyphenateWord(const nsAString& aString, uint32_t aStart, uint32_t aLimit,
|
||||
nsTArray<bool>& aHyphens);
|
||||
|
||||
void* mDict;
|
||||
bool mHyphenateCapitalized;
|
||||
|
|
|
@ -69,7 +69,7 @@ ProcessRuntime::ProcessRuntime(GeckoProcessType aProcessType)
|
|||
}
|
||||
nsAutoHandle curThreadImpToken(rawCurThreadImpToken);
|
||||
|
||||
#if defined(DEBUG)
|
||||
# if defined(DEBUG)
|
||||
// Ensure that our current token is still an impersonation token (ie, we
|
||||
// have not yet called RevertToSelf() on this thread).
|
||||
DWORD len;
|
||||
|
@ -77,7 +77,7 @@ ProcessRuntime::ProcessRuntime(GeckoProcessType aProcessType)
|
|||
MOZ_ASSERT(::GetTokenInformation(rawCurThreadImpToken, TokenType,
|
||||
&tokenType, sizeof(tokenType), &len) &&
|
||||
len == sizeof(tokenType) && tokenType == TokenImpersonation);
|
||||
#endif // defined(DEBUG)
|
||||
# endif // defined(DEBUG)
|
||||
|
||||
// Create an impersonation token based on the current thread's token
|
||||
HANDLE rawMtaThreadImpToken = nullptr;
|
||||
|
@ -89,22 +89,26 @@ ProcessRuntime::ProcessRuntime(GeckoProcessType aProcessType)
|
|||
nsAutoHandle mtaThreadImpToken(rawMtaThreadImpToken);
|
||||
|
||||
SandboxTarget::Instance()->RegisterSandboxStartCallback([]() -> void {
|
||||
EnsureMTA([]() -> void {
|
||||
// This is a security risk if it fails, so we release assert
|
||||
MOZ_RELEASE_ASSERT(::RevertToSelf(),
|
||||
"mscom::ProcessRuntime RevertToSelf failed");
|
||||
}, EnsureMTA::Option::ForceDispatch);
|
||||
EnsureMTA(
|
||||
[]() -> void {
|
||||
// This is a security risk if it fails, so we release assert
|
||||
MOZ_RELEASE_ASSERT(::RevertToSelf(),
|
||||
"mscom::ProcessRuntime RevertToSelf failed");
|
||||
},
|
||||
EnsureMTA::Option::ForceDispatch);
|
||||
});
|
||||
|
||||
// Impersonate and initialize.
|
||||
EnsureMTA([this, rawMtaThreadImpToken]() -> void {
|
||||
if (!::SetThreadToken(nullptr, rawMtaThreadImpToken)) {
|
||||
mInitResult = HRESULT_FROM_WIN32(::GetLastError());
|
||||
return;
|
||||
}
|
||||
EnsureMTA(
|
||||
[this, rawMtaThreadImpToken]() -> void {
|
||||
if (!::SetThreadToken(nullptr, rawMtaThreadImpToken)) {
|
||||
mInitResult = HRESULT_FROM_WIN32(::GetLastError());
|
||||
return;
|
||||
}
|
||||
|
||||
InitInsideApartment();
|
||||
}, EnsureMTA::Option::ForceDispatch);
|
||||
InitInsideApartment();
|
||||
},
|
||||
EnsureMTA::Option::ForceDispatch);
|
||||
|
||||
return;
|
||||
}
|
||||
|
|
|
@ -42,13 +42,13 @@ nsString nsQuoteNode::Text() {
|
|||
MOZ_ASSERT(depth >= -1);
|
||||
|
||||
Span<const StyleQuotePair> quotes =
|
||||
mPseudoFrame->StyleList()->mQuotes._0.AsSpan();
|
||||
mPseudoFrame->StyleList()->mQuotes._0.AsSpan();
|
||||
|
||||
// Reuse the last pair when the depth is greater than the number of
|
||||
// pairs of quotes. (Also make 'quotes: none' and close-quote from
|
||||
// a depth of 0 equivalent for the next test.)
|
||||
if (depth >= static_cast<int32_t>(quotes.Length())) {
|
||||
depth = static_cast<int32_t>(quotes.Length()) - 1;
|
||||
depth = static_cast<int32_t>(quotes.Length()) - 1;
|
||||
}
|
||||
|
||||
if (depth == -1) {
|
||||
|
@ -58,7 +58,7 @@ nsString nsQuoteNode::Text() {
|
|||
|
||||
const StyleQuotePair& pair = quotes[depth];
|
||||
const StyleOwnedStr& quote =
|
||||
mType == StyleContentType::OpenQuote ? pair.opening : pair.closing;
|
||||
mType == StyleContentType::OpenQuote ? pair.opening : pair.closing;
|
||||
result.Assign(NS_ConvertUTF8toUTF16(quote.AsString()));
|
||||
return result;
|
||||
}
|
||||
|
|
|
@ -3642,8 +3642,8 @@ static bool DescendIntoChild(nsDisplayListBuilder* aBuilder,
|
|||
}
|
||||
|
||||
nsDisplayTableBackgroundSet* tableBGs = aBuilder->GetTableBackgroundSet();
|
||||
if (tableBGs &&
|
||||
tableBGs->GetDirtyRect().Intersects(normalPositionOverflowRelativeToTable)) {
|
||||
if (tableBGs && tableBGs->GetDirtyRect().Intersects(
|
||||
normalPositionOverflowRelativeToTable)) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -130,8 +130,9 @@ bool RetainedDisplayListBuilder::PreProcessDisplayList(
|
|||
// list build if we hit them.
|
||||
static const uint32_t kMaxEdgeRatio = 5;
|
||||
const bool initializeDAG = !aList->mDAG.Length();
|
||||
if (!aKeepLinked && !initializeDAG && aList->mDAG.mDirectPredecessorList.Length() >
|
||||
(aList->mDAG.mNodesInfo.Length() * kMaxEdgeRatio)) {
|
||||
if (!aKeepLinked && !initializeDAG &&
|
||||
aList->mDAG.mDirectPredecessorList.Length() >
|
||||
(aList->mDAG.mNodesInfo.Length() * kMaxEdgeRatio)) {
|
||||
return false;
|
||||
}
|
||||
|
||||
|
@ -227,7 +228,9 @@ bool RetainedDisplayListBuilder::PreProcessDisplayList(
|
|||
if (!PreProcessDisplayList(
|
||||
item->GetChildren(), SelectAGRForFrame(f, aAGR), aUpdated,
|
||||
item->GetPerFrameKey(), aNestingDepth + 1, keepLinked)) {
|
||||
MOZ_RELEASE_ASSERT(!aKeepLinked, "Can't early return since we need to move the out list back");
|
||||
MOZ_RELEASE_ASSERT(
|
||||
!aKeepLinked,
|
||||
"Can't early return since we need to move the out list back");
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
@ -1201,8 +1204,7 @@ static void AddFramesForContainingBlock(nsIFrame* aBlock,
|
|||
// ancestors must also be visited).
|
||||
static void FindContainingBlocks(nsIFrame* aFrame,
|
||||
nsTArray<nsIFrame*>& aExtraFrames) {
|
||||
for (nsIFrame* f = aFrame; f;
|
||||
f = nsLayoutUtils::GetDisplayListParent(f)) {
|
||||
for (nsIFrame* f = aFrame; f; f = nsLayoutUtils::GetDisplayListParent(f)) {
|
||||
if (f->ForceDescendIntoIfVisible()) return;
|
||||
f->SetForceDescendIntoIfVisible(true);
|
||||
CRR_LOG("Considering OOFs for %p\n", f);
|
||||
|
|
|
@ -3753,7 +3753,8 @@ nsCSSBorderImageRenderer::nsCSSBorderImageRenderer(
|
|||
const auto& width = aStyleBorder.mBorderImageWidth.Get(s);
|
||||
switch (width.tag) {
|
||||
case StyleBorderImageSideWidth::Tag::LengthPercentage:
|
||||
value = std::max(0, width.AsLengthPercentage().Resolve(borderDimension));
|
||||
value =
|
||||
std::max(0, width.AsLengthPercentage().Resolve(borderDimension));
|
||||
break;
|
||||
case StyleBorderImageSideWidth::Tag::Number:
|
||||
value = width.AsNumber() * borderWidths.Side(s);
|
||||
|
|
|
@ -1153,8 +1153,7 @@ bool CustomCounterStyle::IsBullet() {
|
|||
void CustomCounterStyle::GetNegative(NegativeType& aResult) {
|
||||
if (!(mFlags & FLAG_NEGATIVE_INITED)) {
|
||||
mFlags |= FLAG_NEGATIVE_INITED;
|
||||
if (!Servo_CounterStyleRule_GetNegative(mRule,
|
||||
&mNegative.before,
|
||||
if (!Servo_CounterStyleRule_GetNegative(mRule, &mNegative.before,
|
||||
&mNegative.after)) {
|
||||
if (IsExtendsSystem()) {
|
||||
GetExtends()->GetNegative(mNegative);
|
||||
|
|
|
@ -315,8 +315,7 @@ void FontFace::SetDisplay(const nsAString& aValue, ErrorResult& aRv) {
|
|||
}
|
||||
}
|
||||
|
||||
void FontFace::DescriptorUpdated()
|
||||
{
|
||||
void FontFace::DescriptorUpdated() {
|
||||
// If we haven't yet initialized mUserFontEntry, no need to do anything here;
|
||||
// we'll respect the updated descriptor when the time comes to create it.
|
||||
if (!mUserFontEntry) {
|
||||
|
@ -326,7 +325,7 @@ void FontFace::DescriptorUpdated()
|
|||
// Behind the scenes, this will actually update the existing entry and return
|
||||
// it, rather than create a new one.
|
||||
RefPtr<gfxUserFontEntry> newEntry =
|
||||
mFontFaceSet->FindOrCreateUserFontEntryFromFontFace(this);
|
||||
mFontFaceSet->FindOrCreateUserFontEntryFromFontFace(this);
|
||||
SetUserFontEntry(newEntry);
|
||||
|
||||
if (mInFontFaceSet) {
|
||||
|
|
|
@ -1032,17 +1032,16 @@ FontFaceSet::FindOrCreateUserFontEntryFromFontFace(
|
|||
if (existingEntry) {
|
||||
// aFontFace already has a user font entry, so we update its attributes
|
||||
// rather than creating a new one.
|
||||
existingEntry->UpdateAttributes(weight, stretch, italicStyle,
|
||||
featureSettings, variationSettings,
|
||||
languageOverride, unicodeRanges,
|
||||
fontDisplay, rangeFlags);
|
||||
existingEntry->UpdateAttributes(
|
||||
weight, stretch, italicStyle, featureSettings, variationSettings,
|
||||
languageOverride, unicodeRanges, fontDisplay, rangeFlags);
|
||||
// If the family name has changed, remove the entry from its current family
|
||||
// and clear the mFamilyName field so it can be reset when added to a new
|
||||
// family.
|
||||
if (!existingEntry->mFamilyName.IsEmpty() &&
|
||||
existingEntry->mFamilyName != aFamilyName) {
|
||||
gfxUserFontFamily* family =
|
||||
set->GetUserFontSet()->LookupFamily(existingEntry->mFamilyName);
|
||||
set->GetUserFontSet()->LookupFamily(existingEntry->mFamilyName);
|
||||
if (family) {
|
||||
family->RemoveFontEntry(existingEntry);
|
||||
}
|
||||
|
|
|
@ -11,9 +11,9 @@
|
|||
#include "nsStyleStruct.h"
|
||||
|
||||
namespace mozilla {
|
||||
#define STYLE_STRUCT(name_) \
|
||||
struct Gecko##name_ { \
|
||||
ServoManuallyDrop<nsStyle##name_> gecko; \
|
||||
#define STYLE_STRUCT(name_) \
|
||||
struct Gecko##name_ { \
|
||||
ServoManuallyDrop<nsStyle##name_> gecko; \
|
||||
};
|
||||
#include "nsStyleStructList.h"
|
||||
#undef STYLE_STRUCT
|
||||
|
|
|
@ -80,7 +80,7 @@ class WritingMode;
|
|||
class ServoElementSnapshotTable;
|
||||
enum class StyleContentType : uint8_t;
|
||||
|
||||
template<typename T>
|
||||
template <typename T>
|
||||
struct StyleForgottenArcSlicePtr;
|
||||
|
||||
struct AnimationPropertySegment;
|
||||
|
|
|
@ -240,7 +240,7 @@ struct GridTemplateAreasValue final {
|
|||
} // namespace mozilla
|
||||
|
||||
enum nsCSSUnit : uint32_t {
|
||||
eCSSUnit_Null = 0, // (n/a) null unit, value is not specified
|
||||
eCSSUnit_Null = 0, // (n/a) null unit, value is not specified
|
||||
|
||||
eCSSUnit_Integer = 70, // (int) simple value
|
||||
eCSSUnit_Enumerated = 71, // (int) value has enumerated meaning
|
||||
|
|
|
@ -171,7 +171,8 @@ enum class StyleScrollbarWidth : uint8_t {
|
|||
// Shape source type
|
||||
enum class StyleShapeSourceType : uint8_t {
|
||||
None,
|
||||
Image, // shape-outside / clip-path only, and clip-path only uses it for <url>s
|
||||
Image, // shape-outside / clip-path only, and clip-path only uses it for
|
||||
// <url>s
|
||||
Shape,
|
||||
Box,
|
||||
Path, // SVG path function
|
||||
|
|
|
@ -29,7 +29,7 @@ class FontSlantStyle;
|
|||
namespace dom {
|
||||
class Document;
|
||||
class Element;
|
||||
}
|
||||
} // namespace dom
|
||||
} // namespace mozilla
|
||||
|
||||
// Style utility functions
|
||||
|
|
|
@ -55,11 +55,13 @@ void SVGImageContext::MaybeStoreContextPaint(Maybe<SVGImageContext>& aContext,
|
|||
haveContextPaint = true;
|
||||
contextPaint->SetStroke(style->mStroke.GetColor(aFromComputedStyle));
|
||||
}
|
||||
if (style->mMozContextProperties.bits & StyleContextPropertyBits_FILL_OPACITY) {
|
||||
if (style->mMozContextProperties.bits &
|
||||
StyleContextPropertyBits_FILL_OPACITY) {
|
||||
haveContextPaint = true;
|
||||
contextPaint->SetFillOpacity(style->mFillOpacity);
|
||||
}
|
||||
if (style->mMozContextProperties.bits & StyleContextPropertyBits_STROKE_OPACITY) {
|
||||
if (style->mMozContextProperties.bits &
|
||||
StyleContextPropertyBits_STROKE_OPACITY) {
|
||||
haveContextPaint = true;
|
||||
contextPaint->SetStrokeOpacity(style->mStrokeOpacity);
|
||||
}
|
||||
|
|
|
@ -1234,7 +1234,8 @@ static nsSVGPaintingProperty* GetOrCreateClipPathObserver(
|
|||
if (svgStyleReset->mClipPath.GetType() != StyleShapeSourceType::Image) {
|
||||
return nullptr;
|
||||
}
|
||||
const css::URLValue* url = svgStyleReset->mClipPath.ShapeImage().GetURLValue();
|
||||
const css::URLValue* url =
|
||||
svgStyleReset->mClipPath.ShapeImage().GetURLValue();
|
||||
MOZ_ASSERT(url);
|
||||
RefPtr<URLAndReferrerInfo> pathURI =
|
||||
ResolveURLUsingLocalRef(aClippedFrame, url);
|
||||
|
|
|
@ -240,8 +240,8 @@ void nsTableRowGroupFrame::BuildDisplayList(nsDisplayListBuilder* aBuilder,
|
|||
DisplayOutsetBoxShadow(aBuilder, aLists.BorderBackground());
|
||||
|
||||
for (nsTableRowFrame* row = GetFirstRow(); row; row = row->GetNextRow()) {
|
||||
if (!aBuilder->GetDirtyRect().Intersects(
|
||||
row->GetVisualOverflowRect() + row->GetNormalPosition())) {
|
||||
if (!aBuilder->GetDirtyRect().Intersects(row->GetVisualOverflowRect() +
|
||||
row->GetNormalPosition())) {
|
||||
continue;
|
||||
}
|
||||
row->PaintCellBackgroundsForFrame(this, aBuilder, aLists,
|
||||
|
|
|
@ -45,9 +45,9 @@
|
|||
#if ARCH_AARCH64 == 1
|
||||
// Those values are copied from the auto generated
|
||||
// config file produced by stand alone dav1d build.
|
||||
#define HAVE_AS_FUNC 0
|
||||
#define HAVE_GETAUXVAL 1
|
||||
#define PIC 3
|
||||
# define HAVE_AS_FUNC 0
|
||||
# define HAVE_GETAUXVAL 1
|
||||
# define PIC 3
|
||||
#endif
|
||||
|
||||
// The following macros are defined from autoconf
|
||||
|
|
|
@ -1618,7 +1618,6 @@ class HashTable : private AllocPolicy {
|
|||
|
||||
static char* createTable(AllocPolicy& aAllocPolicy, uint32_t aCapacity,
|
||||
FailureBehavior aReportFailure = ReportFailure) {
|
||||
|
||||
FakeSlot* fake =
|
||||
aReportFailure
|
||||
? aAllocPolicy.template pod_malloc<FakeSlot>(aCapacity)
|
||||
|
|
|
@ -45,42 +45,41 @@ namespace recordreplay {
|
|||
(JSContext * aCx, JSObject * aObj), (aCx, aObj))
|
||||
|
||||
#define FOR_EACH_INTERFACE_VOID(Macro) \
|
||||
Macro( \
|
||||
InternalBeginOrderedAtomicAccess, (const void* aValue), \
|
||||
(aValue)) Macro(InternalEndOrderedAtomicAccess, (), \
|
||||
()) Macro(InternalBeginPassThroughThreadEvents, (), \
|
||||
()) Macro(InternalEndPassThroughThreadEvents, \
|
||||
(), ()) \
|
||||
Macro(InternalBeginDisallowThreadEvents, (), ()) Macro( \
|
||||
InternalEndDisallowThreadEvents, (), \
|
||||
()) Macro(InternalRecordReplayBytes, (void* aData, size_t aSize), \
|
||||
(aData, aSize)) Macro(InternalInvalidateRecording, \
|
||||
(const char* aWhy), (aWhy)) \
|
||||
Macro(InternalDestroyPLDHashTableCallbacks, \
|
||||
(const PLDHashTableOps* aOps), \
|
||||
(aOps)) Macro(InternalMovePLDHashTableContents, \
|
||||
(const PLDHashTableOps* aFirstOps, \
|
||||
const PLDHashTableOps* aSecondOps), \
|
||||
(aFirstOps, \
|
||||
aSecondOps)) Macro(SetWeakPointerJSRoot, \
|
||||
(const void* aPtr, \
|
||||
JSObject* aJSObj), \
|
||||
(aPtr, aJSObj)) \
|
||||
Macro(RegisterTrigger, \
|
||||
(void* aObj, const std::function<void()>& aCallback), \
|
||||
(aObj, aCallback)) Macro(UnregisterTrigger, (void* aObj), \
|
||||
(aObj)) \
|
||||
Macro(ActivateTrigger, (void* aObj), (aObj)) Macro( \
|
||||
ExecuteTriggers, (), \
|
||||
()) Macro(InternalRecordReplayAssert, \
|
||||
(const char* aFormat, va_list aArgs), \
|
||||
(aFormat, aArgs)) \
|
||||
Macro(InternalRecordReplayAssertBytes, \
|
||||
(const void* aData, size_t aSize), \
|
||||
(aData, aSize)) Macro(InternalRegisterThing, \
|
||||
(void* aThing), (aThing)) \
|
||||
Macro(InternalUnregisterThing, (void* aThing), \
|
||||
(aThing)) \
|
||||
Macro(InternalBeginOrderedAtomicAccess, (const void* aValue), \
|
||||
(aValue)) Macro(InternalEndOrderedAtomicAccess, (), ()) \
|
||||
Macro(InternalBeginPassThroughThreadEvents, (), ()) Macro( \
|
||||
InternalEndPassThroughThreadEvents, (), \
|
||||
()) Macro(InternalBeginDisallowThreadEvents, (), \
|
||||
()) Macro(InternalEndDisallowThreadEvents, (), \
|
||||
()) Macro(InternalRecordReplayBytes, \
|
||||
(void* aData, size_t aSize), \
|
||||
(aData, aSize)) \
|
||||
Macro( \
|
||||
InternalInvalidateRecording, (const char* aWhy), \
|
||||
(aWhy)) Macro(InternalDestroyPLDHashTableCallbacks, \
|
||||
(const PLDHashTableOps* aOps), \
|
||||
(aOps)) Macro(InternalMovePLDHashTableContents, \
|
||||
(const PLDHashTableOps* aFirstOps, \
|
||||
const PLDHashTableOps* aSecondOps), \
|
||||
(aFirstOps, aSecondOps)) \
|
||||
Macro(SetWeakPointerJSRoot, \
|
||||
(const void* aPtr, JSObject* aJSObj), (aPtr, aJSObj)) \
|
||||
Macro(RegisterTrigger, \
|
||||
(void* aObj, const std::function<void()>& aCallback), \
|
||||
(aObj, \
|
||||
aCallback)) Macro(UnregisterTrigger, (void* aObj), \
|
||||
(aObj)) Macro(ActivateTrigger, \
|
||||
(void* aObj), (aObj)) \
|
||||
Macro(ExecuteTriggers, (), ()) Macro( \
|
||||
InternalRecordReplayAssert, \
|
||||
(const char* aFormat, va_list aArgs), \
|
||||
(aFormat, \
|
||||
aArgs)) Macro(InternalRecordReplayAssertBytes, \
|
||||
(const void* aData, size_t aSize), \
|
||||
(aData, aSize)) \
|
||||
Macro(InternalRegisterThing, (void* aThing), \
|
||||
(aThing)) Macro(InternalUnregisterThing, \
|
||||
(void* aThing), (aThing)) \
|
||||
Macro(BeginContentParse, \
|
||||
(const void* aToken, const char* aURL, \
|
||||
const char* aContentType), \
|
||||
|
|
|
@ -312,8 +312,8 @@ bool SignedBinary::VerifySignature(const wchar_t* aFilePath) {
|
|||
|
||||
static const mozilla::DynamicallyLinkedFunctionPtr<decltype(
|
||||
&::CryptCATAdminReleaseCatalogContext)>
|
||||
pCryptCATAdminReleaseCatalogContext(L"wintrust.dll",
|
||||
"CryptCATAdminReleaseCatalogContext");
|
||||
pCryptCATAdminReleaseCatalogContext(L"wintrust.dll",
|
||||
"CryptCATAdminReleaseCatalogContext");
|
||||
if (!pCryptCATAdminReleaseCatalogContext) {
|
||||
return false;
|
||||
}
|
||||
|
@ -326,10 +326,10 @@ bool SignedBinary::VerifySignature(const wchar_t* aFilePath) {
|
|||
|
||||
// We can't use UniquePtr for this because the deleter function requires two
|
||||
// parameters.
|
||||
auto cleanCatInfoHdl = mozilla::MakeScopeExit(
|
||||
[rawCatAdmin, catInfoHdl]() -> void {
|
||||
pCryptCATAdminReleaseCatalogContext(rawCatAdmin, catInfoHdl, 0);
|
||||
});
|
||||
auto cleanCatInfoHdl =
|
||||
mozilla::MakeScopeExit([rawCatAdmin, catInfoHdl]() -> void {
|
||||
pCryptCATAdminReleaseCatalogContext(rawCatAdmin, catInfoHdl, 0);
|
||||
});
|
||||
|
||||
// We found a catalog! Now query for the path to the catalog file.
|
||||
|
||||
|
|
|
@ -533,7 +533,7 @@ bool ShouldTestTipTsf() {
|
|||
}
|
||||
|
||||
mozilla::DynamicallyLinkedFunctionPtr<decltype(&SHGetKnownFolderPath)>
|
||||
pSHGetKnownFolderPath(L"shell32.dll", "SHGetKnownFolderPath");
|
||||
pSHGetKnownFolderPath(L"shell32.dll", "SHGetKnownFolderPath");
|
||||
if (!pSHGetKnownFolderPath) {
|
||||
return false;
|
||||
}
|
||||
|
@ -563,7 +563,7 @@ static BOOLEAN gIsPresent;
|
|||
|
||||
bool HasApiSetQueryApiSetPresence() {
|
||||
mozilla::DynamicallyLinkedFunctionPtr<decltype(&ApiSetQueryApiSetPresence)>
|
||||
func(L"Api-ms-win-core-apiquery-l1-1-0.dll", "ApiSetQueryApiSetPresence");
|
||||
func(L"Api-ms-win-core-apiquery-l1-1-0.dll", "ApiSetQueryApiSetPresence");
|
||||
if (!func) {
|
||||
return false;
|
||||
}
|
||||
|
@ -832,7 +832,12 @@ extern "C" int wmain(int argc, wchar_t* argv[]) {
|
|||
#endif
|
||||
TEST_DETOUR_SKIP_EXEC(kernel32.dll, BaseThreadInitThunk) &&
|
||||
TEST_DETOUR_SKIP_EXEC(ntdll.dll, LdrLoadDll) &&
|
||||
MAYBE_TEST_HOOK_PARAMS(HasApiSetQueryApiSetPresence(), Api-ms-win-core-apiquery-l1-1-0.dll, ApiSetQueryApiSetPresence, Equals, FALSE, &gEmptyUnicodeString, &gIsPresent) &&
|
||||
MAYBE_TEST_HOOK_PARAMS(HasApiSetQueryApiSetPresence(),
|
||||
// clang-format off
|
||||
Api-ms-win-core-apiquery-l1-1-0.dll,
|
||||
// clang-format on
|
||||
ApiSetQueryApiSetPresence, Equals, FALSE,
|
||||
&gEmptyUnicodeString, &gIsPresent) &&
|
||||
TestTenByteDetour()) {
|
||||
printf("TEST-PASS | WindowsDllInterceptor | all checks passed\n");
|
||||
|
||||
|
|
|
@ -71,7 +71,7 @@ DataChannelParent::SetClassifierMatchedInfo(const nsACString& aList,
|
|||
|
||||
NS_IMETHODIMP
|
||||
DataChannelParent::SetClassifierMatchedTrackingInfo(
|
||||
const nsACString &aLists, const nsACString &aFullHashes) {
|
||||
const nsACString& aLists, const nsACString& aFullHashes) {
|
||||
// nothing to do
|
||||
return NS_OK;
|
||||
}
|
||||
|
|
|
@ -71,7 +71,7 @@ FileChannelParent::SetClassifierMatchedInfo(const nsACString& aList,
|
|||
|
||||
NS_IMETHODIMP
|
||||
FileChannelParent::SetClassifierMatchedTrackingInfo(
|
||||
const nsACString &aLists, const nsACString &aFullHashes) {
|
||||
const nsACString& aLists, const nsACString& aFullHashes) {
|
||||
// nothing to do
|
||||
return NS_OK;
|
||||
}
|
||||
|
|
|
@ -75,8 +75,12 @@ class AltSvcMapping;
|
|||
* FRAMECHECK_STRICT - we also do not allow case 2) and 3) from
|
||||
* FRAMECHECK_BARELY.
|
||||
*/
|
||||
enum FrameCheckLevel { FRAMECHECK_LAX, FRAMECHECK_BARELY,
|
||||
FRAMECHECK_STRICT_CHUNKED, FRAMECHECK_STRICT };
|
||||
enum FrameCheckLevel {
|
||||
FRAMECHECK_LAX,
|
||||
FRAMECHECK_BARELY,
|
||||
FRAMECHECK_STRICT_CHUNKED,
|
||||
FRAMECHECK_STRICT
|
||||
};
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// nsHttpHandler - protocol handler for HTTP and HTTPS
|
||||
|
|
|
@ -1143,9 +1143,8 @@ void nsHttpTransaction::Close(nsresult reason) {
|
|||
// response that ends on exactly a chunk boundary also as partial.
|
||||
// Here a response must have the last 0-size chunk.
|
||||
if ((clevel == FRAMECHECK_STRICT) ||
|
||||
(mChunkedDecoder &&
|
||||
(mChunkedDecoder->GetChunkRemaining() ||
|
||||
(clevel == FRAMECHECK_STRICT_CHUNKED))) ||
|
||||
(mChunkedDecoder && (mChunkedDecoder->GetChunkRemaining() ||
|
||||
(clevel == FRAMECHECK_STRICT_CHUNKED))) ||
|
||||
(!mChunkedDecoder && !mContentDecoding && mContentDecodingCheck)) {
|
||||
reason = NS_ERROR_NET_PARTIAL_TRANSFER;
|
||||
LOG(("Partial transfer, incomplete HTTP response received: %s",
|
||||
|
|
|
@ -13,8 +13,7 @@
|
|||
// static
|
||||
nsHtml5HtmlAttributes* nsHtml5PlainTextUtils::NewLinkAttributes() {
|
||||
nsHtml5HtmlAttributes* linkAttrs = new nsHtml5HtmlAttributes(0);
|
||||
nsHtml5String rel =
|
||||
nsHtml5Portability::newStringFromLiteral("stylesheet");
|
||||
nsHtml5String rel = nsHtml5Portability::newStringFromLiteral("stylesheet");
|
||||
linkAttrs->addAttribute(nsHtml5AttributeName::ATTR_REL, rel, -1);
|
||||
nsHtml5String href = nsHtml5Portability::newStringFromLiteral(
|
||||
"resource://content-accessible/plaintext.css");
|
||||
|
|
|
@ -31,9 +31,11 @@ static LazyLogModule gTrustDomainPRLog("CSTrustDomain");
|
|||
CSTrustDomain::CSTrustDomain(UniqueCERTCertList& certChain)
|
||||
: mCertChain(certChain),
|
||||
#ifdef MOZ_NEW_CERT_STORAGE
|
||||
mCertBlocklist(do_GetService(NS_CERT_STORAGE_CID)) {}
|
||||
mCertBlocklist(do_GetService(NS_CERT_STORAGE_CID)) {
|
||||
}
|
||||
#else
|
||||
mCertBlocklist(do_GetService(NS_CERTBLOCKLIST_CONTRACTID)) {}
|
||||
mCertBlocklist(do_GetService(NS_CERTBLOCKLIST_CONTRACTID)) {
|
||||
}
|
||||
#endif
|
||||
|
||||
Result CSTrustDomain::GetCertTrust(EndEntityOrCA endEntityOrCA,
|
||||
|
|
|
@ -48,17 +48,19 @@ static BOOL WINAPI patched_DuplicateHandle(
|
|||
dwDesiredAccess, bInheritHandle, dwOptions);
|
||||
}
|
||||
|
||||
typedef BOOL (WINAPI* ApiSetQueryApiSetPresence_func)(PCUNICODE_STRING, PBOOLEAN);
|
||||
static WindowsDllInterceptor::FuncHookType<ApiSetQueryApiSetPresence_func> stub_ApiSetQueryApiSetPresence;
|
||||
typedef BOOL(WINAPI* ApiSetQueryApiSetPresence_func)(PCUNICODE_STRING,
|
||||
PBOOLEAN);
|
||||
static WindowsDllInterceptor::FuncHookType<ApiSetQueryApiSetPresence_func>
|
||||
stub_ApiSetQueryApiSetPresence;
|
||||
|
||||
static const WCHAR gApiSetNtUserWindowStation[] =
|
||||
L"ext-ms-win-ntuser-windowstation-l1-1-0";
|
||||
L"ext-ms-win-ntuser-windowstation-l1-1-0";
|
||||
|
||||
static BOOL WINAPI patched_ApiSetQueryApiSetPresence(
|
||||
PCUNICODE_STRING aNamespace, PBOOLEAN aPresent) {
|
||||
if (aNamespace && aPresent && !wcsncmp(aNamespace->Buffer,
|
||||
gApiSetNtUserWindowStation,
|
||||
aNamespace->Length / sizeof(WCHAR))) {
|
||||
if (aNamespace && aPresent &&
|
||||
!wcsncmp(aNamespace->Buffer, gApiSetNtUserWindowStation,
|
||||
aNamespace->Length / sizeof(WCHAR))) {
|
||||
*aPresent = FALSE;
|
||||
return TRUE;
|
||||
}
|
||||
|
@ -99,10 +101,9 @@ static void EnableApiQueryInterception() {
|
|||
}
|
||||
|
||||
gApiQueryIntercept.Init(L"Api-ms-win-core-apiquery-l1-1-0.dll");
|
||||
DebugOnly<bool> hookSetOk =
|
||||
stub_ApiSetQueryApiSetPresence.Set(gApiQueryIntercept,
|
||||
"ApiSetQueryApiSetPresence",
|
||||
&patched_ApiSetQueryApiSetPresence);
|
||||
DebugOnly<bool> hookSetOk = stub_ApiSetQueryApiSetPresence.Set(
|
||||
gApiQueryIntercept, "ApiSetQueryApiSetPresence",
|
||||
&patched_ApiSetQueryApiSetPresence);
|
||||
MOZ_ASSERT(hookSetOk);
|
||||
}
|
||||
|
||||
|
|
|
@ -1763,7 +1763,8 @@ nsNavBookmarks::RemoveObserver(nsINavBookmarkObserver* aObserver) {
|
|||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
nsNavBookmarks::GetObservers(nsTArray<RefPtr<nsINavBookmarkObserver>>& aObservers) {
|
||||
nsNavBookmarks::GetObservers(
|
||||
nsTArray<RefPtr<nsINavBookmarkObserver>>& aObservers) {
|
||||
aObservers.Clear();
|
||||
|
||||
if (!mCanNotify) return NS_OK;
|
||||
|
|
|
@ -299,7 +299,8 @@ nsFormFillController::MarkAsLoginManagerField(HTMLInputElement* aInput) {
|
|||
}
|
||||
|
||||
if (!mLoginManagerAC) {
|
||||
mLoginManagerAC = do_GetService("@mozilla.org/login-manager/autocompletesearch;1");
|
||||
mLoginManagerAC =
|
||||
do_GetService("@mozilla.org/login-manager/autocompletesearch;1");
|
||||
}
|
||||
|
||||
return NS_OK;
|
||||
|
@ -708,7 +709,8 @@ nsFormFillController::StartSearch(const nsAString& aSearchString,
|
|||
// MarkAsLoginManagerField wasn't called because password manager is
|
||||
// disabled.
|
||||
if (!mLoginManagerAC) {
|
||||
mLoginManagerAC = do_GetService("@mozilla.org/login-manager/autocompletesearch;1");
|
||||
mLoginManagerAC =
|
||||
do_GetService("@mozilla.org/login-manager/autocompletesearch;1");
|
||||
}
|
||||
|
||||
if (NS_WARN_IF(!mLoginManagerAC)) {
|
||||
|
@ -718,7 +720,8 @@ nsFormFillController::StartSearch(const nsAString& aSearchString,
|
|||
// XXX aPreviousResult shouldn't ever be a historyResult type, since we're
|
||||
// not letting satchel manage the field?
|
||||
mLastListener = aListener;
|
||||
rv = mLoginManagerAC->StartSearch(aSearchString, aPreviousResult, mFocusedInput, this);
|
||||
rv = mLoginManagerAC->StartSearch(aSearchString, aPreviousResult,
|
||||
mFocusedInput, this);
|
||||
NS_ENSURE_SUCCESS(rv, rv);
|
||||
} else {
|
||||
MOZ_LOG(sLogger, LogLevel::Debug, ("StartSearch: non-login field"));
|
||||
|
|
|
@ -517,4 +517,4 @@ void TabListener::RemoveListeners() {
|
|||
}
|
||||
}
|
||||
|
||||
TabListener::~TabListener() { RemoveListeners();}
|
||||
TabListener::~TabListener() { RemoveListeners(); }
|
||||
|
|
|
@ -548,7 +548,7 @@ nsAppStartup::GetWasRestarted(bool* aResult) {
|
|||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
nsAppStartup::GetSecondsSinceLastOSRestart(int64_t *aResult) {
|
||||
nsAppStartup::GetSecondsSinceLastOSRestart(int64_t* aResult) {
|
||||
#if defined(XP_WIN)
|
||||
*aResult = int64_t(GetTickCount64() / 1000ull);
|
||||
return NS_OK;
|
||||
|
|
|
@ -233,7 +233,8 @@ void GetEncodedOriginStrings(
|
|||
nsAutoJSString jsStr;
|
||||
ASSERT_TRUE(jsStr.init(aCx, encodingVal));
|
||||
|
||||
nsPrintfCString encoding(aEncoding.get(), i % TelemetryOrigin::SizeOfPrioDatasPerMetric());
|
||||
nsPrintfCString encoding(aEncoding.get(),
|
||||
i % TelemetryOrigin::SizeOfPrioDatasPerMetric());
|
||||
ASSERT_TRUE(NS_ConvertUTF16toUTF8(jsStr) == encoding)
|
||||
<< "Actual 'encoding' (" << NS_ConvertUTF16toUTF8(jsStr).get()
|
||||
<< ") must match expected (" << encoding << ")";
|
||||
|
|
|
@ -35,10 +35,8 @@ static LazyLogModule gUrlClassifierPrefixSetLog("UrlClassifierPrefixSet");
|
|||
NS_IMPL_ISUPPORTS(nsUrlClassifierPrefixSet, nsIUrlClassifierPrefixSet,
|
||||
nsIMemoryReporter)
|
||||
|
||||
|
||||
nsUrlClassifierPrefixSet::nsUrlClassifierPrefixSet()
|
||||
: mLock("nsUrlClassifierPrefixSet.mLock"),
|
||||
mTotalPrefixes(0) {}
|
||||
: mLock("nsUrlClassifierPrefixSet.mLock"), mTotalPrefixes(0) {}
|
||||
|
||||
NS_IMETHODIMP
|
||||
nsUrlClassifierPrefixSet::Init(const nsACString& aName) {
|
||||
|
|
|
@ -491,5 +491,7 @@ TEST_P(UrlClassifierPrefixSetTest, LoadSaveNoDelta) {
|
|||
file->Remove(false);
|
||||
}
|
||||
|
||||
// To run the same test for different configurations of "browser_safebrowsing_prefixset_max_array_size"
|
||||
INSTANTIATE_TEST_CASE_P(UrlClassifierPrefixSetTest, UrlClassifierPrefixSetTest, ::testing::Values(0, UINT32_MAX));
|
||||
// To run the same test for different configurations of
|
||||
// "browser_safebrowsing_prefixset_max_array_size"
|
||||
INSTANTIATE_TEST_CASE_P(UrlClassifierPrefixSetTest, UrlClassifierPrefixSetTest,
|
||||
::testing::Values(0, UINT32_MAX));
|
||||
|
|
|
@ -170,8 +170,7 @@ struct DirtyPageSet {
|
|||
InfallibleVector<DirtyPage, 256, AllocPolicy<MemoryKind::DirtyPageSet>>
|
||||
mPages;
|
||||
|
||||
explicit DirtyPageSet(size_t aCheckpoint)
|
||||
: mCheckpoint(aCheckpoint) {}
|
||||
explicit DirtyPageSet(size_t aCheckpoint) : mCheckpoint(aCheckpoint) {}
|
||||
};
|
||||
|
||||
// Worklist used by each snapshot thread.
|
||||
|
|
|
@ -65,9 +65,8 @@ void RestoreCheckpointAndResume(size_t aCheckpoint) {
|
|||
MOZ_RELEASE_ASSERT(IsReplaying());
|
||||
MOZ_RELEASE_ASSERT(Thread::CurrentIsMainThread());
|
||||
MOZ_RELEASE_ASSERT(!AreThreadEventsPassedThrough());
|
||||
MOZ_RELEASE_ASSERT(
|
||||
aCheckpoint == gRewindInfo->mLastCheckpoint ||
|
||||
aCheckpoint < gRewindInfo->mLastCheckpoint);
|
||||
MOZ_RELEASE_ASSERT(aCheckpoint == gRewindInfo->mLastCheckpoint ||
|
||||
aCheckpoint < gRewindInfo->mLastCheckpoint);
|
||||
|
||||
// Make sure we don't lose pending main thread callbacks due to rewinding.
|
||||
{
|
||||
|
@ -82,8 +81,7 @@ void RestoreCheckpointAndResume(size_t aCheckpoint) {
|
|||
{
|
||||
// Rewind heap memory to the target checkpoint, which must have been saved.
|
||||
AutoDisallowMemoryChanges disallow;
|
||||
size_t newCheckpoint =
|
||||
gRewindInfo->mSavedCheckpoints.back().mCheckpoint;
|
||||
size_t newCheckpoint = gRewindInfo->mSavedCheckpoints.back().mCheckpoint;
|
||||
RestoreMemoryToLastSavedCheckpoint();
|
||||
while (aCheckpoint < newCheckpoint) {
|
||||
gRewindInfo->mSavedCheckpoints.back().ReleaseContents();
|
||||
|
@ -97,9 +95,8 @@ void RestoreCheckpointAndResume(size_t aCheckpoint) {
|
|||
FixupFreeRegionsAfterRewind();
|
||||
|
||||
double end = CurrentTime();
|
||||
PrintSpew("Restore #%d -> #%d %.2fs\n",
|
||||
(int)gRewindInfo->mLastCheckpoint, (int)aCheckpoint,
|
||||
(end - start) / 1000000.0);
|
||||
PrintSpew("Restore #%d -> #%d %.2fs\n", (int)gRewindInfo->mLastCheckpoint,
|
||||
(int)aCheckpoint, (end - start) / 1000000.0);
|
||||
|
||||
// Finally, let threads restore themselves to their stacks at the checkpoint
|
||||
// we are rewinding to.
|
||||
|
|
|
@ -76,8 +76,7 @@ struct SavedCheckpoint {
|
|||
size_t mCheckpoint;
|
||||
SavedThreadStack mStacks[MaxRecordedThreadId];
|
||||
|
||||
explicit SavedCheckpoint(size_t aCheckpoint)
|
||||
: mCheckpoint(aCheckpoint) {}
|
||||
explicit SavedCheckpoint(size_t aCheckpoint) : mCheckpoint(aCheckpoint) {}
|
||||
|
||||
void ReleaseContents() {
|
||||
for (SavedThreadStack& stack : mStacks) {
|
||||
|
|
|
@ -224,9 +224,7 @@ void Channel::SendMessage(Message&& aMsg) {
|
|||
|
||||
PrintMessage("SendMsg", aMsg);
|
||||
|
||||
if (gSimulatedLatency &&
|
||||
gSimulatedBandwidth &&
|
||||
mSimulateDelays &&
|
||||
if (gSimulatedLatency && gSimulatedBandwidth && mSimulateDelays &&
|
||||
MessageSubjectToSimulatedDelay(aMsg.mType)) {
|
||||
AutoEnsurePassThroughThreadEvents pt;
|
||||
|
||||
|
@ -243,7 +241,7 @@ void Channel::SendMessage(Message&& aMsg) {
|
|||
// The receive time of the message is the time the message finishes sending
|
||||
// plus the connection latency.
|
||||
TimeStamp receiveTime =
|
||||
mAvailableTime + TimeDuration::FromMilliseconds(gSimulatedLatency);
|
||||
mAvailableTime + TimeDuration::FromMilliseconds(gSimulatedLatency);
|
||||
|
||||
aMsg.mReceiveTime = (receiveTime - mStartTime).ToMilliseconds();
|
||||
}
|
||||
|
@ -318,7 +316,7 @@ Message::UniquePtr Channel::WaitForMessage() {
|
|||
// If there is a simulated delay on the message, wait until it completes.
|
||||
if (res->mReceiveTime) {
|
||||
TimeStamp receiveTime =
|
||||
mStartTime + TimeDuration::FromMilliseconds(res->mReceiveTime);
|
||||
mStartTime + TimeDuration::FromMilliseconds(res->mReceiveTime);
|
||||
while (receiveTime > TimeStamp::Now()) {
|
||||
MonitorAutoLock lock(mMonitor);
|
||||
mMonitor.WaitUntil(receiveTime);
|
||||
|
|
|
@ -109,7 +109,7 @@ struct Message {
|
|||
|
||||
protected:
|
||||
Message(MessageType aType, uint32_t aSize)
|
||||
: mType(aType), mReceiveTime(0), mSize(aSize) {
|
||||
: mType(aType), mReceiveTime(0), mSize(aSize) {
|
||||
MOZ_RELEASE_ASSERT(mSize >= sizeof(*this));
|
||||
}
|
||||
|
||||
|
|
|
@ -120,9 +120,9 @@ static void ChannelMessageHandler(Message::UniquePtr aMsg) {
|
|||
js::CharBuffer* buf = new js::CharBuffer();
|
||||
buf->append(nmsg.Buffer(), nmsg.BufferSize());
|
||||
PauseMainThreadAndInvokeCallback([=]() {
|
||||
js::ManifestStart(*buf);
|
||||
delete buf;
|
||||
});
|
||||
js::ManifestStart(*buf);
|
||||
delete buf;
|
||||
});
|
||||
break;
|
||||
}
|
||||
case MessageType::MiddlemanCallResponse: {
|
||||
|
@ -150,8 +150,8 @@ static void ListenForCheckpointThreadMain(void*) {
|
|||
uint8_t data = 0;
|
||||
ssize_t rv = HANDLE_EINTR(read(gCheckpointReadFd, &data, 1));
|
||||
if (rv > 0) {
|
||||
NS_DispatchToMainThread(NewRunnableFunction("NewCheckpoint",
|
||||
NewCheckpoint));
|
||||
NS_DispatchToMainThread(
|
||||
NewRunnableFunction("NewCheckpoint", NewCheckpoint));
|
||||
} else {
|
||||
MOZ_RELEASE_ASSERT(errno == EIO);
|
||||
MOZ_RELEASE_ASSERT(HasDivergedFromRecording());
|
||||
|
@ -488,8 +488,8 @@ static void PaintFromMainThread() {
|
|||
|
||||
if (IsMainChild() && gDrawTargetBuffer) {
|
||||
memcpy(gGraphicsShmem, gDrawTargetBuffer, gDrawTargetBufferSize);
|
||||
gChannel->SendMessage(PaintMessage(GetLastCheckpoint(),
|
||||
gPaintWidth, gPaintHeight));
|
||||
gChannel->SendMessage(
|
||||
PaintMessage(GetLastCheckpoint(), gPaintWidth, gPaintHeight));
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -579,7 +579,7 @@ bool CurrentRepaintCannotFail() {
|
|||
void ManifestFinished(const js::CharBuffer& aBuffer) {
|
||||
MOZ_RELEASE_ASSERT(NS_IsMainThread());
|
||||
ManifestFinishedMessage* msg =
|
||||
ManifestFinishedMessage::New(aBuffer.begin(), aBuffer.length());
|
||||
ManifestFinishedMessage::New(aBuffer.begin(), aBuffer.length());
|
||||
PauseMainThreadAndInvokeCallback([=]() {
|
||||
gChannel->SendMessage(std::move(*msg));
|
||||
free(msg);
|
||||
|
|
|
@ -313,9 +313,7 @@ void SetupDevtoolsSandbox() {
|
|||
InitializeScriptHits();
|
||||
}
|
||||
|
||||
bool IsInitialized() {
|
||||
return !!gReplay;
|
||||
}
|
||||
bool IsInitialized() { return !!gReplay; }
|
||||
|
||||
extern "C" {
|
||||
|
||||
|
@ -574,8 +572,8 @@ static bool RecordReplay_AreThreadEventsDisallowed(JSContext* aCx,
|
|||
return true;
|
||||
}
|
||||
|
||||
static bool RecordReplay_DivergeFromRecording(JSContext* aCx,
|
||||
unsigned aArgc, Value* aVp) {
|
||||
static bool RecordReplay_DivergeFromRecording(JSContext* aCx, unsigned aArgc,
|
||||
Value* aVp) {
|
||||
CallArgs args = CallArgsFromVp(aArgc, aVp);
|
||||
DivergeFromRecording();
|
||||
args.rval().setUndefined();
|
||||
|
@ -585,7 +583,7 @@ static bool RecordReplay_DivergeFromRecording(JSContext* aCx,
|
|||
static bool RecordReplay_ProgressCounter(JSContext* aCx, unsigned aArgc,
|
||||
Value* aVp) {
|
||||
CallArgs args = CallArgsFromVp(aArgc, aVp);
|
||||
args.rval().setNumber((double) gProgressCounter);
|
||||
args.rval().setNumber((double)gProgressCounter);
|
||||
return true;
|
||||
}
|
||||
|
||||
|
@ -661,7 +659,7 @@ static bool RecordReplay_ResumeExecution(JSContext* aCx, unsigned aArgc,
|
|||
}
|
||||
|
||||
static bool RecordReplay_RestoreCheckpoint(JSContext* aCx, unsigned aArgc,
|
||||
Value* aVp) {
|
||||
Value* aVp) {
|
||||
CallArgs args = CallArgsFromVp(aArgc, aVp);
|
||||
|
||||
if (!args.get(0).isNumber()) {
|
||||
|
@ -765,8 +763,8 @@ struct ScriptHitInfo {
|
|||
// The most recent checkpoint prior to the hit.
|
||||
uint32_t mCheckpoint;
|
||||
|
||||
// Index of the frame where the hit occurred, or UINT32_MAX if this represents
|
||||
// an aggregate set of hits after the checkpoint.
|
||||
// Index of the frame where the hit occurred, or UINT32_MAX if this
|
||||
// represents an aggregate set of hits after the checkpoint.
|
||||
uint32_t mFrameIndex;
|
||||
|
||||
// Progress counter when the hit occurred, invalid if this represents an
|
||||
|
@ -778,7 +776,8 @@ struct ScriptHitInfo {
|
|||
|
||||
ScriptHit(uint32_t aCheckpoint, uint32_t aFrameIndex,
|
||||
ProgressCounter aProgress)
|
||||
: mCheckpoint(aCheckpoint), mFrameIndex(aFrameIndex),
|
||||
: mCheckpoint(aCheckpoint),
|
||||
mFrameIndex(aFrameIndex),
|
||||
mProgress(aProgress) {}
|
||||
};
|
||||
|
||||
|
@ -801,13 +800,14 @@ struct ScriptHitInfo {
|
|||
}
|
||||
|
||||
static bool match(const ScriptHitKey& aFirst, const ScriptHitKey& aSecond) {
|
||||
return aFirst.mScript == aSecond.mScript
|
||||
&& aFirst.mOffset == aSecond.mOffset;
|
||||
return aFirst.mScript == aSecond.mScript &&
|
||||
aFirst.mOffset == aSecond.mOffset;
|
||||
}
|
||||
};
|
||||
|
||||
typedef HashMap<ScriptHitKey, ScriptHitChunk*, ScriptHitKey,
|
||||
AllocPolicy<MemoryKind::ScriptHits>> ScriptHitMap;
|
||||
AllocPolicy<MemoryKind::ScriptHits>>
|
||||
ScriptHitMap;
|
||||
ScriptHitMap mTable;
|
||||
ScriptHitChunk* mFreeChunk;
|
||||
|
||||
|
@ -871,8 +871,7 @@ static bool RecordReplay_AddScriptHit(JSContext* aCx, unsigned aArgc,
|
|||
Value* aVp) {
|
||||
CallArgs args = CallArgsFromVp(aArgc, aVp);
|
||||
|
||||
if (!args.get(0).isNumber() ||
|
||||
!args.get(1).isNumber() ||
|
||||
if (!args.get(0).isNumber() || !args.get(1).isNumber() ||
|
||||
!args.get(2).isNumber()) {
|
||||
JS_ReportErrorASCII(aCx, "Bad parameters");
|
||||
return false;
|
||||
|
@ -909,12 +908,12 @@ static bool RecordReplay_FindScriptHits(JSContext* aCx, unsigned aArgc,
|
|||
if (hit.mCheckpoint) {
|
||||
RootedObject hitObject(aCx, JS_NewObject(aCx, nullptr));
|
||||
if (!hitObject ||
|
||||
!JS_DefineProperty(aCx, hitObject, "checkpoint",
|
||||
hit.mCheckpoint, JSPROP_ENUMERATE) ||
|
||||
!JS_DefineProperty(aCx, hitObject, "checkpoint", hit.mCheckpoint,
|
||||
JSPROP_ENUMERATE) ||
|
||||
!JS_DefineProperty(aCx, hitObject, "progress",
|
||||
(double) hit.mProgress, JSPROP_ENUMERATE) ||
|
||||
!JS_DefineProperty(aCx, hitObject, "frameIndex",
|
||||
hit.mFrameIndex, JSPROP_ENUMERATE) ||
|
||||
(double)hit.mProgress, JSPROP_ENUMERATE) ||
|
||||
!JS_DefineProperty(aCx, hitObject, "frameIndex", hit.mFrameIndex,
|
||||
JSPROP_ENUMERATE) ||
|
||||
!values.append(ObjectValue(*hitObject))) {
|
||||
return false;
|
||||
}
|
||||
|
|
|
@ -21,7 +21,7 @@ namespace recordreplay {
|
|||
struct Message;
|
||||
|
||||
namespace parent {
|
||||
class ChildProcessInfo;
|
||||
class ChildProcessInfo;
|
||||
}
|
||||
|
||||
namespace js {
|
||||
|
|
|
@ -105,9 +105,9 @@ LauncherVoidResult LauncherRegistryInfo::ReflectTelemetryPrefToRegistry(
|
|||
|
||||
DWORD value = aEnable ? 1UL : 0UL;
|
||||
DWORD len = sizeof(value);
|
||||
LSTATUS result = ::RegSetValueExW(mRegKey.get(), valueName.c_str(), 0,
|
||||
REG_DWORD, reinterpret_cast<PBYTE>(&value),
|
||||
len);
|
||||
LSTATUS result =
|
||||
::RegSetValueExW(mRegKey.get(), valueName.c_str(), 0, REG_DWORD,
|
||||
reinterpret_cast<PBYTE>(&value), len);
|
||||
if (result != ERROR_SUCCESS) {
|
||||
return LAUNCHER_ERROR_FROM_WIN32(result);
|
||||
}
|
||||
|
@ -443,9 +443,9 @@ LauncherResult<bool> LauncherRegistryInfo::GetTelemetrySetting() {
|
|||
DWORD value;
|
||||
DWORD valueLen = sizeof(value);
|
||||
DWORD type;
|
||||
LSTATUS result = ::RegQueryValueExW(
|
||||
mRegKey.get(), telemetryValueName.c_str(), nullptr, &type,
|
||||
reinterpret_cast<PBYTE>(&value), &valueLen);
|
||||
LSTATUS result =
|
||||
::RegQueryValueExW(mRegKey.get(), telemetryValueName.c_str(), nullptr,
|
||||
&type, reinterpret_cast<PBYTE>(&value), &valueLen);
|
||||
if (result == ERROR_FILE_NOT_FOUND) {
|
||||
// Value does not exist, treat as false
|
||||
return false;
|
||||
|
|
Некоторые файлы не были показаны из-за слишком большого количества измененных файлов Показать больше
Загрузка…
Ссылка в новой задаче