Bug 110773

Summary: WebSpeech: change voiceURI to voice
Product: WebKit Reporter: chris fleizach <cfleizach>
Component: AccessibilityAssignee: chris fleizach <cfleizach>
Status: RESOLVED FIXED    
Severity: Normal CC: abarth, bdakin, dmazzoni, esprehn+autocc, ojan.autocc, thorton, webkit.review.bot
Priority: P2    
Version: 528+ (Nightly build)   
Hardware: Unspecified   
OS: Unspecified   
Bug Depends on:    
Bug Blocks: 106742    
Attachments:
Description Flags
patch thorton: review+

Comment 1 chris fleizach 2013-02-28 10:01:34 PST
E07 2013-02-25 (Important):
Section 5.2 IDL: SpeechSynthesisUtterance "attribute DOMString voiceURI" should be "attribute SpeechSynthesisVoice voice".
Section 5.2.3 SpeechSynthesisUtterance Attributes: "voiceURI attribute" should be "voice attribute", with the following definition:
The voice attribute specifies speech synthesis voice that the web application wishes to use. If, at the time of the play method call, this attribute has been set to one of the SpeechSynthesisVoice objects returned by getVoices, then the user agent MUST use that voice. If this attribute is unset or null at the time of the play method call, then the user agent MUST use a user agent default voice. The user agent default voice SHOULD support the current language (see "lang" attribute) and can be a local or remote speech service and can incorporate end user choices via interfaces provided by the user agent such as browser configuration parameters.
Section 5.2.6 SpeechSynthesisVoice: voiceURI attribute: "as described in the SpeechSynthesisUtterance voiceURI attribute" should be "either through use of a URN with meaning to the user agent or by specifying a URL that the user agent recognizes as a local service."
Comment 2 chris fleizach 2013-02-28 14:59:17 PST
Created attachment 190816 [details]
patch
Comment 3 chris fleizach 2013-02-28 15:02:03 PST
Adding Beth for review
Comment 4 Tim Horton 2013-03-04 13:20:53 PST
Comment on attachment 190816 [details]
patch

View in context: https://bugs.webkit.org/attachment.cgi?id=190816&action=review

I don't know enough about this code to know if the object lifetimes are right...

> Source/WebCore/Modules/speech/SpeechSynthesisUtterance.idl:-34
> -    attribute DOMString voiceURI;

Is it OK to just remove the old property?

> Source/WebCore/platform/PlatformSpeechSynthesisUtterance.cpp:35
> +    , m_voice(0)

null is the default value for RefPtr.

> Source/WebCore/platform/mac/PlatformSpeechSynthesizerMac.mm:86
> +    WebCore::PlatformSpeechSynthesisVoice *utteranceVoice = utterance->voice();

This * is on the wrong side; PlatformSpeechSynthesisVoice is a C++ class.
Comment 5 chris fleizach 2013-03-04 14:00:28 PST
(In reply to comment #4)
> (From update of attachment 190816 [details])
> View in context: https://bugs.webkit.org/attachment.cgi?id=190816&action=review
> 
> I don't know enough about this code to know if the object lifetimes are right...
> 
> > Source/WebCore/Modules/speech/SpeechSynthesisUtterance.idl:-34
> > -    attribute DOMString voiceURI;
> 
> Is it OK to just remove the old property?

This feature has not yet been enabled on any platform, so we should be ok

> 
> > Source/WebCore/platform/PlatformSpeechSynthesisUtterance.cpp:35
> > +    , m_voice(0)
> 
> null is the default value for RefPtr.
> 
> > Source/WebCore/platform/mac/PlatformSpeechSynthesizerMac.mm:86
> > +    WebCore::PlatformSpeechSynthesisVoice *utteranceVoice = utterance->voice();
> 
> This * is on the wrong side; PlatformSpeechSynthesisVoice is a C++ class.

hmm, bug in the style checker!
Comment 6 Tim Horton 2013-03-04 14:02:06 PST
(In reply to comment #5)
> (In reply to comment #4)
> > (From update of attachment 190816 [details] [details])
> > View in context: https://bugs.webkit.org/attachment.cgi?id=190816&action=review
> > 
> > I don't know enough about this code to know if the object lifetimes are right...
> > 
> > > Source/WebCore/Modules/speech/SpeechSynthesisUtterance.idl:-34
> > > -    attribute DOMString voiceURI;
> > 
> > Is it OK to just remove the old property?
> 
> This feature has not yet been enabled on any platform, so we should be ok

Perfect!

> > 
> > > Source/WebCore/platform/PlatformSpeechSynthesisUtterance.cpp:35
> > > +    , m_voice(0)
> > 
> > null is the default value for RefPtr.
> > 
> > > Source/WebCore/platform/mac/PlatformSpeechSynthesizerMac.mm:86
> > > +    WebCore::PlatformSpeechSynthesisVoice *utteranceVoice = utterance->voice();
> > 
> > This * is on the wrong side; PlatformSpeechSynthesisVoice is a C++ class.
> 
> hmm, bug in the style checker!

I don't think the style checker can tell if it's an C++ or ObjC class so it doesn't try to correct that particular style nit :D
Comment 7 chris fleizach 2013-03-04 14:43:57 PST
http://trac.webkit.org/changeset/144679