Clean up some CSS & Font code
authormmaxfield@apple.com <mmaxfield@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 2 Nov 2015 00:52:46 +0000 (00:52 +0000)
committermmaxfield@apple.com <mmaxfield@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 2 Nov 2015 00:52:46 +0000 (00:52 +0000)
commitd67f144a4c73751aeb990bf533bfa1db7f8c25c7
tree860e3f6e2e390496377ff57aa13e45231725fb78
parentb197046bdd824402cbaadb430039b13407ee67b9
Clean up some CSS & Font code
https://bugs.webkit.org/show_bug.cgi?id=150767

Reviewed by Darin Adler.

This patch migrates some CSS code to use references instead of pointers.
It also migrates some Font code to use RefPtr instead of PassRefPtr.

No new tests because there is no behavior change.

* css/CSSDefaultStyleSheets.cpp:
(WebCore::CSSDefaultStyleSheets::loadFullDefaultStyle):
(WebCore::CSSDefaultStyleSheets::loadSimpleDefaultStyle):
(WebCore::CSSDefaultStyleSheets::ensureDefaultStyleSheetsForElement):
* css/CSSFontSelector.cpp:
(WebCore::createFontFace):
(WebCore::CSSFontSelector::addFontFaceRule):
* css/CSSFontSelector.h:
* css/DocumentRuleSets.cpp:
(WebCore::DocumentRuleSets::initUserStyle):
(WebCore::DocumentRuleSets::collectRulesFromUserStyleSheets):
(WebCore::DocumentRuleSets::appendAuthorStyleSheets):
* css/RuleSet.cpp:
(WebCore::RuleSet::addChildRules):
(WebCore::RuleSet::addRulesFromSheet):
* css/RuleSet.h:
* css/StyleInvalidationAnalysis.cpp:
(WebCore::StyleInvalidationAnalysis::StyleInvalidationAnalysis):
* platform/graphics/Font.cpp:
(WebCore::Font::verticalRightOrientationFont):
(WebCore::Font::uprightOrientationFont):
(WebCore::Font::smallCapsFont):
(WebCore::Font::emphasisMarkFont):
(WebCore::Font::brokenIdeographFont):
(WebCore::Font::nonSyntheticItalicFont):
(WebCore::Font::createScaledFont):
* platform/graphics/Font.h:
(WebCore::Font::variantFont):
* platform/graphics/cocoa/FontCocoa.mm:
(WebCore::Font::platformCreateScaledFont):
* svg/SVGFontFaceElement.h:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@191871 268f45cc-cd09-0410-ab3c-d52691b4dbfc
16 files changed:
Source/WebCore/ChangeLog
Source/WebCore/css/CSSDefaultStyleSheets.cpp
Source/WebCore/css/CSSFontSelector.cpp
Source/WebCore/css/CSSFontSelector.h
Source/WebCore/css/DocumentRuleSets.cpp
Source/WebCore/css/RuleSet.cpp
Source/WebCore/css/RuleSet.h
Source/WebCore/css/StyleInvalidationAnalysis.cpp
Source/WebCore/platform/graphics/Font.cpp
Source/WebCore/platform/graphics/Font.h
Source/WebCore/platform/graphics/FontCascadeFonts.cpp
Source/WebCore/platform/graphics/cocoa/FontCascadeCocoa.mm
Source/WebCore/platform/graphics/cocoa/FontCocoa.mm
Source/WebCore/platform/graphics/freetype/SimpleFontDataFreeType.cpp
Source/WebCore/platform/graphics/win/SimpleFontDataWin.cpp
Source/WebCore/svg/SVGFontFaceElement.h