Bug 40984

Summary: Rendering the speech button in input elements.
Product: WebKit Reporter: Satish Sampath <satish>
Component: FormsAssignee: Nobody <webkit-unassigned>
Status: RESOLVED FIXED    
Severity: Normal CC: abarth, adele, commit-queue, dglazkov, eric, jorlow, tkent, webkit.review.bot
Priority: P2    
Version: 528+ (Nightly build)   
Hardware: All   
OS: All   
Bug Depends on:    
Bug Blocks: 39485    
Attachments:
Description Flags
Patch
none
Patch
none
Patch
none
Address Jeremy's comments
none
Add new tests per tkent and some fixes
none
Moved layout tests and updated Skipped lists.
none
Updated changelog and test_expectations.txt
none
Merged with latest revision
none
Changed RenderTextControlSingleLine to use INLINE_BLOCK only if a spin button is also present, so all existing layout test and the new ones pass now. none

Satish Sampath
Reported 2010-06-22 08:09:18 PDT
Renders a generic speech input button on all platforms (enabled with the '@speech' attribute in <input> elements). Individual ports can customize the button if necessary in their RenderTheme implementation. Also added pixel tests. All code changes are behind the speech input compile time flag (disabled by default). More information about the speech input API proposal can be found in the following links: Parent bug: https://bugs.webkit.org/show_bug.cgi?id=39485 Full API proposal: https://docs.google.com/View?id=dcfg79pz_5dhnp23f5 Relevant discussions in the WHATWG list: - http://lists.whatwg.org/htdig.cgi/whatwg-whatwg.org/2010-May/026338.html - http://lists.whatwg.org/pipermail/whatwg-whatwg.org/2010-June/026747.html
Attachments
Patch (163.83 KB, patch)
2010-06-24 05:53 PDT, Satish Sampath
no flags
Patch (163.82 KB, patch)
2010-06-24 06:04 PDT, Satish Sampath
no flags
Patch (163.79 KB, patch)
2010-06-24 18:07 PDT, Satish Sampath
no flags
Address Jeremy's comments (163.79 KB, patch)
2010-06-24 18:21 PDT, Satish Sampath
no flags
Add new tests per tkent and some fixes (505.58 KB, patch)
2010-06-25 10:04 PDT, Satish Sampath
no flags
Moved layout tests and updated Skipped lists. (508.11 KB, patch)
2010-06-29 03:25 PDT, Satish Sampath
no flags
Updated changelog and test_expectations.txt (508.15 KB, patch)
2010-06-29 03:49 PDT, Satish Sampath
no flags
Merged with latest revision (508.44 KB, patch)
2010-06-29 04:17 PDT, Satish Sampath
no flags
Changed RenderTextControlSingleLine to use INLINE_BLOCK only if a spin button is also present, so all existing layout test and the new ones pass now. (506.98 KB, patch)
2010-07-01 02:29 PDT, Satish Sampath
no flags
Satish Sampath
Comment 1 2010-06-24 05:53:50 PDT
WebKit Review Bot
Comment 2 2010-06-24 05:57:27 PDT
Attachment 59648 [details] did not pass style-queue: Failed to run "['WebKitTools/Scripts/check-webkit-style', '--no-squash']" exit_code: 1 WARNING: File exempt from style guide. Skipping: "WebKit/qt/Api/qwebsettings.cpp" WARNING: File exempt from style guide. Skipping: "WebKit/qt/Api/qwebsettings.h" WebCore/platform/graphics/qt/ImageQt.cpp:67: Tests for true/false, null/non-null, and zero/non-zero should all be done without equality comparisons. [readability/comparison_to_zero] [5] Total errors found: 1 in 17 files If any of these errors are false positives, please file a bug against check-webkit-style.
Satish Sampath
Comment 3 2010-06-24 06:04:40 PDT
WebKit Review Bot
Comment 4 2010-06-24 07:11:47 PDT
Jeremy Orlow
Comment 5 2010-06-24 07:13:17 PDT
Comment on attachment 59649 [details] Patch Drive by comments. WebCore/rendering/RenderInputSpeech.cpp:34 + #include "RenderInputSpeech.h" You only put this within guards when the file is generated only when enabled. Since this file is being checked in, you know it exists and thus it can go right under the config.h part.
Satish Sampath
Comment 6 2010-06-24 18:07:18 PDT
Satish Sampath
Comment 7 2010-06-24 18:15:00 PDT
Thanks Jeremy. Latest patch has your suggestion implemented. The cr-linux build fails for all these patches because of a known issue in the cr-linux build bot (it does not run 'gclient runhooks' for GYP/GYPI changes so keeps using the earlier makefiles). I have verified again on my local machine that cr-linux builds fine.
Satish Sampath
Comment 8 2010-06-24 18:21:14 PDT
Created attachment 59717 [details] Address Jeremy's comments
WebKit Review Bot
Comment 9 2010-06-24 18:57:29 PDT
Kent Tamura
Comment 10 2010-06-24 20:45:59 PDT
Comment on attachment 59717 [details] Address Jeremy's comments I don't think we need to introduce new files; RenderInputSpeech.{cpp,h}.
Satish Sampath
Comment 11 2010-06-25 00:49:48 PDT
Future patches will be adding more speech input related rendering code hence I created a new file as it would help in better code organization, looking at how the media controls were implemented in RenderMediaControls.cpp. If you strongly feel about not creating new files I can change it.
Kent Tamura
Comment 12 2010-06-25 01:01:33 PDT
(In reply to comment #11) > Future patches will be adding more speech input related rendering code hence I created a new file as it would help in better code organization, looking at how the media controls were implemented in RenderMediaControls.cpp. If you strongly feel about not creating new files I can change it. Ok, I understand. I don't have strong objection. The code looks ok. We should have layout tests for type=number + speech and type=search + speech.
Satish Sampath
Comment 13 2010-06-25 10:04:26 PDT
Created attachment 59776 [details] Add new tests per tkent and some fixes
WebKit Review Bot
Comment 14 2010-06-25 10:27:18 PDT
Satish Sampath
Comment 15 2010-06-25 11:55:35 PDT
(adding Adele) Kent, thanks for the additional layout tests suggestion. I found some issues in my patch due to that and fixed now (in RenderThemeMac.mm and RenderTextControlSingleLine.cpp). Please take another look at them in particular. Adele - can you please let me know if the changes to RenderThemeMac.mm and switching from setDisplay(BLOCK) to setDisplay(INLINE_BLOCK) in RenderTextControlSingleLine.cpp look ok? (Background info: in this patch I am enabling render of a speech input button in <input> elements, the feature need to be explicitly enabled with an @speech attribute and all the code is behind a define). - The setDisplay() change to INLINE_BLOCK is required because RenderTextControlSingleLine can now contain both innerBlock and other child elements (i.e. spin button in the 'type=number' case), so to render them both in the same line I'm using INLINE_BLOCK - The RenderThemeMac.mm change is required because the search field's clear (x) button may not be the right-most child element if the speech button is enabled. For both the above changes, all layout tests passed in my local machine.
Kent Tamura
Comment 16 2010-06-28 22:18:32 PDT
Comment on attachment 59776 [details] Add new tests per tkent and some fixes LayoutTests/ChangeLog:15 + * platform/mac/fast/forms/input-appearance-numberandspeech.html: Added. These tests should be put to fast/forms/, not platform/mac/fast/forms/. We should check appearance on other platforms.
Kent Tamura
Comment 17 2010-06-28 22:20:31 PDT
(In reply to comment #15) > Adele - can you please let me know if the changes to RenderThemeMac.mm and switching from setDisplay(BLOCK) to setDisplay(INLINE_BLOCK) in RenderTextControlSingleLine.cpp look ok? (Background info: in this patch I am enabling render of a speech input button in <input> elements, the feature need to be explicitly enabled with an @speech attribute and all the code is behind a define). I think these changes are reasonable.
Satish Sampath
Comment 18 2010-06-29 03:25:03 PDT
Created attachment 60000 [details] Moved layout tests and updated Skipped lists.
Kent Tamura
Comment 19 2010-06-29 03:33:57 PDT
Comment on attachment 60000 [details] Moved layout tests and updated Skipped lists. LayoutTests/ChangeLog:24 + * platform/chromium/Skipped: Skipped all these new tests as the speech input feature is disabled by default. chromium/Skpped -> chromium/test_expectations.txt LayoutTests/platform/chromium/test_expectations.txt:2896 + BUG44844: fast/forms/input-appearance-numberandspeech.html = TEXT I think "TEXT" should be "IMAGE+TEXT" or "FAIL"
Satish Sampath
Comment 20 2010-06-29 03:49:20 PDT
Created attachment 60001 [details] Updated changelog and test_expectations.txt
Satish Sampath
Comment 21 2010-06-29 04:17:15 PDT
Created attachment 60004 [details] Merged with latest revision
WebKit Commit Bot
Comment 22 2010-06-29 05:22:12 PDT
Comment on attachment 60004 [details] Merged with latest revision Rejecting patch 60004 from commit-queue. Failed to run "['WebKitTools/Scripts/run-webkit-tests', '--no-launch-safari', '--exit-after-n-failures=1', '--ignore-tests', 'compositing', '--quiet']" exit_code: 1 Last 500 characters of output: dertree Compiling Java tests make: Nothing to be done for `default'. Running tests from /Users/eseidel/Projects/CommitQueue/LayoutTests Skipped list contained 'compositing/iframes/composited-iframe.html', but no file of that name could be found Testing 19232 test cases. fast/css/input-search-padding.html -> failed Exiting early after 1 failures. 5961 tests run. 108.46s total testing time 5960 test cases (99%) succeeded 1 test case (<1%) had incorrect layout 1 test case (<1%) had stderr output Full output: http://webkit-commit-queue.appspot.com/results/3352216
Satish Sampath
Comment 23 2010-07-01 02:29:01 PDT
Created attachment 60216 [details] Changed RenderTextControlSingleLine to use INLINE_BLOCK only if a spin button is also present, so all existing layout test and the new ones pass now.
WebKit Commit Bot
Comment 24 2010-07-01 04:11:30 PDT
Comment on attachment 60216 [details] Changed RenderTextControlSingleLine to use INLINE_BLOCK only if a spin button is also present, so all existing layout test and the new ones pass now. Clearing flags on attachment: 60216 Committed r62249: <http://trac.webkit.org/changeset/62249>
WebKit Commit Bot
Comment 25 2010-07-01 04:11:39 PDT
All reviewed patches have been landed. Closing bug.
WebKit Review Bot
Comment 26 2010-07-01 04:19:02 PDT
http://trac.webkit.org/changeset/62249 might have broken Chromium Linux Release
Note You need to log in before you can comment on or make changes to this bug.