Title: [107097] trunk/Source/WebCore
Revision
107097
Author
carycl...@google.com
Date
2012-02-08 09:15:42 -0800 (Wed, 08 Feb 2012)

Log Message

[Skia Mac] Make misspelling underline dots unclipped
https://bugs.webkit.org/show_bug.cgi?id=78117
http://code.google.com/p/chromium/issues/detail?id=113154

Reviewed by Stephen White.

No new tests. Existing layout tests cover this.

As is done on the CoreGraphics Mac platform, adjust the
underline width to remove partial dots, not including the
trailing transparent pixel column.

* platform/graphics/skia/GraphicsContextSkia.cpp:
(WebCore::GraphicsContext::drawLineForTextChecking):

Modified Paths

Diff

Modified: trunk/Source/WebCore/ChangeLog (107096 => 107097)


--- trunk/Source/WebCore/ChangeLog	2012-02-08 17:05:08 UTC (rev 107096)
+++ trunk/Source/WebCore/ChangeLog	2012-02-08 17:15:42 UTC (rev 107097)
@@ -1,3 +1,20 @@
+2012-02-08  Cary Clark  <carycl...@google.com>
+
+        [Skia Mac] Make misspelling underline dots unclipped
+        https://bugs.webkit.org/show_bug.cgi?id=78117
+        http://code.google.com/p/chromium/issues/detail?id=113154
+
+        Reviewed by Stephen White.
+
+        No new tests. Existing layout tests cover this.
+
+        As is done on the CoreGraphics Mac platform, adjust the
+        underline width to remove partial dots, not including the
+        trailing transparent pixel column.
+
+        * platform/graphics/skia/GraphicsContextSkia.cpp:
+        (WebCore::GraphicsContext::drawLineForTextChecking):
+
 2012-02-08  Pavel Feldman  <pfeld...@google.com>
 
         Web Inspector: bind entire subtree upon childNodeInserted so that text node were accounted.

Modified: trunk/Source/WebCore/platform/graphics/skia/GraphicsContextSkia.cpp (107096 => 107097)


--- trunk/Source/WebCore/platform/graphics/skia/GraphicsContextSkia.cpp	2012-02-08 17:05:08 UTC (rev 107096)
+++ trunk/Source/WebCore/platform/graphics/skia/GraphicsContextSkia.cpp	2012-02-08 17:15:42 UTC (rev 107097)
@@ -721,6 +721,11 @@
     SkScalar originX = WebCoreFloatToSkScalar(pt.x());
 #if PLATFORM(CHROMIUM) && OS(DARWIN)
     SkScalar originY = WebCoreFloatToSkScalar(pt.y());
+    // Make sure to draw only complete dots.
+    int rowPixels = misspellBitmap->width();
+    float widthMod = fmodf(width, rowPixels);
+    if (rowPixels - widthMod > 1)
+        width -= widthMod;
 #else
     // Offset it vertically by 1 so that there's some space under the text.
     SkScalar originY = WebCoreFloatToSkScalar(pt.y()) + 1;
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
http://lists.webkit.org/mailman/listinfo.cgi/webkit-changes

Reply via email to