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