Move static StyleResolver functions to Style namespace
authorantti@apple.com <antti@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 9 Aug 2013 19:44:07 +0000 (19:44 +0000)
committerantti@apple.com <antti@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 9 Aug 2013 19:44:07 +0000 (19:44 +0000)
commit556eeb566184f53702c749f29841f8cc96fcf23b
tree4c808edf60c035196ba43dbfddda3ad77968a4be
parenta825559a96d419246dd18f2fb1fc926a1a93c79e
Move static StyleResolver functions to Style namespace
https://bugs.webkit.org/show_bug.cgi?id=119629

Reviewed by Sam Weinig and Andreas Kling.

- Move static font size computation functions to StyleFontSizeFunctions.h/.cpp
- Move StyleResolver::styleForDocument to Style::resolveForDocument

* WebCore.xcodeproj/project.pbxproj:
* css/DeprecatedStyleBuilder.cpp:
(WebCore::ApplyPropertyFontFamily::applyInitialValue):
(WebCore::ApplyPropertyFontFamily::applyValue):
(WebCore::ApplyPropertyFontSize::applyInitialValue):
(WebCore::ApplyPropertyFontSize::applyValue):
* css/StyleResolver.cpp:
(WebCore::StyleResolver::adjustRenderStyle):
(WebCore::checkForOrientationChange):
(WebCore::StyleResolver::applyProperty):
(WebCore::StyleResolver::checkForGenericFamilyChange):
(WebCore::StyleResolver::initializeFontStyle):
(WebCore::StyleResolver::setFontSize):
* css/StyleResolver.h:
* dom/Document.cpp:
(WebCore::Document::recalcStyle):
* editing/EditingStyle.cpp:
(WebCore::legacyFontSizeFromCSSValue):
* html/HTMLLinkElement.cpp:
(WebCore::HTMLLinkElement::process):
* rendering/style/RenderStyle.cpp:
(WebCore::RenderStyle::getFontAndGlyphOrientation):

    Moved from StyleResolver.cpp so it can be used by Style::resolveForDocument().
    This depends on RenderStyle only so it is a natural member function.

* rendering/style/RenderStyle.h:
* rendering/svg/RenderSVGInlineText.cpp:
(WebCore::RenderSVGInlineText::computeNewScaledFontForStyle):
* style/StyleFontSizeFunctions.cpp: Copied from Source/WebCore/css/StyleResolver.cpp.
(WebCore::Style::computedFontSizeFromSpecifiedSize):
(WebCore::Style::computedFontSizeFromSpecifiedSizeForSVGInlineText):
(WebCore::Style::fontSizeForKeyword):
(WebCore::Style::legacyFontSizeForPixelSize):
* style/StyleFontSizeFunctions.h: Added.
* style/StyleResolveForDocument.cpp: Added.
(WebCore::Style::resolveForDocument):
* style/StyleResolveForDocument.h: Added.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@153906 268f45cc-cd09-0410-ab3c-d52691b4dbfc
19 files changed:
Source/WebCore/CMakeLists.txt
Source/WebCore/ChangeLog
Source/WebCore/GNUmakefile.list.am
Source/WebCore/Target.pri
Source/WebCore/WebCore.vcxproj/WebCore.vcxproj
Source/WebCore/WebCore.xcodeproj/project.pbxproj
Source/WebCore/css/DeprecatedStyleBuilder.cpp
Source/WebCore/css/StyleResolver.cpp
Source/WebCore/css/StyleResolver.h
Source/WebCore/dom/Document.cpp
Source/WebCore/editing/EditingStyle.cpp
Source/WebCore/html/HTMLLinkElement.cpp
Source/WebCore/rendering/style/RenderStyle.cpp
Source/WebCore/rendering/style/RenderStyle.h
Source/WebCore/rendering/svg/RenderSVGInlineText.cpp
Source/WebCore/style/StyleFontSizeFunctions.cpp [new file with mode: 0644]
Source/WebCore/style/StyleFontSizeFunctions.h [new file with mode: 0644]
Source/WebCore/style/StyleResolveForDocument.cpp [new file with mode: 0644]
Source/WebCore/style/StyleResolveForDocument.h [new file with mode: 0644]