RESOLVED FIXED 176949
[Mac] Spelling, grammar and correction dots are painted upside down
https://bugs.webkit.org/show_bug.cgi?id=176949
Summary [Mac] Spelling, grammar and correction dots are painted upside down
Daniel Bates
Reported 2017-09-14 13:24:08 PDT
Sunlight falls from the sky. It does not rise from the earth. The dots are upside down.
Attachments
Patch (3.12 KB, patch)
2017-09-14 13:26 PDT, Daniel Bates
simon.fraser: review+
[Screenshot] Before patch (4.17 KB, image/png)
2017-09-14 13:27 PDT, Daniel Bates
no flags
[Screenshot] After patch (4.20 KB, image/png)
2017-09-14 13:27 PDT, Daniel Bates
no flags
[Screenshot] TextEdit (4.36 KB, image/png)
2017-09-14 13:28 PDT, Daniel Bates
no flags
Radar WebKit Bug Importer
Comment 1 2017-09-14 13:25:05 PDT
Daniel Bates
Comment 2 2017-09-14 13:26:35 PDT
Daniel Bates
Comment 3 2017-09-14 13:27:01 PDT
Created attachment 320806 [details] [Screenshot] Before patch
Daniel Bates
Comment 4 2017-09-14 13:27:13 PDT
Created attachment 320807 [details] [Screenshot] After patch
Daniel Bates
Comment 5 2017-09-14 13:28:49 PDT
Created attachment 320808 [details] [Screenshot] TextEdit For comparison, attached screenshot of the same text seen in the Before patch and After patch screenshots rendered in TextEdit with spelling and grammar checking enabled.
Daniel Bates
Comment 6 2017-09-14 13:39:34 PDT
If you look closely at screenshots "After patch" (attachment #320807 [details]) and "TextEdit" (attachment #320808 [details]) you will notice that the dots are shifted to the right in the latter. Filed bug #176951 to address this issue.
Simon Fraser (smfr)
Comment 7 2017-09-14 14:15:35 PDT
Comment on attachment 320805 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=320805&action=review > Source/WebCore/platform/graphics/cocoa/GraphicsContextCocoa.mm:322 > + CGContextClipToRect(context, destinationRect); Might as well convert this function (replace the CGContextSaveGState above this diff) to use CGContextStateSaver. > Source/WebCore/platform/graphics/cocoa/GraphicsContextCocoa.mm:333 > // FIXME: Rather than getting the NSImage and then picking the CGImage from it, we should do what iOS does and > // just load the CGImage in the first place. Should we actually do this bit now?
Daniel Bates
Comment 8 2017-09-14 14:47:46 PDT
(In reply to Simon Fraser (smfr) from comment #7) > Comment on attachment 320805 [details] > Patch > > View in context: > https://bugs.webkit.org/attachment.cgi?id=320805&action=review > > > Source/WebCore/platform/graphics/cocoa/GraphicsContextCocoa.mm:322 > > + CGContextClipToRect(context, destinationRect); > > Might as well convert this function (replace the CGContextSaveGState above > this diff) to use CGContextStateSaver. > OK. > > Source/WebCore/platform/graphics/cocoa/GraphicsContextCocoa.mm:333 > > // FIXME: Rather than getting the NSImage and then picking the CGImage from it, we should do what iOS does and > > // just load the CGImage in the first place. > > Should we actually do this bit now? I do not see the need to do this now. Moreover, I suggest we look to make the Mac code use a CGPattern as we do for iOS. This will achieve the same effect as the FIXME above (to have the Mac and iOS code paths use CG objects and operations) and will allow us to remove an earlier FIXME in this function: <https://trac.webkit.org/browser/trunk/Source/WebCore/platform/graphics/cocoa/GraphicsContextCocoa.mm?rev=221485#L304>.
Daniel Bates
Comment 9 2017-09-14 16:52:40 PDT
Note You need to log in before you can comment on or make changes to this bug.