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.
<rdar://problem/46247234>
Created attachment 355647 [details] Patch and layout test
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.
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.
Committed r238519: <https://trac.webkit.org/changeset/238519>
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/>.