RESOLVED FIXED119174
<input type="search"> doesn't correctly handle the "size" attribute
https://bugs.webkit.org/show_bug.cgi?id=119174
Summary <input type="search"> doesn't correctly handle the "size" attribute
Antoine Quint
Reported 2013-07-27 00:15:10 PDT
Created attachment 207579 [details] Testcase Per http://www.w3.org/html/wg/drafts/html/master/forms.html#the-size-attribute, the "size" attribute should make it so that the user agent ensures the minimal display of the number of characters specified in the search field. However, the padding due to the rounded corners, the display of the magnifying glass to the left and potentially the clear button to the right don't seem to be taken into account and an <input type="text" size="20"> and an <input type="search" size="20"> are rendered with the same size even though fewer characters are visible to the user in the <input type="search"> case.
Attachments
Testcase (544 bytes, text/html)
2013-07-27 00:15 PDT, Antoine Quint
no flags
Patch (15.90 KB, patch)
2013-08-01 10:47 PDT, Antoine Quint
no flags
Archive of layout-test-results from webkit-ews-10 for mac-mountainlion-wk2 (1008.01 KB, application/zip)
2013-08-01 12:45 PDT, Build Bot
no flags
Archive of layout-test-results from webkit-ews-06 for mac-mountainlion (1.13 MB, application/zip)
2013-08-01 13:53 PDT, Build Bot
no flags
Archive of layout-test-results from webkit-ews-03 for mac-mountainlion (1.12 MB, application/zip)
2013-08-01 14:58 PDT, Build Bot
no flags
Patch (590.84 KB, patch)
2013-08-02 02:19 PDT, Antoine Quint
no flags
Patch for landing (590.84 KB, patch)
2013-08-02 06:30 PDT, Antoine Quint
no flags
Patch for landing (590.83 KB, patch)
2013-08-02 06:35 PDT, Antoine Quint
no flags
Radar WebKit Bug Importer
Comment 1 2013-07-27 00:15:28 PDT
Antoine Quint
Comment 2 2013-08-01 10:47:21 PDT
Darin Adler
Comment 3 2013-08-01 10:55:03 PDT
Comment on attachment 207936 [details] Patch Looks OK. Unfortunate to have to add more rendering-related functions to HTMLInputElement.
Tim Horton
Comment 4 2013-08-01 11:10:01 PDT
Comment on attachment 207936 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=207936&action=review > Source/WebCore/ChangeLog:8 > + and as a result we would not guarantee that we could show the number of characeters set by typo characters > Source/WebCore/ChangeLog:11 > + To make the process of reporting extra width due to decorations, we add a new decorationWidth() there's something wrong with this sentence. > Source/WebCore/html/InputType.cpp:317 > +LayoutUnit InputType::decorationWidth() const LayoutUnits all the way out here? Is that right?
Antoine Quint
Comment 5 2013-08-01 11:22:13 PDT
(In reply to comment #4) > (From update of attachment 207936 [details]) > View in context: https://bugs.webkit.org/attachment.cgi?id=207936&action=review > > > Source/WebCore/ChangeLog:8 > > + and as a result we would not guarantee that we could show the number of characeters set by > > typo characters > > > Source/WebCore/ChangeLog:11 > > + To make the process of reporting extra width due to decorations, we add a new decorationWidth() > > there's something wrong with this sentence. Indeed, I'll fix the ChangeLog. > > Source/WebCore/html/InputType.cpp:317 > > +LayoutUnit InputType::decorationWidth() const > > LayoutUnits all the way out here? Is that right? Would a float be more suitable here?
Build Bot
Comment 6 2013-08-01 12:45:52 PDT
Comment on attachment 207936 [details] Patch Attachment 207936 [details] did not pass mac-wk2-ews (mac-wk2): Output: http://webkit-queues.appspot.com/results/1312140 New failing tests: fast/forms/search-cancel-button-style-sharing.html fast/forms/search-display-none-cancel-button.html fast/forms/searchfield-heights.html fast/forms/control-restrict-line-height.html fast/forms/placeholder-pseudo-style.html fast/forms/search-rtl.html fast/css/text-overflow-input.html fast/forms/placeholder-position.html fast/repaint/search-field-cancel.html fast/forms/input-appearance-height.html fast/forms/search-vertical-alignment.html fast/forms/box-shadow-override.html fast/forms/search/search-size-with-decorations.html fast/css/input-search-padding.html fast/forms/search-styled.html
Build Bot
Comment 7 2013-08-01 12:45:54 PDT
Created attachment 207945 [details] Archive of layout-test-results from webkit-ews-10 for mac-mountainlion-wk2 The attached test failures were seen while running run-webkit-tests on the mac-wk2-ews. Bot: webkit-ews-10 Port: mac-mountainlion-wk2 Platform: Mac OS X 10.8.4
Build Bot
Comment 8 2013-08-01 13:53:53 PDT
Comment on attachment 207936 [details] Patch Attachment 207936 [details] did not pass mac-ews (mac): Output: http://webkit-queues.appspot.com/results/1320107 New failing tests: fast/forms/search-cancel-button-style-sharing.html fast/forms/search-display-none-cancel-button.html fast/forms/searchfield-heights.html fast/forms/control-restrict-line-height.html fast/forms/placeholder-pseudo-style.html fast/forms/search-rtl.html fast/css/text-overflow-input.html fast/forms/placeholder-position.html fast/repaint/search-field-cancel.html fast/forms/input-appearance-height.html fast/forms/search-vertical-alignment.html fast/forms/box-shadow-override.html fast/forms/search/search-size-with-decorations.html fast/css/input-search-padding.html fast/forms/search-styled.html
Build Bot
Comment 9 2013-08-01 13:53:55 PDT
Created attachment 207949 [details] Archive of layout-test-results from webkit-ews-06 for mac-mountainlion The attached test failures were seen while running run-webkit-tests on the mac-ews. Bot: webkit-ews-06 Port: mac-mountainlion Platform: Mac OS X 10.8.4
Build Bot
Comment 10 2013-08-01 14:58:22 PDT
Comment on attachment 207936 [details] Patch Attachment 207936 [details] did not pass mac-ews (mac): Output: http://webkit-queues.appspot.com/results/1322050 New failing tests: fast/forms/search-cancel-button-style-sharing.html fast/forms/search-display-none-cancel-button.html fast/forms/searchfield-heights.html fast/forms/control-restrict-line-height.html fast/forms/placeholder-pseudo-style.html fast/forms/search-rtl.html fast/css/text-overflow-input.html fast/forms/placeholder-position.html fast/repaint/search-field-cancel.html fast/forms/input-appearance-height.html fast/forms/search-vertical-alignment.html fast/forms/box-shadow-override.html fast/forms/search/search-size-with-decorations.html fast/css/input-search-padding.html fast/forms/search-styled.html
Build Bot
Comment 11 2013-08-01 14:58:24 PDT
Created attachment 207956 [details] Archive of layout-test-results from webkit-ews-03 for mac-mountainlion The attached test failures were seen while running run-webkit-tests on the mac-ews. Bot: webkit-ews-03 Port: mac-mountainlion Platform: Mac OS X 10.8.4
Antoine Quint
Comment 12 2013-08-02 02:19:45 PDT
Antoine Quint
Comment 13 2013-08-02 06:30:15 PDT
Created attachment 208006 [details] Patch for landing
WebKit Commit Bot
Comment 14 2013-08-02 06:31:45 PDT
Comment on attachment 208006 [details] Patch for landing Rejecting attachment 208006 [details] from commit-queue. Failed to run "['/Volumes/Data/EWS/WebKit/Tools/Scripts/webkit-patch', '--status-host=webkit-queues.appspot.com', '--bot-id=webkit-cq-03', 'validate-changelog', '--check-oops', '--non-interactive', 208006, '--port=mac']" exit_code: 1 cwd: /Volumes/Data/EWS/WebKit ChangeLog entry in LayoutTests/ChangeLog contains OOPS!. Full output: http://webkit-queues.appspot.com/results/1338165
Antoine Quint
Comment 15 2013-08-02 06:35:31 PDT
Created attachment 208007 [details] Patch for landing
WebKit Commit Bot
Comment 16 2013-08-02 07:57:01 PDT
Comment on attachment 208007 [details] Patch for landing Clearing flags on attachment: 208007 Committed r153647: <http://trac.webkit.org/changeset/153647>
WebKit Commit Bot
Comment 17 2013-08-02 07:57:04 PDT
All reviewed patches have been landed. Closing bug.
Note You need to log in before you can comment on or make changes to this bug.