Increase the text padding insets for TextFields on Windows with DirectWrite enabled for UI font metrics by 1 px.
DirectWrite font metrics are 1, 2 px larger than their GDI counterparts. The default font height is used to calculate the
textfield height.
When the selection rectangle is drawn around text, the bounds of the selection rectangle are calculated based on the rectangle
comprising the text which is based off the font used to render the text.
While the above logic works well in the normal case, it does not work if the text field starts rendering Devnagri or text with
larger dimensions. Reason being the text height is a touch larger for these fonts.
To account for that, the proposal is to set the text padding for textfields on Windows with DirectWrite to 4px instead of the
traditional 3px.
This works well in my testing.
BUG=445366
TBR=msw
TEST=Navigate to http://www.indianrail.gov.in/hindex.html. Bring up the bookmark bubble. The bookmark highlight in the name field in the bubble should not be shifted upwards.
Review URL: https://codereview.chromium.org/
1007633002
Cr-Commit-Position: refs/heads/master@{#320553}