Skip to content
Permalink
Browse files
2011-05-24 Nikolas Zimmermann <nzimmermann@rim.com>
        Not reviewed, build fix.

        Remove platform layering violation: TextRun stores RenderObjects for SVG Fonts support
        https://bugs.webkit.org/show_bug.cgi?id=60254

        Rename SimpleFontData::FontData subclass to AdditionalFontData, to avoid clashes with the WebCore::FontData class, which breaks the win build.

        * platform/graphics/SimpleFontData.cpp:
        (WebCore::SimpleFontData::SimpleFontData):
        * platform/graphics/SimpleFontData.h:
        (WebCore::SimpleFontData::fontData):
        * svg/SVGFontData.h:


Canonical link: https://commits.webkit.org/76736@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@87156 268f45cc-cd09-0410-ab3c-d52691b4dbfc
  • Loading branch information
Nikolas Zimmermann committed May 24, 2011
1 parent e32f05f commit 60ec2f88f076c7a5705821a96b0db8313c2a86ca
Showing with 21 additions and 7 deletions.
  1. +15 −0 Source/WebCore/ChangeLog
  2. +1 −1 Source/WebCore/platform/graphics/SimpleFontData.cpp
  3. +4 −4 Source/WebCore/platform/graphics/SimpleFontData.h
  4. +1 −2 Source/WebCore/svg/SVGFontData.h
@@ -1,3 +1,18 @@
2011-05-24 Nikolas Zimmermann <nzimmermann@rim.com>

Not reviewed, build fix.

Remove platform layering violation: TextRun stores RenderObjects for SVG Fonts support
https://bugs.webkit.org/show_bug.cgi?id=60254

Rename SimpleFontData::FontData subclass to AdditionalFontData, to avoid clashes with the WebCore::FontData class, which breaks the win build.

* platform/graphics/SimpleFontData.cpp:
(WebCore::SimpleFontData::SimpleFontData):
* platform/graphics/SimpleFontData.h:
(WebCore::SimpleFontData::fontData):
* svg/SVGFontData.h:

2011-05-24 Nikolas Zimmermann <nzimmermann@rim.com>

Reviewed by Antti Koivisto.
@@ -56,7 +56,7 @@ SimpleFontData::SimpleFontData(const FontPlatformData& platformData, bool isCust
platformCharWidthInit();
}

SimpleFontData::SimpleFontData(PassOwnPtr<SimpleFontData::FontData> fontData, int size, bool syntheticBold, bool syntheticItalic)
SimpleFontData::SimpleFontData(PassOwnPtr<AdditionalFontData> fontData, int size, bool syntheticBold, bool syntheticItalic)
: m_platformData(FontPlatformData(size, syntheticBold, syntheticItalic))
, m_fontData(fontData)
, m_treatAsFixedPitch(false)
@@ -70,7 +70,7 @@ enum Pitch { UnknownPitch, FixedPitch, VariablePitch };

class SimpleFontData : public FontData {
public:
class FontData {
class AdditionalFontData {
WTF_MAKE_FAST_ALLOCATED;
public:
virtual ~FontData() { }
@@ -82,7 +82,7 @@ class SimpleFontData : public FontData {
SimpleFontData(const FontPlatformData&, bool isCustomFont = false, bool isLoading = false, bool isTextOrientationFallback = false);

// Used to create SVG Fonts.
SimpleFontData(PassOwnPtr<SimpleFontData::FontData>, int size, bool syntheticBold, bool syntheticItalic);
SimpleFontData(PassOwnPtr<AdditionalFontData>, int size, bool syntheticBold, bool syntheticItalic);

virtual ~SimpleFontData();

@@ -145,7 +145,7 @@ class SimpleFontData : public FontData {
void determinePitch();
Pitch pitch() const { return m_treatAsFixedPitch ? FixedPitch : VariablePitch; }

SimpleFontData::FontData* fontData() const { return m_fontData.get(); }
AdditionalFontData* fontData() const { return m_fontData.get(); }
bool isSVGFont() const { return m_fontData; }

virtual bool isCustomFont() const { return m_isCustomFont; }
@@ -222,7 +222,7 @@ class SimpleFontData : public FontData {
float m_avgCharWidth;

FontPlatformData m_platformData;
OwnPtr<SimpleFontData::FontData> m_fontData;
OwnPtr<AdditionalFontData> m_fontData;

mutable OwnPtr<GlyphMetricsMap<FloatRect> > m_glyphToBoundsMap;
mutable GlyphMetricsMap<float> m_glyphToWidthMap;
@@ -26,7 +26,7 @@

namespace WebCore {

class SVGFontData : public SimpleFontData::FontData {
class SVGFontData : public SimpleFontData::AdditionalFontData {
public:
static PassOwnPtr<SVGFontData> create(SVGFontFaceElement* element)
{
@@ -35,7 +35,6 @@ class SVGFontData : public SimpleFontData::FontData {

virtual ~SVGFontData() { }

virtual bool isSVGFontData() const { return true; }
virtual void initializeFontData(SimpleFontData*, int size);

SVGFontFaceElement* svgFontFaceElement() const { return m_svgFontFaceElement; }

0 comments on commit 60ec2f8

Please sign in to comment.