Bug 112410

Summary: A placeholder renderer should not be taken to imply the existence of a text renderer in single line text controls
Product: WebKit Reporter: Dominic Cooney <dominicc>
Component: Layout and RenderingAssignee: Dominic Cooney <dominicc>
Status: RESOLVED FIXED    
Severity: Normal CC: eric, esprehn+autocc, mifenton, ojan.autocc, ojan, tkent, tony, webkit.review.bot
Priority: P2    
Version: 528+ (Nightly build)   
Hardware: Unspecified   
OS: Unspecified   
Attachments:
Description Flags
Patch
none
Patch for CQ
none
Patch for CQ (with "Reviewed by" this time) none

Dominic Cooney
Reported 2013-03-14 23:30:25 PDT
There are a couple of places in the rendering of text inputs with placeholders that assume that if the placeholder is rendered, a renderer for the text must exist too. However this is not the case if ::-webkit-textfield-decoration-controller is set it to display: none; (or possibly other unusual values like display: table-cell;) which hides the text renderer's container. This can be reproduced by adding a placeholder="x" attribute to the input element in the fast/forms/search/search-hide-decoration-container-crash.html layout test. I think at least HTMLTextFormControlElement::fixPlaceholderRenderer and RenderTextControlSingleLine::layout need to be fixed.
Attachments
Patch (5.82 KB, patch)
2013-03-14 23:43 PDT, Dominic Cooney
no flags
Patch for CQ (6.31 KB, patch)
2013-03-17 23:52 PDT, Dominic Cooney
no flags
Patch for CQ (with "Reviewed by" this time) (6.31 KB, patch)
2013-03-18 00:21 PDT, Dominic Cooney
no flags
Dominic Cooney
Comment 1 2013-03-14 23:43:27 PDT
Dominic Cooney
Comment 2 2013-03-14 23:45:21 PDT
Comment on attachment 193242 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=193242&action=review > Source/WebCore/html/HTMLTextFormControlElement.cpp:176 > return; I wonder if it would be possible to do this renderer swizzle using another layer of Shadow DOM instead of these renderer-level hacks. Shadow DOM could certainly swap the order of a couple of renderers.
Tony Chang
Comment 3 2013-03-15 10:09:57 PDT
Comment on attachment 193242 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=193242&action=review > LayoutTests/fast/forms/search/search-hide-decoration-container-crash.html:11 > -<input type="search"> > +<input type="search" placeholder="x"> Rather than replacing the old test, can we add a second <input> with placeholder?
Dominic Cooney
Comment 4 2013-03-17 23:52:40 PDT
Created attachment 193493 [details] Patch for CQ
Dominic Cooney
Comment 5 2013-03-17 23:53:19 PDT
Comment on attachment 193493 [details] Patch for CQ Patch updates test based on reviewer's suggestion.
WebKit Review Bot
Comment 6 2013-03-17 23:56:09 PDT
Comment on attachment 193493 [details] Patch for CQ Rejecting attachment 193493 [details] from commit-queue. Failed to run "['/mnt/git/webkit-commit-queue/Tools/Scripts/webkit-patch', '--status-host=webkit-commit-queue.appspot.com', '--bot-id=gce-cq-03', 'validate-changelog', '--non-interactive', 193493, '--port=chromium-xvfb']" exit_code: 1 cwd: /mnt/git/webkit-commit-queue /mnt/git/webkit-commit-queue/LayoutTests/ChangeLog neither lists a valid reviewer nor contains the string "Unreviewed" or "Rubber stamp" (case insensitive). Full output: http://webkit-commit-queue.appspot.com/results/17114921
Dominic Cooney
Comment 7 2013-03-18 00:21:50 PDT
Created attachment 193496 [details] Patch for CQ (with "Reviewed by" this time)
WebKit Review Bot
Comment 8 2013-03-18 01:04:18 PDT
Comment on attachment 193496 [details] Patch for CQ (with "Reviewed by" this time) Clearing flags on attachment: 193496 Committed r146038: <http://trac.webkit.org/changeset/146038>
WebKit Review Bot
Comment 9 2013-03-18 01:04:23 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.