diff options
author | George Mount <mount@google.com> | 2011-11-30 15:28:07 -0800 |
---|---|---|
committer | George Mount <mount@google.com> | 2011-11-30 15:28:07 -0800 |
commit | 1c0dc8f01cc996f5356b59341d2ecaecaad96c3a (patch) | |
tree | a08c40de3877612dee28c1c34cce3fb79ca6590c | |
parent | 8455890bc9390c647ebc53fe5a8d2f7557c10dba (diff) | |
download | external_webkit-1c0dc8f01cc996f5356b59341d2ecaecaad96c3a.zip external_webkit-1c0dc8f01cc996f5356b59341d2ecaecaad96c3a.tar.gz external_webkit-1c0dc8f01cc996f5356b59341d2ecaecaad96c3a.tar.bz2 |
Fix unsigned/signed int problem in Complex font layout.
Bug 5646179
Offsets were unsigned int, but they can be negative.
Change-Id: I7b5111925788eea10ebd0087342d6318015c3672
-rw-r--r-- | Source/WebCore/platform/graphics/android/FontAndroid.cpp | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/Source/WebCore/platform/graphics/android/FontAndroid.cpp b/Source/WebCore/platform/graphics/android/FontAndroid.cpp index 8fe27a8..56b50f0 100644 --- a/Source/WebCore/platform/graphics/android/FontAndroid.cpp +++ b/Source/WebCore/platform/graphics/android/FontAndroid.cpp @@ -380,7 +380,7 @@ static int truncateFixedPointToInteger(HB_Fixed value) // can call |reset| to start over again. class TextRunWalker { public: - TextRunWalker(const TextRun&, unsigned, unsigned, const Font*); + TextRunWalker(const TextRun&, int, int, const Font*); ~TextRunWalker(); bool isWordBreak(unsigned, bool); @@ -488,9 +488,9 @@ private: uint16_t* m_glyphs16; // A vector of 16-bit glyph ids. SkPoint* m_positions; // A vector of positions for each glyph. ssize_t m_indexOfNextScriptRun; // Indexes the script run in |m_run|. - const unsigned m_startingX; // Offset in pixels of the first script run. - const unsigned m_startingY; // Offset in pixels of the first script run. - unsigned m_offsetX; // Offset in pixels to the start of the next script run. + const int m_startingX; // Offset in pixels of the first script run. + const int m_startingY; // Offset in pixels of the first script run. + int m_offsetX; // Offset in pixels to the start of the next script run. unsigned m_pixelWidth; // Width (in px) of the current script run. unsigned m_numCodePoints; // Code points in current script run. unsigned m_glyphsArrayCapacity; // Current size of all the Harfbuzz arrays. @@ -521,7 +521,7 @@ const char* TextRunWalker::paths[] = { "/system/fonts/DroidSansThai.ttf" }; -TextRunWalker::TextRunWalker(const TextRun& run, unsigned startingX, unsigned startingY, const Font* font) +TextRunWalker::TextRunWalker(const TextRun& run, int startingX, int startingY, const Font* font) : m_font(font) , m_startingX(startingX) , m_startingY(startingY) |