Skip to content
Snippets Groups Projects
Commit 0c70ea0a authored by Tom Schuster's avatar Tom Schuster
Browse files

Bug 1825233 - Cut SpeechSynthesis over to RFPTarget. r=tjr

parent 87bb7d04
No related branches found
No related tags found
No related merge requests found
......@@ -225,7 +225,8 @@ void SpeechSynthesis::GetVoices(
nsCOMPtr<nsPIDOMWindowInner> window = GetOwner();
nsCOMPtr<nsIDocShell> docShell = window ? window->GetDocShell() : nullptr;
if (nsContentUtils::ShouldResistFingerprinting(docShell)) {
if (nsContentUtils::ShouldResistFingerprinting(docShell,
RFPTarget::SpeechSynthesis)) {
return;
}
......@@ -298,7 +299,8 @@ SpeechSynthesis::Observe(nsISupports* aSubject, const char* aTopic,
nsCOMPtr<nsPIDOMWindowInner> window = GetOwner();
nsCOMPtr<nsIDocShell> docShell = window ? window->GetDocShell() : nullptr;
if (!nsContentUtils::ShouldResistFingerprinting(docShell)) {
if (!nsContentUtils::ShouldResistFingerprinting(
docShell, RFPTarget::SpeechSynthesis)) {
DispatchTrustedEvent(u"voiceschanged"_ns);
// If we have a pending item, and voices become available, speak it.
if (!mCurrentTask && !mHoldQueue && HasVoices()) {
......
......@@ -35,7 +35,8 @@ SpeechSynthesisUtterance::SpeechSynthesisUtterance(
mPitch(1),
mPaused(false),
mShouldResistFingerprinting(
aOwnerWindow->AsGlobal()->ShouldResistFingerprinting()) {}
aOwnerWindow->AsGlobal()->ShouldResistFingerprinting(
RFPTarget::SpeechSynthesis)) {}
SpeechSynthesisUtterance::~SpeechSynthesisUtterance() = default;
......
......@@ -8,6 +8,8 @@ ITEM_VALUE(TouchEvents, 0x0001)
ITEM_VALUE(ScreenOrientation, 0x0005)
// SpeechSynthesis part of the Web Speech API
ITEM_VALUE(SpeechSynthesis, 0x0006)
/*
* Certain classes (Document, at time of writing) have a cached value for
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment