Closed Bug 1267309 Opened 9 years ago Closed 9 years ago

Disallow embedded speech control commands in synthesized text

Categories

(Core :: Web Speech, defect)

Unspecified
macOS
defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla49
Tracking Status
firefox49 --- fixed

People

(Reporter: eeejay, Assigned: eeejay)

References

Details

Attachments

(1 file)

OSX has its own set of speech commands that can be embedded in the synthesized text. We should disallow any command from executing, and we should simply read the text as-is.
Assignee: nobody → eitan
OS: Unspecified → Mac OS X
Comment on attachment 8746228 [details] MozReview Request: Bug 1267309 - Escape embedded speech command delimiters. r?m_kato Review request updated; see interdiff: https://reviewboard.mozilla.org/r/49321/diff/1-2/
Comment on attachment 8746228 [details] MozReview Request: Bug 1267309 - Escape embedded speech command delimiters. r?m_kato https://reviewboard.mozilla.org/r/49321/#review46283 ::: dom/media/webspeech/synth/cocoa/OSXSpeechSynthesizerService.mm:28 (Diff revision 2) > using namespace mozilla; > > class SpeechTaskCallback final : public nsISpeechTaskCallback > { > public: > - SpeechTaskCallback(nsISpeechTask* aTask, NSSpeechSynthesizer* aSynth) > + SpeechTaskCallback(nsISpeechTask* aTask, NSSpeechSynthesizer* aSynth, nsTArray<size_t>& aOffsets) nit: SpeechTaskCallback(..., const nsTArray<size_t>& aOffsets). ::: dom/media/webspeech/synth/cocoa/OSXSpeechSynthesizerService.mm:401 (Diff revision 2) > [synth setObject:[NSNumber numberWithInt:newPitch] > forProperty:NSSpeechPitchBaseProperty error:nil]; > } > > - RefPtr<SpeechTaskCallback> callback = new SpeechTaskCallback(aTask, synth); > + nsAutoString escapedText; > + nsTArray<size_t> offsets; add the following to reduce reallocation. offsets.SetCapacity(aText.Length());
Attachment #8746228 - Flags: review?(m_kato) → review+
Comment on attachment 8746228 [details] MozReview Request: Bug 1267309 - Escape embedded speech command delimiters. r?m_kato Review request updated; see interdiff: https://reviewboard.mozilla.org/r/49321/diff/2-3/
Status: NEW → RESOLVED
Closed: 9 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla49
Depends on: 1269221
Blocks: 1268633
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: