Changeset 13247 in webkit


Ignore:
Timestamp:
Mar 10, 2006 10:58:31 AM (18 years ago)
Author:
hyatt
Message:

Rename FontRenderer to FontDataSet.

Reviewed by adele

  • WebCore.xcodeproj/project.pbxproj:
  • platform/Font.cpp: (WebCore::Font::update):
  • platform/Font.h:
  • platform/FontDataSet.h: Added.
  • platform/FontRenderer.h: Removed.
  • platform/mac/FontMac.mm: (WebCore::FontDataSet::~FontDataSet): (WebCore::FontDataSet::getWebCoreFont): (WebCore::FontDataSet::getRenderer): (WebCore::FontDataSet::determinePitch): (WebCore::FontDataSet::invalidate):
  • platform/win/FontWin.cpp: (WebCore::getCairoFont): (WebCore::FontDataSet::~FontDataSet): (WebCore::FontDataSet::determinePitch): (WebCore::FontDataSet::invalidate): (WebCore::FontDataSet::primaryCairoFont):
Location:
trunk/WebCore
Files:
6 edited
1 moved

Legend:

Unmodified
Added
Removed
  • trunk/WebCore/ChangeLog

    r13245 r13247  
     12006-03-10  David Hyatt  <hyatt@apple.com>
     2
     3        Rename FontRenderer to FontDataSet.
     4
     5        Reviewed by adele
     6
     7        * WebCore.xcodeproj/project.pbxproj:
     8        * platform/Font.cpp:
     9        (WebCore::Font::update):
     10        * platform/Font.h:
     11        * platform/FontDataSet.h: Added.
     12        * platform/FontRenderer.h: Removed.
     13        * platform/mac/FontMac.mm:
     14        (WebCore::FontDataSet::~FontDataSet):
     15        (WebCore::FontDataSet::getWebCoreFont):
     16        (WebCore::FontDataSet::getRenderer):
     17        (WebCore::FontDataSet::determinePitch):
     18        (WebCore::FontDataSet::invalidate):
     19        * platform/win/FontWin.cpp:
     20        (WebCore::getCairoFont):
     21        (WebCore::FontDataSet::~FontDataSet):
     22        (WebCore::FontDataSet::determinePitch):
     23        (WebCore::FontDataSet::invalidate):
     24        (WebCore::FontDataSet::primaryCairoFont):
     25
    1262006-03-09  Justin Garcia  <justin.garcia@apple.com>
    227
  • trunk/WebCore/WebCore.xcodeproj/project.pbxproj

    r13187 r13247  
    10141014                BCEA4948097F0F770094C9E4 /* BrowserExtensionMac.mm in Sources */ = {isa = PBXBuildFile; fileRef = BCEA4946097F0F770094C9E4 /* BrowserExtensionMac.mm */; };
    10151015                BCEB377309B7BA3900CB38B1 /* FontMac.mm in Sources */ = {isa = PBXBuildFile; fileRef = BCEB377209B7BA3900CB38B1 /* FontMac.mm */; };
    1016                 BCEB377609B7BB0D00CB38B1 /* FontRenderer.h in Headers */ = {isa = PBXBuildFile; fileRef = BCEB377509B7BB0D00CB38B1 /* FontRenderer.h */; };
     1016                BCEB377609B7BB0D00CB38B1 /* FontDataSet.h in Headers */ = {isa = PBXBuildFile; fileRef = BCEB377509B7BB0D00CB38B1 /* FontDataSet.h */; };
    10171017                BCEF3434087B563E00BBF833 /* htmlfactory.cpp in Sources */ = {isa = PBXBuildFile; fileRef = BCEF3432087B563E00BBF833 /* htmlfactory.cpp */; };
    10181018                BCEF3435087B563E00BBF833 /* htmlfactory.h in Headers */ = {isa = PBXBuildFile; fileRef = BCEF3433087B563E00BBF833 /* htmlfactory.h */; };
     
    21012101                BCEACC8F0592E0AD009D6AEF /* xbl_docimpl.h */ = {isa = PBXFileReference; fileEncoding = 30; indentWidth = 4; lastKnownFileType = sourcecode.c.h; name = xbl_docimpl.h; path = xbl/xbl_docimpl.h; sourceTree = "<group>"; tabWidth = 8; usesTabs = 0; };
    21022102                BCEB377209B7BA3900CB38B1 /* FontMac.mm */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.objcpp; path = FontMac.mm; sourceTree = "<group>"; };
    2103                 BCEB377509B7BB0D00CB38B1 /* FontRenderer.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; name = FontRenderer.h; path = platform/FontRenderer.h; sourceTree = "<group>"; };
     2103                BCEB377509B7BB0D00CB38B1 /* FontDataSet.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; name = FontDataSet.h; path = platform/FontDataSet.h; sourceTree = "<group>"; };
    21042104                BCEF3432087B563E00BBF833 /* htmlfactory.cpp */ = {isa = PBXFileReference; fileEncoding = 30; indentWidth = 4; lastKnownFileType = sourcecode.cpp.cpp; path = htmlfactory.cpp; sourceTree = "<group>"; tabWidth = 8; usesTabs = 0; };
    21052105                BCEF3433087B563E00BBF833 /* htmlfactory.h */ = {isa = PBXFileReference; fileEncoding = 30; indentWidth = 4; lastKnownFileType = sourcecode.c.h; path = htmlfactory.h; sourceTree = "<group>"; tabWidth = 8; usesTabs = 0; };
     
    33513351                                BCC47E2409A3D6F100ADB771 /* FontFamily.cpp */,
    33523352                                BCC47E2509A3D6F100ADB771 /* FontFamily.h */,
    3353                                 BCEB377509B7BB0D00CB38B1 /* FontRenderer.h */,
     3353                                BCEB377509B7BB0D00CB38B1 /* FontDataSet.h */,
    33543354                                A823A75B09B6E53900B60641 /* GraphicsContext.cpp */,
    33553355                                935367E409AF77DD00D35CD6 /* GraphicsContext.h */,
     
    43474347                                A82398A609B3ACDB00B60641 /* PlugInInfoStore.h in Headers */,
    43484348                                A8239E0109B3CF8A00B60641 /* Logging.h in Headers */,
    4349                                 BCEB377609B7BB0D00CB38B1 /* FontRenderer.h in Headers */,
     4349                                BCEB377609B7BB0D00CB38B1 /* FontDataSet.h in Headers */,
    43504350                                C6D74AD509AA282E000B0A52 /* ModifySelectionListLevelCommand.h in Headers */,
    43514351                                6545F67109B82FED0013006F /* TransferJob.h in Headers */,
  • trunk/WebCore/platform/Font.cpp

    r13236 r13247  
    2727#include "Font.h"
    2828
    29 #include "FontRenderer.h"
     29#include "FontDataSet.h"
    3030#include "GraphicsContext.h"
    3131#include "khtml_settings.h"
     
    7373    // and could eventually be rectified by using RefPtrs for Fonts themselves.
    7474    if (!m_renderer)
    75         m_renderer = new FontRenderer();
     75        m_renderer = new FontDataSet();
    7676    m_renderer->invalidate();
    7777}
  • trunk/WebCore/platform/Font.h

    r13206 r13247  
    4343namespace WebCore {
    4444
    45 class FontRenderer;
     45class FontDataSet;
    4646class GraphicsContext;
    4747class IntRect;
     
    121121#endif
    122122
    123     // Metrics that we query the FontRenderer for.
     123    // Metrics that we query the FontDataSet for.
    124124    int ascent() const;
    125125    int descent() const;
     
    130130private:
    131131    FontDescription m_fontDescription;
    132     mutable RefPtr<FontRenderer> m_renderer;
     132    mutable RefPtr<FontDataSet> m_renderer;
    133133    short m_letterSpacing;
    134134    short m_wordSpacing;
  • trunk/WebCore/platform/FontDataSet.h

    r13245 r13247  
    3939#endif
    4040
    41 class FontRenderer : public Shared<FontRenderer>, Noncopyable {
     41class FontDataSet : public Shared<FontDataSet>, Noncopyable {
    4242public:
    43     FontRenderer();
    44     ~FontRenderer();
     43    FontDataSet();
     44    ~FontDataSet();
    4545
    4646    void invalidate();
  • trunk/WebCore/platform/mac/FontMac.mm

    r13236 r13247  
    3131#import "FoundationExtras.h"
    3232
    33 #import "FontRenderer.h"
     33#import "FontDataSet.h"
    3434#import "GraphicsContext.h"
    3535#import "khtml_settings.h"
     
    4141namespace WebCore {
    4242
    43 FontRenderer::FontRenderer()
     43FontDataSet::FontDataSet()
    4444:m_pitch(UnknownPitch), m_renderer(nil)
    4545{
     
    4747}
    4848
    49 FontRenderer::~FontRenderer()
     49FontDataSet::~FontDataSet()
    5050{
    5151    KWQRelease(m_renderer);
     
    5353}
    5454
    55 const WebCoreFont& FontRenderer::getWebCoreFont(const FontDescription& fontDescription) const
     55const WebCoreFont& FontDataSet::getWebCoreFont(const FontDescription& fontDescription) const
    5656{
    5757    if (!m_webCoreFont.font) {
     
    7272}
    7373
    74 id <WebCoreTextRenderer> FontRenderer::getRenderer(const FontDescription& fontDescription)
     74id <WebCoreTextRenderer> FontDataSet::getRenderer(const FontDescription& fontDescription)
    7575{
    7676    if (!m_renderer)
     
    7979}
    8080
    81 void FontRenderer::determinePitch(const FontDescription& fontDescription) const {
     81void FontDataSet::determinePitch(const FontDescription& fontDescription) const {
    8282    KWQ_BLOCK_EXCEPTIONS;
    8383    if ([[WebCoreTextRendererFactory sharedFactory] isFontFixedPitch:getWebCoreFont(fontDescription)])
     
    8888}
    8989
    90 void FontRenderer::invalidate()
     90void FontDataSet::invalidate()
    9191{
    9292    KWQRelease(m_renderer);
  • trunk/WebCore/platform/win/FontWin.cpp

    r13246 r13247  
    2727#include "Font.h"
    2828
    29 #include "FontRenderer.h"
     29#include "FontDataSet.h"
    3030#include "GraphicsContext.h"
    3131#include <cairo.h>
     
    107107    HFONT font = CreateFontIndirectW(&winfont);
    108108   
    109     // Windows will always give us valid pointer here, even if the face name is non-existent.  We have to double-check
     109    // Windows will always give us a valid pointer here, even if the face name is non-existent.  We have to double-check
    110110    // and see if the family name was really used.
    111111    HDC dc = GetDC((HWND)0);
     
    148148}
    149149
    150 FontRenderer::FontRenderer()
     150FontDataSet::FontDataSet()
    151151:m_pitch(UnknownPitch)
    152152{
     
    154154}
    155155
    156 FontRenderer::~FontRenderer()
     156FontDataSet::~FontDataSet()
    157157{
    158158    deleteAllValues(m_fontSet);
    159159}
    160160
    161 void FontRenderer::determinePitch(const FontDescription& fontDescription) const
     161void FontDataSet::determinePitch(const FontDescription& fontDescription) const
    162162{
    163163    // FIXME: Implement this.
     
    165165}
    166166
    167 void FontRenderer::invalidate()
     167void FontDataSet::invalidate()
    168168{
    169169    // Delete the Cairo fonts.
     
    172172}
    173173
    174 CairoFont* FontRenderer::primaryCairoFont(const FontDescription& fontDescription) const
     174CairoFont* FontDataSet::primaryCairoFont(const FontDescription& fontDescription) const
    175175{
    176176    if (!m_fontSet.isEmpty())
Note: See TracChangeset for help on using the changeset viewer.