REGRESSION (r176751): line-height ignored in <button> elements
https://bugs.webkit.org/show_bug.cgi?id=144234
Reviewed by Antti Koivisto.
Source/WebCore:
Test: fast/forms/button-line-height.html
* platform/Theme.h: Changed controlFont to return an Optional so we can tell
when the theme is overriding the font. Otherwise if the font from the user-agent
style sheet and the font from the theme are the same, we will think we are not
overriding the font when we actually are.
* platform/mac/ThemeMac.h: Updated controlFont to return Optional.
* platform/mac/ThemeMac.mm:
(WebCore::ThemeMac::controlFont): Ditto.
* rendering/RenderTheme.cpp:
(WebCore::RenderTheme::adjustStyle): Set line height only if the font is
overriden by the theme, all the time for PushButtonPart on Mac, and not at all
for other parts. Also tightened up the logic a little since RenderStyle's
setFontDescription already does an "==" comparison; we don't have to do
that twice.
LayoutTests:
* fast/forms/button-line-height-expected.html: Added.
* fast/forms/button-line-height.html: Added.
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@183366
268f45cc-cd09-0410-ab3c-
d52691b4dbfc