Index: Source/platform/fonts/Font.cpp |
diff --git a/Source/platform/fonts/Font.cpp b/Source/platform/fonts/Font.cpp |
index 18633d16b7141a4ad1127f448d0c3b4d437381d3..b17467f081632b527a47ccf8f2b7ae1a31e7afa1 100644 |
--- a/Source/platform/fonts/Font.cpp |
+++ b/Source/platform/fonts/Font.cpp |
@@ -780,12 +780,15 @@ float Font::floatWidthForComplexText(const TextRun& run, HashSet<const SimpleFon |
if (!shaper.shape()) |
return 0; |
- glyphBounds->setTop(ceilf(-shaper.glyphBoundingBox().y())); |
- glyphBounds->setBottom(ceilf(shaper.glyphBoundingBox().maxY())); |
- glyphBounds->setLeft(std::max<int>(0, ceilf(-shaper.glyphBoundingBox().x()))); |
- glyphBounds->setRight(std::max<int>(0, ceilf(shaper.glyphBoundingBox().maxX() - shaper.totalWidth()))); |
+ FloatRect glyphBoundingBox = shaper.glyphBoundingBox(); |
jbroman
2014/12/30 14:42:56
FWIW, these are both just members of HarfBuzzShape
h.joshi
2015/01/04 16:22:35
Removed these change in new patch.
Yes this change
|
+ float totalWidth = shaper.totalWidth(); |
- return shaper.totalWidth(); |
+ glyphBounds->setTop(ceilf(-glyphBoundingBox.y())); |
+ glyphBounds->setBottom(ceilf(glyphBoundingBox.maxY())); |
+ glyphBounds->setLeft(std::max<int>(0, ceilf(-glyphBoundingBox.x()))); |
+ glyphBounds->setRight(std::max<int>(0, ceilf(glyphBoundingBox.maxX() - totalWidth))); |
+ |
+ return totalWidth; |
} |
// Return the code point index for the given |x| offset into the text run. |