Bug 191968 - Placeholder text is not repainted after caps lock indicator is hidden
Summary: Placeholder text is not repainted after caps lock indicator is hidden
Alias: None
Product: WebKit
Classification: Unclassified
Component: Layout and Rendering (show other bugs)
Version: WebKit Local Build
Hardware: All All
: P2 Normal
Assignee: Daniel Bates
Keywords: InRadar
Depends on:
Blocks: 191164
  Show dependency treegraph
Reported: 2018-11-26 09:57 PST by Daniel Bates
Modified: 2018-11-26 13:56 PST (History)
7 users (show)

See Also:

Test (425 bytes, text/html)
2018-11-26 09:57 PST, Daniel Bates
no flags Details
Patch and layout test (7.45 KB, patch)
2018-11-26 10:01 PST, Daniel Bates
zalan: review+
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Daniel Bates 2018-11-26 09:57:49 PST
Created attachment 355646 [details]

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.
Comment 1 Radar WebKit Bug Importer 2018-11-26 09:58:28 PST
Comment 2 Daniel Bates 2018-11-26 10:01:00 PST
Created attachment 355647 [details]
Patch and layout test
Comment 3 Daniel Bates 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.
Comment 4 Daniel Bates 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.
Comment 5 Daniel Bates 2018-11-26 13:50:26 PST
Committed r238519: <https://trac.webkit.org/changeset/238519>
Comment 6 Daniel Bates 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/>.