Bug 44427 - Pass the element's bounds to embedder during speech recognition.
Summary: Pass the element's bounds to embedder during speech recognition.
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Forms (show other bugs)
Version: 528+ (Nightly build)
Hardware: All All
: P2 Normal
Assignee: Nobody
URL:
Keywords:
Depends on:
Blocks: 39485
  Show dependency treegraph
 
Reported: 2010-08-23 08:27 PDT by Satish Sampath
Modified: 2010-08-25 09:43 PDT (History)
4 users (show)

See Also:


Attachments
Patch (10.77 KB, patch)
2010-08-23 08:55 PDT, Satish Sampath
no flags Details | Formatted Diff | Diff
Patch (10.94 KB, patch)
2010-08-23 14:32 PDT, Satish Sampath
no flags Details | Formatted Diff | Diff
Patch (10.93 KB, patch)
2010-08-23 14:41 PDT, Satish Sampath
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Satish Sampath 2010-08-23 08:27:53 PDT
For speech recognition, the embedder would typically want to show a native UI with information, settings etc. We now pass the display bounds (in page coordinates) of the html element when invoking speech recognition, so the embedder can position the native speech recognition UI appropriately.
Comment 1 Satish Sampath 2010-08-23 08:55:24 PDT
Created attachment 65125 [details]
Patch
Comment 2 Jeremy Orlow 2010-08-23 14:13:22 PDT
Comment on attachment 65125 [details]
Patch

WebCore/rendering/TextControlInnerElements.cpp:401
 +                  m_listenerId, input->renderer()->absoluteBoundingBoxRect())) {
don't wrap...don't need {}'s

WebCore/ChangeLog:5
 +          Pass the element's bounds to embedder during speech recognition.
Please explain why here.
Comment 3 Satish Sampath 2010-08-23 14:32:07 PDT
Created attachment 65161 [details]
Patch
Comment 4 Satish Sampath 2010-08-23 14:32:46 PDT
Thanks for the comments, made both the changes.
Comment 5 Jeremy Orlow 2010-08-23 14:37:24 PDT
Comment on attachment 65161 [details]
Patch

WebCore/rendering/TextControlInnerElements.cpp:400
 +              if (speechInput()->startRecognition(
You didn't put this all on one line

r=me
Comment 6 Satish Sampath 2010-08-23 14:41:49 PDT
Created attachment 65162 [details]
Patch

Sorry, my bad. Moved the if statement to a single line now.
Comment 7 Jeremy Orlow 2010-08-23 14:43:36 PDT
Comment on attachment 65162 [details]
Patch

Let's cq+ it tomorrow when we're in the office.
Comment 8 WebKit Commit Bot 2010-08-24 07:56:27 PDT
Comment on attachment 65162 [details]
Patch

Rejecting patch 65162 from commit-queue.

Failed to run "['WebKitTools/Scripts/run-webkit-tests', '--no-launch-safari', '--exit-after-n-failures=1', '--wait-for-httpd', '--ignore-tests', 'compositing', '--quiet']" exit_code: 1
Running build-dumprendertree
Compiling Java tests
make: Nothing to be done for `default'.
Running tests from /Users/eseidel/Projects/CommitQueue/LayoutTests
Testing 20910 test cases.
http/tests/security/xssAuditor/dom-write-location-inline-event.html -> failed

Exiting early after 1 failures. 20558 tests run.
553.41s total testing time

20557 test cases (99%) succeeded
1 test case (<1%) had incorrect layout
36 test cases (<1%) had stderr output

Full output: http://queues.webkit.org/results/3771547
Comment 9 Jeremy Orlow 2010-08-24 08:26:17 PDT
Comment on attachment 65162 [details]
Patch

try and try again
Comment 10 WebKit Commit Bot 2010-08-24 10:11:50 PDT
Comment on attachment 65162 [details]
Patch

Rejecting patch 65162 from commit-queue.

Failed to run "['WebKitTools/Scripts/run-webkit-tests', '--no-launch-safari', '--exit-after-n-failures=1', '--wait-for-httpd', '--ignore-tests', 'compositing', '--quiet']" exit_code: 1
Running build-dumprendertree
Compiling Java tests
make: Nothing to be done for `default'.
Running tests from /Users/eseidel/Projects/CommitQueue/LayoutTests
Testing 20912 test cases.
http/tests/security/xssAuditor/dom-write-location-inline-event.html -> failed

Exiting early after 1 failures. 20560 tests run.
557.65s total testing time

20559 test cases (99%) succeeded
1 test case (<1%) had incorrect layout
35 test cases (<1%) had stderr output

Full output: http://queues.webkit.org/results/3715552
Comment 11 Jeremy Orlow 2010-08-25 05:00:09 PDT
Comment on attachment 65162 [details]
Patch

Clearing flags on attachment: 65162

Committed r66007: <http://trac.webkit.org/changeset/66007>
Comment 12 Jeremy Orlow 2010-08-25 05:00:19 PDT
All reviewed patches have been landed.  Closing bug.
Comment 13 Darin Fisher (:fishd, Google) 2010-08-25 09:33:48 PDT
Comment on attachment 65162 [details]
Patch

WebKit/chromium/public/WebSpeechInputController.h:46
 +      virtual bool startRecognition(int requestId, const WebRect&)
Looking at this public API, it is quite mysterious what this WebRect
parameter is supposed to mean.  You should give it a meaningful name
and perhaps add some documentation.

Neither the ChangeLog nor the bug description says anything about why
you need this.  Are you trying to have the embedder externally position
something on top of the input element?

You should be sure to document the coordinates of this WebRect.  Have
you considered what happens if the user zooms or scrolls the page?
(Note you can scroll the page without changing focus by using the
mouse wheel.)
Comment 14 Darin Fisher (:fishd, Google) 2010-08-25 09:35:10 PDT
(In reply to comment #13)
> Neither the ChangeLog nor the bug description says anything about why
> you need this.

Ah, I overlooked comment #0.  Some form of that text should be in the ChangeLog.
Comment 15 Jeremy Orlow 2010-08-25 09:41:19 PDT
(In reply to comment #14)
> (In reply to comment #13)
> > Neither the ChangeLog nor the bug description says anything about why
> > you need this.
> 
> Ah, I overlooked comment #0.  Some form of that text should be in the ChangeLog.

Something very similar to that is in the ChangeLog, I believe.
Comment 16 Satish Sampath 2010-08-25 09:43:53 PDT
(In reply to comment #15)
> (In reply to comment #14)
> > (In reply to comment #13)
> > > Neither the ChangeLog nor the bug description says anything about why
> > > you need this.
> > 
> > Ah, I overlooked comment #0.  Some form of that text should be in the ChangeLog.
> 
> Something very similar to that is in the ChangeLog, I believe.

I had included it in the WebCore/Changelog, but missed out in the WebKit/chromium/Changelog. Would you prefer I edit the WebKit/chromium/Changelog now to include it? I will make sure to include sufficient information in all changelogs in future patches.