The spelling dots on Mac and iOS have the same visual appearance up to color. As a step towards having the spelling dots in WebKit on iOS more closely match the spelling dots on iOS we should share the same painting code used in WebKit on Mac. A side benefit of sharing more code between Mac and iOS is that this will fix rendering artifacts when painting spelling dots on iOS when the page is zoomed.
Another benefit is that we get to remove a lot of code :P
Created attachment 347731 [details] Patch
An example of a rendering artifact when painting the bitmap dots on iOS can be see in attachment #347552 [details] (bug #188762).
Created attachment 347733 [details] Patch
Comment on attachment 347731 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=347731&action=review > Source/WebCore/platform/graphics/cocoa/GraphicsContextCocoa.mm:220 > + // Cocoa platform use the theme to paint the platform document markers. Uses the theme?
(In reply to Simon Fraser (smfr) from comment #5) > Comment on attachment 347731 [details] > Patch > > View in context: > https://bugs.webkit.org/attachment.cgi?id=347731&action=review > > > Source/WebCore/platform/graphics/cocoa/GraphicsContextCocoa.mm:220 > > + // Cocoa platform use the theme to paint the platform document markers. > > Uses the theme? Maybe "Cocoa platforms use RenderTheme::drawLineForDocumentMarker() to paint the platform document markers."?
Created attachment 347746 [details] Patch Updated code comment per comment 6. Removed more codez.
(In reply to Daniel Bates from comment #0) > A side benefit of sharing more code between Mac and iOS is that this will > fix rendering artifacts when painting spelling dots on iOS when the page is > zoomed. This issue is tracked in <rdar://problem/15966403>.
Created attachment 347809 [details] Patch
Comment on attachment 347809 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=347809&action=review > Source/WebCore/rendering/RenderThemeCocoa.mm:29 > #if ENABLE(APPLE_PAY) Er, why are all these #includes under ENABLE(APPLE_PAY)? I think you'll have to move out those you need for drawLineForDocumentMarker().
Comment on attachment 347809 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=347809&action=review >> Source/WebCore/rendering/RenderThemeCocoa.mm:29 >> #if ENABLE(APPLE_PAY) > > Er, why are all these #includes under ENABLE(APPLE_PAY)? I think you'll have to move out those you need for drawLineForDocumentMarker(). Will fix before landing.
Created attachment 347972 [details] For landing
Committed r235378: <https://trac.webkit.org/changeset/235378>
<rdar://problem/43758062>
*** Bug 135666 has been marked as a duplicate of this bug. ***