Summary: | Send origin/url as part of speech input requests to the embedder. | ||||||||
---|---|---|---|---|---|---|---|---|---|
Product: | WebKit | Reporter: | Satish Sampath <satish> | ||||||
Component: | Forms | Assignee: | Nobody <webkit-unassigned> | ||||||
Status: | RESOLVED FIXED | ||||||||
Severity: | Normal | CC: | fishd, jorlow, levin | ||||||
Priority: | P2 | ||||||||
Version: | 528+ (Nightly build) | ||||||||
Hardware: | All | ||||||||
OS: | All | ||||||||
Bug Depends on: | |||||||||
Bug Blocks: | 39485 | ||||||||
Attachments: |
|
Description
Satish Sampath
2011-01-19 06:29:15 PST
Created attachment 79415 [details]
Patch
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>); * Created attachment 79428 [details]
Patch
(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. Comment on attachment 79428 [details]
Patch
r=me
can you please fix the creation of a security origin in geolocation as well?
(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. Oops...yes you do. Committed r76128: <http://trac.webkit.org/changeset/76128> Please cc Darin for WebKit API changes. Darin, do you actually want CLs like this? The API side of it seemed quite straightforward and there's plenty of similar precedent. |