Backgrounds bleed out of natively rendered text fields
authorwenson_hsieh@apple.com <wenson_hsieh@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 9 Oct 2015 15:18:42 +0000 (15:18 +0000)
committerwenson_hsieh@apple.com <wenson_hsieh@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 9 Oct 2015 15:18:42 +0000 (15:18 +0000)
commit64f40106d86a7d624d4a7ba09361dc335005f9cb
tree2d090f59c1ee30c1a6820185f045066ba80bffde
parent47ad65c681855c7b407216fd8e846b1520a9cf36
Backgrounds bleed out of natively rendered text fields
https://bugs.webkit.org/show_bug.cgi?id=149843
<rdar://problem/22896977>

Reviewed by Darin Adler.

Source/WebCore:

When natively rendering a text field with a background on Mac, the background bleeds out
of the text field's border when the graphics context is scaled (as a result of a retina
display or zoom/scale effects). This is because when we render the text field in bezeled
style within a certain frame, AppKit adds 1 device pixel insets on all sides of the frame,
which renders a text field that is slightly smaller than the frame. To adjust for this, we
inflate the paint rect.

Test: fast/forms/hidpi-textfield-background-bleeding.html

* rendering/RenderThemeMac.mm:
(WebCore::RenderThemeMac::paintTextField):

LayoutTests:

Add a layout test to check that the background of a natively rendered text field
cell does not bleed.

* TestExpectations:
* fast/forms/hidpi-textfield-background-bleeding-expected.html: Added.
* fast/forms/hidpi-textfield-background-bleeding.html: Added.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@190800 268f45cc-cd09-0410-ab3c-d52691b4dbfc
LayoutTests/ChangeLog
LayoutTests/fast/forms/hidpi-textfield-background-bleeding-expected.html [new file with mode: 0644]
LayoutTests/fast/forms/hidpi-textfield-background-bleeding.html [new file with mode: 0644]
LayoutTests/platform/ios-simulator/TestExpectations
LayoutTests/platform/mac/TestExpectations
Source/WebCore/ChangeLog
Source/WebCore/rendering/RenderThemeMac.mm