Changeset 145706 in webkit


Ignore:
Timestamp:
Mar 13, 2013 5:38:08 AM (11 years ago)
Author:
commit-queue@webkit.org
Message:

[BlackBerry] SimpleFontData: remove duplicate code
https://bugs.webkit.org/show_bug.cgi?id=112149

Patch by Alberto Garcia <agarcia@igalia.com> on 2013-03-13
Reviewed by Carlos Garcia Campos.

smallCapsFontData() and emphasisMarkFontData() were moved from
platform specific files into platform/graphics/SimpleFontData.cpp
in r133362, so the BlackBerry port no longer needs its own
implementation.

  • platform/graphics/blackberry/SimpleFontDataBlackBerry.cpp:
Location:
trunk/Source/WebCore
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebCore/ChangeLog

    r145704 r145706  
     12013-03-13  Alberto Garcia  <agarcia@igalia.com>
     2
     3        [BlackBerry] SimpleFontData: remove duplicate code
     4        https://bugs.webkit.org/show_bug.cgi?id=112149
     5
     6        Reviewed by Carlos Garcia Campos.
     7
     8        smallCapsFontData() and emphasisMarkFontData() were moved from
     9        platform specific files into platform/graphics/SimpleFontData.cpp
     10        in r133362, so the BlackBerry port no longer needs its own
     11        implementation.
     12
     13        * platform/graphics/blackberry/SimpleFontDataBlackBerry.cpp:
     14
    1152013-03-13  Ilya Tikhonovsky  <loislo@chromium.org>
    216
  • trunk/Source/WebCore/platform/graphics/blackberry/SimpleFontDataBlackBerry.cpp

    r145687 r145706  
    3131namespace WebCore {
    3232
    33 // Smallcaps versions of fonts are 70% the size of the normal font.
    34 static const float smallCapsFraction = 0.7f;
    35 static const float emphasisMarkFraction = .5;
    36 
    3733static inline float FSFixedToFloat(FS_FIXED n) { return n / 65536.0; }
    3834
     
    121117}
    122118
    123 SimpleFontData* SimpleFontData::smallCapsFontData(const FontDescription& fontDescription) const
    124 {
    125     if (!m_derivedFontData)
    126         m_derivedFontData = DerivedFontData::create(isCustomFont());
    127     if (!m_derivedFontData->smallCaps)
    128         m_derivedFontData->smallCaps = createScaledFontData(fontDescription, smallCapsFraction);
    129 
    130     return m_derivedFontData->smallCaps.get();
    131 }
    132 
    133 SimpleFontData* SimpleFontData::emphasisMarkFontData(const FontDescription& fontDescription) const
    134 {
    135     if (!m_derivedFontData)
    136         m_derivedFontData = DerivedFontData::create(isCustomFont());
    137     if (!m_derivedFontData->emphasisMark)
    138         m_derivedFontData->emphasisMark = createScaledFontData(fontDescription, emphasisMarkFraction);
    139 
    140     return m_derivedFontData->emphasisMark.get();
    141 }
    142 
    143119bool SimpleFontData::containsCharacters(const UChar* characters, int length) const
    144120{
Note: See TracChangeset for help on using the changeset viewer.