summaryrefslogtreecommitdiffstats
path: root/WebCore/platform
diff options
context:
space:
mode:
authorSteve Block <steveblock@google.com>2010-04-28 15:59:17 +0100
committerSteve Block <steveblock@google.com>2010-05-11 14:42:12 +0100
commitd2816f16f713bc58b245e2d5c5fd16ac4bb32cb8 (patch)
tree71cbcab222637e6bd77a3880d3671656472e838c /WebCore/platform
parent0c3375cc49016da4a394db00595be9cf605093b1 (diff)
downloadexternal_webkit-d2816f16f713bc58b245e2d5c5fd16ac4bb32cb8.zip
external_webkit-d2816f16f713bc58b245e2d5c5fd16ac4bb32cb8.tar.gz
external_webkit-d2816f16f713bc58b245e2d5c5fd16ac4bb32cb8.tar.bz2
Merge webkit.org at r58033 : Update font method signatures
See http://trac.webkit.org/changeset/57215 Change-Id: I441f2905fe3882d3da2f4e9c8084a7d09d94b6f6
Diffstat (limited to 'WebCore/platform')
-rw-r--r--WebCore/platform/graphics/android/FontAndroid.cpp2
-rw-r--r--WebCore/platform/graphics/android/FontDataAndroid.cpp10
2 files changed, 8 insertions, 4 deletions
diff --git a/WebCore/platform/graphics/android/FontAndroid.cpp b/WebCore/platform/graphics/android/FontAndroid.cpp
index 36c6248..0a67188 100644
--- a/WebCore/platform/graphics/android/FontAndroid.cpp
+++ b/WebCore/platform/graphics/android/FontAndroid.cpp
@@ -211,7 +211,7 @@ void Font::drawComplexText(GraphicsContext* gc, TextRun const& run,
paint);
}
-float Font::floatWidthForComplexText(const TextRun& run, HashSet<const SimpleFontData*>*) const
+float Font::floatWidthForComplexText(const TextRun& run, HashSet<const SimpleFontData*>*, GlyphOverflow*) const
{
SkPaint paint;
diff --git a/WebCore/platform/graphics/android/FontDataAndroid.cpp b/WebCore/platform/graphics/android/FontDataAndroid.cpp
index c915eae..c9b1d37 100644
--- a/WebCore/platform/graphics/android/FontDataAndroid.cpp
+++ b/WebCore/platform/graphics/android/FontDataAndroid.cpp
@@ -95,7 +95,7 @@ void SimpleFontData::determinePitch()
m_treatAsFixedPitch = false;
}
-float SimpleFontData::platformWidthForGlyph(Glyph glyph) const
+GlyphMetrics SimpleFontData::platformMetricsForGlyph(Glyph glyph, GlyphMetricsMode) const
{
SkASSERT(sizeof(glyph) == 2); // compile-time assert
@@ -103,12 +103,16 @@ float SimpleFontData::platformWidthForGlyph(Glyph glyph) const
m_platformData.setupPaint(&paint);
+ float advanceWidth;
if (EmojiFont::IsEmojiGlyph(glyph))
- return EmojiFont::GetAdvanceWidth(glyph, paint);
+ advanceWidth = EmojiFont::GetAdvanceWidth(glyph, paint);
else {
paint.setTextEncoding(SkPaint::kGlyphID_TextEncoding);
- return SkScalarToFloat(paint.measureText(&glyph, 2));
+ advanceWidth = SkScalarToFloat(paint.measureText(&glyph, 2));
}
+ GlyphMetrics metrics;
+ metrics.horizontalAdvance = advanceWidth;
+ return metrics;
}
}