Closed
Bug 1267309
Opened 9 years ago
Closed 9 years ago
Disallow embedded speech control commands in synthesized text
Categories
(Core :: Web Speech, defect)
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 | ||
Updated•9 years ago
|
Assignee: nobody → eitan
Assignee | ||
Comment 1•9 years ago
|
||
Review commit: https://reviewboard.mozilla.org/r/49321/diff/#index_header
See other reviews: https://reviewboard.mozilla.org/r/49321/
Attachment #8746228 -
Flags: review?(m_kato)
Assignee | ||
Updated•9 years ago
|
OS: Unspecified → Mac OS X
Assignee | ||
Comment 2•9 years ago
|
||
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 3•9 years ago
|
||
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+
Assignee | ||
Comment 4•9 years ago
|
||
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/
Comment 6•9 years ago
|
||
bugherder |
Status: NEW → RESOLVED
Closed: 9 years ago
status-firefox49:
--- → fixed
Resolution: --- → FIXED
Target Milestone: --- → mozilla49
You need to log in
before you can comment on or make changes to this bug.
Description
•