Subpixel rendering: Clipping on text areas when shifted by one device pixel.
authorzalan@apple.com <zalan@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 24 Apr 2014 20:46:26 +0000 (20:46 +0000)
committerzalan@apple.com <zalan@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 24 Apr 2014 20:46:26 +0000 (20:46 +0000)
commit4841d356cdd5d0df0cd1d6232ade9be2b71a9c4d
treee15c061d896c6ba0109b8ef74004eda8a91ecccd
parent77a9871ad29dadb67fbcaa992cbad8961eb2be2f
Subpixel rendering: Clipping on text areas when shifted by one device pixel.
https://bugs.webkit.org/show_bug.cgi?id=132008

Reviewed by Darin Adler.

Make RenderTheme paint* functions LayoutRect aware. Textarea is device pixel snapped, while
other theme controls are still on integral size/positions.

Source/WebCore:
Test: fast/forms/hidpi-textarea-on-subpixel-position.html

* rendering/RenderBox.cpp:
(WebCore::RenderBox::paintBoxDecorations):
* rendering/RenderTheme.cpp:
(WebCore::RenderTheme::paint):
(WebCore::RenderTheme::paintBorderOnly):
(WebCore::RenderTheme::paintDecorations):
* rendering/RenderTheme.h:
(WebCore::RenderTheme::paintTextField):
(WebCore::RenderTheme::paintTextFieldDecorations):
(WebCore::RenderTheme::paintTextArea):
(WebCore::RenderTheme::paintTextAreaDecorations):
* rendering/RenderThemeIOS.h:
* rendering/RenderThemeIOS.mm:
(WebCore::RenderThemeIOS::paintTextFieldDecorations):
(WebCore::RenderThemeIOS::paintTextAreaDecorations):
* rendering/RenderThemeMac.h:
* rendering/RenderThemeMac.mm:
(WebCore::RenderThemeMac::paintTextField):
(WebCore::RenderThemeMac::paintTextArea):

LayoutTests:
* fast/forms/hidpi-textarea-on-subpixel-position-expected.html: Added.
* fast/forms/hidpi-textarea-on-subpixel-position.html: Added.
* platform/mac-wk2/TestExpectations: Due to defective RenderLayer cliprect calculation (WK2 only): webkit.org/b/132100

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@167771 268f45cc-cd09-0410-ab3c-d52691b4dbfc
12 files changed:
LayoutTests/ChangeLog
LayoutTests/fast/forms/hidpi-textarea-on-subpixel-position-expected.html [new file with mode: 0644]
LayoutTests/fast/forms/hidpi-textarea-on-subpixel-position.html [new file with mode: 0644]
LayoutTests/platform/mac-wk2/TestExpectations
Source/WebCore/ChangeLog
Source/WebCore/rendering/RenderBox.cpp
Source/WebCore/rendering/RenderTheme.cpp
Source/WebCore/rendering/RenderTheme.h
Source/WebCore/rendering/RenderThemeIOS.h
Source/WebCore/rendering/RenderThemeIOS.mm
Source/WebCore/rendering/RenderThemeMac.h
Source/WebCore/rendering/RenderThemeMac.mm