RESOLVED FIXED Bug 113845
Input value/placeholder is not redrawn when the input height grows
https://bugs.webkit.org/show_bug.cgi?id=113845
Summary Input value/placeholder is not redrawn when the input height grows
Kent Tamura
Reported 2013-04-02 22:09:03 PDT
https://code.google.com/p/chromium/issues/detail?id=126395 <input value=foo style="height:0.5em;"> <input placeholder=foo style="height:0.5em;"> <script> document.getElementsByTagName('input')[0].style.height = 'initial'; document.getElementsByTagName('input')[1].style.height = 'initial'; </script> The value/placeholder keeps the initial height after setting input height.
Attachments
Patch (3.46 KB, patch)
2013-04-02 22:10 PDT, Kent Tamura
no flags
Patch 2 (3.51 KB, patch)
2013-04-02 22:48 PDT, Kent Tamura
no flags
Kent Tamura
Comment 1 2013-04-02 22:10:52 PDT
Ojan Vafai
Comment 2 2013-04-02 22:39:12 PDT
Comment on attachment 196278 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=196278&action=review > Source/WebCore/rendering/RenderTextControlSingleLine.cpp:256 > + if (RenderObject* innerTextRenderer = innerTextElement()->renderer()) > + innerTextRenderer->setNeedsLayout(true, MarkOnlyThis); I think we only need this if stye StyleDifference is a Layout difference.
Kent Tamura
Comment 3 2013-04-02 22:48:03 PDT
Created attachment 196282 [details] Patch 2 StyleDifferenceLayout
Kent Tamura
Comment 4 2013-04-02 22:48:43 PDT
Comment on attachment 196278 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=196278&action=review >> Source/WebCore/rendering/RenderTextControlSingleLine.cpp:256 >> + innerTextRenderer->setNeedsLayout(true, MarkOnlyThis); > > I think we only need this if stye StyleDifference is a Layout difference. That's right!
Ojan Vafai
Comment 5 2013-04-03 10:23:03 PDT
Comment on attachment 196282 [details] Patch 2 View in context: https://bugs.webkit.org/attachment.cgi?id=196282&action=review > Source/WebCore/rendering/RenderTextControlSingleLine.cpp:257 > + innerTextRenderer->setNeedsLayout(true, MarkOnlyThis); You shouldn't MarkOnlyThis. I'm trying to get rid of all of our uses of MarkOnlyThis. There are a couple cases where we need it right now to avoid hitting asserts, but setNeedsLayout in styleDidChange/styleWillChange it should be safe to leave out the MarkOnlyThis.
Kent Tamura
Comment 6 2013-04-03 18:04:51 PDT
Comment on attachment 196282 [details] Patch 2 View in context: https://bugs.webkit.org/attachment.cgi?id=196282&action=review >> Source/WebCore/rendering/RenderTextControlSingleLine.cpp:257 >> + innerTextRenderer->setNeedsLayout(true, MarkOnlyThis); > > You shouldn't MarkOnlyThis. I'm trying to get rid of all of our uses of MarkOnlyThis. There are a couple cases where we need it right now to avoid hitting asserts, but setNeedsLayout in styleDidChange/styleWillChange it should be safe to leave out the MarkOnlyThis. Yeah, I agree it. This is a hack. I think we can remove many hacks in RenderTextControlSingleLine by using flexible box with align-items:center.
WebKit Review Bot
Comment 7 2013-04-03 18:15:22 PDT
Comment on attachment 196282 [details] Patch 2 Clearing flags on attachment: 196282 Committed r147602: <http://trac.webkit.org/changeset/147602>
WebKit Review Bot
Comment 8 2013-04-03 18:15:26 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.