RESOLVED FIXED 191968
Placeholder text is not repainted after caps lock indicator is hidden
https://bugs.webkit.org/show_bug.cgi?id=191968
Summary Placeholder text is not repainted after caps lock indicator is hidden
Daniel Bates
Reported 2018-11-26 09:57:49 PST
Created attachment 355646 [details] Test Placeholder text is truncated when the caps lock indicator is hidden. You can see this by opening the attached test case and following the included instructions.
Attachments
Test (425 bytes, text/html)
2018-11-26 09:57 PST, Daniel Bates
no flags
Patch and layout test (7.45 KB, patch)
2018-11-26 10:01 PST, Daniel Bates
zalan: review+
Radar WebKit Bug Importer
Comment 1 2018-11-26 09:58:28 PST
Daniel Bates
Comment 2 2018-11-26 10:01:00 PST
Created attachment 355647 [details] Patch and layout test
Daniel Bates
Comment 3 2018-11-26 13:48:12 PST
The placeholder renderer is special. It is an excluded child renderer and does not take part in normal flow layout. It is also created and destroyed as needed. The caps lock indicator is also special in that it is implemented as a RenderImage and we do not know its dimensions before it is loaded and the load happens asynchronously. These constraints together led me to the solution proposed in the patch (attachment #355647 [details]): to detect when the inner text size changes and mark the placeholder as dirty as a way to keep the dimensions of the placeholder in sync with the dimensions of the inner text.
Daniel Bates
Comment 4 2018-11-26 13:49:08 PST
The reason we do not know the dimensions of the caps lock indicator in advance of its load is because we want it to scale with respect to the height of the field.
Daniel Bates
Comment 5 2018-11-26 13:50:26 PST
Daniel Bates
Comment 6 2018-11-26 13:56:46 PST
Substituted UIHelper.toggleCapsLock() for testRunner.toggleCapsLock() as the former replaces the latter following <https://trac.webkit.org/changeset/238512> (bug #191972) and committed the fix in <https://trac.webkit.org/changeset/238520/>.
Note You need to log in before you can comment on or make changes to this bug.