зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1825233 - Cut SpeechSynthesis over to RFPTarget. r=tjr
Differential Revision: https://phabricator.services.mozilla.com/D173944
This commit is contained in:
Родитель
87bb7d04d6
Коммит
0c70ea0a2f
|
@ -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
|
||||
|
|
Загрузка…
Ссылка в новой задаче