Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1573)

Unified Diff: Source/platform/fonts/Font.cpp

Issue 824263003: At some places Blink is using old style character string notation (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 6 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
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.
« no previous file with comments | « no previous file | Source/platform/fonts/shaping/SimpleShaper.cpp » ('j') | Source/platform/fonts/shaping/SimpleShaper.cpp » ('J')

Powered by Google App Engine
This is Rietveld 408576698