Rename RenderStyle::fontSize() to RenderStyle::computedFontPixelSize()
authormmaxfield@apple.com <mmaxfield@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Sun, 16 Jul 2017 06:08:41 +0000 (06:08 +0000)
committermmaxfield@apple.com <mmaxfield@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Sun, 16 Jul 2017 06:08:41 +0000 (06:08 +0000)
commitad1fe2531c9180d81c58c384c0bdf8deaa490e70
treea481c5d9d55b77efebf31ba8114fdf08d7cae037
parent3149c180f6f9cf1aecafe6e1ca7b30aaf53f6e2d
Rename RenderStyle::fontSize() to RenderStyle::computedFontPixelSize()
https://bugs.webkit.org/show_bug.cgi?id=174509

Reviewed by Simon Fraser.

We have three font size functions:
- computedFontSize(): returns a float
- specifiedFontSize(): also returns a float
- fontSize(): returns the rounded computedFontSize()

FontDescription uses the convention of labelling rounded values as "pixel",
so a better name font fontSize() is computedFontPixelSize().

Also, because font sizes can never be negative, switch the type from an int
to an unsigned.

No new tests because there is no behavior change.

* accessibility/atk/WebKitAccessibleInterfaceText.cpp:
(getAttributeSetForAccessibilityObject):
* css/StyleResolver.cpp:
(WebCore::StyleResolver::adjustRenderStyle):
* platform/graphics/FontDescription.h:
(WebCore::FontDescription::computedPixelSize):
(WebCore::FontDescription::fontSelectionRequest):
* rendering/RenderBlock.cpp:
(WebCore::styleForFirstLetter):
* rendering/RenderRubyRun.cpp:
(WebCore::shouldOverhang):
(WebCore::RenderRubyRun::getOverhang):
* rendering/RenderRubyText.cpp:
(WebCore::RenderRubyText::adjustInlineDirectionLineBounds):
* rendering/RenderThemeGtk.cpp:
(WebCore::adjustSearchFieldIconStyle):
(WebCore::paintSearchFieldIcon):
* rendering/RenderThemeIOS.mm:
(WebCore::RenderThemeIOS::adjustCheckboxStyle):
(WebCore::RenderThemeIOS::adjustRadioStyle):
* rendering/RenderThemeMac.mm:
(WebCore::RenderThemeMac::controlSizeForFont):
(WebCore::RenderThemeMac::controlSizeForSystemFont):
(WebCore::RenderThemeMac::paintMenuListButtonDecorations):
(WebCore::RenderThemeMac::popupInternalPaddingBox):
(WebCore::RenderThemeMac::adjustMenuListButtonStyle):
* rendering/RenderThemeWin.cpp:
(WebCore::RenderThemeWin::adjustSearchFieldCancelButtonStyle):
(WebCore::RenderThemeWin::adjustSearchFieldResultsDecorationPartStyle):
(WebCore::RenderThemeWin::adjustSearchFieldResultsButtonStyle):
* rendering/TextDecorationPainter.cpp:
(WebCore::TextDecorationPainter::paintTextDecoration):
* rendering/mathml/RenderMathMLRow.cpp:
(WebCore::RenderMathMLRow::computeLineVerticalStretch):
* rendering/style/RenderStyle.cpp:
(WebCore::RenderStyle::computedFontPixelSize):
(WebCore::RenderStyle::computedLineHeight):
(WebCore::RenderStyle::fontSize): Deleted.
* rendering/style/RenderStyle.h:
* style/InlineTextBoxStyle.cpp:
(WebCore::visualOverflowForDecorations):
* style/StyleTreeResolver.cpp:
(WebCore::Style::TreeResolver::resolveElement):
* svg/SVGLengthContext.cpp:
(WebCore::SVGLengthContext::convertValueFromUserUnitsToEMS):
(WebCore::SVGLengthContext::convertValueFromEMSToUserUnits):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@219544 268f45cc-cd09-0410-ab3c-d52691b4dbfc
18 files changed:
Source/WebCore/ChangeLog
Source/WebCore/accessibility/atk/WebKitAccessibleInterfaceText.cpp
Source/WebCore/css/StyleResolver.cpp
Source/WebCore/platform/graphics/FontDescription.h
Source/WebCore/rendering/RenderBlock.cpp
Source/WebCore/rendering/RenderRubyRun.cpp
Source/WebCore/rendering/RenderRubyText.cpp
Source/WebCore/rendering/RenderThemeGtk.cpp
Source/WebCore/rendering/RenderThemeIOS.mm
Source/WebCore/rendering/RenderThemeMac.mm
Source/WebCore/rendering/RenderThemeWin.cpp
Source/WebCore/rendering/TextDecorationPainter.cpp
Source/WebCore/rendering/mathml/RenderMathMLRow.cpp
Source/WebCore/rendering/style/RenderStyle.cpp
Source/WebCore/rendering/style/RenderStyle.h
Source/WebCore/style/InlineTextBoxStyle.cpp
Source/WebCore/style/StyleTreeResolver.cpp
Source/WebCore/svg/SVGLengthContext.cpp