RESOLVED FIXED 43146
Runtime feature switch for speech input
https://bugs.webkit.org/show_bug.cgi?id=43146
Summary Runtime feature switch for speech input
Satish Sampath
Reported 2010-07-28 14:18:11 PDT
Runtime feature switch for speech input
Attachments
Patch (6.18 KB, patch)
2010-07-28 14:45 PDT, Satish Sampath
no flags
Satish Sampath
Comment 1 2010-07-28 14:45:57 PDT
Steve Block
Comment 2 2010-07-29 03:06:55 PDT
Comment on attachment 62879 [details] Patch WebCore/bindings/generic/RuntimeEnabledFeatures.h:123 + static bool speechInputEnabled() { return isSpeechInputEnabled; } For DeviceOrientation, the flag was used by Page to prevent the controller being created if the feature is disabled. Is there no equivalent use for Speech?
Satish Sampath
Comment 3 2010-07-29 03:08:15 PDT
The flag is used to not expose the 'speech' attribute in HTMLInputElement.idl . Without that attribute, the page cannot turn on speech input, hence nothing else needs to be disabled in code.
Steve Block
Comment 4 2010-07-29 03:19:52 PDT
> The flag is used to not expose the 'speech' attribute in HTMLInputElement.idl . Without that attribute, > the page cannot turn on speech input, hence nothing else needs to be disabled in code. Sure, but I think Hans added the extra use of the flag for DeviceOrientation to avoid unnecessary member initialisation. Just wondering if we can do any of that here, for consistency?
Satish Sampath
Comment 5 2010-07-29 03:22:13 PDT
For speech input, the controller (of type SpeechInput) is created in Webcore/page/Page.cpp lazily, i.e. on first use. Without the IDL attribute enabled at runtime, this call will never be made so the controller will remain null.
Steve Block
Comment 6 2010-07-29 03:24:30 PDT
Comment on attachment 62879 [details] Patch r=me
Hans Wennborg
Comment 7 2010-07-29 03:32:12 PDT
(In reply to comment #4) > > The flag is used to not expose the 'speech' attribute in HTMLInputElement.idl . Without that attribute, > > the page cannot turn on speech input, hence nothing else needs to be disabled in code. > Sure, but I think Hans added the extra use of the flag for DeviceOrientation to avoid unnecessary member initialisation. Just wondering if we can do any of that here, for consistency? The reason for the extra use of the flag was to prevent the controller being instantiated if a page did window.addEventListener('deviceorientation'). As I understand, that shouldn't be an issue with speech, as the attribute to the input tag is the only entry point to this functionality.
WebKit Commit Bot
Comment 8 2010-07-29 04:28:05 PDT
Comment on attachment 62879 [details] Patch Clearing flags on attachment: 62879 Committed r64269: <http://trac.webkit.org/changeset/64269>
WebKit Commit Bot
Comment 9 2010-07-29 04:28:10 PDT
All reviewed patches have been landed. Closing bug.
WebKit Review Bot
Comment 10 2010-07-29 05:40:01 PDT
http://trac.webkit.org/changeset/64269 might have broken Chromium Win Release
Note You need to log in before you can comment on or make changes to this bug.