Search fields should scale when rendering while zoomed
https://bugs.webkit.org/show_bug.cgi?id=147867
Reviewed by Daniel Bates.
When rendering zoomed search fields, draw to an image buffer instead of drawing directly into the context. This
allows us to scale the image buffer up before rendering. Also refactors common logic used to draw both selects
(paintMenuList) and search fields into the new private method paintCellAndSetFocusedElementNeedsRepaintIfNecessary.
* rendering/RenderThemeMac.h: Changed drawCellOrFocusRingWithViewIntoContext to take a raw pointer.
* rendering/RenderThemeMac.mm:
(WebCore::paintToggleButton): Passes a raw pointer to drawCellOrFocusRingWithViewIntoContext.
(WebCore::ThemeMac::drawCellOrFocusRingWithViewIntoContext): Changed to take a raw pointer.
* rendering/RenderThemeMac.h:
* rendering/RenderThemeMac.mm:
(WebCore::RenderThemeMac::paintMenuList): Refactored to use paintCellAndSetFocusedElementNeedsRepaintIfNecessary.
(WebCore::RenderThemeMac::paintCellAndSetFocusedElementNeedsRepaintIfNecessary): Contains logic common to painting
both selects and search fields.
(WebCore::RenderThemeMac::paintSearchField): Use ThemeMac::drawCellOrFocusRingWithViewIntoContext
to render search fields, utilizing an offscreen image buffer only when necessary.
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@188510
268f45cc-cd09-0410-ab3c-
d52691b4dbfc