Changeset 107097 in webkit


Ignore:
Timestamp:
Feb 8, 2012 9:15:42 AM (12 years ago)
Author:
caryclark@google.com
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):

Location:
trunk/Source/WebCore
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebCore/ChangeLog

    r107093 r107097  
     12012-02-08  Cary Clark  <caryclark@google.com>
     2
     3        [Skia Mac] Make misspelling underline dots unclipped
     4        https://bugs.webkit.org/show_bug.cgi?id=78117
     5        http://code.google.com/p/chromium/issues/detail?id=113154
     6
     7        Reviewed by Stephen White.
     8
     9        No new tests. Existing layout tests cover this.
     10
     11        As is done on the CoreGraphics Mac platform, adjust the
     12        underline width to remove partial dots, not including the
     13        trailing transparent pixel column.
     14
     15        * platform/graphics/skia/GraphicsContextSkia.cpp:
     16        (WebCore::GraphicsContext::drawLineForTextChecking):
     17
    1182012-02-08  Pavel Feldman  <pfeldman@google.com>
    219
  • trunk/Source/WebCore/platform/graphics/skia/GraphicsContextSkia.cpp

    r105468 r107097  
    722722#if PLATFORM(CHROMIUM) && OS(DARWIN)
    723723    SkScalar originY = WebCoreFloatToSkScalar(pt.y());
     724    // Make sure to draw only complete dots.
     725    int rowPixels = misspellBitmap->width();
     726    float widthMod = fmodf(width, rowPixels);
     727    if (rowPixels - widthMod > 1)
     728        width -= widthMod;
    724729#else
    725730    // Offset it vertically by 1 so that there's some space under the text.
Note: See TracChangeset for help on using the changeset viewer.