From 733e4cfb8b3cae83daff5cc7a426ee901227dbc6 Mon Sep 17 00:00:00 2001 From: Anders Edenbrandt Date: Wed, 10 Feb 2010 10:41:22 +0100 Subject: Fix focus ring on links with non-latin text When a clickable link in a HTML document is focused, a rectangle with rounded corners is drawn around that link. If the link contains Arabic characters (or characters from other non-latin alphabets) the focus ring will be drawn too high up on the page. Change-Id: Ia589236c4e315af76c6e8f746cc99af63e7e53d7 --- WebCore/platform/graphics/android/FontAndroid.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'WebCore') diff --git a/WebCore/platform/graphics/android/FontAndroid.cpp b/WebCore/platform/graphics/android/FontAndroid.cpp index a430b07..e9cf4c8 100644 --- a/WebCore/platform/graphics/android/FontAndroid.cpp +++ b/WebCore/platform/graphics/android/FontAndroid.cpp @@ -188,7 +188,7 @@ FloatRect Font::selectionRectForComplexText(const TextRun& run, SkScalar spacing = paint.getFontMetrics(&metrics); return FloatRect(point.x(), - point.y() - floorf(SkScalarToFloat(-metrics.fAscent)), + point.y(), roundf(SkScalarToFloat(width)), roundf(SkScalarToFloat(spacing))); } -- cgit v1.1