WebKit Bugzilla
New
Browse
Search+
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
211776
REGRESSION (iOS 13.4.1): SpeechSynthesisUtterance.onend event won't fire on cancel().
https://bugs.webkit.org/show_bug.cgi?id=211776
Summary
REGRESSION (iOS 13.4.1): SpeechSynthesisUtterance.onend event won't fire on c...
Takao Baba
Reported
2020-05-12 03:44:54 PDT
Created
attachment 399117
[details]
testcase Step to reproduce: 1. Open attached test.html 2. Click "play" button. 3. Click "stop" button before the speaking finished. Expected behavior: An alert "on end" should be shown. Actual result: No alert is shown. UA: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_4) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/13.1 Safari/605.1.15 Remarks: This issue occurs on iOS 13.4.1, while iOS 13.3.1 does not have the issue. Able to reproduce on both simulator and real device. (Probably Safari on macOS has same issue, but details have not been confirmed.)
Attachments
testcase
(1.03 KB, text/html)
2020-05-12 03:44 PDT
,
Takao Baba
no flags
Details
testcase2
(956 bytes, text/html)
2020-05-12 18:09 PDT
,
Takao Baba
no flags
Details
patch
(1.90 KB, patch)
2020-05-13 01:01 PDT
,
chris fleizach
no flags
Details
Formatted Diff
Diff
View All
Add attachment
proposed patch, testcase, etc.
Radar WebKit Bug Importer
Comment 1
2020-05-12 03:45:03 PDT
<
rdar://problem/63130249
>
chris fleizach
Comment 2
2020-05-12 08:03:13 PDT
(In reply to Takao Baba from
comment #0
)
> Created
attachment 399117
[details]
> testcase > > Step to reproduce: > 1. Open attached test.html > 2. Click "play" button. > 3. Click "stop" button before the speaking finished. > > Expected behavior: > An alert "on end" should be shown. > > Actual result: > No alert is shown. > > UA: > Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_4) AppleWebKit/605.1.15 (KHTML, > like Gecko) Version/13.1 Safari/605.1.15 > > Remarks: > This issue occurs on iOS 13.4.1, while iOS 13.3.1 does not have the issue. > Able to reproduce on both simulator and real device. > > (Probably Safari on macOS has same issue, but details have not been > confirmed.)
It looks like "onerror" is fired when a cancel event is generated. I think this is correct based on spec usage 4.2.7. SpeechSynthesisErrorEvent Attributes The SpeechSynthesisErrorEvent is the interface used for the SpeechSynthesisUtterance error event. error attribute, of type SpeechSynthesisErrorCode, readonly The errorCode is an enumeration indicating what has gone wrong. The values are: "canceled" A cancel method call caused the SpeechSynthesisUtterance to be removed from the queue before it had begun being spoken.
https://wicg.github.io/speech-api/
Takao Baba
Comment 3
2020-05-12 18:09:25 PDT
Created
attachment 399215
[details]
testcase2
Takao Baba
Comment 4
2020-05-12 18:12:18 PDT
OK, I've understood that "onerror" should be fired rather than "onend". But neither onend nor onerror seem be called (see testcase2).
chris fleizach
Comment 5
2020-05-13 00:27:22 PDT
(In reply to Takao Baba from
comment #4
)
> OK, I've understood that "onerror" should be fired rather than "onend". > > But neither onend nor onerror seem be called (see testcase2).
Yep looks like a regression
chris fleizach
Comment 6
2020-05-13 01:01:21 PDT
Created
attachment 399247
[details]
patch
Alexey Proskuryakov
Comment 7
2020-05-15 12:31:35 PDT
Comment on
attachment 399247
[details]
patch View in context:
https://bugs.webkit.org/attachment.cgi?id=399247&action=review
> Source/WebCore/ChangeLog:3 > + REGRESSION (iOS 13.4.1): SpeechSynthesisUtterance.onend event won't fire on cancel().
Obvious question: can a regression test be made for this issue?
chris fleizach
Comment 8
2020-05-15 12:33:24 PDT
Comment on
attachment 399247
[details]
patch View in context:
https://bugs.webkit.org/attachment.cgi?id=399247&action=review
>> Source/WebCore/ChangeLog:3 >> + REGRESSION (iOS 13.4.1): SpeechSynthesisUtterance.onend event won't fire on cancel(). > > Obvious question: can a regression test be made for this issue?
we have one for the Mock synthesizer that goes all through WebCore. This one uses the synthesizer in the client, which AFAICT there were no tests added for. @Per, @Brent, is there a way to test this flow? Right now we use a mock synthesizer in these tests that bypasses this logic that was fixed
Brent Fulgham
Comment 9
2020-05-15 16:05:19 PDT
Comment on
attachment 399247
[details]
patch View in context:
https://bugs.webkit.org/attachment.cgi?id=399247&action=review
>>> Source/WebCore/ChangeLog:3 >>> + REGRESSION (iOS 13.4.1): SpeechSynthesisUtterance.onend event won't fire on cancel(). >> >> Obvious question: can a regression test be made for this issue? > > we have one for the Mock synthesizer that goes all through WebCore. This one uses the synthesizer in the client, which AFAICT there were no tests added for. > > @Per, @Brent, is there a way to test this flow? Right now we use a mock synthesizer in these tests that bypasses this logic that was fixed
I do not know of a way to test the system speech synthesizer flow.
Per Arne Vollan
Comment 10
2020-05-15 16:16:22 PDT
Comment on
attachment 399247
[details]
patch View in context:
https://bugs.webkit.org/attachment.cgi?id=399247&action=review
R=me.
>>> Source/WebCore/ChangeLog:3 >>> + REGRESSION (iOS 13.4.1): SpeechSynthesisUtterance.onend event won't fire on cancel(). >> >> Obvious question: can a regression test be made for this issue? > > we have one for the Mock synthesizer that goes all through WebCore. This one uses the synthesizer in the client, which AFAICT there were no tests added for. > > @Per, @Brent, is there a way to test this flow? Right now we use a mock synthesizer in these tests that bypasses this logic that was fixed
I am not sure how to write a test for this. Is it possible to write a layout test that does not use a mock synthesizer?
> Source/WebCore/ChangeLog:17 > + (WebCore::SpeechSynthesis::cancel):
Perhaps you could include an explanation here if creating a test is not feasible.
chris fleizach
Comment 11
2020-05-15 16:21:53 PDT
(In reply to Per Arne Vollan from
comment #10
)
> Comment on
attachment 399247
[details]
> patch > > View in context: >
https://bugs.webkit.org/attachment.cgi?id=399247&action=review
> > R=me. > > >>> Source/WebCore/ChangeLog:3 > >>> + REGRESSION (iOS 13.4.1): SpeechSynthesisUtterance.onend event won't fire on cancel(). > >> > >> Obvious question: can a regression test be made for this issue? > > > > we have one for the Mock synthesizer that goes all through WebCore. This one uses the synthesizer in the client, which AFAICT there were no tests added for. > > > > @Per, @Brent, is there a way to test this flow? Right now we use a mock synthesizer in these tests that bypasses this logic that was fixed > > I am not sure how to write a test for this. Is it possible to write a layout > test that does not use a mock synthesizer?
There's some reason we didn't do this, but I can't remember now. Will try to research
> > > Source/WebCore/ChangeLog:17 > > + (WebCore::SpeechSynthesis::cancel): > > Perhaps you could include an explanation here if creating a test is not > feasible.
Yes
Alexey Proskuryakov
Comment 12
2020-05-15 16:58:54 PDT
Perhaps it could be mocked at a lower level? Trying to actually make sound through device's speakers wouldn't be OK :) Definitely not blocking this fix.
chris fleizach
Comment 13
2020-05-20 22:23:14 PDT
(In reply to Alexey Proskuryakov from
comment #12
)
> Perhaps it could be mocked at a lower level? Trying to actually make sound > through device's speakers wouldn't be OK :) >
Right, that might be why we moved away from using the actual synthesizer!
> Definitely not blocking this fix.
EWS
Comment 14
2020-05-20 22:46:57 PDT
Committed
r261984
: <
https://trac.webkit.org/changeset/261984
> All reviewed patches have been landed. Closing bug and clearing flags on
attachment 399247
[details]
.
Per Arne Vollan
Comment 15
2020-05-21 10:18:02 PDT
(In reply to chris fleizach from
comment #13
)
> (In reply to Alexey Proskuryakov from
comment #12
) > > Perhaps it could be mocked at a lower level? Trying to actually make sound > > through device's speakers wouldn't be OK :) > > > > Right, that might be why we moved away from using the actual synthesizer! > > > Definitely not blocking this fix.
Would it be possible to mute the sound?
chris fleizach
Comment 16
2020-05-21 10:36:33 PDT
(In reply to Per Arne Vollan from
comment #15
)
> (In reply to chris fleizach from
comment #13
) > > (In reply to Alexey Proskuryakov from
comment #12
) > > > Perhaps it could be mocked at a lower level? Trying to actually make sound > > > through device's speakers wouldn't be OK :) > > > > > > > Right, that might be why we moved away from using the actual synthesizer! > > > > > Definitely not blocking this fix. > > Would it be possible to mute the sound?
I think we could set the volume to 0 on all the speech requests
Alexey Proskuryakov
Comment 17
2020-05-21 10:49:38 PDT
Can the synthesizer be invoked multiple times in parallel without flaking?
chris fleizach
Comment 18
2020-05-21 10:50:20 PDT
(In reply to Alexey Proskuryakov from
comment #17
)
> Can the synthesizer be invoked multiple times in parallel without flaking?
on iOS yes, on macOS I am unsure
Note
You need to
log in
before you can comment on or make changes to this bug.
Top of Page
Format For Printing
XML
Clone This Bug