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.
<rdar://problem/14567753>
Created attachment 207936 [details] Patch
Comment on attachment 207936 [details] Patch Looks OK. Unfortunate to have to add more rendering-related functions to HTMLInputElement.
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?
(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?
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
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
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
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
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
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
Created attachment 207995 [details] Patch
Created attachment 208006 [details] Patch for landing
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
Created attachment 208007 [details] Patch for landing
Comment on attachment 208007 [details] Patch for landing Clearing flags on attachment: 208007 Committed r153647: <http://trac.webkit.org/changeset/153647>
All reviewed patches have been landed. Closing bug.