[webkit-reviews] review granted: [Bug 52403] [chromium] drop backwards iteration in Linux complex text code : [Attachment 78866] Patch
bugzilla-daemon at webkit.org
bugzilla-daemon at webkit.org
Thu Jan 13 16:07:50 PST 2011
Tony Chang <tony at chromium.org> has granted Evan Martin <evan at chromium.org>'s
request for review:
Bug 52403: [chromium] drop backwards iteration in Linux complex text code
https://bugs.webkit.org/show_bug.cgi?id=52403
Attachment 78866: Patch
https://bugs.webkit.org/attachment.cgi?id=78866&action=review
------- Additional Comments from Tony Chang <tony at chromium.org>
View in context: https://bugs.webkit.org/attachment.cgi?id=78866&action=review
> Source/WebCore/platform/graphics/chromium/FontLinux.cpp:247
> + for (int glyphIndex = 0; static_cast<unsigned>(glyphIndex) <
controller.length(); ++glyphIndex) {
> + int advance =
truncateFixedPointToInteger(controller.advances()[glyphIndex]);
> + int nextX = static_cast<int>(controller.xPositions()[glyphIndex]);
> + nextX += advance / 2;
> + if (std::min(nextX, lastX) <= targetX && targetX <= std::max(nextX,
lastX))
> + return glyphIndex;
> + lastX = nextX;
A comment explaining this loop sounds like it would be worthwhile.
More information about the webkit-reviews
mailing list