Checkboxes and radio buttons should scale when zooming or pinching to zoom
authorwenson_hsieh@apple.com <wenson_hsieh@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 5 Aug 2015 16:03:06 +0000 (16:03 +0000)
committerwenson_hsieh@apple.com <wenson_hsieh@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 5 Aug 2015 16:03:06 +0000 (16:03 +0000)
commita5cc870dae1f715009acf0d9de2d05e478a58331
treef9ffd6ff505364dab97aa895eb63a880e4ca9ec6
parent8be8eb124becb77827aecbfefce7577d6df7b789
Checkboxes and radio buttons should scale when zooming or pinching to zoom
https://bugs.webkit.org/show_bug.cgi?id=147405

Reviewed by Dean Jackson.

Refactors paintButton and paintToggleButton to use a temporary buffer when rendering
if the controls are zoomed. This affects checkboxes, radio buttons, and normal (push)
buttons.

* platform/mac/ThemeMac.h:
* platform/mac/ThemeMac.mm:
(WebCore::paintToggleButton): Refactored to use drawCellOrFocusRingWithViewIntoContext.
(WebCore::paintButton): Refactored to use drawCellOrFocusRingWithViewIntoContext.
(WebCore::ThemeMac::drawCellOrFocusRingWithViewIntoContext): Draws a given button cell
    and/or its focus ring into the given context, optionally using an offscreen buffer.
    This is a static function in ThemeMac so it can be accessed later on by
    RenderThemeMac when painting search fields that scale with zoom.
(WebCore::ThemeMac::paint):
(WebCore::buttonFocusRectOutlineWidth): Deleted. Made this value into a const float.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@187961 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Source/WebCore/ChangeLog
Source/WebCore/platform/mac/ThemeMac.h
Source/WebCore/platform/mac/ThemeMac.mm