Bug 188828 - Spelling dots do not scale with page on iOS; share spelling dot painting code between Mac and iOS
Summary: Spelling dots do not scale with page on iOS; share spelling dot painting code...
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: WebCore Misc. (show other bugs)
Version: WebKit Local Build
Hardware: iPhone / iPad iOS 11
: P2 Normal
Assignee: Daniel Bates
URL:
Keywords: InRadar
: 135666 (view as bug list)
Depends on:
Blocks:
 
Reported: 2018-08-21 16:41 PDT by Daniel Bates
Modified: 2020-01-16 10:07 PST (History)
4 users (show)

See Also:


Attachments
Patch (55.05 KB, patch)
2018-08-21 16:59 PDT, Daniel Bates
no flags Details | Formatted Diff | Diff
Patch (44.67 KB, patch)
2018-08-21 17:03 PDT, Daniel Bates
no flags Details | Formatted Diff | Diff
Patch (50.15 KB, patch)
2018-08-21 18:00 PDT, Daniel Bates
no flags Details | Formatted Diff | Diff
Patch (50.27 KB, patch)
2018-08-22 09:40 PDT, Daniel Bates
no flags Details | Formatted Diff | Diff
For landing (50.40 KB, patch)
2018-08-23 16:47 PDT, Daniel Bates
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Daniel Bates 2018-08-21 16:41:00 PDT
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.
Comment 1 Daniel Bates 2018-08-21 16:41:42 PDT
Another benefit is that we get to remove a lot of code :P
Comment 2 Daniel Bates 2018-08-21 16:59:04 PDT
Created attachment 347731 [details]
Patch
Comment 3 Daniel Bates 2018-08-21 17:01:29 PDT
An example of a rendering artifact when painting the bitmap dots on iOS can be see in attachment #347552 [details] (bug #188762).
Comment 4 Daniel Bates 2018-08-21 17:03:40 PDT
Created attachment 347733 [details]
Patch
Comment 5 Simon Fraser (smfr) 2018-08-21 17:04:03 PDT
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?
Comment 6 Daniel Bates 2018-08-21 17:06:10 PDT
(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."?
Comment 7 Daniel Bates 2018-08-21 18:00:45 PDT
Created attachment 347746 [details]
Patch

Updated code comment per comment 6. Removed more codez.
Comment 8 Daniel Bates 2018-08-22 09:32:25 PDT
(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>.
Comment 9 Daniel Bates 2018-08-22 09:40:22 PDT
Created attachment 347809 [details]
Patch
Comment 10 Simon Fraser (smfr) 2018-08-23 15:25:40 PDT
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 11 Daniel Bates 2018-08-23 16:20:03 PDT
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.
Comment 12 Daniel Bates 2018-08-23 16:47:24 PDT
Created attachment 347972 [details]
For landing
Comment 13 Daniel Bates 2018-08-27 10:06:22 PDT
Committed r235378: <https://trac.webkit.org/changeset/235378>
Comment 14 Radar WebKit Bug Importer 2018-08-27 10:07:26 PDT
<rdar://problem/43758062>
Comment 15 Daniel Bates 2020-01-16 10:07:45 PST
*** Bug 135666 has been marked as a duplicate of this bug. ***