summaryrefslogtreecommitdiffstats
path: root/Source/WebCore/platform/graphics/FontFastPath.cpp
diff options
context:
space:
mode:
authorSteve Block <steveblock@google.com>2011-05-18 13:36:51 +0100
committerSteve Block <steveblock@google.com>2011-05-24 15:38:28 +0100
commit2fc2651226baac27029e38c9d6ef883fa32084db (patch)
treee396d4bf89dcce6ed02071be66212495b1df1dec /Source/WebCore/platform/graphics/FontFastPath.cpp
parentb3725cedeb43722b3b175aaeff70552e562d2c94 (diff)
downloadexternal_webkit-2fc2651226baac27029e38c9d6ef883fa32084db.zip
external_webkit-2fc2651226baac27029e38c9d6ef883fa32084db.tar.gz
external_webkit-2fc2651226baac27029e38c9d6ef883fa32084db.tar.bz2
Merge WebKit at r78450: Initial merge by git.
Change-Id: I6d3e5f1f868ec266a0aafdef66182ddc3f265dc1
Diffstat (limited to 'Source/WebCore/platform/graphics/FontFastPath.cpp')
-rw-r--r--Source/WebCore/platform/graphics/FontFastPath.cpp13
1 files changed, 6 insertions, 7 deletions
diff --git a/Source/WebCore/platform/graphics/FontFastPath.cpp b/Source/WebCore/platform/graphics/FontFastPath.cpp
index f927c13..034ac22 100644
--- a/Source/WebCore/platform/graphics/FontFastPath.cpp
+++ b/Source/WebCore/platform/graphics/FontFastPath.cpp
@@ -23,7 +23,6 @@
#include "config.h"
#include "Font.h"
-#include "CharacterNames.h"
#include "FloatRect.h"
#include "FontCache.h"
#include "FontFallbackList.h"
@@ -32,8 +31,8 @@
#include "SimpleFontData.h"
#include "TextRun.h"
#include "WidthIterator.h"
-
#include <wtf/MathExtras.h>
+#include <wtf/unicode/CharacterNames.h>
#include <wtf/unicode/Unicode.h>
using namespace WTF;
@@ -252,7 +251,7 @@ int Font::emphasisMarkAscent(const AtomicString& mark) const
if (!markFontData)
return 0;
- return markFontData->ascent();
+ return markFontData->fontMetrics().ascent();
}
int Font::emphasisMarkDescent(const AtomicString& mark) const
@@ -266,7 +265,7 @@ int Font::emphasisMarkDescent(const AtomicString& mark) const
if (!markFontData)
return 0;
- return markFontData->descent();
+ return markFontData->fontMetrics().descent();
}
int Font::emphasisMarkHeight(const AtomicString& mark) const
@@ -280,7 +279,7 @@ int Font::emphasisMarkHeight(const AtomicString& mark) const
if (!markFontData)
return 0;
- return markFontData->height();
+ return markFontData->fontMetrics().height();
}
float Font::getGlyphsAndAdvancesForSimpleText(const TextRun& run, int from, int to, GlyphBuffer& glyphBuffer, ForTextEmphasisOrNot forTextEmphasis) const
@@ -414,8 +413,8 @@ float Font::floatWidthForSimpleText(const TextRun& run, GlyphBuffer* glyphBuffer
it.advance(run.length(), glyphBuffer);
if (glyphOverflow) {
- glyphOverflow->top = max<int>(glyphOverflow->top, ceilf(-it.minGlyphBoundingBoxY()) - ascent());
- glyphOverflow->bottom = max<int>(glyphOverflow->bottom, ceilf(it.maxGlyphBoundingBoxY()) - descent());
+ glyphOverflow->top = max<int>(glyphOverflow->top, ceilf(-it.minGlyphBoundingBoxY()) - fontMetrics().ascent());
+ glyphOverflow->bottom = max<int>(glyphOverflow->bottom, ceilf(it.maxGlyphBoundingBoxY()) - fontMetrics().descent());
glyphOverflow->left = ceilf(it.firstGlyphOverflow());
glyphOverflow->right = ceilf(it.lastGlyphOverflow());
}