WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
52718
Send origin/url as part of speech input requests to the embedder.
https://bugs.webkit.org/show_bug.cgi?id=52718
Summary
Send origin/url as part of speech input requests to the embedder.
Satish Sampath
Reported
2011-01-19 06:29:15 PST
In the embedder we need the page/frame url which requests speech input. One example is for deciding when/whether to ask for user consent before starting speech input.
Attachments
Patch
(13.96 KB, patch)
2011-01-19 06:40 PST
,
Satish Sampath
no flags
Details
Formatted Diff
Diff
Patch
(14.54 KB, patch)
2011-01-19 07:58 PST
,
Satish Sampath
jorlow
: review+
Details
Formatted Diff
Diff
Show Obsolete
(1)
View All
Add attachment
proposed patch, testcase, etc.
Satish Sampath
Comment 1
2011-01-19 06:40:59 PST
Created
attachment 79415
[details]
Patch
Jeremy Orlow
Comment 2
2011-01-19 07:00:30 PST
Comment on
attachment 79415
[details]
Patch View in context:
https://bugs.webkit.org/attachment.cgi?id=79415&action=review
> Source/WebCore/page/SpeechInput.cpp:96 > +bool SpeechInput::startRecognition(int listenerId, const IntRect& elementRect, const AtomicString& language, const String& grammar, PassRefPtr<SecurityOrigin> origin)
Just pass a pointer.
> Source/WebCore/page/SpeechInput.h:65 > + bool startRecognition(int listenerId, const IntRect& elementRect, const AtomicString& language, const String& grammar, PassRefPtr<SecurityOrigin>);
ditto
> Source/WebCore/page/SpeechInputClient.h:54 > + virtual bool startRecognition(int requestId, const IntRect& elementRect, const AtomicString& language, const String& grammar, PassRefPtr<SecurityOrigin>) = 0;
ditto
> Source/WebCore/platform/mock/SpeechInputClientMock.cpp:54 > +bool SpeechInputClientMock::startRecognition(int requestId, const IntRect& elementRect, const AtomicString& language, const String& grammar, PassRefPtr<SecurityOrigin> origin)
ditto
> Source/WebCore/platform/mock/SpeechInputClientMock.h:57 > + bool startRecognition(int requestId, const IntRect& elementRect, const AtomicString& language, const String& grammar, PassRefPtr<SecurityOrigin>);
ditto
> Source/WebCore/rendering/TextControlInnerElements.cpp:440 > + RefPtr<SecurityOrigin> origin(SecurityOrigin::create(document()->url()));
You should be able to get this some other way.
> Source/WebCore/rendering/TextControlInnerElements.cpp:441 > + if (speechInput()->startRecognition(m_listenerId, rect, language, grammar, origin))
origin.get()
> Source/WebKit/chromium/src/SpeechInputClientImpl.cpp:67 > +bool SpeechInputClientImpl::startRecognition(int requestId, const WebCore::IntRect& elementRect, const AtomicString& language, const String& grammar, PassRefPtr<WebCore::SecurityOrigin> origin)
*
> Source/WebKit/chromium/src/SpeechInputClientImpl.h:61 > + bool startRecognition(int requestId, const WebCore::IntRect& elementRect, const AtomicString& language, const String& grammar, PassRefPtr<WebCore::SecurityOrigin>);
*
Satish Sampath
Comment 3
2011-01-19 07:58:50 PST
Created
attachment 79428
[details]
Patch
Satish Sampath
Comment 4
2011-01-19 08:01:57 PST
(In reply to
comment #2
) I converted all PassRefPtrs to raw pointers as suggested and now using document()->securityOrigin() to get the existing SecurityOrigin object from Document/ScriptExecutionContext. I have also updated existing code in WebGeolocationPermissionRequest.cpp which was doing a similar thing as I did earlier.
Jeremy Orlow
Comment 5
2011-01-19 08:09:28 PST
Comment on
attachment 79428
[details]
Patch r=me can you please fix the creation of a security origin in geolocation as well?
Satish Sampath
Comment 6
2011-01-19 08:21:28 PST
(In reply to
comment #5
)
> (From update of
attachment 79428
[details]
) > r=me > > can you please fix the creation of a security origin in geolocation as well?
Yes, I have in this same patch.
Jeremy Orlow
Comment 7
2011-01-19 08:22:30 PST
Oops...yes you do.
Satish Sampath
Comment 8
2011-01-19 08:42:04 PST
Committed
r76128
: <
http://trac.webkit.org/changeset/76128
>
David Levin
Comment 9
2011-01-19 09:11:08 PST
Please cc Darin for WebKit API changes.
Jeremy Orlow
Comment 10
2011-01-19 09:22:47 PST
Darin, do you actually want CLs like this? The API side of it seemed quite straightforward and there's plenty of similar precedent.
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