Changeset 130082 in webkit


Ignore:
Timestamp:
Oct 1, 2012, 3:18:28 PM (13 years ago)
Author:
schenney@chromium.org
Message:

Rename Font::m_fontList to avoid confusion
https://bugs.webkit.org/show_bug.cgi?id=95867

Reviewed by Eric Seidel.

Renames Font::m_fontList to Font::m_fontFallbackList to avoid confusion
with FontFallbackList::m_fontList.

No new tests as behavior is absolutely not different.

  • platform/graphics/Font.cpp:

(WebCore::Font::Font):
(WebCore::Font::operator=):
(WebCore::Font::operator==):
(WebCore::Font::update):

  • platform/graphics/Font.h:

(WebCore::Font::fontList):
(WebCore::Font::loadingCustomFonts):
(Font):
(WebCore::Font::primaryFont):
(WebCore::Font::fontDataAt):
(WebCore::Font::isFixedPitch):
(WebCore::Font::fontSelector):

  • platform/graphics/FontFastPath.cpp:

(WebCore::Font::glyphDataAndPageForCharacter):

Location:
trunk/Source/WebCore
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebCore/ChangeLog

    r130081 r130082  
     12012-10-01  Stephen Chenney  <schenney@chromium.org>
     2
     3        Rename Font::m_fontList to avoid confusion
     4        https://bugs.webkit.org/show_bug.cgi?id=95867
     5
     6        Reviewed by Eric Seidel.
     7
     8       Renames Font::m_fontList to Font::m_fontFallbackList to avoid confusion
     9       with FontFallbackList::m_fontList.
     10
     11        No new tests as behavior is absolutely not different.
     12
     13        * platform/graphics/Font.cpp:
     14        (WebCore::Font::Font):
     15        (WebCore::Font::operator=):
     16        (WebCore::Font::operator==):
     17        (WebCore::Font::update):
     18        * platform/graphics/Font.h:
     19        (WebCore::Font::fontList):
     20        (WebCore::Font::loadingCustomFonts):
     21        (Font):
     22        (WebCore::Font::primaryFont):
     23        (WebCore::Font::fontDataAt):
     24        (WebCore::Font::isFixedPitch):
     25        (WebCore::Font::fontSelector):
     26        * platform/graphics/FontFastPath.cpp:
     27        (WebCore::Font::glyphDataAndPageForCharacter):
     28
    1292012-10-01  Florin Malita  <fmalita@chromium.org>
    230
  • trunk/Source/WebCore/platform/graphics/Font.cpp

    r127801 r130082  
    8787
    8888Font::Font(const FontPlatformData& fontData, bool isPrinterFont, FontSmoothingMode fontSmoothingMode)
    89     : m_fontList(FontFallbackList::create())
     89    : m_fontFallbackList(FontFallbackList::create())
    9090    , m_letterSpacing(0)
    9191    , m_wordSpacing(0)
     
    9595    m_fontDescription.setFontSmoothing(fontSmoothingMode);
    9696    m_needsTranscoding = fontTranscoder().needsTranscoding(fontDescription());
    97     m_fontList->setPlatformFont(fontData);
     97    m_fontFallbackList->setPlatformFont(fontData);
    9898}
    9999
    100100Font::Font(const Font& other)
    101101    : m_fontDescription(other.m_fontDescription)
    102     , m_fontList(other.m_fontList)
     102    , m_fontFallbackList(other.m_fontFallbackList)
    103103    , m_letterSpacing(other.m_letterSpacing)
    104104    , m_wordSpacing(other.m_wordSpacing)
     
    111111{
    112112    m_fontDescription = other.m_fontDescription;
    113     m_fontList = other.m_fontList;
     113    m_fontFallbackList = other.m_fontFallbackList;
    114114    m_letterSpacing = other.m_letterSpacing;
    115115    m_wordSpacing = other.m_wordSpacing;
     
    126126        return false;
    127127   
    128     FontSelector* first = m_fontList ? m_fontList->fontSelector() : 0;
    129     FontSelector* second = other.m_fontList ? other.m_fontList->fontSelector() : 0;
     128    FontSelector* first = m_fontFallbackList ? m_fontFallbackList->fontSelector() : 0;
     129    FontSelector* second = other.m_fontFallbackList ? other.m_fontFallbackList->fontSelector() : 0;
    130130
    131131    return first == second
    132            && m_fontDescription == other.m_fontDescription
    133            && m_letterSpacing == other.m_letterSpacing
    134            && m_wordSpacing == other.m_wordSpacing
    135            && (m_fontList ? m_fontList->fontSelectorVersion() : 0) == (other.m_fontList ? other.m_fontList->fontSelectorVersion() : 0)
    136            && (m_fontList ? m_fontList->generation() : 0) == (other.m_fontList ? other.m_fontList->generation() : 0);
     132        && m_fontDescription == other.m_fontDescription
     133        && m_letterSpacing == other.m_letterSpacing
     134        && m_wordSpacing == other.m_wordSpacing
     135        && (m_fontFallbackList ? m_fontFallbackList->fontSelectorVersion() : 0) == (other.m_fontFallbackList ? other.m_fontFallbackList->fontSelectorVersion() : 0)
     136        && (m_fontFallbackList ? m_fontFallbackList->generation() : 0) == (other.m_fontFallbackList ? other.m_fontFallbackList->generation() : 0);
    137137}
    138138
     
    144144    // won't stick around long enough to get you in trouble). Still, this is pretty disgusting,
    145145    // and could eventually be rectified by using RefPtrs for Fonts themselves.
    146     if (!m_fontList)
    147         m_fontList = FontFallbackList::create();
    148     m_fontList->invalidate(fontSelector);
     146    if (!m_fontFallbackList)
     147        m_fontFallbackList = FontFallbackList::create();
     148    m_fontFallbackList->invalidate(fontSelector);
    149149}
    150150
  • trunk/Source/WebCore/platform/graphics/Font.h

    r130079 r130082  
    262262
    263263    bool needsTranscoding() const { return m_needsTranscoding; }
    264     FontFallbackList* fontList() const { return m_fontList.get(); }
     264    FontFallbackList* fontList() const { return m_fontFallbackList.get(); }
    265265
    266266private:
    267267    bool loadingCustomFonts() const
    268268    {
    269         return m_fontList && m_fontList->loadingCustomFonts();
     269        return m_fontFallbackList && m_fontFallbackList->loadingCustomFonts();
    270270    }
    271271
     
    275275
    276276    FontDescription m_fontDescription;
    277     mutable RefPtr<FontFallbackList> m_fontList;
     277    mutable RefPtr<FontFallbackList> m_fontFallbackList;
    278278    short m_letterSpacing;
    279279    short m_wordSpacing;
     
    288288inline const SimpleFontData* Font::primaryFont() const
    289289{
    290     ASSERT(m_fontList);
    291     return m_fontList->primarySimpleFontData(this);
     290    ASSERT(m_fontFallbackList);
     291    return m_fontFallbackList->primarySimpleFontData(this);
    292292}
    293293
    294294inline const FontData* Font::fontDataAt(unsigned index) const
    295295{
    296     ASSERT(m_fontList);
    297     return m_fontList->fontDataAt(this, index);
     296    ASSERT(m_fontFallbackList);
     297    return m_fontFallbackList->fontDataAt(this, index);
    298298}
    299299
    300300inline bool Font::isFixedPitch() const
    301301{
    302     ASSERT(m_fontList);
    303     return m_fontList->isFixedPitch(this);
     302    ASSERT(m_fontFallbackList);
     303    return m_fontFallbackList->isFixedPitch(this);
    304304}
    305305
    306306inline FontSelector* Font::fontSelector() const
    307307{
    308     return m_fontList ? m_fontList->fontSelector() : 0;
     308    return m_fontFallbackList ? m_fontFallbackList->fontSelector() : 0;
    309309}
    310310
  • trunk/Source/WebCore/platform/graphics/FontFastPath.cpp

    r130079 r130082  
    6969    unsigned pageNumber = (c / GlyphPage::size);
    7070
    71     GlyphPageTreeNode* node = pageNumber ? m_fontList->m_pages.get(pageNumber) : m_fontList->m_pageZero;
     71    GlyphPageTreeNode* node = pageNumber ? m_fontFallbackList->m_pages.get(pageNumber) : m_fontFallbackList->m_pageZero;
    7272    if (!node) {
    7373        node = GlyphPageTreeNode::getRootChild(fontDataAt(0), pageNumber);
    7474        if (pageNumber)
    75             m_fontList->m_pages.set(pageNumber, node);
     75            m_fontFallbackList->m_pages.set(pageNumber, node);
    7676        else
    77             m_fontList->m_pageZero = node;
     77            m_fontFallbackList->m_pageZero = node;
    7878    }
    7979
     
    140140            node = node->getChild(fontDataAt(node->level()), pageNumber);
    141141            if (pageNumber)
    142                 m_fontList->m_pages.set(pageNumber, node);
     142                m_fontFallbackList->m_pages.set(pageNumber, node);
    143143            else
    144                 m_fontList->m_pageZero = node;
     144                m_fontFallbackList->m_pageZero = node;
    145145        }
    146146    }
     
    177177            node = node->getChild(fontDataAt(node->level()), pageNumber);
    178178            if (pageNumber)
    179                 m_fontList->m_pages.set(pageNumber, node);
     179                m_fontFallbackList->m_pages.set(pageNumber, node);
    180180            else
    181                 m_fontList->m_pageZero = node;
     181                m_fontFallbackList->m_pageZero = node;
    182182        }
    183183    }
Note: See TracChangeset for help on using the changeset viewer.